Created
June 8, 2022 10:46
-
-
Save doingthisalright/28be70ad4f930fce68411b5e7f3e0fc6 to your computer and use it in GitHub Desktop.
Mint with Reveal: Commands used in the video: https://youtu.be/K2ykv9IffdA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference for the video: https://youtu.be/K2ykv9IffdA | |
## Create wallets | |
# BkuPyM8HV8Ea1RhwpydEjJ2YKMjXA81KxKME2AVXaCRW | |
solana-keygen new --outfile ~/KeyStrokes/nft/wallets/Payer.json | |
# CQdR5xa2u85GiBpt9hBMrcHN9Z6Jf6QNN1jjaAg7TPBu | |
solana-keygen new --outfile ~/KeyStrokes/nft/wallets/Minter.json | |
## Configure Solana CLI | |
solana config set --keypair ~/KeyStrokes/nft/wallets/Payer.json | |
solana config set --url https://metaplex.devnet.rpcpool.com/ | |
## Setup Metaplex and Candy Machine UI | |
git clone https://github.com/metaplex-foundation/metaplex.git ./metaplex | |
yarn install --cwd ./metaplex/js/ | |
cd ./metaplex/js/packages/candy-machine-ui | |
cp .env.example .env | |
yarn install | |
## Setup Bundlr and Metaboss | |
npm install -g @bundlr-network/client | |
bash <(curl -sSf https://raw.githubusercontent.com/samuelvanderwaal/metaboss/main/scripts/install.sh) | |
## Check Bundlr balance | |
bundlr balance BkuPyM8HV8Ea1RhwpydEjJ2YKMjXA81KxKME2AVXaCRW \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 | |
## Check Bundlr upload cost for placeholder.png file | |
# 4681 lamports (0.000004681 solana) | |
bundlr price 37000 \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 | |
## Fund Bundlr balance for uploading placeholder.png file | |
bundlr fund 5000 \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 \ | |
--provider-url https://metaplex.devnet.rpcpool.com \ | |
--wallet ~/KeyStrokes/nft/wallets/Payer.json | |
## Upload placeholder.png file to arweave using bundlr | |
# Uploaded to https://arweave.net/EO-TynRoDpYcTyq2tIvpbo9OFp-Rzk0ITkVQdaCRkss | |
bundlr upload ~/KeyStrokes/nft/placeholder/placeholder.png \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 \ | |
--wallet ~/KeyStrokes/nft/wallets/Payer.json | |
## Check Bundlr upload cost for placeholder.json file | |
bundlr price 600 \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 | |
## Fund Bundlr balance for uploading placeholder.json file | |
bundlr fund 1100 \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 \ | |
--provider-url https://metaplex.devnet.rpcpool.com \ | |
--wallet ~/KeyStrokes/nft/wallets/Payer.json | |
## Upload placeholder.json file to arweave using bundlr | |
# Uploaded to https://arweave.net/NC4ZSf7XA5KToz6CqIxmFcH5lIlMdxrJPow7X8dVyzM | |
bundlr upload ~/KeyStrokes/nft/placeholder/placeholder.json \ | |
--host https://devnet.bundlr.network \ | |
--currency solana \ | |
--timeout 200 \ | |
--wallet ~/KeyStrokes/nft/wallets/Payer.json | |
## Create Candy Machine | |
# Candy machine address: 2PqpdLjMnXt8Me8EPvPRRdo7snbDHAs8RViG5dCWddsY | |
ts-node ./metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload \ | |
-e devnet \ | |
-k ~/KeyStrokes/nft/wallets/Payer.json \ | |
-cp config.json \ | |
./assets | |
## Calculate MD5 hash | |
# 57f991df225de65bfc03b991fc728304 | |
md5 .cache/devnet-temp.json | |
## Update Candy Machine to use the Hidden Settings Hash, and updated NFT count | |
ts-node ./metaplex/js/packages/cli/src/candy-machine-v2-cli.ts update_candy_machine \ | |
-e devnet \ | |
-k ~/KeyStrokes/nft/wallets/Payer.json \ | |
-cp config.json | |
## Get all holders and the corresponding mint accounts for the NFTs | |
metaboss snapshot holders --creator 2PqpdLjMnXt8Me8EPvPRRdo7snbDHAs8RViG5dCWddsY --v2 --output ./ --timeout 200 | |
## Get the NFT number that should be minted for this mint account | |
# Number #1 - https://arweave.net/llPcaU-kFbenmkMcmhiz6GqHENgdYRNEn2h31kx-ebk | |
metaboss decode mint --account HQUFQ5tnq8zSJqBKrZYEV12XYvGwUagY6ZFYYLPLEWGE -o ./ | |
# Number #2 - https://arweave.net/hxAJNr97iiee-yT5bwcrCrW0a1H982TVfNXpOzbtZ64 | |
metaboss decode mint --account DccM57CssU5J5Q4pefHCePqBdqqQVTJjhYqU1KhU4cDu -o ./ | |
## Update the NFT mint account to point to the correct NFT metadata | |
metaboss update uri \ | |
--keypair ~/KeyStrokes/nft/wallets/Payer.json \ | |
--account HQUFQ5tnq8zSJqBKrZYEV12XYvGwUagY6ZFYYLPLEWGE \ | |
--new-uri https://arweave.net/llPcaU-kFbenmkMcmhiz6GqHENgdYRNEn2h31kx-ebk | |
metaboss update uri \ | |
--keypair ~/KeyStrokes/nft/wallets/Payer.json \ | |
--account DccM57CssU5J5Q4pefHCePqBdqqQVTJjhYqU1KhU4cDu \ | |
--new-uri https://arweave.net/hxAJNr97iiee-yT5bwcrCrW0a1H982TVfNXpOzbtZ64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment