Eth module

eth.blockNumber

Returns current block number
Invocation
eth.blockNumber
This method doesn't have parameters.
Returned type
Description
Quantity
Example request of eth.blockNumber
Example response of eth.blockNumber
1
eth.blockNumber
Copied!
1
0x885480
Copied!

eth.call

Executes a tx call (does not create a transaction)
Invocation
eth.call(transactionCall, blockParameter)
Parameter
Type
Description
transactionCall
TransactionForRpc object
blockParameter
BlockParameter object
Returned type
Description
String
Example request of eth.call
Example response of eth.call
Objects in eth_call
1
eth.call(transactionCall, blockParameter)
Copied!
1
0x
Copied!
TransactionForRpc
Field name
Type
Hash
Hash
Nonce
Quantity
BlockHash
Hash
BlockNumber
Quantity
TransactionIndex
Quantity
From
Address
To
Address
Value
Quantity
GasPrice
Quantity
MaxPriorityFeePerGas
Quantity
MaxFeePerGas
Quantity
Gas
Quantity
Data
Data
Input
Data
ChainId
Quantity
Type
TxType object
AccessList
AccessListItemForRpc[] object
V
Quantity
S
Quantity
R
Quantity
TxType
AccessListItemForRpc[]
Field name
Type
Address
Address
StorageKeys
Array
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)

eth.chainId

Returns ChainID
Invocation
eth.chainId
This method doesn't have parameters.
Returned type
Description
Quantity
Example request of eth.chainId
Example response of eth.chainId
1
eth.chainId
Copied!
1
0x4
Copied!

eth.createAccessList

Creates an EIP2930 type AccessList for the given transaction
Hint: If your transaction has code executed, then you can generate transaction access list with eth_createAccessList. If you send it with your transaction then it will lower your gas cost on Ethereum
Invocation
eth.createAccessList(transactionCall, blockParameter, optimize)
Parameter
Type
Description
transactionCall
TransactionForRpc object
Transaction's details
blockParameter
BlockParameter object
(optional)
optimize
Boolean
(optional)
Returned type
Description
AccessListForRpc object
Example request of eth.createAccessList
Example response of eth.createAccessList
Objects in eth_createAccessList
1
eth.createAccessList(transactionCall, blockParameter, optimize)
Copied!
1
{"accessList":[{"address":"0xfffffffffffffffffffffffffffffffffffffffe","storageKeys":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"]},{"address":"0x76e68a8696537e4141926f3e528733af9e237d69","storageKeys":[]}],"gasUsed":"0xf71b"}
Copied!
TransactionForRpc
Field name
Type
Hash
Hash
Nonce
Quantity
BlockHash
Hash
BlockNumber
Quantity
TransactionIndex
Quantity
From
Address
To
Address
Value
Quantity
GasPrice
Quantity
MaxPriorityFeePerGas
Quantity
MaxFeePerGas
Quantity
Gas
Quantity
Data
Data
Input
Data
ChainId
Quantity
Type
TxType object
AccessList
AccessListItemForRpc[] object
V
Quantity
S
Quantity
R
Quantity
TxType
AccessListItemForRpc[]
Field name
Type
Address
Address
StorageKeys
Array
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)
AccessListForRpc
Field name
Type
AccessList
AccessListItemForRpc[] object
GasUsed
Quantity

eth.estimateGas

Executes a tx call and returns gas used (does not create a transaction)
Invocation
eth.estimateGas(transactionCall, blockParameter)
Parameter
Type
Description
transactionCall
TransactionForRpc object
blockParameter
BlockParameter object
Returned type
Description
Quantity
Example request of eth.estimateGas
Example response of eth.estimateGas
Objects in eth_estimateGas
1
eth.estimateGas(transactionCall, blockParameter)
Copied!
1
0x
Copied!
TransactionForRpc
Field name
Type
Hash
Hash
Nonce
Quantity
BlockHash
Hash
BlockNumber
Quantity
TransactionIndex
Quantity
From
Address
To
Address
Value
Quantity
GasPrice
Quantity
MaxPriorityFeePerGas
Quantity
MaxFeePerGas
Quantity
Gas
Quantity
Data
Data
Input
Data
ChainId
Quantity
Type
TxType object
AccessList
AccessListItemForRpc[] object
V
Quantity
S
Quantity
R
Quantity
TxType
AccessListItemForRpc[]
Field name
Type
Address
Address
StorageKeys
Array
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)

eth.getBalance

Returns account balance
Invocation
eth.getBalance(address, blockParameter)
Parameter
Type
Description
address
Address
blockParameter
BlockParameter object
Returned type
Description
Quantity
Example request of eth.getBalance
Example response of eth.getBalance
Objects in eth_getBalance
1
eth.getBalance(address, blockParameter)
Copied!
1
0x6c8ae945bfe6e
Copied!
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)

eth.getBlockByHash

Retrieves a block by hash
Invocation
eth.getBlockByHash(blockHash, returnFullTransactionObjects)
Parameter
Type
Description
blockHash
Hash
returnFullTransactionObjects
Boolean
Returned type
Description
BlockForRpc object
Example request of eth.getBlockByHash
Example response of eth.getBlockByHash
Objects in eth_getBlockByHash
1
eth.getBlockByHash(blockHash, returnFullTransactionObjects)
Copied!
1
{"author":"0x0000000000000000000000000000000000000000","difficulty":"0x1","extraData":"0x000000000000436f6e73656e5379732048797065726c656467657220426573754d3f7b71165a8266fcc569c96b6fcf9971ee4a8df59eeec4dcced0df8d778733429988e21d0124918859f988be9debf4b25fb5282ea41a2fc15f827f446ec93200","gasLimit":"0x1c9c364","gasUsed":"0x3aa87","hash":"0xf33507f93a046dbdbb80dee5f47b84283297f6c53f1b665adc3cb6fe4138aa84","logsBloom":"0x00000000000020000000000008000060000000000000000000000000000000000000000000000000201000020008000000000000000000000100000000200020000000000000000000000008000000000000000010000000000000000000000000000000000000000000080000000000000000000000002000000010000000000000000000000000000000000000000000040000001000000000000000020000020400000000000000000000000000000000000000000000000000010000000000000002080000000000000000020000000000000000000000000000000000000010020000000000000000000000000100000000000000000000010000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x4e3d79","parentHash":"0x01dba3a7eb61dc6dba3f9663c8fb632f76f60a476f57df74c3e5bd9d0a246339","receiptsRoot":"0x70f3bd929735d8edeb953cd30a27e703e7dd3ec4af32cb74fe8ac302f9e7fb87","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x754","stateRoot":"0x71af7e25302d1baa4c988c267450eb2c7fa20938fac377809c8d77f8ff8108ac","totalDifficulty":"0x726275","timestamp":"0x60ec1218","baseFeePerGas":"0x7","transactions":["0xa65d391d8149ed0906fab923e870d2bc7f6d27c2be10fe1bcfc6f02869b38ef3","0x369a89354041b7a8cb40edce51c36ebb0ee6ffa4d8056f5a658d90f3bbe1a81a","0xf857daf60d03381b9a6ecb341b62798b424d20dc05763858e13955dd866b489d"],"transactionsRoot":"0x90115f8dc10c08e748675f52f3904615729a014461ca80d72c60239bf75ee209","uncles":[]}
Copied!
BlockForRpc
Field name
Type
Author
Address
Difficulty
Quantity
ExtraData
Data
GasLimit
Quantity
GasUsed
Quantity
Hash
Hash
LogsBloom
Bloom Object
Miner
Address
MixHash
Hash
Nonce
Data
Number
Quantity
ParentHash
Hash
ReceiptsRoot
Hash
Sha3Uncles
Hash
Signature
Data
Size
Quantity
StateRoot
Hash
Step
Quantity
TotalDifficulty
Quantity
Timestamp
Quantity
BaseFeePerGas
Quantity
Transactions
Array
TransactionsRoot
Hash
Uncles
Array

eth.getBlockByNumber

