Coder Social home page Coder Social logo

thedonmon / solana-nft-token-metadata-update Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thuglabs/solana-nft-token-metadata-update

0.0 1.0 0.0 319 KB

Node.js script to update NFT Token metadata on Solana Blockchain

JavaScript 28.04% TypeScript 71.96%

solana-nft-token-metadata-update's Introduction

๐ŸŒ… Script to update Solana NFT Token Metadata

This script updates existing NFTs (replaces json metadata) created with Candy Machine on the blockchain with updated metadata. It have 2 commands: download-meta current metadata and update with new metadata.

Demo

update.token.demo.mp4

Script logs all failed tokens in case of any, so you can retry upload them separately. Also, it do update retry with some sleep time in case of fail. By default it suppose to update tokens in the list between 0 and 10k. you can edit specific range at this line. Also, you can set to update single token here.

Prepare

Install dependencies.

yarn

Set your Candy Machine ID within: src/constans.ts. Place all your tokens addresses (mint id) as string array to the ./src/data/token-list-to-parse.json.

Download current meta.

You need download existing metadata for further reuse on update command. Run

yarn metadata-download

It will get array of tokens from ./src/data/token-list-to-parse.json and fetch all metadata to the file src/data/current-metadata-cache.json (may take ~1hr for 1k items).

Create new updated metadata on Arweave.

It can be done with metaplex upload same as when creating new candy machine. Tip: You can upload to devnet with same result, arweave links will be still valid. Otherwise newly updated links need to be formated to format of metaplex cache file. Put cache file into -> ./src/data/mainnet-beta-temp.json

Update metadata for tokens

Place mainnet-beta-temp.json into ./src/data/.

Local keypair should be the same as keypair used to create related Candy Machine, and assumed to be an Update Authority for each token in the list. Default env is `devnet

yarn run update --keypair <PATH_TO_LOCAL_KEYPAIR> --env mainnet-beta

solana-nft-token-metadata-update's People

Contributors

jamland avatar moshthepitt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.