Geth Proxy
For the full documentation of available parameters and descriptions, please visit the official Ethereum JSON-RPC docs.
For compatibility with Parity, please prefix all hex strings with " 0x ".
eth_blockNumber
Returns the number of most recent block
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
No parameters required.
Sample response
{
"jsonrpc":"2.0",
"result":"0x1276d6",
"id":83
}
eth_getBlockByNumber
Returns information about a block by block number.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x1276d6
&boolean=true
&apikey=YourApiKeyToken
Query Parameters
Sample response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x32",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"gasUsed": "0xb705",
"hash": "0x98f5caab046494b49e753b203480a791bac2db402cc51e597d998fba23bb6707",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x9d12daf3f876487a82308303b5ab910847b5bc53480a52a1b36f4678667c3e9c",
"nonce": "0x0000000000000000",
"number": "0x1276d6",
"parentHash": "0xf6cbdfac35279e199c865c3a2de0ae1c2e66ab85929e293f1da252a23397d55d",
"receiptsRoot": "0xbe451c8e014ba1edc26a94ea4fc1104586c565143fee1d58e4bca3730df08f98",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x365",
"stateRoot": "0x9d0fd43ccc0c433c0656d4e72d720d5c97e7a308792aeafd7b056972137544b0",
"timestamp": "0x64fbc958",
"totalDifficulty": "0x0",
"transactions": [
{
"blockHash": "0x98f5caab046494b49e753b203480a791bac2db402cc51e597d998fba23bb6707",
"blockNumber": "0x1276d6",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0xf4240",
"gasPrice": "0x0",
"hash": "0xa4b7fbcf4de8e32923ed80ef49f73e490285ae1ce8927cf44f61ebb70bc6c45f",
"input": "0x015d8eb9000000000000000000000000000000000000000000000000000000000040de110000000000000000000000000000000000000000000000000000000064fbc90c000000000000000000000000000000000000000000000000000000000000000731656d082e51054ce9942810d0218a415495bd0e6bbf79e596af70574c8e5b0b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000008f23bb38f531600e5d8fddaaec41f13fab46e98c00000000000000000000000000000000000000000000000000000000000000bc00000000000000000000000000000000000000000000000000000000000a6fe0",
"nonce": "0x1276d5",
"to": "0x4200000000000000000000000000000000000015",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0x6a85f90b7ba8db99356f49e912b5ba4c6f2fbd9d7308e042efb7afb465c864c9",
"mint": "0x0"
}
],
"transactionsRoot": "0x596bdd8494a53b922e4c6b450ff6af0ced19c966cb8c37e56695384d42acc06b",
"uncles": []
}
}
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x1276d6
&apikey=YourApiKeyToken
Query Parameters
Sample response
{
"jsonrpc":"2.0",
"result":"0x1",
"id":1
}
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"blockNumber": "0x42975a",
"from": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"gas": "0x3e8569",
"gasPrice": "0x59682f39",
"maxFeePerGas": "0x59682f44",
"maxPriorityFeePerGas": "0x59682f00",
"hash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"input": "0xe8e337000000000000000000000000000091f4e75a03c11cb9be8e3717219005eb780d890000000000000000000000008cf05e03d9ad6c9141e2ef8c3836185abc94b05a000000000000000000000000000000000000000000000ed2b525841adfc0000000000000000000000000000000000000000000000000021e19e0c9bab240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e100000000000000000000000000000000000000000000000000038d7ea4c68000",
"nonce": "0x67",
"to": "0x4c8945a4781f46acf2ecd0c8155be738093b15c7",
"transactionIndex": "0x1",
"value": "0x0",
"type": "0x2",
"accessList": [],
"chainId": "0xaa37dc",
"v": "0x1",
"r": "0x2d9db0b166a4aa7898860a9d70fe066c96e02b714df3eba1c05e0bb894a68e6e",
"s": "0x165fd19588266afd383e7597bb6661e5fd8aa986c858635e420cfb2b9bec8aa4",
"yParity": "0x1"
}
}
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=0x1276d6
&index=0x0
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x98f5caab046494b49e753b203480a791bac2db402cc51e597d998fba23bb6707",
"blockNumber": "0x1276d6",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0xf4240",
"gasPrice": "0x0",
"hash": "0xa4b7fbcf4de8e32923ed80ef49f73e490285ae1ce8927cf44f61ebb70bc6c45f",
"input": "0x015d8eb9000000000000000000000000000000000000000000000000000000000040de110000000000000000000000000000000000000000000000000000000064fbc90c000000000000000000000000000000000000000000000000000000000000000731656d082e51054ce9942810d0218a415495bd0e6bbf79e596af70574c8e5b0b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000008f23bb38f531600e5d8fddaaec41f13fab46e98c00000000000000000000000000000000000000000000000000000000000000bc00000000000000000000000000000000000000000000000000000000000a6fe0",
"nonce": "0x1276d5",
"to": "0x4200000000000000000000000000000000000015",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0x6a85f90b7ba8db99356f49e912b5ba4c6f2fbd9d7308e042efb7afb465c864c9",
"mint": "0x0"
}
}
eth_getTransactionCount
Returns the number of transactions performed by an address.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getTransactionCount
&address=0xf198a1af2682538e834bbc5f1af1847cf50603e1
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0x69",
"id":1
}
eth_sendRawTransaction
Submits a pre-signed transaction for broadcast to the Ethereum network.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0xe8e337000000000000000000000000000091f4e75a03c11cb9be8e3717219005eb780d890000000000000000000000008cf05e03d9ad6c9141e2ef8c3836185abc94b05a000000000000000000000000000000000000000000000ed2b525841adfc0000000000000000000000000000000000000000000000000021e19e0c9bab240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e100000000000000000000000000000000000000000000000000038d7ea4c68000
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x84c81fc1e23474e13be0114f94f99b43696830f33292fd1d642f37e87e95acd6"
}
Use eth_getTransactionReceipt to retrieve full details.
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"blockNumber": "0x42975a",
"contractAddress": null,
"cumulativeGasUsed": "0x2a102f",
"effectiveGasPrice": "0x59682f39",
"from": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"gasUsed": "0x29592a",
"l1Fee": "0x6d03",
"l1FeeScalar": "0.684",
"l1GasPrice": "0xa",
"l1GasUsed": "0xff0",
"logs": [
{
"address": "0x7423bee608ef90bdfd2e171cc8c3dc138247fd74",
"topics": [
"0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9",
"0x0000000000000000000000000091f4e75a03c11cb9be8e3717219005eb780d89",
"0x0000000000000000000000008cf05e03d9ad6c9141e2ef8c3836185abc94b05a"
],
"data": "0x000000000000000000000000efa7f4cb611e585b874cab7a4de8c333fe76cf8c000000000000000000000000000000000000000000000000000000000000000a",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x0",
"removed": false
},
{
"address": "0x0091f4e75a03c11cb9be8e3717219005eb780d89",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e1",
"0x000000000000000000000000efa7f4cb611e585b874cab7a4de8c333fe76cf8c"
],
"data": "0x000000000000000000000000000000000000000000000ed2b525841adfc00000",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x1",
"removed": false
},
{
"address": "0x8cf05e03d9ad6c9141e2ef8c3836185abc94b05a",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e1",
"0x000000000000000000000000efa7f4cb611e585b874cab7a4de8c333fe76cf8c"
],
"data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x2",
"removed": false
},
{
"address": "0x8cf05e03d9ad6c9141e2ef8c3836185abc94b05a",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e1",
"0x0000000000000000000000004c8945a4781f46acf2ecd0c8155be738093b15c7"
],
"data": "0x000000000000000000000000000072cb5bd86321e38cad51c99e1892a4000000",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x3",
"removed": false
},
{
"address": "0xefa7f4cb611e585b874cab7a4de8c333fe76cf8c",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000003e8",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x4",
"removed": false
},
{
"address": "0xefa7f4cb611e585b874cab7a4de8c333fe76cf8c",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f198a1af2682538e834bbc5f1af1847cf50603e1"
],
"data": "0x00000000000000000000000000000000000000000000059a43c0bc3861755190",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x5",
"removed": false
},
{
"address": "0xefa7f4cb611e585b874cab7a4de8c333fe76cf8c",
"topics": [
"0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1"
],
"data": "0x000000000000000000000000000000000000000000000ed2b525841adfc0000000000000000000000000000000000000000000000000021e19e0c9bab2400000",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x6",
"removed": false
},
{
"address": "0xefa7f4cb611e585b874cab7a4de8c333fe76cf8c",
"topics": [
"0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f",
"0x0000000000000000000000004c8945a4781f46acf2ecd0c8155be738093b15c7"
],
"data": "0x000000000000000000000000000000000000000000000ed2b525841adfc0000000000000000000000000000000000000000000000000021e19e0c9bab2400000",
"blockNumber": "0x42975a",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"blockHash": "0x4c800649065bd019e53d148dea92cbbff4c2d42250911a36467d699278f79945",
"logIndex": "0x7",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000080000000000000000000010000001410000001000001000000000000000000000000000000000000000002000000008000200000000000000000080100000008010000000000000800050000200000000000000000000000020100000000000000000900000000000208000000000010100000000000000000000000000000000000008000000040200000080000000000000000020000000800000800000000000000000000000000000000000000000000000000000002000000000000000000020040000000000000001040080000000020000090000000000000080000100000000000000000000000000000000100000000",
"status": "0x1",
"to": "0x4c8945a4781f46acf2ecd0c8155be738093b15c7",
"transactionHash": "0x62465076c448b8d48568b8addbf4fe8dd7088c5bcce4fb82f92953000e10972c",
"transactionIndex": "0x1",
"type": "0x2"
}
}
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_call
&to=0x4200000000000000000000000000000000000042
&data=0x095ea7b3000000000000000000000000a7ca2c8673bcfa5a26d8ceec2887f2cc2b0db22affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": 3,
"message": "execution reverted: ERC20: approve from the zero address",
"data": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002445524332303a20617070726f76652066726f6d20746865207a65726f206164647265737300000000000000000000000000000000000000000000000000000000"
}
}
eth_getCode
Returns code at a given address.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getCode
&address=0x46E7b6b82F45a9e85c34595E2a5aE76cC67FF5Ba
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x60806040526004361061004e5760003560e01c8063025313a21461006557806310b2b981146100965780633d643cbe146100ab578063afe13fbc146100cb578063f1739cae146100e05761005d565b3661005d5761005b610100565b005b61005b610100565b34801561007157600080fd5b5061007a610132565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b5061007a610161565b3480156100b757600080fd5b5061005b6100c63660046103d6565b61018b565b3480156100d757600080fd5b5061005b610241565b3480156100ec57600080fd5b5061005b6100fb3660046103d6565b61027a565b61013061012b7f9a1f1e098310d583b5217269e373bf0137d9ebbd218ab5d04d9ff18a0c5c62e15490565b61031a565b565b600061015c7f3d5fef76c3ed66b0ef56fb540c5aae1f78bb9d0a3b938760982770c408c354cd5490565b905090565b600061015c7f9a1f1e098310d583b5217269e373bf0137d9ebbd218ab5d04d9ff18a0c5c62e15490565b33610194610132565b6001600160a01b0316146101c35760405162461bcd60e51b81526004016101ba90610406565b60405180910390fd5b6000816001600160a01b03163b1161021d5760405162461bcd60e51b815260206004820152601a60248201527f414444524553532053484f554c4420424520434f4e545241435400000000000060448201526064016101ba565b7f9a1f1e098310d583b5217269e373bf0137d9ebbd218ab5d04d9ff18a0c5c62e155565b3361024a610132565b6001600160a01b0316146102705760405162461bcd60e51b81526004016101ba90610406565b610130600061033e565b33610283610132565b6001600160a01b0316146102a95760405162461bcd60e51b81526004016101ba90610406565b6001600160a01b03811661030e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ba565b6103178161033e565b50565b3660008037600080366000845af43d6000803e808015610339573d6000f35b3d6000fd5b60006103687f3d5fef76c3ed66b0ef56fb540c5aae1f78bb9d0a3b938760982770c408c354cd5490565b9050610392827f3d5fef76c3ed66b0ef56fb540c5aae1f78bb9d0a3b938760982770c408c354cd55565b816001600160a01b0316816001600160a01b03167f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd960405160405180910390a35050565b6000602082840312156103e857600080fd5b81356001600160a01b03811681146103ff57600080fd5b9392505050565b60208082526025908201527f50726f78794f776e61626c653a2063616c6c6572206973206e6f74207468652060408201526437bbb732b960d91b60608201526080019056fea2646970667358221220e13c3e37ccc2c72debf0d5bc0351a08bfa5c2c181ad7adc761acce586c862c9f64736f6c63430008120033"
}
eth_getStorageAt
Returns the value from a storage position at a given address.
This endpoint is still experimental and may have potential issues
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_getStorageAt
&address=0x46E7b6b82F45a9e85c34595E2a5aE76cC67FF5Ba
&position=0x0
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0x0000000000000000000000000000000000000000000000000000000000000001",
"id":1
}
eth_gasPrice
Returns the current price per gas in wei.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
No parameters required.
Sample Response
{
"jsonrpc":"2.0",
"id":73,
"result":"0xf4279"
}
Easily convert Ethereum units using our unit converter.
eth_estimateGas
Makes a call or transaction, which won't be added to the blockchain and returns the used gas.
https://api-sepolia-optimism.etherscan.io/api
?module=proxy
&action=eth_estimateGas
&data=0x
&to=0x1464F3b6EA5A34b6832897F7b0E418482c773a7b
&value=0xff22
&gasPrice=0x51da038cc
&gas=0x5f5e0ff
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0x5208",
"id":1
}
Last updated