Retrieves a block by number
Invocation
eth.getBlockByNumber(blockParameter, returnFullTransactionObjects)
Parameter
Type
Description
blockParameter
BlockParameter object
returnFullTransactionObjects
Boolean
Returned type
Description
BlockForRpc object
Example request of eth.getBlockByNumber
Example response of eth.getBlockByNumber
Objects in eth_getBlockByNumber
1
eth.getBlockByNumber(blockParameter, returnFullTransactionObjects)
Copied!
1
{"author":"0x0000000000000000000000000000000000000000","difficulty":"0x1","extraData":"0x000000000000436f6e73656e5379732048797065726c656467657220426573754d3f7b71165a8266fcc569c96b6fcf9971ee4a8df59eeec4dcced0df8d778733429988e21d0124918859f988be9debf4b25fb5282ea41a2fc15f827f446ec93200","gasLimit":"0x1c9c364","gasUsed":"0x3aa87","hash":"0xf33507f93a046dbdbb80dee5f47b84283297f6c53f1b665adc3cb6fe4138aa84","logsBloom":"0x00000000000020000000000008000060000000000000000000000000000000000000000000000000201000020008000000000000000000000100000000200020000000000000000000000008000000000000000010000000000000000000000000000000000000000000080000000000000000000000002000000010000000000000000000000000000000000000000000040000001000000000000000020000020400000000000000000000000000000000000000000000000000010000000000000002080000000000000000020000000000000000000000000000000000000010020000000000000000000000000100000000000000000000010000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x4e3d79","parentHash":"0x01dba3a7eb61dc6dba3f9663c8fb632f76f60a476f57df74c3e5bd9d0a246339","receiptsRoot":"0x70f3bd929735d8edeb953cd30a27e703e7dd3ec4af32cb74fe8ac302f9e7fb87","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x754","stateRoot":"0x71af7e25302d1baa4c988c267450eb2c7fa20938fac377809c8d77f8ff8108ac","totalDifficulty":"0x726275","timestamp":"0x60ec1218","baseFeePerGas":"0x7","transactions":["0xa65d391d8149ed0906fab923e870d2bc7f6d27c2be10fe1bcfc6f02869b38ef3","0x369a89354041b7a8cb40edce51c36ebb0ee6ffa4d8056f5a658d90f3bbe1a81a","0xf857daf60d03381b9a6ecb341b62798b424d20dc05763858e13955dd866b489d"],"transactionsRoot":"0x90115f8dc10c08e748675f52f3904615729a014461ca80d72c60239bf75ee209","uncles":[]}
Copied!
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)
BlockForRpc
Field name
Type
Author
Address
Difficulty
Quantity
ExtraData
Data
GasLimit
Quantity
GasUsed
Quantity
Hash
Hash
LogsBloom
Bloom Object
Miner
Address
MixHash
Hash
Nonce
Data
Number
Quantity
ParentHash
Hash
ReceiptsRoot
Hash
Sha3Uncles
Hash
Signature
Data
Size
Quantity
StateRoot
Hash
Step
Quantity
TotalDifficulty
Quantity
Timestamp
Quantity
BaseFeePerGas
Quantity
Transactions
Array
TransactionsRoot
Hash
Uncles
Array

eth.getBlockTransactionCountByHash

Returns number of transactions in the block block hash
Invocation
eth.getBlockTransactionCountByHash(blockHash)
Parameter
Type
Description
blockHash
Hash
Returned type
Description
Quantity
Example request of eth.getBlockTransactionCountByHash
Example response of eth.getBlockTransactionCountByHash
1
eth.getBlockTransactionCountByHash(["0x199c2ef63392fb67f929fe0580e11f62fa6c54b9951a624896da91375a6805b1"])
Copied!
1
0x20
Copied!

eth.getBlockTransactionCountByNumber

Returns number of transactions in the block by block number
Invocation
eth.getBlockTransactionCountByNumber(blockParameter)
Parameter
Type
Description
blockParameter
BlockParameter object
Returned type
Description
Quantity
Example request of eth.getBlockTransactionCountByNumber
Example response of eth.getBlockTransactionCountByNumber
Objects in eth_getBlockTransactionCountByNumber
1
eth.getBlockTransactionCountByNumber(["8934677"])
Copied!
1
0x20
Copied!
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)

eth.getCode

Returns account code at given address and block
Invocation
eth.getCode(address, blockParameter)
Parameter
Type
Description
address
Address
blockParameter
BlockParameter object
Returned type
Description
Data
Example request of eth.getCode
Objects in eth_getCode
1
eth.getCode(address, blockParameter)
Copied!
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
    Quantity or String (latest, earliest, pending)

eth.getFilterChanges

Reads filter changes
Invocation
eth.getFilterChanges(filterId)
Parameter
Type
Description
filterId
Quantity
Returned type
Description
Array
Example request of eth.getFilterChanges
Example response of eth.getFilterChanges
1
eth.getFilterChanges(["0x9"])
Copied!
1
[]
Copied!

eth.getLogs

Reads logs
Invocation
eth.getLogs(filter)
Parameter
Type
Description
filter
Filter object
Returned type
Description
Array
Example request of eth.getLogs
Objects in eth_getLogs
1
eth.getLogs(filter)
Copied!
Filter
Field name
Type
FromBlock
BlockParameter object
ToBlock
BlockParameter object
Address
Object
Topics
Array
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean