![]() Due to the design of ESDT tokens, smart contracts can manage tokens with ease, and they can even react to an ESDT transfer. The protocol guarantees that no Account can modify the storage of ESDT tokens, neither its own nor of other Accounts.ĮSDT tokens can be issued, owned and held by any Account on the Elrond network, which means that both users and smart contracts have the same functionality available to them. It also implies that an Account can hold balances of any number of custom tokens, in addition to the native EGLD balance. Technically, the balances of ESDT tokens held by an Account are stored directly under the data trie of that Account. Sharding is therefore automatically handled and invisible to the user. Users also do not need to worry about sharding when transacting custom tokens, because the protocol employs the same handling mechanisms for ESDT transactions across shards as the mechanisms used for the EGLD token. In effect, this means that custom tokens are as fast and as scalable as the native EGLD token itself. And due to the native in-protocol support, transactions with custom tokens do not require the VM at all. The Elrond network natively supports the issuance of custom tokens, without the need for contracts such as ERC20, but addressing the same use-cases. ESDT stands for Elrond Standard Digital Token.Ĭustom tokens at native speed and scalability, without ERC20 Give the token a description this is critical as it explains to the end user what the token is used for eg “This token is used to set the competition to Open or Closed when the competition ends simply change the text here to Closed and it will update the site”ĭ.Ğnter the content you would like the Token to show in this case just the word OpenĢ) This Custom token is now saved and can be used throughout the site to see a list of all tokens on the site go to /admin/help/token all Custom tokens are found under the Custom list eg ģ) Navigate to the page / area you will be using this Custom Token on and place it where ever it is needed making sure to set “Text format” to Full HTML if you do not set the Text format to Full HTML the token will not be processed and it will just display įeel free to delete / edit the above Addition to notes if needed contributed by: BeeOnLion". Give the token a human understandable name eg CompetitionOpenOrCloseī. ![]() ġ) Go to Structure > Custom Tokens > Add TokenĪ. I only "moved" them to what I think is the most appropriate spot for this (great!) docu. Therefore, if your custom tokens include other tokens and/or PHP code, then the "Body" box in which you place your tokens must use the same text format that you used to define them, so that the other tokens and/or PHP get evaluated.Ĭredits: the above details are only like a cut-and-paste from issue #2486205: Docu about how to use the Custom Tokens module. ![]() It doesn't evaluate it first and then send it. If you enter your custom tokens directly in your webpages, note that "Custom Token" sends what you put in the "Content" box to the page.If you want to be able to enter your token directly in your webpages instead of just via other modules, then get the " Token filter" module.The "Demo" column should show the value of your token. Your new token should appear in the table of custom tokens. If you are using PHP and you want to include a previously defined token in your code, put the token in "token_replace()" (see Replacing Tokens In A String in the Token documentation.).In the "Content" box, wrap any PHP code in.Even if your token is just plain text, don't use the "Plain text" format unless you want the token wrapped in.If you want your token to execute some PHP code to decide what it should say, then use a text format that includes the filter, "PHP evaluator" (which requires that the core "PHP filter" module be enabled).If you want to include a previously defined token in your new token, then use a text format that includes the filter, "Replace tokens".For "Text format" (under the "Content" box):.In the "Content" box, enter what you want your token to say.Should we always leave it as "Custom" or are there situations where we'd want to use a different type?) ![]() (I don't know what to say about token type.Steps to start using the Custom Tokens module:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |