Tutorials
EVM (CLI)

Interact with EVM on Sei via CLI

You can query or send transactions to Sei easily via CLI once you have the seid command installed (see Installing Seid)

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-sei-cosmos-rpc to your command. Refer to the Tools and Resources page for a list of RPC endpoints.

  • seid q evm sei-addr [some EVM address]: Gets the associated Sei address of the queried EVM address, if it exists on-chain.
  • seid q evm evm-addr [some Sei address]: Gets the associated EVM address of the queried Sei address, if it exists on-chain.
  • seid q evm erc20 [erc20 address] [method] [arguments...]: Query the ERC20 contract at given address using the given method/arguments.
  • seid q evm payload [abi-filepath] [method] [arguments...]: Generate the hexadecimal payload of the requested method call given an ABI.
  • seid q evm pointer [type] [pointee]: Gets the pointer contract of the requested pointee. The type parameter can be one of "NATIVE", "CW20", "CW721", "ERC20", or "ERC721", and pointee is the target contract address. For "NATIVE" type, pointee would be the native denom name instead.

Transactions

Sending transactions via CLI requires you to have keys added via seid 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-sei-evm-rpc to your command. Refer to the Tools and Resources page for a list of RPC endpoints.

  • seid tx evm associate-address: Associates the Sei address and EVM address on-chain for the sending key.
  • seid tx evm send [to EVM address] [amount in wei]: Sends native tokens to the target EVM address.
  • seid tx evm deploy [path_to_binary]: Deploys the EVM contract specified in path_to_binary.
  • seid tx evm call-contract [addr] [payload hex]: Sends a transaction that calls contract at the target address with the provided payload.
  • seid tx evm erc20-send [addr] [recipient] [amount]: Sends ERC20 tokens of contract at addr to the target recipient.
  • seid tx evm delegate [val-addr] [amount]: Delegates specified amount to the target validator address. The validator address must be in Sei/Cosmos validator address format.