Search Apps Documentation Source Content File Folder Download Copy Actions Download

nftregistry2 package

Functions

AddAdmin

func AddAdmin(newAdmin address)
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "AddAdmin" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "AddAdmin" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetNFTGetter

func GetNFTGetter(collectionAddr address) (grc721.NFTGetter, bool)
Execute

GetNFTGetter - Get the NFT getter function for a collection This is the main function marketplaces will use

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetNFTGetter" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetNFTGetter" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetTokenMetadata

func GetTokenMetadata(collectionAddr address, tokenId grc721.TokenID) (grc721.Metadata, error)
Execute

GetTokenMetadata - Get metadata for a specific token (if collection supports it)

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetTokenMetadata" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetTokenMetadata" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

IsRegistered

func IsRegistered(collectionAddr address) bool
Execute

IsRegistered - Check if a collection is registered

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "IsRegistered" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "IsRegistered" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

RegisterCollection

func RegisterCollection( name string, symbol string, category string, description string, externalURL string, getter grc721.NFTGetter, )
Execute

RegisterCollection - Register a new NFT collection The collection realm must call this function itself

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "RegisterCollection" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "RegisterCollection" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

RemoveAdmin

func RemoveAdmin(admin address)
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "RemoveAdmin" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "RemoveAdmin" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

Render

func Render(path string) string
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "Render" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "Render" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

SetRegistrationFee

func SetRegistrationFee(fee int64)
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "SetRegistrationFee" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "SetRegistrationFee" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

UnverifyCollection

func UnverifyCollection(collectionAddr address)
Execute

UnverifyCollection - Admin function to remove verification

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "UnverifyCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "UnverifyCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

UpdateCollectionInfo

func UpdateCollectionInfo(category, description, externalURL string)
Execute

UpdateCollectionInfo - Collection creator can update mutable metadata

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "UpdateCollectionInfo" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "UpdateCollectionInfo" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

VerifyCollection

func VerifyCollection(collectionAddr address)
Execute

VerifyCollection - Admin function to verify a collection

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "VerifyCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "VerifyCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetAllCollections

func GetAllCollections() []CollectionInfo
Execute

GetAllCollections - Returns all registered collections

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetAllCollections" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetAllCollections" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetCollection

func GetCollection(collectionAddr address) *CollectionInfo
Execute

GetCollection - Get collection info by address

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetCollection" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetCollectionsByCategory

func GetCollectionsByCategory(category string) []CollectionInfo
Execute

GetCollectionsByCategory - Returns collections in a specific category

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetCollectionsByCategory" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetCollectionsByCategory" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx

GetVerifiedCollections

func GetVerifiedCollections() []CollectionInfo
Execute

GetVerifiedCollections - Returns only verified collections

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetVerifiedCollections" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test9.1" -remote "https://rpc.test9.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/pierre115/nftregistry2" -func "GetVerifiedCollections" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9.1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx