Skip to content

Oz/metadata extension#2439

Open
afa7789 wants to merge 24 commits into0xMiden:nextfrom
afa7789:oz/metadata_extension
Open

Oz/metadata extension#2439
afa7789 wants to merge 24 commits into0xMiden:nextfrom
afa7789:oz/metadata_extension

Conversation

@afa7789
Copy link
Contributor

@afa7789 afa7789 commented Feb 12, 2026

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).

@afa7789 afa7789 marked this pull request as ready for review February 12, 2026 20:12
@afa7789 afa7789 force-pushed the oz/metadata_extension branch from 9be0d29 to 55282e1 Compare February 14, 2026 12:46
  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
@afa7789 afa7789 force-pushed the oz/metadata_extension branch from 55282e1 to b1dba96 Compare February 14, 2026 12:48
account_storage_mode: AccountStorageMode,
auth_scheme: AuthScheme,
name: Option<TokenName>,
logo_uri: Option<TokenLogoURI>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have both logo_uri & content_uri? we can rename it later for NFTs

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.

2 participants