Bytes32
The bytes32
Element is used to define data used in interactions with
Ethereum blockchain.
bytes32
element doesn't need a starting and
a closing element to embedd information, but can stand alone, like
<ts:bytes32 local-ref="nodeHash" />
. Code Examples
Setting an Attribute with an Ethereum call:
<ts:attribute name="emailRecord">
<ts:type>
<ts:syntax>1.3.6.1.4.1.1466.115.121.1.15</ts:syntax>
</ts:type>
<ts:origins>
<ethereum:call as="utf8" contract="PublicResolver" function="text">
<ts:data>
<ts:bytes32 local-ref="nodeHash"/>
<ts:string>email</ts:string>
</ts:data>
</ethereum:call>
</ts:origins>
</ts:attribute>
Creating an Ethereum transaction:
<ts:transaction>
<ethereum:transaction function="setText" contract="PublicResolver" as="bool">
<ts:data>
<ts:bytes32 local-ref="nodeHash"/>
<ts:string>email</ts:string>
<ts:string ref="newRecordValue"/>
</ts:data>
</ethereum:transaction>
</ts:transaction>