Skip to content

The Metaplex NFT-standard Swiss Army Knife tool.

Notifications You must be signed in to change notification settings

PlatypussDivva/metaboss

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metaboss

The Solana Metaplex NFT 'Swiss Army Knife' tool. Current supported features:

  • Decode NFT mint account metadata
  • Get a list of mint accounts for a given candy machine ID or update authority
  • Get a snapshot of current NFT holders for a given candy machine ID or update authority
  • Set update authority on a single NFT or list of NFTs
  • Update all data fields for a single NFT or list of NFTs

Planned features:

  • Use Solana config for default RPC
  • Get snapshot of holders who initially minted from a candy machine, whether or not they currently hold the token
  • Get snapshots based on verified creators

Suggestions and PRs welcome!

Install From Source

Install Rust.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Clone the source:

git clone git@github.com:samuelvanderwaal/metaboss.git

Change directory and check out the develop branch:

cd metaboss
git checkout develop

Install or build with Rust:

cargo install --path ./

or

cargo build --release

Binaries

  • Linux
  • Windows

Options

-r, --rpc The RPC endpoint to use for commands. Defaults to https://api.devnet.solana.com.

Usage

metaboss -r https://api.mainnet-beta.solana.com <SUBCOMMAND>

Please don't abuse public APIs or you may get rate-limited. If you have heavy work to do, use a private RPC such as from QuickNode or Triton.

Subcommands

Decode

Decode a single NFT mint account metadata into a JSON file.

Usage

metaboss decode --mint-account <MINT_ACCOUNT> -o <OUPUT_DIRECTORY>

The command will write the metadata JSON file to the output directory with the mint account as the name: e.g. CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp.json. The output option defaults to the current directory.

Decode All

Decode a list of NFT mint accounts metadata into a JSON file.

Usage

metaboss decode_all --json-file <JSON_FILE> -o <OUPUT_DIRECTORY>

The JSON file should be an array of mint accounts to be decoded:

["xSy...", "Cnb..." ...]

The command will write each metadata JSON file to the output directory as a separate file with the mint account as the name: e.g. CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp.json. The output option defaults to the current directory.

Help

Displays list of commands and options for the program.

Get Mints

Get mint accounts for a candy machine or an update authority. Specify either a candy machine id, or an update authority, but not both and at least one.

Usage

metaboss get_mints --candy-machine-id <CANDY_MACHINE_ID> -o <OUTPUT_DIRECTORY>

or

metaboss get_mints --update_authority <UPDATE_AUTHORITY> -o <OUTPUT_DIRECTORY>

This creates a JSON file named: <CANDY_MACHINE_ID/UPDATE_AUTHORITY>_mint_accounts.json in the specified output directory. The JSON file contains an array of mint accounts.

Set Update Authority

Warning: This command modifies your NFT. Use with caution.

Set the update authority on a single NFT's metadata account.

Usage

metaboss set_update_authority --keypair <PATH_TO_KEYPAIR> --mint-account <MINT_ACCOUNT> --new-update-authority <NEW_UPDATE_AUTHORITY>

Outputs a TxId to the command line so you can check the result.

Set Update Authority All

Warning: This command modifies your NFT. Use with caution.

Set the update authority on a list NFT's metadata accounts.

Usage

metaboss set_update_authority_all --keypair <PATH_TO_KEYPAIR> --json-file <PATH_TO_JSON_FILE>

The JSON file should be an array of objects with mint_account and new_update_authority:

[
    {
        "mint_account": "CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp",
        "new_update_authority": "42NevAWA6A8m9prDvZRUYReQmhNC3NtSZQNFUppPJDRB"
    },
    {
        "mint_account": "9pVUWcAje2HphJqXKwkhsehGnPM7RFt5syqUK99tLMFM",
        "new_update_authority": "42NevAWA6A8m9prDvZRUYReQmhNC3NtSZQNFUppPJDRB"
    }
]

Outputs a TxId to the command line so you can check the result.

Update NFT

Warning: This command modifies your NFT. Use with caution.

Update all Data fields on a single NFT's metadata account by reading new values from a URI JSON file.

Usage

metaboss update_nft --keypair <PATH_TO_KEYPAIR> --mint-account <MINT_ACCOUNT> --new-uri <NEW_URI>

Outputs a TxId to the command line so you can check the result.

Update NFT All

Warning: This command modifies your NFT. Use with caution.

Update all Data fields on a list of NFTs' metadata accounts by reading new values from provided new URIs.

metaboss update_nft_all --keypair <PATH_TO_KEYPAIR> --json-file <PATH_TO_JSON_FILE>

The JSON file should be an array of objects with mint_account and new_uri fields, where the new_uri is an already existing JSON file stored at the URI:

[
    {
        "mint_account": "CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp",
        "new_uri": "https://arweave.net/FPGAv1XnyZidnqquOdEbSY6_ES735ckcDTdaAtI7GFw"
    },
    {
        "mint_account": "9pVUWcAje2HphJqXKwkhsehGnPM7RFt5syqUK99tLMFM",
        "new_uri": "https://arweave.net/N36gZYJ6PEH8OE11i0MppIbPG4VXKV4iuQw1zaq3rls"
    }
]

Snapshot

Get a snapshot of current holders of NFTs specifying an NFT collection by either candy machine ID or update authority. Specify either a candy machine id, or or an update authority, but not both and at least one.

Usage

metaboss snapshot --candy-machine-id <CANDY_MACHINE_ID> -o <OUTPUT_DIRECTORY>

or

metaboss snapshot --update_authority <UPDATE_AUTHORITY> -o <OUTPUT_DIRECTORY>

Creates a snapshot.json file in the output directory consisting of an array of objects containing owner_wallet, token_address and mint_account fields.

[
    {
        "owner_wallet": "BJD9JeKEnGU9mqqagoovTsDSr1bSZQSy8pHS8hHmjve6",
        "token_address": "BqNz4yh9q7z4N2cAdaqMCk7Y9oLF93Pcwc6hBMBRfLtc"
    },
    {
        "owner_wallet": "BJD9JeKEnGU9mqqagoovTsDSr1bSZQSy8pHS8hHmjve6",
        "token_address": "3rDbzaZJ79pz7HPR4cTABxnpGJpeKJuMf32SPfFHvNUg"
    }
]

Example Usage

Update a list of mint accounts with new URIs:

metaboss update_nft_all -k ~/.config/solana/devnet.json --json-file new_uri.json

The JSON file should be an array of mint_accounts and new_uris. Example:

[
    {
        "mint_account": "CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp",
        "new_uri": "https://arweave.net/FPGAv1XnyZidnqquOdEbSY6_ES735ckcDTdaAtI7GFw"
    },
    {
        "mint_account": "9pVUWcAje2HphJqXKwkhsehGnPM7RFt5syqUK99tLMFM",
        "new_uri": "https://arweave.net/N36gZYJ6PEH8OE11i0MppIbPG4VXKV4iuQw1zaq3rls"
    }
]

Update a single NFT with a new update_authority:

metaboss set_update_authority -k ~/.config/solana/devnet.json --mint-account CQNKXw1rw2eWwi812Exk4cKUjKuomZ2156STGRyXd2Mp --new-update-authority 42NevAWA6A8m9prDvZRUYReQmhNC3NtSZQNFUppPJDRB

About

The Metaplex NFT-standard Swiss Army Knife tool.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%