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-testnet.snowscan.xyz/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
No parameters required.
Sample response
{
"jsonrpc":"2.0",
"result":"0x80beeb",
"id":83
}
eth_getBlockByNumber
Returns information about a block by block number.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x80beeb
&boolean=true
&apikey=YourApiKeyToken
Query Parameters
Sample response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"baseFeePerGas":"0x5d21dba00",
"blockExtraData":"0x",
"blockGasCost":"0x0",
"difficulty":"0x1",
"extDataGasUsed":"0x0",
"extDataHash":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"extraData":"0x00000000000000000000000000013c4e0000000000000000000000000004561b000000000000000000000000000087ee000000000000000000000000000116b000000000000000000000000000000000",
"gasLimit":"0x7a1200",
"gasUsed":"0x1804d",
"hash":"0x3a7d0b881167c24f9159385eaaf6e646d2b257e9e4742893affc824f0de0ee58",
"logsBloom":"0x00000000000000000000000000000000000000000000000000000000080000000000000080800000000000000000000000000000000000000000000000200000000000000000000000000008000000000000000000000000001000000000000100100000020000000000000000000800000000000000002000000010000000000000000000000000000000000000000000000000000000000000000000000000020000000008000000200000000000000000000000000000001000000000000000000002000000000000000000000000000000000400200000000000000020800010000000000000000000000000000000000000000020000800000000000000",
"miner":"0x0100000000000000000000000000000000000000",
"mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce":"0x0000000000000000",
"number":"0x80beeb",
"parentHash":"0xfb92b05801d3f2f86e3fc01850faf6cbc79bb2d06c0bab23ca68995662b93844",
"receiptsRoot":"0x288a03caf31afb92c54f324f881739c78369ec96634eb848008b9a3f60eaec3a",
"sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size":"0x317",
"stateRoot":"0xc193e7a5bc44cad9c42bb57a8ef0e72acdb2de5226356431a823ee2f81e2e3bd",
"timestamp":"0x625479cf",
"totalDifficulty":"0x80beeb",
"transactions":[
{
"blockHash":"0x3a7d0b881167c24f9159385eaaf6e646d2b257e9e4742893affc824f0de0ee58",
"blockNumber":"0x80beeb",
"from":"0x15dff6d27e56e5e63991ba4f42f3d0fc3ecf1994",
"gas":"0x311ba",
"gasPrice":"0x5d21dba00",
"maxFeePerGas":"0x5d21dba00",
"maxPriorityFeePerGas":"0x5d21dba00",
"hash":"0x2b622a001e47aaead03801857116737a8e788aa2a38ca8bef7b799314849d7cd",
"input":"0x51c6590a00000000000000000000000000000000000000000000000029a2241af62c0000",
"nonce":"0x8",
"to":"0xf0387731304b1471c5bbb54d1302931cce952a1a",
"transactionIndex":"0x0",
"value":"0x0",
"type":"0x2",
"accessList":[
],
"chainId":"0xa869",
"v":"0x1",
"r":"0x84e4bee9aa2feefb72741a14681f83147ce90f730c52e1e2576795c831514783",
"s":"0x6a092bfd375eb4ecd5abaef02a02242384a8ec280213b96137365d57abe65253"
}
],
"transactionsRoot":"0x5e5bf718768dd6e3a0470b5fb21f29bc2c8c0d9a460fad9a98a553a9069a0359",
"uncles":[
]
}
}
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x80beeb
&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-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0x2b622a001e47aaead03801857116737a8e788aa2a38ca8bef7b799314849d7cd
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0x3a7d0b881167c24f9159385eaaf6e646d2b257e9e4742893affc824f0de0ee58",
"blockNumber":"0x80beeb",
"from":"0x15dff6d27e56e5e63991ba4f42f3d0fc3ecf1994",
"gas":"0x311ba",
"gasPrice":"0x5d21dba00",
"maxFeePerGas":"0x5d21dba00",
"maxPriorityFeePerGas":"0x5d21dba00",
"hash":"0x2b622a001e47aaead03801857116737a8e788aa2a38ca8bef7b799314849d7cd",
"input":"0x51c6590a00000000000000000000000000000000000000000000000029a2241af62c0000",
"nonce":"0x8",
"to":"0xf0387731304b1471c5bbb54d1302931cce952a1a",
"transactionIndex":"0x0",
"value":"0x0",
"type":"0x2",
"accessList":[
],
"chainId":"0xa869",
"v":"0x1",
"r":"0x84e4bee9aa2feefb72741a14681f83147ce90f730c52e1e2576795c831514783",
"s":"0x6a092bfd375eb4ecd5abaef02a02242384a8ec280213b96137365d57abe65253"
}
}
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=0x80beeb
&index=0x0
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0x3a7d0b881167c24f9159385eaaf6e646d2b257e9e4742893affc824f0de0ee58",
"blockNumber":"0x80beeb",
"from":"0x15dff6d27e56e5e63991ba4f42f3d0fc3ecf1994",
"gas":"0x311ba",
"gasPrice":"0x5d21dba00",
"maxFeePerGas":"0x5d21dba00",
"maxPriorityFeePerGas":"0x5d21dba00",
"hash":"0x2b622a001e47aaead03801857116737a8e788aa2a38ca8bef7b799314849d7cd",
"input":"0x51c6590a00000000000000000000000000000000000000000000000029a2241af62c0000",
"nonce":"0x8",
"to":"0xf0387731304b1471c5bbb54d1302931cce952a1a",
"transactionIndex":"0x0",
"value":"0x0",
"type":"0x2",
"accessList":[
],
"chainId":"0xa869",
"v":"0x1",
"r":"0x84e4bee9aa2feefb72741a14681f83147ce90f730c52e1e2576795c831514783",
"s":"0x6a092bfd375eb4ecd5abaef02a02242384a8ec280213b96137365d57abe65253"
}
}
eth_getTransactionCount
Returns the number of transactions performed by an address.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getTransactionCount
&address=0x15dff6d27e56e5e63991ba4f42f3d0fc3ecf1994
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0xa",
"id":1
}
eth_sendRawTransaction
Submits a pre-signed transaction for broadcast to the Avalanche C-Chain network.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0x02f874030185012a05f200852e90edd00082520894eeee7341f206302f2216e39d715b96d8c6901a1c880de0b6b3a764000080c001a0bf61ea5419c7856be4ea2221b721b849d50fec738d10a714e7aaa809d9ad8838a01e59353aa8e567cc0661fb58b047361998df234df6593bf424839bc5ea214a2c
&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-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0x04d096e0ef5d113a1ef65002ddc8a9d2225b4d7344300cc09f152cfbf23cbb3c
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0x772cb46a4c51e20b4d51a97f3db4c7c3802d4fbab91bc2bbf74fd10f692d1614",
"blockNumber":"0x80bfad",
"contractAddress":null,
"cumulativeGasUsed":"0x610d4",
"effectiveGasPrice":"0x63f642c55",
"from":"0x23cf70eb292e8aa451cd8f18b444e7db00502513",
"gasUsed":"0x610d4",
"logs":[
{
"address":"0xdc3431c2f5caefcd68d274a2ec9982babc2f4fcc",
"topics":[
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000644f73a58e8d7386d4c5db2eff6cb33de455b4e3",
"0x27ee667666e60205361d6e421dc82d6c61216e0bb80f05884dda591ca5a5f725"
],
"data":"0x",
"blockNumber":"0x80bfad",
"transactionHash":"0x04d096e0ef5d113a1ef65002ddc8a9d2225b4d7344300cc09f152cfbf23cbb3c",
"transactionIndex":"0x0",
"blockHash":"0x772cb46a4c51e20b4d51a97f3db4c7c3802d4fbab91bc2bbf74fd10f692d1614",
"logIndex":"0x0",
"removed":false
}
],
"logsBloom":"0x00000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000008000000000800000000022000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000002000000000000800000000000000000000000000000000000800020000000000000000000000000000000000000020000000000000000000000000000",
"status":"0x1",
"to":"0xdc3431c2f5caefcd68d274a2ec9982babc2f4fcc",
"transactionHash":"0x04d096e0ef5d113a1ef65002ddc8a9d2225b4d7344300cc09f152cfbf23cbb3c",
"transactionIndex":"0x0",
"type":"0x2"
}
}
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_call
&to=0x0f2a5d18ad37395266c0b59e3dfcfe790a0ee8e1
&data=0x313ce5670000000000000000000000000000000000000000000000000000000000000000
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
⛽ Note: The gas
parameter is capped at 2x the current block gas limit.
Sample Response
{
"jsonrpc":"2.0",
"result":"0x0000000000000000000000000000000000000000000000000000000000000006",
"id":1
}
eth_getCode
Returns code at a given address.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getCode
&address=0xebbc3452cc911591e4f18f3b36727df45d6bd1f9
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101c6565b6040516100c391906107d8565b60405180910390f35b6100df6100da3660046107ae565b610258565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610772565b61026e565b604051601281526020016100c3565b6100df6101313660046107ae565b61031d565b6100f361014436600461071d565b6001600160a01b031660009081526020819052604090205490565b6100b6610359565b6100df6101753660046107ae565b610368565b6100df6101883660046107ae565b610401565b6100f361019b36600461073f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101d590610853565b80601f016020809104026020016040519081016040528092919081815260200182805461020190610853565b801561024e5780601f106102235761010080835404028352916020019161024e565b820191906000526020600020905b81548152906001019060200180831161023157829003601f168201915b5050505050905090565b600061026533848461040e565b50600192915050565b600061027b848484610532565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103055760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610312853385840361040e565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161026591859061035490869061082d565b61040e565b6060600480546101d590610853565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103ea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102fc565b6103f7338585840361040e565b5060019392505050565b6000610265338484610532565b6001600160a01b0383166104705760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6001600160a01b0382166104d15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102fc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105965760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102fc565b6001600160a01b0382166105f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102fc565b6001600160a01b038316600090815260208190526040902054818110156106705760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102fc565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906106a790849061082d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106f391815260200190565b60405180910390a350505050565b80356001600160a01b038116811461071857600080fd5b919050565b60006020828403121561072f57600080fd5b61073882610701565b9392505050565b6000806040838503121561075257600080fd5b61075b83610701565b915061076960208401610701565b90509250929050565b60008060006060848603121561078757600080fd5b61079084610701565b925061079e60208501610701565b9150604084013590509250925092565b600080604083850312156107c157600080fd5b6107ca83610701565b946020939093013593505050565b600060208083528351808285015260005b81811015610805578581018301518582016040015282016107e9565b81811115610817576000604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561084e57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061086757607f821691505b6020821081141561088857634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212201b3d4b657de1a235dd79d09ac5a4b158cb6fd6379b9a1a84b6d71ca19520106964736f6c63430008070033",
"id":1
}
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-testnet.snowscan.xyz/api
?module=proxy
&action=eth_getStorageAt
&address=0x2B579a734436045F1ea233AC11CE3259Da9b4445
&position=0x0
&tag=latest
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"result":"0x000000000000000000000000d97a3d9eb7c07ce23f241feadd6da13c0506ea1a",
"id":1
}
eth_gasPrice
Returns the current price per gas in wei.
https://api-testnet.snowscan.xyz/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
No parameters required.
Sample Response
{
"jsonrpc":"2.0",
"result":"0x5d21dba00",
"id":73
}
Easily convert Avalanche 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-testnet.snowscan.xyz/api
?module=proxy
&action=eth_estimateGas
&data=0x
&to=0x2b579a734436045f1ea233ac11ce3259da9b4445
&value=0x1
&gasPrice=0x5D21DBA00
&gas=0x186A0
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"error":{
"code":-32000,
"message":"execution reverted"
}
}
Last updated