Hector Bardales
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Metaboss ## Introduction Metaboss was made to help out users to interact with their tokens and its main functionalities allow to get data from nonfungible tokens and even update them. We will begin by installing the program and then proceed to use several of its commands and features. ## Installation To install you can copy paste the following command into your terminal. ```javascript= bash <(curl -sSf https://raw.githubusercontent.com/samuelvanderwaal/metaboss/main/scripts/install.sh) //Result ✅ Installation successful: type 'metaboss' to start using it. ``` In case any errors occur, here are some helpful programs to install that will help you fix them. Macos ```javascript= brew install openssl@3 ``` Ubuntu ```javascript= sudo apt install libssl-dev libudev-dev pkg-config ``` ## Uses In this section we will be exploring some of the different uses for Metaboss. We will begin by looking at the different methods that we have avaiable by using: ```javascript= metaboss -h //Result Metaboss 0.8.4 Metaplex NFT 'Swiss Army Knife' tool. USAGE: metaboss [OPTIONS] <SUBCOMMAND> FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: -l, --log-level <log-level> Log level [default: off] -r, --rpc <rpc> RPC endpoint url to override using the Solana config or the hard-coded default -T, --timeout <timeout> Timeout to override default value of 90 seconds [default: 90] SUBCOMMANDS: burn Burn token collections NFT collections commands decode Decode on-chain data into JSON format derive Derive PDAs for various account types find Find things help Prints this message or the help of the given subcommand(s) mint Mint new NFTs from JSON files parse-errors Parse Errors commands set Set non-Data struct values for a NFT sign Sign metadata for an unverified creator snapshot Get snapshots of various blockchain states update Update various aspects of NFTs uses NFT uses commands ``` From this, you'll notice that there are many very useful functions including burning tokens, signing collections and taking snapshots which includes holders snapshots, and even mint NFTs. You can also take note of the different flags that you can pass of which include `--rpc` and `--timeout` which are very useful for more demanding commands. You can pass these flags before the commands: ```javascript= metaboss --rpc <YOUR-RPC> --timeout 100 ...subcommands-here ``` We will begin with one of the most important things to do when working with NFTs. Metaboss allows us to mint an NFT from a json file. This command requires the path to the keypair of your file system wallet and if you happen to have several you can always get information including the path of it by using: ```javascript= solana config get ``` ### Mint We will now proceed to mint a single token. ```javascript= metaboss mint one --keypair <PATH-TO-KEYPAIR> --nft-data-file <PATH-TO-JSON-FILE> //Example metaboss mint one --keypair /Users/macos/my-keypair.json --nft-data-file /Users/macos/test-nft.json Tx id: 2z1rkgwJx3NhtHN2ME7X44uV5mxjEYihSxEy3munJW3X6eyyuKDhN5aWkFF1FJ8ciCwpWPe2cGAEVHsNWVgqDcnc Mint account: 5RGsE43RfvdtfLhcVjfpjqoX43vy2fQLj2H7RngLmCDN Done! ``` This directly mint our token to the wallet of the keypair we provided. We also have the option of changing the wallet that receives the NFT, and for this we must provide an address. To do this we will add a `--receiver` flag at the end. ```javascript= metaboss mint one --keypair <PATH-TO-KEYPAIR> --nft-data-file <PATH-TO-JSON-FILE> --receiver <ADDRESS-OF-RECEIVER> ``` ### Snapshot We will now move on to finding mints using a creator address. ```rust= //This is the command we'll use metaboss snapshot mints --creator <FIRST_CREATOR> --output <OUTPUT_DIR> //Example: Here the result should look similar with any creator you add metaboss snapshot mints --creator <CREATOR> --output /Users/macos Getting accounts... Getting metadata and writing to file... Done! ``` For many projects a snapshot of the holdres is very important for several reasons. And metaboss has a simple `snapshot` command that takes in the `update authority` and allows you to choose the directory to output the holders list like the following: ```javascript= metaboss snapshot holders --update-authority <UPDATE-AUTHORITY> --ouput <OUTPUT-DIR> ``` ### Update The next command we will be trying out is called `update`. Oftentimes we might find ourselves with a token, specifically a nonfungible token that might require some changes in its metadata. To do so we will start with smaller updated within the metdata of the tokens. In our first example, we'll be updating the seller basis fees points. For this, we will need the path to your keypair stored in your system: ```javascript= metaboss update sfbp --keypair <PATH_TO_KEYPAIR> -a <MINT_ACCOUNT> -n <NEW_SELLER_FEE_BASIS_POINTS_VALUE> //Example metaboss update sfbp --keypair /Users/macos/solana-wallet/keypair.json -a 4rxTT8pKeYFrFgNBgTspBWVEnMnsAZGwChkjRUtP4Xpi -n 500 ``` Updating other sections of the data struct can be done through similar commands. For example, let's try to update the symbol of our NFT: ```javascript= metaboss update symbol --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-symbol <NEW_SYMBOL> //Example metaboss update symbol --keypair /Users/macos/solana-wallet/keypair.json --account 4rxTT8pKeYFrFgNBgTspBWVEnMnsAZGwChkjRUtP4Xpi --new-symbol SYM ``` Once again we're using updating but we've replaced `sfbp` with `symbol`. For our following update we will do something similar with the command and instead of `symbol` we'll write `creators`. ```javascript= metaboss update creators -k <PATH_TO_KEYPAIR> -a <MINT_ACCOUNT> -c <CREATOR1:SHARE:VERIFIED,CREATOR2:SHARE:VERIFIED> //Example metaboss update creators -k /Users/macos/solana-wallet/keypair.json -a 4rxTT8pKeYFrFgNBgTspBWVEnMnsAZGwChkjRUtP4Xpi -c 42NevAWA6A8m9prDvZRUYReQmhNC3NtSZQNFUppPJDRB:70:false,AVdBTNhDqYgXGaaVkqiaUJ1Yqa61hMiFFaVRtqwzs5GZ:30:false ``` In this example, we've included two creators separated by a comma and set verified to false. Finally, we can also use a JSON file to update the data struct using `data` and providing the path to the JSON file. ```javascript= metaboss update data --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-data-file <PATH_TO_NEW_DATA_FILE> //Example metaboss update data --keypair /Users/macos/solana-wallet/keypair.json --account 4rxTT8pKeYFrFgNBgTspBWVEnMnsAZGwChkjRUtP4Xpi --new-data-file /Users/macos/new_data.json ``` ### Burn Now that we've done trying out the different parts of the metadata we can update let's move on to burning NFTs. At some point you might want to get rid of an NFT and to do that we will burn it. For this command we will need the mint account of the NFT we want to burn. Metaboss also provides us with the option of burning multiple NFTs at once by listing them in JSON file such as shown below. ```javascript= [ "D5ycm2mgBWDR37QVkvM389x84V4ux48bSeHLeiHPtX28", "4kYdMRRYtXjmkusgKEBntSXLDhqkHNE57GF3RPdtx6MW", "J8xuCFCeBRESoXewtMwrrpVUGikUG3B1WznNdLffyymz", "4gRtRjrbD7g5ZKUvSVA1tYMK9LZqz6uWuSc3rKeinySh" ] ``` ```javascript= //Burn Single NFT metaboss burn one -k <OWNER_KEYPAIR> --account <MINT_ACCOUNT> //Burn Mulitple NFTs metaboss burn all -k <OWNER_KEYPAIR> -L <JSON_LIST_OF_MINTS_ACCOUNTS> ``` ### Collections Sometimes the NFTs we mint do not belong to a single collection, and with the new Metaplex Certified Collections we might want our NFTs to belong to a single on-chain collection. We can `migrate` our collection using a mint list within a JSON file as shown below. ```javascript= [ "D5ycm2mgBWDR37QVkvM389x84V4ux48bSeHLeiHPtX28", "4kYdMRRYtXjmkusgKEBntSXLDhqkHNE57GF3RPdtx6MW", "J8xuCFCeBRESoXewtMwrrpVUGikUG3B1WznNdLffyymz", "4gRtRjrbD7g5ZKUvSVA1tYMK9LZqz6uWuSc3rKeinySh" ] ``` We will also need the mint address of the parent NFT that will be representing this collection. With this information we just grab the path to the JSON we've created in the first step and migrate the collection. ```javascript= metaboss collections migrate -k my_keypair.json -L my_mint_list.json --mint-address 9wtpdjMysSphxipTSJi7pYWGzSZFm2PRFtQucJiiXUzq ``` The longer our list becomes the higher our chance of encountering a small error. This often happens because `migrate` will attempt to finish moving the collection quickly. To give the command a higher chance of success we can pass the `--retries` flag along with a number. ```javascript= metaboss collections migrate -k my_keypair.json -L my_mint_list.json --mint-address 9wtpdjMysSphxipTSJi7pYWGzSZFm2PRFtQucJiiXUzq --retries 10 ``` If after running this, there are still some, this will result with a cache file containing the errors. We can then take this file and pass it on to the command before running it again. ```javascript= metaboss collections migrate -k my_keypair.json --cache-file metaboss-cache-migrate-collections.json --mint-address 9wtpdjMysSphxipTSJi7pYWGzSZFm2PRFtQucJiiXUzq ``` We can also find ourselves with a repeating error with can be addressed by looking through the contents of the cache file. Let's look at the following cache file. ```javascript= { "FqKGC9CCVThn857VAyZtZQq5L31njnbeUTe1JoCsCX8J": { "error": "Migration failed with error: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x39 [5 log messages]" }, "H7xrCZwA7oqsFeRcPsP6EEYHCxqq7atUBuuQAursXvWF": { "error": "Migration failed with error: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x39 [5 log messages]" } } ``` Both errors indicate the `0x39` error. From the Metaplex errors we know that `0x39` means that these two NFTs have a different update authority. ```javascript= 0x39: Token Metadata | IncorrectOwner: Incorrect account owner ``` Once migration has finished we must verify that it all the items successfully moved and belong to the same verified collection. ```javascript= metaboss collections check-items --collection-mint <COLLECTION_NFT_MINT_ADDRESS> -L <PATH_TO_MINT_LIST> ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully