Skip to content

Conversation

@georgmay
Copy link

Add name(), symbol(), and decimals() functions to the IERC20.sol interface as per the ERC-20 specification. These functions are marked as optional metadata functions that implementations may provide.

The implementation accesses the pallet_assets::Metadata storage to retrieve token metadata (name, symbol, decimals).

Changes:

  • Added name(), symbol(), decimals() functions to IERC20.sol interface
  • Implemented the three metadata functions in the Rust precompile (lib.rs)
  • Added comprehensive test coverage for the new metadata functions (tests.rs)
  • Added prdoc documentation for the changes

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jan 30, 2026

User @georgmay, please sign the CLA here.

@georgmay georgmay force-pushed the erc20-metadata-functions branch from 054bdc1 to c6e4ba2 Compare January 30, 2026 13:15
@georgmay georgmay changed the title feat(ethereum-standards): add optional ERC20 metadata functions ethereum-standards: add optional ERC20 metadata functions Jan 30, 2026
@georgmay georgmay force-pushed the erc20-metadata-functions branch 2 times, most recently from a23b4d5 to f0d2964 Compare January 30, 2026 13:29
Add name(), symbol(), and decimals() functions to the IERC20.sol interface
as per the ERC-20 specification. These functions are marked as optional
metadata functions that implementations may provide.

The implementation accesses the pallet_assets::Metadata storage to retrieve
token metadata (name, symbol, decimals).

Changes:
- Added name(), symbol(), decimals() functions to IERC20.sol interface
- Implemented the three metadata functions in the Rust precompile (lib.rs)
- Added comprehensive test coverage for the new metadata functions (tests.rs)
- Added prdoc documentation for the changes
@georgmay georgmay force-pushed the erc20-metadata-functions branch from f0d2964 to fd4043b Compare January 30, 2026 13:32
@georgmay georgmay closed this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant