Token Metadata extension to form standard.#2439
Token Metadata extension to form standard.#2439afa7789 wants to merge 28 commits into0xMiden:nextfrom
Conversation
9be0d29 to
55282e1
Compare
Replace the single StorageMap-based MetadataExtension with plain value slots for name (2 Words) and content URI (6 Words). - Define 8 value slot names (name_chunk_0..1, content_uri_0..5) - Update MetadataExtension struct to use [Word; 2] and [Word; 6] - Replace MASM `get` proc with `get_name` + `get_content_uri_0..5` - Use @Locals with loc_storew_be/loc_loadw_be to maintain call-frame stack depth of 16 - Update BasicFungibleFaucet and NetworkFungibleFaucet accordingly - Rewrite integration tests for new value-slot access patterns
…undant Info component
…utable_owner_succeeds test
55282e1 to
b1dba96
Compare
| account_storage_mode: AccountStorageMode, | ||
| auth_scheme: AuthScheme, | ||
| name: Option<TokenName>, | ||
| logo_uri: Option<TokenLogoURI>, |
There was a problem hiding this comment.
Why do we have both logo_uri & content_uri? we can rename it later for NFTs
There was a problem hiding this comment.
yeah, renaming it, u right.
There was a problem hiding this comment.
Thank you. contract_uri would be a better option.
|
We should also consider adding the corresponding metadata and the new constructor to the network fungible faucets: https://github.com/afa7789/miden-base/blob/f7426116833b1f76da3195738ccb838a52880f80/crates/miden-standards/src/account/faucets/network_fungible.rs#L93-L101 |
|
@afa7789 we should also add a flag and procedure to change max_supply. It's basically similar to have we have done in |
In this branch ? pr ? |
- Updated all references from content URI to contract URI in metadata module. - Adjusted related functions and tests to reflect the new naming convention. - Modified BasicFungibleFaucet and NetworkFungibleFaucet to include TokenName. - Ensured compatibility in tests for contract URI handling.
Yes, it would be better if you can have this in this PR. |
|
@bobbinth @mmagician this is ready for review :) |
Unified metadata: One place for account/faucet metadata: token (symbol, decimals, max_supply), owner, name, and content URI. Slot names live under miden::standards::metadata::* (and ownable for owner).
Layout: Token metadata and owner in slots 0–1; name in 2 words (name_0, name_1); content URI in 6 words (content_uri_0..5). Same layout in Rust and MASM.
Faucets: Basic and network fungible faucets support optional name and content URI; both re-export metadata getters (get_name, get_content_uri, get_token_metadata, get_max_supply, get_decimals, get_token_symbol; network also get_owner).
Standalone Info: Non-faucet accounts can use the metadata Info component (name + content URI) for future use (e.g. NFTs).
Testing: Unit tests in miden-standards (metadata storage, recovery); integration tests in miden-testing (MASM getters, faucet + metadata).