restvo.blogg.se

Lyx update
Lyx update











lyx update
  1. #Lyx update how to#
  2. #Lyx update code#

If everything went successfully, you should see that the "Balance" field of your Universal Profile has been updated! Paste the address of the Universal Profile in the address field in the top right corner of the block explorer. Check the balance of your Universal Profile on the LUKSO L16 Block Explorer ⬇️.Make a tweet with your UP address and paste the tweet's url in the input field and click the "Give me LYX" button.In order to send LYX from our Universal Profile, we will first request some free test LYX for our UP via the L16 Faucet. need to have LYX both in your EOA (which will pay for the transaction fees) and in your Universal Profile (where the LYX will be transferred from).Make sure you have the following dependencies installed before beginning this tutorial: an EOA with some LYX for gas fees and the required permissions for the interaction.the address of our Universal Profile we want to send LYX from.the UniversalProfile contracts ABI from the npm package.To complete this mini-guide, we will need:

lyx update

The chosen EOA needs to have TRANSFERVALUE Permission together with AllowedCalls or SUPER_TRANSFERVALUE Permission. _data: empty ( 0x since we are just transferring LYX)._value: the amount of LYX we want to transfer (in Wei)._to: the address we want to send LYX to (Externally Owned Account or contract address).Transferring LYX from our UP is as simple as making a standard CALL to any address, attaching some value to the call.įor a regular LYX transfer, the parameters will be: We can use this function to transfer LYX from our UP to any address (including another UP).

lyx update

This function takes four arguments (see ERC725 API docs). The execute(operation,to,value,data) function from ERC725X enable us to use our UP to interact with other addresses, such as transferring LYX or calling other smart contracts.

#Lyx update how to#

We previously saw how to use setData(.) to update data in our UP contract's storage. In our Edit a Universal Profile guide, we saw the basics of interacting with our UP to edit our profile info. This smart contract acts as its controller. In our Create a Universal Profile guide, we saw in the Universal Profile architecture diagram that the owner of a Universal Profile (UP) is a Key Manager (KM). Remember that you will have to provide a controller key (EOA) of your Universal Profile in order to transfer funds.

#Lyx update code#

If you want to run the code as standalone JavaScript files within the terminal or the browser, you can open the lukso-playground repository or use the correlated StackBlitz page. A complete "ready to use" JS file is available at the end in the Final Code section.













Lyx update