Solana: How to get the NFT metadata account?

I can present to you the Supolist Stati O Tom, how to get a quoted record of the metadadne nft with the use of the software interface of Solana (API). I also include some shagies for the shooting of the nepot and potential resolutions.

Related Uthetno Metadno NFT in Solan

In this state, we disperse, how to access access to the NFT metadades on the solana blockchain. We disperse the unusual code, the identifies of the cuts and the step that you have started.

PROVIDERS

Earsting in the statutory, what you have:

  • Drinking Solana (for example, solana cli, web3.js)

  • The sign with the tongue of the programming

  • Kontract on Methalist NFT, Expired on Your blockchain solana

Program Acquint Interface (API)

In Solana, we use the Akkunt (API) program interfense for the dimingets with the cuts and programs on the blockchain. To make access to a given centening record, you need to submit the “seed” argument with the IDENTIFTER STICE RECTIONS.

Primer code

`

Pragma Polidy ^0.8,0;

Import “

CONTACT MYNFTMETADA {

to be enclosed by a partial methodoacouut;

FUNCTION GETMETADATA () PUBLIC RETURN (Address) {

Trebat (

MetadataAaccount! = 0, // Pierce, Actual Li Identifikator

“Methodotaacunt may not be zero”

);

Return the methodoacone;

}

Constructor () {

/

Seeds = [b “meta_data”, mpl_token_metadata :: id.as_ref ()];

MetadataAaccount = 0x …; // Out on your own addresses of metadanic

}

}

`

In this, we use the library AccountProgrammaticanterface for access to KMetadataAaccount '. We initiate the massive semen two elements:” Meta_data “andMPL_TOKEN_METADATA :: ID.

#0

The "Semyan" argument is an unusual field, which is assured by the Massist of the Four Significances:

  • Strike, introduced by the name of the staff (for example, "metadanic")

  • The Address Counter -on the Program Interface

  • Tip data to which you want to get accessed

  • Identifier your ucellant records (inappropriately)

Obligatory changeB” Meta_data “andmpl_token_metadata :: ID.As_ref ()with your factual identification.

shooting nepotoja Shagov

If you have a table with the problems that have access to the metadntic recording, please try the following:

1.

  • The Library Version Library : Encourage that you use the Library of LibraryAccountProgrammactintinterfacewith the web -sala labs.

3.

4.

solving

Solana: How to get the NFT metadata account?

If you have everything else you still take the problems, please try the pursuit:

RemoveB” Meta_data “on the intersection, the introduction name of the UCHA.

Seeds = [b “accountname”, mpl_token_metadata :: id.as_ref ()];

`

Obligatory the code of your contraction.

The follow -up of these Shaga and Council, you are able to quickly access the NFT Metadata Nuts on your solana blockchain. If you continue to stack with the problems, do not stir about the more helpful help or introduce a more sophisticated information about your problem.

ETHEREUM ADDRESS

leave your comment

Your email address will not be published. Required fields are marked *

Recent Comments

No comments to show.

Search

Recent comments

    Top