https://github.com/MarkSackerberg/sol-metadata-update-preparer
https://github.com/MarkSackerberg/sol-metadata-update-preparer
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/MarkSackerberg/sol-metadata-update-preparer
- Owner: MarkSackerberg
- License: mit
- Created: 2023-03-10T13:41:24.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-05T22:47:38.000Z (about 2 years ago)
- Last Synced: 2024-10-28T22:34:35.414Z (7 months ago)
- Language: TypeScript
- Size: 62.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - MarkSackerberg/sol-metadata-update-preparer - (TypeScript)
README
# Solana NFT Update preparer
## What does it do?
This repo will not update the NFT data for you. It is a CLI to make updates easier, e.g. by downloading old metadata, copying old image links into new metadata and preparing files to update Metadata with [metaboss](https://github.com/samuelvanderwaal/metaboss).This CLI was created with a specific usecase in mind, but will aligned in the future.
## Install
1. Install [node.js](https://nodejs.org/en/download/), [yarn](https://yarnpkg.com/getting-started/install) (or use npm).
2. Clone this repository, and using a terminal navigate to its directory.
3. Run `yarn` or `npm install` to install the dependencies.## Run
1. Run `ts-node src/cli.ts` to start the application. It will show the help command.
```
npx ts-node src/cli.ts
Usage: cli [options] [command]Options:
-h, --help display help for commandCommands:
fetch-single-nft [options] Fetch a single NFTs off-chain metadata by mint address
fetch-all-nft [options] Fetch all NFTs off-chain metadata based on mintlist
copy-uri Copy the URI from downloaded JSON files into json files with other metadata.
manifest-to-decoded Convert the Arweave manifest file by bundlr to decoded metadata files
metaboss-snapshot-sugar-airdrop [outputFile] Convert the the metaboss holder snapshot to a airdrop list in the format sugar expects
help [command] display help for command
```## Example
Process flow that I am often following is:
1. Download old NFT off-chain metadata using `ts-node src/cli.ts fetch-all-nft ../mints.json downloadFolder`
2. Get the image urls and add them to new JSON files `ts-node src/cli.ts copy-uri downloadFolder updatedFolder`
3. Upload the new JSON files using [Bundlr](https://docs.bundlr.network/CLI/uploading-a-folder) `bundlr upload-dir updatedFolder -h https://node1.bundlr.network -w wallet.json -c arweave`
4. Decode the on-chain metadata of the nfts using `metaboss decode mint -o decoded -L mints.json --full`
4. Add the URIs of the JSON into the decoded metadata files `ts-node src/cli.ts manifest-to-decoded updatedFolder-manifest.json decoded`
5. Update the NFTs with metaboss `metaboss update data-all -d decoded`## Contact
If you have any issues or ideas feel free to contact me on Discord (Mark Sackerberg#7975), [Twitter](https://twitter.com/MarkSackerberg) or open a issue here on Github.**Open for opportunities: If you want to work with me on a project - small, big, or just have me do some metadata updates for you - let me know!**
This project was created using [themetalfleece/nodejs-typescript-template](https://github.com/themetalfleece/nodejs-typescript-template)