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

Upgrade ABIEncoding to V2 #344

Merged
merged 7 commits into from
Jan 28, 2024
Merged

Upgrade ABIEncoding to V2 #344

merged 7 commits into from
Jan 28, 2024

Conversation

sc0Vu
Copy link
Member

@sc0Vu sc0Vu commented Jan 25, 2024

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:

  • refactor encoding
  • refactor decoding
  • more unit test (eth-abi and ethers.js)
  • 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.
  • Improve validator.

@sc0Vu sc0Vu added the WIP label Jan 25, 2024
@sc0Vu sc0Vu changed the title Upgrade ABIEncoding to V2 [WIP] Upgrade ABIEncoding to V2 Jan 25, 2024
@sc0Vu sc0Vu changed the title [WIP] Upgrade ABIEncoding to V2 Upgrade ABIEncoding to V2 Jan 28, 2024
@sc0Vu sc0Vu merged commit c58212a into master Jan 28, 2024
10 checks passed
@sc0Vu sc0Vu deleted the upgrade-eth-abi branch January 28, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant