BlockX Documentation
  • Introduction
    • BlockX
    • Tokens
    • Transactions
    • Inflation
    • Keys
      • Keyring
      • Multisig
    • Gas Fees
    • Wallet and Accounts
      • Adding BlockX to Metamask
      • Adding BlockX to Keplr
      • Transfers Between Wallets
      • Backup
    • Deploying Smart Contracts
      • Remix
      • Hardhat
  • BlockX White Paper
  • The BCX Token
  • Governance
    • Proposals
      • Proposal Tips
      • Submit a Proposal
    • Community Pool
    • Chain Parameters
  • Technical Concepts
    • Architecture
    • Accounts
    • Chain ID
    • Encoding
    • Pending State
  • dApp Developers
    • Establishing Connections
    • BlockX Clients
    • Guides
      • Wallet Integration
      • Smart Contract Incentive Registration
      • Tracing Transactions
      • Query Balances
    • Localnet
      • Single-node
      • Multi-node
    • Testnet
      • Testnet Commands
    • Ethereum JSON-RPC
      • JSON-RPC Server
      • Running the Server
      • Namespaces
      • JSON-RPC Methods
      • Events
    • Tendermint RPC
  • Protocol Developers
    • Modules
      • auth
        • Concepts
        • State
        • AnteHandlers
        • Keepers
        • Vesting
        • Parameters
        • Client Auth
      • bank
        • State
        • Keepers
        • Messages
        • Events
        • Parameters
        • Client
      • crisis
        • State
        • Messages
        • Events
        • Parameters
        • Client
      • distribution
        • Concepts
        • State
        • Begin Block
        • Messages
        • Hooks
        • Events
        • Parameters
        • Client
      • epochs
        • Concepts
        • State
        • Events
        • Keepers
        • Hooks
        • Queries
        • Future Improvements
      • erc20
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
      • evidence
        • Concepts
        • State
        • Messages
        • Events
        • Parameters
        • BeginBlock
        • Client
      • evm
        • Concepts
        • State
        • State Transitions
        • Transactions
        • ABCI
        • Hooks
        • Events
        • Parameters
        • Client
      • feemarket
        • Concepts
        • State
        • Begin block
        • End block
        • AnteHandlers
        • Keeper
        • Events
        • Client
        • Future Improvements
        • Parameters
      • feesplit
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
        • Future Improvements
      • gov
        • Concepts
        • State
        • Messages
        • Events
        • Future Improvements
        • Parameters
        • Client
      • incentives
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
      • ibc-core
      • inflation
        • Concepts
        • State
        • Hooks
        • Events
        • Parameters
        • Clients
      • slashing
        • Concepts
        • State
        • Messages
        • BeginBlock
        • Hooks
        • Events
        • Staking Tombstone
        • Parameters
        • CLI
      • staking
        • State
        • State Transitions
        • Messages
        • Begin-Block
        • End-Block
        • Hooks
        • Events
        • Parameters
        • Client
      • upgrade
        • Concepts
        • State
        • Events
        • Client
        • Resources
      • vesting
        • Concepts
        • State
        • State Transitions
        • Transactions
        • AnteHandlers
        • Events
        • Clients
    • Module Accounts
    • IBC Channels
    • Ethermint API
  • Validators
    • Quick Start
    • Telemetry
    • Security
      • Tendermint KMS
      • Tendermint KMS + Ledger
      • Validator Security Checklist
      • Validator Backup
    • Snapshots, Archive Nodes
    • FAQ
  • Delegators
    • Staking Process
  • Tokenomics
  • Block Explorers
Powered by GitBook
On this page
  • CLI
  • JSON-RPC
  • gRPC
  1. Protocol Developers
  2. Modules
  3. evm

Client

A user can query and interact with the evm module using the CLI, JSON-RPC, gRPC or REST.

CLI

Find below a list of ethermintd commands added with the x/evm module. You can obtain the full list by using the ethermintd -h command.

Queries

The query commands allow users to query evm state.

code

Allows users to query the smart contract code at a given address.

ethermintd query evm code [address] [flags]
# Example
$ ethermintd query evm code 0x7bf7b17da59880d9bcca24915679668db75f9397

# Output
code: "0xef616c92f3cfc9e92dc270d6acff9cea213cecc7020a76ee4395af09bdceb4837a1ebdb5735e11e7d3adb6104e0c3ac55180b4ddf5e54d022cc5e8837f6a4f971b"

storage

Allows users to query storage for an account with a given key and height.

ethermintd query evm storage [address] [key] [flags]
# Example
$ ethermintd query evm storage 0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0 0 --height 0

# Output
value: "0x0000000000000000000000000000000000000000000000000000000000000000"

Transactions

The tx commands allow users to interact with the evm module.

raw

Allows users to build cosmos transactions from raw ethereum transaction.

ethermintd tx evm raw [tx-hex] [flags]
# Example
$ ethermintd tx evm raw 0xf9ff74c86aefeb5f6019d77280bbb44fb695b4d45cfe97e6eed7acd62905f4a85034d5c68ed25a2e7a8eeb9baf1b84

# Output
value: "0x0000000000000000000000000000000000000000000000000000000000000000"

JSON-RPC

gRPC

Queries

Verb
Method
Description

gRPC

ethermint.evm.v1.Query/Account

Get an Ethereum account

gRPC

ethermint.evm.v1.Query/CosmosAccount

Get an Ethereum account's Cosmos Address

gRPC

ethermint.evm.v1.Query/ValidatorAccount

Get an Ethereum account's from a validator consensus Address

gRPC

ethermint.evm.v1.Query/Balance

Get the balance of a the EVM denomination for a single EthAccount.

gRPC

ethermint.evm.v1.Query/Storage

Get the balance of all coins for a single account

gRPC

ethermint.evm.v1.Query/Code

Get the balance of all coins for a single account

gRPC

ethermint.evm.v1.Query/Params

Get the parameters of x/evm module

gRPC

ethermint.evm.v1.Query/EthCall

Implements the eth_call rpc api

gRPC

ethermint.evm.v1.Query/EstimateGas

Implements the eth_estimateGas rpc api

gRPC

ethermint.evm.v1.Query/TraceTx

Implements the debug_traceTransaction rpc api

gRPC

ethermint.evm.v1.Query/TraceBlock

Implements the debug_traceBlockByNumber and debug_traceBlockByHash rpc api

GET

/ethermint/evm/v1/account/{address}

Get an Ethereum account

GET

/ethermint/evm/v1/cosmos_account/{address}

Get an Ethereum account's Cosmos Address

GET

/ethermint/evm/v1/validator_account/{cons_address}

Get an Ethereum account's from a validator consensus Address

GET

/ethermint/evm/v1/balances/{address}

Get the balance of a the EVM denomination for a single EthAccount.

GET

/ethermint/evm/v1/storage/{address}/{key}

Get the balance of all coins for a single account

GET

/ethermint/evm/v1/codes/{address}

Get the balance of all coins for a single account

GET

/ethermint/evm/v1/params

Get the parameters of x/evm module

GET

/ethermint/evm/v1/eth_call

Implements the eth_call rpc api

GET

/ethermint/evm/v1/estimate_gas

Implements the eth_estimateGas rpc api

GET

/ethermint/evm/v1/trace_tx

Implements the debug_traceTransaction rpc api

GET

/ethermint/evm/v1/trace_block

Implements the debug_traceBlockByNumber and debug_traceBlockByHash rpc api

Transactions

Verb
Method
Description

gRPC

ethermint.evm.v1.Msg/EthereumTx

Submit an Ethereum transactions

POST

/ethermint/evm/v1/ethereum_tx

Submit an Ethereum transactions

PreviousParametersNextfeemarket

Last updated 2 years ago

For an overview on the JSON-RPC methods and namespaces supported on Ethermint, please refer to

https://docs.ethermint.zone/basics/json_rpc.html