Data
The data
element embedds data, usually used to interact with the
Ethereum blockchain
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">
<ts:type>
<ts:syntax>1.3.6.1.4.1.1466.115.121.1.15</ts:syntax>
</ts:type>
<ts:origins>
<ethereum:call function="getLocality" contract="EntryToken" as="utf8">
<ts:data>
<ts:uint256 ref="tokenId"/>
</ts:data>
</ethereum:call>
</ts:origins>
</ts:attribute>
Define amount used in an Ethereum transaction
<ts:transaction>
<ethereum:transaction function="redeem" contract="aDAI" as="uint">
<ts:data>
<ts:uint256 ref="redeemAmount"/>
</ts:data>
</ethereum:transaction>
</ts:transaction>
Define amount and receiver for a
transactions
<ts:transaction>
<ethereum:transaction function="transfer" contract="DAI">
<ts:data>
<ts:address>
0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016
</ts:address>
<ts:uint256 ref="amount"/>
</ts:data>
</ethereum:transaction>
</ts:transaction>