-
Notifications
You must be signed in to change notification settings - Fork 31
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
Comments
We aren't accepting those, we will be moving over to ethers.js encoding... eventually... or when someone makes a pr!
Ethers accepts tuples
…Sent from my iPhone
On Jun 16, 2018, at 9:36 PM, NoahMarconi ***@***.***> wrote:
Issue Type
Bug (https://github.com/ethjs/ethjs-abi/blob/master/.github/CONTRIBUTING.md#bug-reports)
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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. |
I see! It's quite simple, use my method interface but run everything through ethers encode and decodeParams methods
…Sent from my iPhone
On Jun 16, 2018, at 11:22 PM, NoahMarconi ***@***.***> wrote:
What's involved in moving the coding 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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
So I'm clear, the fix is to update the main Specifically:
and that's it? |
Well, the results of ethers is slightly different from the current ethjs abi, so there is some conversion of the output data to an object with both array like and contract method output property names (if available).
…Sent from my iPhone
On Jun 17, 2018, at 1:26 PM, NoahMarconi ***@***.***> wrote:
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?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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 |
This needs to be swapped out for ethers.js abo module -- it's been on the agenda forever, it's been hard for me to maintain this and keep it up to date -- if you want, I can explain how to patch it it's pretty straight forward!
Richard with Ethers.js Abi keeps his all up to date -- I'll see if I can hack something today
…Sent from my iPhone
On Oct 30, 2018, at 11:12 AM, Victor ***@***.***> wrote:
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks @SilentCicero for your quick response. Indeed, I'd be interested to have an example for a quick patch ! Many thanks in advance :) |
Is there a solution for this here? I'm running into the same issue |
Issue Type
Description
tuple
type is not checked for: https://github.com/ethjs/ethjs-abi/blob/master/src/utils/index.js#L298Steps to reproduce
https://ethfiddle.com/VxkWJs5sQz
Setter
set
does not accepttuple
type.The text was updated successfully, but these errors were encountered: