Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active April 21, 2022 02:25
Show Gist options
  • Save giansalex/4fdfe5ccad097178539e6f0b8bb76743 to your computer and use it in GitHub Desktop.
Save giansalex/4fdfe5ccad097178539e6f0b8bb76743 to your computer and use it in GitHub Desktop.
Minting gno NFTs

Create collection

# args(2): name, symbol.
./build/gnokey maketx call test1 --pkgpath "gno.land/r/legend" --func CreateCollection \
  --args "Disperze NFTs" \
  --args "DNFT" \
  --gas-fee 1gnot --gas-wanted 2000000 > create.unsigned.txt

./build/gnokey sign test1 --txpath create.unsigned.txt --chainid "testchain" --number $ACC_NUMBER --sequence $SEQUENCE > create.signed.txt
./build/gnokey broadcast create.signed.txt --remote gno.land:36657

Mint (only minter)

# args(3): collectionID, owner, uri.
./build/gnokey maketx call test1 --pkgpath "gno.land/r/legend" --func Mint \
  --args "1" \
  --args "g14vhcdsyf83ngsrrqc92kmw8q9xakqjm0v8448t" \
  --args "https://twitter.com/jaekwon/status/1508905844934545408" \
  --gas-fee 1gnot --gas-wanted 2000000 > mintoken.unsigned.txt

./build/gnokey sign test1 --txpath mintoken.unsigned.txt --chainid "testchain" --number $ACC_NUMBER --sequence $SEQUENCE > mintoken.signed.txt
./build/gnokey broadcast mintoken.signed.txt --remote gno.land:36657

Query Owner

# args: GetOwnerOf(collectionID, tokenID)
./build/gnokey query "vm/qeval" --data "gno.land/r/legend
GetOwnerOf(\"1\", \"1\")" --remote gno.land:36657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment