Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: handling onchain metadata #85

Open
taitruong opened this issue Feb 1, 2024 · 1 comment
Open

feature request: handling onchain metadata #85

taitruong opened this issue Feb 1, 2024 · 1 comment

Comments

@taitruong
Copy link
Collaborator

taitruong commented Feb 1, 2024

This hasnt been considered yet for ICS721 version one, but for upcoming release.

Standard cw721 is designed by having onchain metadatat called extension here: https://github.com/CosmWasm/cw-nfts/blob/main/packages/cw721/src/query.rs#L126-L133

pub struct NftInfoResponse<T> {
    /// Universal resource identifier for this NFT
    /// Should point to a JSON file that conforms to the ERC721
    /// Metadata JSON Schema
    pub token_uri: Option<String>,
    /// You can add any custom metadata here when you extend cw721-base
    pub extension: T,
}

ICS721 allows optional token metadata (token_data) to be transferred as binary. So on receival we just need to unwrap and check whether it matchs with NftInfoResponse struct. If so we can store onchain metadata.

Currently, ICS721 stores cw721-base code id, here we need another code id for cw721-metadata-onchain. Then we're good to go.

@taitruong taitruong changed the title feature: handling onchain metadata feature request: handling onchain metadata Feb 1, 2024
@shanev
Copy link
Member

shanev commented May 22, 2024

Sounds good to me.

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

No branches or pull requests

2 participants