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-moonbase.moonscan.io/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Sample response
{
"jsonrpc": "2.0",
"result": "0x44b1d9",
"id": 83
}
eth_getBlockByNumber
Returns information about a block by block number.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x44b1d9
&boolean=true
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the block number, in hex eg. 0xC36B3C |
| the boolean value to show full transaction objects. when true , returns full transaction objects and their information, when false only returns a list of transactions. |
Sample response
{
"jsonrpc": "2.0",
"result": {
"author": "0x3a7d3048f3cb0391bb44b518e5729f07bcc7a45d",
"baseFeePerGas": "0x7735940",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0xe4e1c0",
"gasUsed": "0x0",
"hash": "0xc71f65bb15bff744f3fce9584e3653da6f0aaaf8e9dfd762dd7c4ba2c2ff216b",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x3a7d3048f3cb0391bb44b518e5729f07bcc7a45d",
"nonce": "0x0000000000000000",
"number": "0x44b1d9",
"parentHash": "0xa312368e080a7c7b87ab7e8759037e4e87e33d8a41b6d6ab6551ca41d8940238",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x201",
"stateRoot": "0xfe76f72432e993e3094ab3e7329acfaaf9530fa250de10270f352fba0b814573",
"timestamp": "0x64817c64",
"totalDifficulty": "0x0",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
},
"id": 1
}
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x10A70A
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the block number, in hex eg. 0x10FB78 |
Sample response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x1"
}
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the hash of the transaction |
Sample Response
{
"jsonrpc": "2.0",
"result": {
"hash": "0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1",
"nonce": "0xf469",
"blockHash": "0x4b3b233de97e0b1263a573e52ec29f6da4fd561a03d51606bdcc4674b4529198",
"blockNumber": "0x44b1b0",
"transactionIndex": "0x0",
"from": "0x104b3f3ff66a98f20e20d401c7a818e0bb931827",
"to": "0x1bfa3b5e9be2c5298b7de11b5acb08c37683f4ef",
"value": "0x0",
"gasPrice": "0x7735940",
"maxFeePerGas": "0xee6b280",
"maxPriorityFeePerGas": "0x0",
"gas": "0x612a3",
"input": "0x151fd8f3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000010a0540073699163d29cc4e8cde4bc3ac276a7c0d2c429a3e3716b3e26ac603e62b0f1e55cd25ba3c8538fa7d66caae49774c542c648cae9e90ce86b526b7d2fe536d5700000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000042697066733a2f2f626166796265696462326a627175337673327564666b6833696a646962336a7a36796b717168366a347075733769693233667870717732646e7175000000000000000000000000000000000000000000000000000000000000",
"creates": null,
"raw": "0x02f9019082050782f46980840ee6b280830612a3941bfa3b5e9be2c5298b7de11b5acb08c37683f4ef80b90124151fd8f3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000010a0540073699163d29cc4e8cde4bc3ac276a7c0d2c429a3e3716b3e26ac603e62b0f1e55cd25ba3c8538fa7d66caae49774c542c648cae9e90ce86b526b7d2fe536d5700000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000042697066733a2f2f626166796265696462326a627175337673327564666b6833696a646962336a7a36796b717168366a347075733769693233667870717732646e7175000000000000000000000000000000000000000000000000000000000000c001a043ac690b08e852e9f8c015da6b096a17109857b3cad84b0d15fe47b7b0582bac9f1507387f9309972e34527550c2984d08569c2912ecd2b2492672ba5a1fc700",
"publicKey": "0xf9036ff07230225083f0d2383e96a9a0a946a19d849e8d9d7faa095e93fd15846dc422c5f3b009594c4c83566a1e43937dd37bb4ecd7e388b42580bdc46f1921",
"chainId": "0x507",
"standardV": "0x1",
"v": "0x1",
"r": "0x43ac690b08e852e9f8c015da6b096a17109857b3cad84b0d15fe47b7b0582bac",
"s": "0x1507387f9309972e34527550c2984d08569c2912ecd2b2492672ba5a1fc700",
"accessList": [],
"type": "0x2"
},
"id": 1
}
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=0x10A70A
&index=0x0
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the block number, in hex eg. 0x10FB78 |
| the position of the uncle's index in the block, in hex eg. 0x0 |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0x9329b3b236fb6a60ddec501d9264e587593f7b810fff31c9a2cf1f2deb58ebe2",
"blockNumber":"0x10a70a",
"from":"0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd",
"gas":"0x5208",
"gasPrice":"0x77359407",
"maxFeePerGas":"0x77359407",
"maxPriorityFeePerGas":"0x77359400",
"hash":"0x57be61afdf095899d160003f58e429d3f9b0851fd90db217fc0aa474761f9f34",
"input":"0x",
"nonce":"0x6e",
"to":"0x97664026bf28d95330dd80174630c287a9c8e2e3",
"transactionIndex":"0x0",
"value":"0x35c007914225000",
"type":"0x2",
"accessList":[
],
"chainId":"0xaa36a7",
"v":"0x1",
"r":"0x9c358c4e6ef291967775d0c50e34dbb3a0c602a3d8e616dffb5a513e4ac2018e",
"s":"0x28dd29246d37f57a35026d315c352042f04afc0709c541a9e0d39df571aa7c67"
}
}
eth_getTransactionCount
Returns the number of transactions performed by an address.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getTransactionCount
&address=0x104b3f3ff66a98f20e20d401c7a818e0bb931827
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to get transaction count |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc": "2.0",
"result": "0xf475",
"id": 1
}
eth_sendRawTransaction
Submits a pre-signed transaction for broadcast to the Moonbase network.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0x02f874030185012a05f200852e90edd00082520894eeee7341f206302f2216e39d715b96d8c6901a1c880de0b6b3a764000080c001a0bf61ea5419c7856be4ea2221b721b849d50fec738d10a714e7aaa809d9ad8838a01e59353aa8e567cc0661fb58b047361998df234df6593bf424839bc5ea214a2c
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the signed raw transaction data to broadcast. |
💡 Tip: Send a POST request if your hex string is particularly long.
🖋️ For more information on creating a signed raw transaction, visit this page.
Sample Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x84c81fc1e23474e13be0114f94f99b43696830f33292fd1d642f37e87e95acd6"
}
⛏️ Note: The result
represents the transaction hash of the submitted raw transaction.
Use eth_getTransactionReceipt to retrieve full details.
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the hash of the transaction |
Sample Response
{
"jsonrpc": "2.0",
"result": {
"transactionHash": "0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1",
"transactionIndex": "0x0",
"blockHash": "0x4b3b233de97e0b1263a573e52ec29f6da4fd561a03d51606bdcc4674b4529198",
"from": "0x104b3f3ff66a98f20e20d401c7a818e0bb931827",
"to": "0x1bfa3b5e9be2c5298b7de11b5acb08c37683f4ef",
"blockNumber": "0x44b1b0",
"cumulativeGasUsed": "0x5af54",
"gasUsed": "0x5af54",
"contractAddress": null,
"logs": [
{
"address": "0x1bfa3b5e9be2c5298b7de11b5acb08c37683f4ef",
"topics": [
"0x8b1f889addbfa41db5227bae3b091bd5c8b9a9122f874dfe54ba2f75aabe1f4c",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x00000000000000000000000000000000000000000000000000000000010a0540"
],
"data": "0x000000000000000000000000000000000000000000000000000000000044b241",
"blockHash": "0x4b3b233de97e0b1263a573e52ec29f6da4fd561a03d51606bdcc4674b4529198",
"blockNumber": "0x44b1b0",
"transactionHash": "0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1",
"transactionIndex": "0x0",
"logIndex": "0x0",
"transactionLogIndex": "0x0",
"removed": false
},
{
"address": "0x1bfa3b5e9be2c5298b7de11b5acb08c37683f4ef",
"topics": [
"0x57b0cb34d2ff9ed661f8b3c684aaee6cbf0bda5da02f4044205556817fa8e76c"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000010a0540073699163d29cc4e8cde4bc3ac276a7c0d2c429a3e3716b3e26ac603e62b0f1e55cd25ba3c8538fa7d66caae49774c542c648cae9e90ce86b526b7d2fe536d5700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000004ce3e843a08e97cdcd000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f626166796265696462326a627175337673327564666b6833696a646962336a7a36796b717168366a347075733769693233667870717732646e7175000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x4b3b233de97e0b1263a573e52ec29f6da4fd561a03d51606bdcc4674b4529198",
"blockNumber": "0x44b1b0",
"transactionHash": "0x1ec8dfbc879ad811113a7b330ef0ec4370a134f13c9b6efb948a6b02113d04a1",
"transactionIndex": "0x0",
"logIndex": "0x1",
"transactionLogIndex": "0x1",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000002100000000000000000000000000000000000000000010000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000010000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000080000000000040000000000000000000000000400000001002080000000000000000000000000000",
"status": "0x1",
"effectiveGasPrice": "0x7735940",
"type": "0x2"
},
"id": 1
}
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_call
&to=0x272c31fc25e4e609cbcc9e7a9e6171b4b39feaca
&data=0x60fe47b10000000000000000000000000000000000000000000000000000000000010f2c
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to interact with |
| the hash of the method signature and encoded parameters |
| the string pre-defined block parameter, either earliest , pending or latest |
⛽ Note: The gas
parameter is capped at 2x the current block gas limit.
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x"
}
eth_getCode
Returns code at a given address.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_getCode
&address=0x1BFa3b5E9bE2c5298B7DE11B5Acb08c37683f4eF
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to get code |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc": "2.0",
"result": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106ed565b610118565b61005b610093366004610707565b610164565b3480156100a457600080fd5b506100ad6101da565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106ed565b610217565b3480156100f557600080fd5b506100ad610241565b6101066102a2565b610116610111610346565b610355565b565b610120610379565b6001600160a01b0316336001600160a01b0316141561015957610154816040518060200160405280600081525060006103ac565b610161565b6101616100fe565b50565b61016c610379565b6001600160a01b0316336001600160a01b031614156101cd576101c88383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103ac915050565b6101d5565b6101d56100fe565b505050565b60006101e4610379565b6001600160a01b0316336001600160a01b0316141561020c57610205610346565b9050610214565b6102146100fe565b90565b61021f610379565b6001600160a01b0316336001600160a01b03161415610159576101548161040b565b600061024b610379565b6001600160a01b0316336001600160a01b0316141561020c57610205610379565b606061029183836040518060600160405280602781526020016108016027913961045f565b9392505050565b803b15155b919050565b6102aa610379565b6001600160a01b0316336001600160a01b031614156103415760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b610116565b600061035061053a565b905090565b3660008037600080366000845af43d6000803e808015610374573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316905090565b6103b583610562565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806103f65750805b156101d557610405838361026c565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f610434610379565b604080516001600160a01b03928316815291841660208301520160405180910390a161016181610611565b606061046a84610298565b6104c55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610338565b600080856001600160a01b0316856040516104e09190610785565b600060405180830381855af49150503d806000811461051b576040519150601f19603f3d011682016040523d82523d6000602084013e610520565b606091505b509150915061053082828661069d565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61039d565b61056b81610298565b6105cd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610338565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381166106765760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610338565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036105f0565b606083156106ac575081610291565b8251156106bc5782518084602001fd5b8160405162461bcd60e51b815260040161033891906107a1565b80356001600160a01b038116811461029d57600080fd5b6000602082840312156106fe578081fd5b610291826106d6565b60008060006040848603121561071b578182fd5b610724846106d6565b9250602084013567ffffffffffffffff80821115610740578384fd5b818601915086601f830112610753578384fd5b813581811115610761578485fd5b876020828501011115610772578485fd5b6020830194508093505050509250925092565b600082516107978184602087016107d4565b9190910192915050565b60006020825282518060208401526107c08160408501602087016107d4565b601f01601f19169190910160400192915050565b60005b838110156107ef5781810151838201526020016107d7565b83811115610405575050600091015256fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122093f028255035b61df476b13b9dba3c4f06f60e51b9b4caee31680b389aef327f64736f6c63430008020033",
"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-moonbase.moonscan.io/api
?module=proxy
&action=eth_getStorageAt
&address=0x1BFa3b5E9bE2c5298B7DE11B5Acb08c37683f4eF
&position=0x0
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to get code |
| the hex code of the position in storage, eg 0x0 |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc": "2.0",
"result": "0x0000000000000000000000000000000000000000000000000000000000000001",
"id": 1
}
eth_gasPrice
Returns the current price per gas in wei.
https://api-moonbase.moonscan.io/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Sample Response
{
"jsonrpc": "2.0",
"result": "0x7735940",
"id": 73
}
📖 Tip: The result
is returned in wei.
Easily convert DEV 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-moonbase.moonscan.io/api
?module=proxy
&action=eth_estimateGas
&data=0x60fe47b10000000000000000000000000000000000000000000000000000000000000004
&to=0x272c31fC25E4e609CbCC9E7a9e6171b4B39feAca
&value=0x0
&gasPrice=0x51da038cc
&gas=0x186A0
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the hash of the method signature and encoded parameters |
| the string representing the address to interact with |
| the value sent in this transaction, in hex eg. 0xff22 |
| the amount of gas provided for the transaction, in hex eg. 0x5f5e0ff |
| the gas price paid for each unit of gas, in wei post EIP-1559, the gasPrice has to be higher than the block's baseFeePerGas |
⛽ Note: The gas
parameter is capped at 2x the current block gas limit.
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x67ea"
}