feat: configurable native token metadata (on-chain, API, CLI)#481
Merged
spreston8 merged 2 commits intorust/stagingfrom Apr 18, 2026
Merged
feat: configurable native token metadata (on-chain, API, CLI)#481spreston8 merged 2 commits intorust/stagingfrom
spreston8 merged 2 commits intorust/stagingfrom
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Adds configurable native token identity (name, symbol, decimals) that is baked into an on-chain Rholang contract at genesis and exposed via the node's API.
TokenMetadataRholang contract deployed at genesis, registered atrho:system:tokenMetadatawith noncei64::MAX(immutable)defaults.confundercasper.genesis-block-data:native-token-name(F1R3CAP),native-token-symbol(F1R3),native-token-decimals(8)--native-token-name,--native-token-symbol,--native-token-decimals(decimals capped at 18, empty/whitespace rejected)/api/statusand gRPCStatusresponse includenativeTokenName,nativeTokenSymbol,nativeTokenDecimalsCloses #477
Files changed (41)
New:
casper/src/main/resources/TokenMetadata.rhox— Rholang contract with 4 methods (name, symbol, decimals, all)casper/src/rust/util/token_metadata_check.rs— on-chain verification + structured loggingcasper/src/test/resources/TokenMetadataTest.rho— contract testcasper/tests/genesis/contracts/token_metadata_spec.rs— Rust test wrapperModified: config structs, genesis pipeline, API layer, compose files, docs
Test plan
cargo check --workspace --testspasses (0 warnings)cargo test --release -p node— 108 passed, 0 failedtest_token_metadata.py) — 18/18 passed in ~2 min (6 parallel workers)Co-Authored-By: Claude noreply@anthropic.com