Most Popular EVM API Methods
A comprehensive list of the most popular EVM API methods
Introduction
Knowing about the most popular API methods of the Ethereum Virtual Machine (EVM) can be valuable for developers looking to interact with smart contracts on the EVM blockchains. These methods allow for various actions such as querying contract data, retrieving transaction information, and checking the status of the blockchain. Understanding the capabilities and use cases of these popular methods can help you make informed decisions when building decentralized applications and interacting with the EVM networks. Additionally, this knowledge can also be useful for individuals looking to access and analyze blockchain data for analytics or research purposes.
On this page, you will find a list of some of the most widely used API methods for interacting with the EVM blockchains.
Most Popular EVM API Methods
1. eth_call
eth_call
Description
Allows you to call a contract method without modifying the state of the blockchain.
Use Cases & Resources
- Querying the balance of an ERC-20 token contract
- How to decode an
eth_call
response - Gas Limits for
eth_call
Access Links
2. eth_getTransactionReceipt
eth_getTransactionReceipt
Description
Retrieves the receipt of a specific transaction by transaction hash.
Use Cases & Resources
- Getting general information about a transaction
- Confirming that a transaction has been processed
- Understanding the Transaction Object on Ethereum
- Ethereum Transactions - Pending, Mined, Dropped & Replaced
Access Links
eth_getTransactionReceipt
: Ethereumeth_getTransactionReceipt
: Polygoneth_getTransactionReceipt
: Optimismeth_getTransactionReceipt
: Arbitrumeth_getTransactionReceipt
: Astar
3. eth_blockNumber
eth_blockNumber
Description
Returns the number of the most recent block on the blockchain.
Use Cases & Resources
- Determining the current height of the blockchain
- How to Get NFT Contract Creator Address
Access Links
eth_blockNumber
: Ethereumeth_blockNumber
: Polygoneth_blockNumber
: Optimismeth_blockNumber
: Arbitrumeth_blockNumber
: Astar
4. eth_getBlockByNumber
eth_getBlockByNumber
Description
Retrieves the full details of a specific block by its block number.
Use Cases & Resources
- Retrieving the details of a specific block for analytics purposes
- Calculating Ethereum Miner Rewards
Access Links
eth_getBlockByNumber
: Ethereumeth_getBlockByNumber
: Polygoneth_getBlockByNumber
: Optimismeth_getBlockByNumber
: Arbitrumeth_getBlockByNumber
: Astar
5. eth_chainId
eth_chainId
Description
Returns the current chain ID of the network.
Use Case
- Determining which Ethereum network a node is connected to (e.g. Mainnet, Goerli)
Access Links
eth_chainId
: Ethereumeth_chainId
: Polygoneth_chainId
: Optimismeth_chainId
: Arbitrumeth_chainId
: Astar
6. eth_getLogs
eth_getLogs
Description
Returns an array of all logs matching a specific filter.
Use Cases & Resources
- Retrieving all transfer events of an ERC-20 token contract
- Understanding Logs: Deep Dive into eth_getLogs
- How to Get On-chain Events on Ethereum
- Logs
Access Links
7. eth_getBalance
eth_getBalance
Description
Returns the balance (of native currency) of a specific address in Wei.
Use Cases & Resources
- Checking the balance of an address before sending a transaction
- How to Get ETH Balance at a Point in Time
- How to Calculate Ethereum Miner Rewards
Access Links
eth_getBalance
: Ethereumeth_getBalance
: Polygoneth_getBalance
: Optimismeth_getBalance
: Arbitrumeth_getBalance
: Astar
8. net_version
net_version
Description
Returns the network ID of the current network.
Example Use Case
- Determining which network a node is connected to (e.g. Mainnet, Goerli)
Access Links
net_version
: Ethereumnet_version
: Polygonnet_version
: Optimismnet_version
: Arbitrumnet_version
: Astar
9. eth_getTransactionByHash
eth_getTransactionByHash
Description
Returns the full details of a specific transaction by its hash
Use Cases & Resources
- Retrieving the details of a specific transaction for analytics purposes.
- Understanding the Transaction Object on Ethereum
Access Links
eth_getTransactionByHash
: Ethereumeth_getTransactionByHash
: Polygoneth_getTransactionByHash
: Optimismeth_getTransactionByHash
: Arbitrumeth_getTransactionByHash
: Astar
10. eth_getCode
eth_getCode
Description
Returns the code of a specific contract address.
Use Case
- Checking if an EVM address is a smart contract or an EOA
Access Links
eth_getCode
: Ethereumeth_getCode
: Polygoneth_getCode
: Optimismeth_getCode
: Arbitrumeth_getCode
: Astar
11. getNFTMetadata
getNFTMetadata
Description
Gets the metadata associated with a given NFT.
Use Cases & Resources
- Retrieving information about a specific NFT (e.g. name, image, etc.)
- How to Get Token Metadata
Access Links
12. eth_getFilterChanges
eth_getFilterChanges
Description
Returns an array of all logs matching a filter, from the filter's creation block to the latest block.
Example Use Case
- Retrieving all transfer events of an ERC-20 token contract since the filter was created
Access Links
Updated almost 2 years ago