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 "staging" -remote "https://rpc.gno.land:443" ADDRESSgnokey query -remote "https://rpc.gno.land:443" 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 "staging" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx