Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

331
Views
Add Meta Data To Solana Token with @solana/web3.js

I am trying to create an NFT using web3.js and spl-token.js.

However, i need to add meta data (like the name of the token or other attributes), otherwise it just shows up as "Unknown Token" in my wallet.

This is the relevant part of the code where I am minting the token:

let mint = await splToken.Token.createMint(
    connection,
    fromWallet,
    fromWallet.publicKey,
    null,
    0,
    splToken.TOKEN_PROGRAM_ID
);

Otherwise the code is similar to the answers on this question: I would like to mint a new token on solana. How can I do this using solana-web3.js?

There does not seem to be any documentation whatsoever, except for the structure of the meta data (which I found here: https://docs.phantom.app/integrating/tokens/on-chain-metadata).

If anyone could point me in the right direction with an example or documentation it would be really much appreciated. Thank you!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

In order to add metadata to NFT you need to invoke this program spl_token_metadata::instruction::create_metadata_accounts . You can find the documentation here https://docs.rs/spl-token-metadata/latest/spl_token_metadata/instruction/fn.create_metadata_accounts.html

about 4 years ago · Juan Pablo Isaza Report

0

Create a metadata for an NFT token in Solana is quite complicated. It is because in Solana SPL-token account would not carry the Metadata. Instead, you have to create another account to carry such data. So, I suggest you to use Metaplex's Candy Machine to make your own NFT with Metadata. You may get more information from their github: https://github.com/metaplex-foundation/metaplex/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!