GetAllMultiTokens
func GetAllMultiTokens() string
Link
Execute
GetAllMultiTokens returns a string of all the multi-tokens registered
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/matijamarjanovic/tokenhub" -func "GetAllMultiTokens" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetAllMultiTokens" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetAllNFTs
func GetAllNFTs() string
Link
Execute
GetAllNFTs returns a string of all the NFTs registered
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/matijamarjanovic/tokenhub" -func "GetAllNFTs" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetAllNFTs" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetAllRegistered
func GetAllRegistered() string
Link
Execute
GetAllRegistered returns a string of all the registered tokens, NFTs and multi-tokens
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/matijamarjanovic/tokenhub" -func "GetAllRegistered" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetAllRegistered" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetAllTokenWithDetails
func GetAllTokenWithDetails() string
Link
Execute
GetAllTokenWithDetails returns a string of all the tokens registered with their details
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/matijamarjanovic/tokenhub" -func "GetAllTokenWithDetails" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetAllTokenWithDetails" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetAllTokens
func GetAllTokens() string
Link
Execute
GetAllTokens returns a string of all the tokens registered
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/matijamarjanovic/tokenhub" -func "GetAllTokens" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetAllTokens" -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetMultiToken
func GetMultiToken(key string) grc1155.IGRC1155
Link
Execute
GetMultiToken returns a multi-token instance for a given key
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/matijamarjanovic/tokenhub" -func "GetMultiToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetMultiToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetNFT
func GetNFT(key string) grc721.IGRC721
Link
Execute
GetNFT returns an NFT instance for a given key
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/matijamarjanovic/tokenhub" -func "GetNFT" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetNFT" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetToken
func GetToken(key string) *grc20.Token
Link
Execute
GetToken returns a token instance for a given key
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/matijamarjanovic/tokenhub" -func "GetToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetUserMultiTokenBalances
func GetUserMultiTokenBalances(userNameOrAddress string) string
Link
Execute
GetUserMultiTokenBalances returns a string of all the multi-tokens the user owns
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/matijamarjanovic/tokenhub" -func "GetUserMultiTokenBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetUserMultiTokenBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetUserMultiTokenBalancesNonZero
func GetUserMultiTokenBalancesNonZero(userNameOrAddress string) string
Link
Execute
GetUserMultiTokenBalancesNonZero returns a string of all the multi-tokens the user owns, but only the ones that have a balance greater than 0
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/matijamarjanovic/tokenhub" -func "GetUserMultiTokenBalancesNonZero" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetUserMultiTokenBalancesNonZero" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetUserNFTBalances
func GetUserNFTBalances(userNameOrAddress string) string
Link
Execute
GetUserNFTBalances returns a string of all the NFTs the user owns
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/matijamarjanovic/tokenhub" -func "GetUserNFTBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetUserNFTBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetUserTokenBalances
func GetUserTokenBalances(userNameOrAddress string) string
Link
Execute
GetUserTokenBalances returns a string of all the grc20 tokens the user owns
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/matijamarjanovic/tokenhub" -func "GetUserTokenBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetUserTokenBalances" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
GetUserTokenBalancesNonZero
func GetUserTokenBalancesNonZero(userNameOrAddress string) string
Link
Execute
GetUserTokenBalancesNonZero returns a string of all the grc20 tokens the user owns, but only the ones that have a balance greater than 0
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/matijamarjanovic/tokenhub" -func "GetUserTokenBalancesNonZero" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "GetUserTokenBalancesNonZero" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
MustGetMultiToken
func MustGetMultiToken(key string) grc1155.IGRC1155
Link
Execute
MustGetMultiToken returns a multi-token instance for a given key, panics if the multi-token is not found
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/matijamarjanovic/tokenhub" -func "MustGetMultiToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "MustGetMultiToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
MustGetNFT
func MustGetNFT(key string) grc721.IGRC721
Link
Execute
MustGetNFT returns an NFT instance for a given key, panics if the NFT is not found
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/matijamarjanovic/tokenhub" -func "MustGetNFT" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "MustGetNFT" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
MustGetToken
func MustGetToken(key string) *grc20.Token
Link
Execute
MustGetToken returns a token instance for a given key, panics if the token is not found
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/matijamarjanovic/tokenhub" -func "MustGetToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "MustGetToken" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
RegisterMultiToken
func RegisterMultiToken(cur realm, mtGetter grc1155.MultiTokenGetter, tokenID string) error
Link
Execute
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
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/matijamarjanovic/tokenhub" -func "RegisterMultiToken" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" 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 "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
RegisterNFT
func RegisterNFT(cur realm, nftGetter grc721.NFTGetter, collection string, tokenId string) error
Link
Execute
RegisterNFT is a function that registers an NFT in an avl.Tree
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/matijamarjanovic/tokenhub" -func "RegisterNFT" -args " " -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" 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 "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
RegisterToken
func RegisterToken(cur realm, token *grc20.Token, slug string) string
Link
Execute
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
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/matijamarjanovic/tokenhub" -func "RegisterToken" -args " " -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" 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 "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx
Render
func Render(path string) string
Link
Execute
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/matijamarjanovic/tokenhub" -func "Render" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " -broadcast -chainid "test9" -remote "https://rpc.test9.testnets.gno.land" ADDRESS gnokey query -remote "https://rpc.test9.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/matijamarjanovic/tokenhub" -func "Render" -args " " -gas-fee 1000000ugnot -gas-wanted 5000000 -send " " ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test9" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test9.testnets.gno.land" call.tx