TokenScript icon indicating copy to clipboard operation
TokenScript copied to clipboard

factor in decimal as the property of the contract

Open SmartLayer opened this issue 3 years ago • 0 comments

The contract has to have the decimal property applied to many but not all attributes, instead of them being specified as as="e16"

Example scenario where as wouldn't solve the problem:

<ts:attribute name="pairedTokenAllowance">
    <ts:type>
        <ts:syntax>1.3.6.1.4.1.1466.115.121.1.27</ts:syntax>
    </ts:type>
    <ts:origins>
        <ethereum:call function="allowance" contract="pair">
            <ts:data>
                <ts:address ref="ownerAddress"></ts:address>
                <ts:address ref="CoFiXRouter"></ts:address>
            </ts:data>
        </ethereum:call>
    </ts:origins>
</ts:attribute>

It's also important to be able to specify decimal in TS instead of through reference to the contract decimals public method since many contracts don't implement it, such as CoFiXPair.sol

SmartLayer avatar Nov 06 '20 01:11 SmartLayer