For the full documentation of available parameters and descriptions, please visit the official Moonbeam 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-moonbeam.moonscan.io/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Sample response
{
"jsonrpc": "2.0",
"result": "0x38dea6",
"id": 83
}
eth_getBlockByNumber
Returns information about a block by block number.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x10d4f
&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": "0xf5fe1e0f92a2d7a8e0d848e8327e24fffd2718a3",
"baseFeePerGas": "0x174876e800",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0xe4e1c0",
"gasUsed": "0x0",
"hash": "0x881d4ef2982decea47020d2afc5c367570caa3fa649b0119cf6757c5af04c0fb",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xf5fe1e0f92a2d7a8e0d848e8327e24fffd2718a3",
"nonce": "0x0000000000000000",
"number": "0x10d4f",
"parentHash": "0x8be6a2ed857b3b2cff16cb91440db218dbfd29fcec9c06ec37744dfb9216d09f",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x201",
"stateRoot": "0x145419d42af35ba136ee7643545be93353ae97ef75122b877765dc6687703d8a",
"timestamp": "0x61ca412c",
"totalDifficulty": "0x0",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
},
"id": 1
}
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x10FB78
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the block number, in hex eg. 0x10FB78 |
Sample response
{
"jsonrpc": "2.0",
"result": "0x15",
"id": 1
}
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb
&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": "0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb",
"nonce": "0x4919",
"blockHash": "0x721d913ac43cf93f9d8e797160a81cde91bad362968a635b3b0d4bb300fb7954",
"blockNumber": "0x38deba",
"transactionIndex": "0x0",
"from": "0x91cb290c35322abe833c878e96dfd441271747cf",
"to": "0x8ae08cb9161a38ce241bb54816b2cba549c136ae",
"value": "0x0",
"gasPrice": "0x30a1292638",
"gas": "0xf4515",
"input": "0x7898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000019aeffc00000000000000000000000000000000000000000000000000000000647fff970000000000000000000000000000000000000000000000000000000000000008474c4d522f555344000000000000000000000000000000000000000000000000",
"creates": null,
"raw": "0xf9010e8249198530a1292638830f4515948ae08cb9161a38ce241bb54816b2cba549c136ae80b8a47898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000019aeffc00000000000000000000000000000000000000000000000000000000647fff970000000000000000000000000000000000000000000000000000000000000008474c4d522f555344000000000000000000000000000000000000000000000000820a2ca07a0bd1ac9d294e4b9dd0149d56abe4e5df9f594371d0f8e07a60c14d517506bba03669c548376aaa99af64f85eb6f2fc17ce0cce284da08cb91b0835989d3e70c6",
"publicKey": "0x111b8983eda474b42eecdcc55f692138f082a254c5727e2f52342448222adf0e30fe382c9db9575bee83b781aab072e288852a614924ccf5243b5cbb1906513e",
"chainId": "0x504",
"standardV": "0x1",
"v": "0xa2c",
"r": "0x7a0bd1ac9d294e4b9dd0149d56abe4e5df9f594371d0f8e07a60c14d517506bb",
"s": "0x3669c548376aaa99af64f85eb6f2fc17ce0cce284da08cb91b0835989d3e70c6",
"accessList": null,
"type": "0x0"
},
"id": 1
}
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=38DEBA
&index=0
&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",
"result": {
"hash": "0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb",
"nonce": "0x4919",
"blockHash": "0x721d913ac43cf93f9d8e797160a81cde91bad362968a635b3b0d4bb300fb7954",
"blockNumber": "0x38deba",
"transactionIndex": "0x0",
"from": "0x91cb290c35322abe833c878e96dfd441271747cf",
"to": "0x8ae08cb9161a38ce241bb54816b2cba549c136ae",
"value": "0x0",
"gasPrice": "0x30a1292638",
"gas": "0xf4515",
"input": "0x7898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000019aeffc00000000000000000000000000000000000000000000000000000000647fff970000000000000000000000000000000000000000000000000000000000000008474c4d522f555344000000000000000000000000000000000000000000000000",
"creates": null,
"raw": "0xf9010e8249198530a1292638830f4515948ae08cb9161a38ce241bb54816b2cba549c136ae80b8a47898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000019aeffc00000000000000000000000000000000000000000000000000000000647fff970000000000000000000000000000000000000000000000000000000000000008474c4d522f555344000000000000000000000000000000000000000000000000820a2ca07a0bd1ac9d294e4b9dd0149d56abe4e5df9f594371d0f8e07a60c14d517506bba03669c548376aaa99af64f85eb6f2fc17ce0cce284da08cb91b0835989d3e70c6",
"publicKey": "0x111b8983eda474b42eecdcc55f692138f082a254c5727e2f52342448222adf0e30fe382c9db9575bee83b781aab072e288852a614924ccf5243b5cbb1906513e",
"chainId": "0x504",
"standardV": "0x1",
"v": "0xa2c",
"r": "0x7a0bd1ac9d294e4b9dd0149d56abe4e5df9f594371d0f8e07a60c14d517506bb",
"s": "0x3669c548376aaa99af64f85eb6f2fc17ce0cce284da08cb91b0835989d3e70c6",
"accessList": null,
"type": "0x0"
},
"id": 1
}
eth_getTransactionCount
Returns the number of transactions performed by an address.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getTransactionCount
&address=0x91cb290c35322abe833c878e96dfd441271747cf
&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": "0x491b",
"id": 1
}
eth_sendRawTransaction
Submits a pre-signed transaction for broadcast to the Moonbeam network.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0xf904808000831cfde080
&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": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
⛏️ 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-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb
&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": "0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb",
"transactionIndex": "0x0",
"blockHash": "0x721d913ac43cf93f9d8e797160a81cde91bad362968a635b3b0d4bb300fb7954",
"from": "0x91cb290c35322abe833c878e96dfd441271747cf",
"to": "0x8ae08cb9161a38ce241bb54816b2cba549c136ae",
"blockNumber": "0x38deba",
"cumulativeGasUsed": "0x7f00",
"gasUsed": "0x7f00",
"contractAddress": null,
"logs": [
{
"address": "0x8ae08cb9161a38ce241bb54816b2cba549c136ae",
"topics": [
"0xa7fc99ed7617309ee23f63ae90196a1e490d362e6f6a547a59bc809ee2291782"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000019aeffc00000000000000000000000000000000000000000000000000000000647fff970000000000000000000000000000000000000000000000000000000000000008474c4d522f555344000000000000000000000000000000000000000000000000",
"blockHash": "0x721d913ac43cf93f9d8e797160a81cde91bad362968a635b3b0d4bb300fb7954",
"blockNumber": "0x38deba",
"transactionHash": "0x9436a4c513f9a023779848c90f8f2069372252c17b7d96471ce9af3665bb20eb",
"transactionIndex": "0x0",
"logIndex": "0x0",
"transactionLogIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000001000000200000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"effectiveGasPrice": "0x30a1292638",
"type": "0x0"
},
"id": 1
}
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_call
&to=0xbe19479be9ec4f78d3da0e92ef640c8d6354f7b1
&data=0x000000000000000000000000000000000000000000000001a055690d9db80000
&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",
"result": "0x",
"id": 1
}
eth_getCode
Returns code at a given address.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getCode
&address=0xacc15dc74880c9944775448304b263d191c6077f
&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": "0x6060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b9578063095ea7b31461014757806318160ddd146101a157806323b872dd146101ca5780632e1a7d4d14610243578063313ce5671461026657806370a082311461029557806395d89b41146102e2578063a9059cbb14610370578063d0e30db0146103ca578063dd62ed3e146103d4575b6100b7610440565b005b34156100c457600080fd5b6100cc6104dd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561010c5780820151818401526020810190506100f1565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610187600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061057b565b604051808215151515815260200191505060405180910390f35b34156101ac57600080fd5b6101b461066d565b6040518082815260200191505060405180910390f35b34156101d557600080fd5b610229600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061068c565b604051808215151515815260200191505060405180910390f35b341561024e57600080fd5b61026460048080359060200190919050506109d9565b005b341561027157600080fd5b610279610b05565b604051808260ff1660ff16815260200191505060405180910390f35b34156102a057600080fd5b6102cc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b18565b6040518082815260200191505060405180910390f35b34156102ed57600080fd5b6102f5610b30565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033557808201518184015260208101905061031a565b50505050905090810190601f1680156103625780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037b57600080fd5b6103b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bce565b604051808215151515815260200191505060405180910390f35b6103d2610440565b005b34156103df57600080fd5b61042a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610be3565b6040518082815260200191505060405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156106dc57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156107b457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156108cf5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561084457600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a2757600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610ab457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc65780601f10610b9b57610100808354040283529160200191610bc6565b820191906000526020600020905b815481529060010190602001808311610ba957829003601f168201915b505050505081565b6000610bdb33848461068c565b905092915050565b60046020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820277c982fea791e07e8e146ad0040415b3396ef5469a23ad426feae6d738cee660029",
"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-moonbeam.moonscan.io/api
?module=proxy
&action=eth_getStorageAt
&address=0xacc15dc74880c9944775448304b263d191c6077f
&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": "0x5772617070656420474c4d520000000000000000000000000000000000000018",
"id": 1
}
eth_gasPrice
Returns the current price per gas in wei.
https://api-moonbeam.moonscan.io/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Sample Response
{
"jsonrpc": "2.0",
"result": "0x2a83aeadeb",
"id": 73
}
📖 Tip: The result
is returned in wei.
Easily convert GLMR 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-moonbeam.moonscan.io/api
?module=proxy
&action=eth_estimateGas
&data=0x4e71d92d
&to=0xacc15dc74880c9944775448304b263d191c6077f
&value=0xff22
&gasPrice=0x51da038cc
&gas=0x5f5e0ff
&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":"0x6556"
}
Last updated