Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attribute as contract ref does not resolve #337

Open
bitcoinwarrior1 opened this issue Apr 16, 2020 · 2 comments
Open

attribute as contract ref does not resolve #337

bitcoinwarrior1 opened this issue Apr 16, 2020 · 2 comments
Assignees
Labels
ASAP bug Something isn't working

Comments

@bitcoinwarrior1
Copy link
Contributor

bitcoinwarrior1 commented Apr 16, 2020

If I want to dynamically get the address to send a transaction to, I cannot do so as the ref will not resolve.

Take the following:

<ts:attribute-type id="lendingPoolAddress" syntax="1.3.6.1.4.1.1466.115.121.1.15">
  <ts:origins>
    <ts:ethereum function="getLendingPool" contract="LendingPoolAddressesProvider" as="address">
    </ts:ethereum>
  </ts:origins>
</ts:attribute-type>

Fed into this action tx:

<ts:action>
    <ts:name>
        <ts:string xml:lang="en">Deposit</ts:string>
    </ts:name>
    <ts:attribute-type id="mintAmount" syntax="1.3.6.1.4.1.1466.115.121.1.36">
        <ts:name>
            <ts:string xml:lang="en">Amount to Deposit</ts:string>
        </ts:name>
        <ts:origins>
            <!-- e18 is a hard coded multiplier.
            rationale for hardcoding: avoiding over-design  -->
            <ts:user-entry as="e18"/>
        </ts:origins>
    </ts:attribute-type>
    <ts:transaction>
        <ts:ethereum function="deposit" contract="lendingPoolAddress" as="uint">
            <ts:data>
                <ts:address>0x6B175474E89094C44Da98b954EedeAC495271d0F</ts:address>
                <ts:uint256 ref="mintAmount"/>
                <ts:uint256>1101</ts:uint256> <!-- placeholder referral -->
            </ts:data>
        </ts:ethereum>
    </ts:transaction>
    <style type="text/css">&style;</style>
    <ts:view xml:lang="en">&supply.en;</ts:view>
</ts:action>

The contract being set to the lendingPoolAddress as attribute cannot be resolved

@bitcoinwarrior1 bitcoinwarrior1 added the bug Something isn't working label Apr 16, 2020
@bitcoinwarrior1
Copy link
Contributor Author

@colourful-land same problem affects ENS whereby we need the namehash to be fed into another attribute.

@SmartLayer
Copy link

This look like an implementation issue. I'll move this to the right implement project after talking to owners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants