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

Unable to decode int #25

Open
hswick opened this issue Oct 11, 2018 · 7 comments
Open

Unable to decode int #25

hswick opened this issue Oct 11, 2018 · 7 comments

Comments

@hswick
Copy link

hswick commented Oct 11, 2018

Receiving this error when I try to output an int from a contract method:

** (RuntimeError) Unsupported decoding type: {:int, 256}
    lib/abi/type_decoder.ex:241: ABI.TypeDecoder.decode_type/2
    lib/abi/type_decoder.ex:219: anonymous fn/2 in ABI.TypeDecoder.decode_type/2

Here is a contract method that I'm failing on:

    function getInt() public pure returns (int) {                                                                                                                      
        return (40 - 100);                                                                                                                                             
    }
@hayesgm
Copy link
Contributor

hayesgm commented Oct 16, 2018

@hswick We don't currently support signed integers. I'm sure it'd be easy to add, let me know how important this is for you. Also note: we're slowly deprecating this library in favor of https://github.com/exthereum/ethereum, which contains the ABI library in it.

@hswick
Copy link
Author

hswick commented Oct 17, 2018

Hi @hayesgm thanks for the reply! My goal with ExW3 is to make it feature parity with web3.js, so thats my main desire for integers. Was working on a side project and noticed this feature was missing.

Happy to move to the ethereum repo. Should I be raising issues there from now on? Also, is the abi package going to be available from hex separately from the ethereum package?

@dingpl716
Copy link
Contributor

@hayesgm I would be nice if you add this feature, I also depend on it.

@ghbutton
Copy link

@hayesgm The project you linked to is being deprecated in favor of this one which doesn't seem to have an abi library. Does that mean that this one will continue to move forward?

@hayesgm
Copy link
Contributor

hayesgm commented Jan 17, 2019

I guess you're right that ABI didn't get included in the Exthereum/Mana merge. Sure thing, I'll get these PRs reviewed and mainlined. Sorry for the delay!

@ghbutton
Copy link

It is alright, just trying to understand the state of things

@ghbutton
Copy link

Thank you for maintaining this library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants