feat: add ERC-6909 Token and Supply extension#777
Merged
Conversation
onurinanc
requested review from
0xNeshi,
bidzyyys and
qalisander
as code owners
August 7, 2025 09:36
✅ Deploy Preview for contracts-stylus canceled.
|
1 task
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 16796 +982
==========================================
+ Hits 15097 16072 +975
- Misses 717 724 +7 ☔ View full report in Codecov by Sentry. |
qalisander
approved these changes
Nov 26, 2025
qalisander
left a comment
Member
There was a problem hiding this comment.
@onurinanc great job and lgtm!
0xNeshi
reviewed
Nov 26, 2025
0xNeshi
self-requested a review
November 26, 2025 09:26
0xNeshi
reviewed
Nov 26, 2025
Co-authored-by: Nenad <xinef.it@gmail.com>
bidzyyys
reviewed
Nov 26, 2025
bidzyyys
reviewed
Nov 27, 2025
bidzyyys
approved these changes
Nov 27, 2025
bidzyyys
left a comment
Collaborator
There was a problem hiding this comment.
Almost ready to merge.
qalisander
reviewed
Nov 27, 2025
qalisander
reviewed
Nov 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: