Interact with EVM on SHE via CLI
You can query or send transactions to SHE easily via CLI once you have the
shed command installed (see Installing Shed)
Queries
If the machine you run these commands from are not running a node of the
network, you’ll need to append --node http://url-to-she-cosmos-rpc to your
command. Refer to the
Tools and Resources page for a list of
RPC endpoints.
shed q evm she-addr [some EVM address]: Gets the associated SHE address of the queried EVM address, if it exists on-chain.shed q evm evm-addr [some SHE address]: Gets the associated EVM address of the queried SHE address, if it exists on-chain.shed q evm erc20 [erc20 address] [method] [arguments...]: Query the ERC20 contract at given address using the given method/arguments.shed q evm payload [abi-filepath] [method] [arguments...]: Generate the hexadecimal payload of the requested method call given an ABI.shed q evm pointer [type] [pointee]: Gets the pointer contract of the requested pointee. Thetypeparameter can be one of “NATIVE”, “CW20”, “CW721”, “ERC20”, or “ERC721”, andpointeeis the target contract address. For “NATIVE” type,pointeewould be the native denom name instead.
Transactions
Sending transactions via CLI requires you to have keys added via
shed keys add. You can then specify the key you want to use by appending
--from=[key name] to your command.
If the machine you run these commands from are not a node of the network, you’d
need to append --evm-rpc http://url-to-she-evm-rpc to your command. Refer to
the Tools and Resources page for a list
of RPC endpoints.
shed tx evm associate-address: Associates the SHE address and EVM address on-chain for the sending key.shed tx evm send [to EVM address] [amount in wei]: Sends native tokens to the target EVM address.shed tx evm deploy [path_to_binary]: Deploys the EVM contract specified inpath_to_binary.shed tx evm call-contract [addr] [payload hex]: Sends a transaction that calls contract at the target address with the provided payload.shed tx evm erc20-send [addr] [recipient] [amount]: Sends ERC20 tokens of contract ataddrto the target recipient.shed tx evm delegate [val-addr] [amount]: Delegates specified amount to the target validator address. The validator address must be in SHE/Cosmos validator address format.
Last updated on