Script

To make it easy to use NFT Gen2 we provided bash script for any user to use it.

Make sure that you had modify some important informations before using script

Download Script

# For Linux OS
wget https://storage.googleapis.com/download-sixprotocol/sixd/script/script.tgz.gz
#or
curl -G https://storage.googleapis.com/download-sixprotocol/sixd/script/script.tgz.gz -o ./script.tgz.gz
#or
gsutil cp gs://download-sixprotocol/sixd/script/script.tgz.gz .

After unzip file we need to modify nft_schema.json to our specific code (nft-schema-code) such as "code": "six.rocket_tiket" and name (schema_name) such as "name":"sixlauncher001" . Then we are ready to use the script

Then modify key or address in file init_data.sh from --from alice to --from <your-address_or_yourkey> such as --from 6x1v23u9k5c8pwm87jtvxwwmuzt8nj250xu4lr4vh

How to user scripts

1. Initial schema

bash init_data.sh

2. Interact with schema

bash menu.sh
## or
bash menu.sh <string_schema_name>

The differentiation between line 1 and line 3: The first one we need to input schema code every times we want to use script while the second one we can skip the step Enter Schema Code:

To make it more efficient we can replace some step such as replace ${address_key} with actual address or key of user and remove line of From (address or key):

For example:

bash init_data.sh

After finish initial schema now we are ready to interact with it

bash menu.sh six.rocket_ticket 

# it will occur response like this

#############################################
##                                         ##
##  Welcome to the menu script             ##
##                                         ##
##  Please select an option                ##
##                                         ##
##  1. Show Schema                         ##
##  2. Create NFT Metadata (mint)          ##
##  3. Show NFTs                           ##
##  4. Do Action                           ##
##  5. Add Attribute                       ##
##  6. Add Action                          ##
##  Your choice:                           ##
##                                         ##
#############################################
Your choice:
# We can input 1-7 to interact with it
# if we enter 1 it will query our scema that we already created schema
# To create NFT metadata input 2 the it will occur response :
Your choice: 2
Mockup Token
Enter Schema Code: ## this line we can skip by press enter if we run command as above
Enter Token ID: 0
From (address or key) : 6x1v23u9k5c8pwm87jtvxwwmuzt8nj250xu4lr4vh ## we can input key instead of address
# From (address or key) : alice

Last updated