The current abi encoding is outdated. In this PR, I upgrade to v2 version, includes array and tuple encoding.
Minor details:
I did some research on how these projects implement (eth-abi / ethers.js / web3.js), most of them use tuple encoding after. In this PR. I did the same thing, probably need to validate data or format.
TODO:
[x] refactor encoding
[x] refactor decoding
[x] more unit test (eth-abi and ethers.js)
[x] validate / format data
Next:
Improve the function to calculate size of static data, use recursive way right now. It might have performance when decode large or complicate abi (too deep). Maybe set length when parse abi or decode value as data stream.
The current abi encoding is outdated. In this PR, I upgrade to v2 version, includes array and tuple encoding.
Minor details: I did some research on how these projects implement (eth-abi / ethers.js / web3.js), most of them use tuple encoding after. In this PR. I did the same thing, probably need to validate data or format.
TODO:
Next: