GetAllMultiTokens
ExecuteGetAllMultiTokens returns a string of all the multi-tokens registered
Command
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllMultiTokens()"
Result
GetAllMultiTokens returns a string of all the multi-tokens registered
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllMultiTokens()"
GetAllNFTs returns a string of all the NFTs registered
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllNFTs()"
GetAllRegistered returns a string of all the registered tokens, NFTs and multi-tokens
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllRegistered()"
GetAllTokenWithDetails returns a string of all the tokens registered with their details
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllTokenWithDetails()"
GetAllTokens returns a string of all the tokens registered
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetAllTokens()"
GetMultiToken returns a multi-token instance for a given key
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetMultiToken()"
GetNFT returns an NFT instance for a given key
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetNFT()"
GetToken returns a token instance for a given key
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetToken()"
GetUserMultiTokenBalances returns a string of all the multi-tokens the user owns
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetUserMultiTokenBalances()"
GetUserMultiTokenBalancesNonZero returns a string of all the multi-tokens the user owns, but only the ones that have a balance greater than 0
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetUserMultiTokenBalancesNonZero()"
GetUserNFTBalances returns a string of all the NFTs the user owns
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetUserNFTBalances()"
GetUserTokenBalances returns a string of all the grc20 tokens the user owns
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetUserTokenBalances()"
GetUserTokenBalancesNonZero returns a string of all the grc20 tokens the user owns, but only the ones that have a balance greater than 0
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.GetUserTokenBalancesNonZero()"
MustGetMultiToken returns a multi-token instance for a given key, panics if the multi-token is not found
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.MustGetMultiToken()"
MustGetNFT returns an NFT instance for a given key, panics if the NFT is not found
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.MustGetNFT()"
MustGetToken returns a token instance for a given key, panics if the token is not found
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.MustGetToken()"
RegisterMultiToken is a function that registers a multi-token in an avl.Tree The avl.Tree value is a struct defined in this realm. It contains not only the getter (like other token types) but also the tokenID
# 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/matijamarjanovic/tokenhub" -func "RegisterMultiToken" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "RegisterMultiToken" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
RegisterNFT is a function that registers an NFT in an avl.Tree
# 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/matijamarjanovic/tokenhub" -func "RegisterNFT" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "RegisterNFT" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
RegisterToken is a function that uses gno.land/r/demo/defi/grc20reg to register a token It uses the slug to construct a key and then registers the token in the registry The logic is the same as in grc20reg, but it's done here so the key path is callers pkgpath and not of this realm After doing so, the token hub realm uses grc20reg's registry as a read-only avl.Tree Note: register token returns the key path that can be used to retrieve the token
# 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/matijamarjanovic/tokenhub" -func "RegisterToken" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "RegisterToken" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/matijamarjanovic/tokenhub.Render()"