No support for tuple type
Issue Type
- [x] 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.
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 [email protected] 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 [email protected] 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 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.encodeetherjs-abi.decodeParams->ethers.AbiCoder.decode
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 [email protected] 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 [email protected] 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