Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save davigmacode/7a8b3b3c504b42094d465572d1749d81 to your computer and use it in GitHub Desktop.

Select an option

Save davigmacode/7a8b3b3c504b42094d465572d1749d81 to your computer and use it in GitHub Desktop.

Revisions

  1. Ben Chow revised this gist Aug 4, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion mint_from_metaplex_master.sh
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,8 @@
    # - cargo build
    # - Add this shell file to this metaplex/rust directory
    # - Give this file permissions to be run => chmod +x ./mint_from_metaplex_master.sh
    # - run this shell command ./mint_from_metaplex_master.sh [number of copies] [nft address you copied from solana explorer]
    #
    # Run this script => ./mint_from_metaplex_master.sh [number of copies] [nft address you copied from solana explorer]
    # - Make sure the minter wallet has enough SOL to mint the number of copies you want

    counter=1
  2. Ben Chow created this gist Aug 4, 2021.
    49 changes: 49 additions & 0 deletions mint_from_metaplex_master.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    #!/bin/bash

    ########################
    # Instructions
    #
    # Download Metaplex code
    # - git clone [email protected]:metaplex-foundation/metaplex.git
    #
    # Edit webserver code to be able to mint NFT
    # - In file .env, add your wallet address that will mint the NFTs to here => REACT_APP_STORE_OWNER_ADDRESS_ADDRESS=<Wallet Address>
    # - [Optional] - Add metadata entry to userNames.json if you want to show your profile photo/name/description for NFT
    # - [Optional] You can remove other entries in userNames.json
    #
    # Run metaplex webserver locally to create master edition NFT
    # - cd ./metaplex/js
    # - yarn install
    # - yarn bootstrap
    # - yarn start
    #
    # Create Master edition NFT
    # - open browser to localhost:3000 if it doesn't open automatically
    # - connect wallet
    # - click on the "Create button"
    # - Follow steps to Mint master edition NFT
    # - After you have minted the NFT. view the NFT on the site and click the Solana button to take you to the Solana explorer.
    # - Copy the address of the Master edition NFT
    #
    # Store your wallet private key that minted the NFT in a .json file in your home directory. You can call it minter_wallet.json
    # - This json file will be an array of decimals representing your private key.
    # - Note Phantom wallet will show you your private key in base58. You must convert that into an array of decimals in the form [1,2,3,4,5]
    # - You can use this site to do the conversion: https://www.dcode.fr/base-58-cipher
    # - However for security, it's best to do that locally. You can use the bs58 javascript lib.
    #
    # Build CLI
    # - cd rust
    # - cargo build
    # - Add this shell file to this metaplex/rust directory
    # - Give this file permissions to be run => chmod +x ./mint_from_metaplex_master.sh
    # - run this shell command ./mint_from_metaplex_master.sh [number of copies] [nft address you copied from solana explorer]
    # - Make sure the minter wallet has enough SOL to mint the number of copies you want

    counter=1
    while [ $counter -le $1 ]
    do
    ./target/debug/spl-token-metadata-test-client --keypair ~/minter_wallet.json mint_new_edition_from_master_edition_via_token --mint $2 --url https://api.metaplex.solana.com/
    ((counter++))
    done

    echo All done