The data element embedds data, usually used to interact with the Ethereum blockchain

The data element is like a carrier: It contains different elements of data. Usually it is used inside an ethereum element to declare the data used for smart contract calls or transaction creation.

Code Examples

Define the needed data for an Ethereum call to fill an attribute

<ts:attribute name="locality">
        <ethereum:call function="getLocality" contract="EntryToken" as="utf8">
              <ts:uint256 ref="tokenId"/>

Define amount used in an Ethereum transaction

      <ethereum:transaction function="redeem" contract="aDAI" as="uint">
               <ts:uint256 ref="redeemAmount"/>

Define amount and receiver for a transactions

    <ethereum:transaction function="transfer" contract="DAI">
         <ts:uint256 ref="amount"/>

Related information


We make tokens smart

Smart Token Labs is the creator of TokenScript and AlphaWallet two open source solutions for a tokenized future.