Skip to content

reduce learning curve by sticking to ABI construction #191

@SmartLayer

Description

@SmartLayer

Consider this:

        <ts:transaction>
            <ts:ethereum function="transfer" contract="dai">
                <ts:data>
                    <!-- to convert erc20 DAI to native xDAI, transfer to this address -->
                    <ts:address>0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016</ts:address>
                    <ts:uint256 ref="amount"/>
                </ts:data>
            </ts:ethereum>
        </ts:transaction>

I'm inclined to do this:

        <ts:transaction>
            <ts:ethereum>
                <ts:to   contract="dai"/>
                <ts:data function="transfer">
                    <!-- to convert erc20 DAI to native xDAI, transfer to this address -->
                    <ts:address>0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016</ts:address>
                    <ts:uint256 ref="amount"/>
                </ts:data>
            </ts:ethereum>
        </ts:transaction>

How do you think? Note that I used contract instead of ref as an attribute for <to> because they meant differently. One is a reference to contract; the other is a reference to an attribute.

P.S. This has to be considered together with #163

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions