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

No support for tuple type #16

Open
1 task done
NoahMarconi opened this issue Jun 17, 2018 · 9 comments
Open
1 task done

No support for tuple type #16

NoahMarconi opened this issue Jun 17, 2018 · 9 comments

Comments

@NoahMarconi
Copy link

Issue Type

Description

tuple type is not checked for: https://github.com/ethjs/ethjs-abi/blob/master/src/utils/index.js#L298

Steps to reproduce

https://ethfiddle.com/VxkWJs5sQz

Setter set does not accept tuple type.

@SilentCicero
Copy link
Member

SilentCicero commented Jun 17, 2018 via email

@NoahMarconi
Copy link
Author

NoahMarconi commented Jun 17, 2018

What's involved in moving the encoding to ethers.js? Maybe I can help; I was using ethers.js to encode my data.

EthFiddle is using your lib which is how I ran into the problem.

@SilentCicero
Copy link
Member

SilentCicero commented Jun 17, 2018 via email

@NoahMarconi
Copy link
Author

So I'm clear, the fix is to update the main index.js methods and defer to ethers.js: https://github.com/ethjs/ethjs-abi/blob/master/src/index.js

Specifically:

  • etherjs-abi.encodeParams -> ethers.AbiCoder.encode
  • etherjs-abi.decodeParams -> ethers.AbiCoder.decode

and that's it?

@SilentCicero
Copy link
Member

SilentCicero commented Jun 17, 2018 via email

@sulliwane
Copy link

Hello,

any progress on this issue? Tuples are supported by the EVM for some months already and more and more solidity code take advantage of it.

I'd prefer not to drop ethjs library in my project as it's very lightweight and has a clean API I love to work with :)

Thanks for your feedback

@SilentCicero
Copy link
Member

SilentCicero commented Oct 30, 2018 via email

@sulliwane
Copy link

Thanks @SilentCicero for your quick response. Indeed, I'd be interested to have an example for a quick patch ! Many thanks in advance :)

@KonScanner
Copy link

Is there a solution for this here? I'm running into the same issue

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