-
Notifications
You must be signed in to change notification settings - Fork 73
feat: add ERC-6909 Token and Supply extension #777
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for contracts-stylus canceled.
|
|
Hey, any update on this PR @0xNeshi ? |
Hey @onurinanc! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #777 +/- ##
==========================================
+ Coverage 95.46% 95.68% +0.22%
==========================================
Files 89 91 +2
Lines 15814 16793 +979
==========================================
+ Hits 15097 16069 +972
- Misses 717 724 +7 ☔ View full report in Codecov by Sentry. |
PR Checklist
ERC6909 Implementation in rust-contracts-stylus
Summary
This PR implements the ERC-6909 token and Supply extension in Rust for Arbitrum Stylus.
The following implementation is provided in this PR:
Comments
Integration tests and the benchmarks inside rust-contracts-stylus, which use nitro-testnode, didn't work with the M3 Pro Chip (would be an issue related to Docker). To solve the problem, firstly, [nitro-devnode] is tried to use. However, I observed that it is not suitable for the
e2e::testworkflow. So, an LTS Ubuntu machine is rented on AWS to run the integration tests and the benchmark.For the Supply Extension implementation,
Dereftraits are implemented. UsingDerefallows direct access to Erc6909 methods, improving readability and maintainability. However, deferencing operations might increase the gas. Designing Supply Token Extension in this way increases the abstraction and makes it easy to use for users who would like to use the Supply Extension with ERC-6909 Token Contract.Future Improvements
Currently, this PR does not include other ERC-6909 Extensions, specifically ContentURI and Metadata. Their example usage and the benchmarks should be added to the repository.
The unit tests that differentiate the
idshould be added.Benchmark
Benchmarks for ERC-6909 can be seen as follows: