Geth Proxy
For the full documentation of available parameters and descriptions, please visit the official Ethereum JSON-RPC docs.
Returns the number of most recent block
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
Request
Response
No parameters required.
Sample response
{
"jsonrpc":"2.0",
"id":83,
"result":"0x133dd79"
}
Returns information about a block by block number.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x133dd79
&boolean=true
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
tag | the block number, in hex eg. 0xC36B3C |
boolean | 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",
"id":1,
"result":{
"difficulty":"0x8",
"extraData":"0xd783010a0883626f7288676f312e31352e35856c696e7578000000000000000039f23cfe5b56a132590feeaba33d2eed7c3a5766458559257cccbe39679c9cb43d4e824bd92d7419c170db474a0c12e852fa965f41cc7492223f73406f27639901",
"gasLimit":"0x1312d00",
"gasUsed":"0x5208",
"hash":"0xf4cf092ea99eb59c84626253c2307ed1b9650e3f0eb3080089db6b447e15542d",
"logsBloom":"0x00000000000000000000000000000000000000008000000000000000000000000000000000000000000000100000000000008000000000000000000000000000000000000000000000000000000000800040000000000000000100000000004004000000000000000000000000000000000000000000000080000000000000100000000000000000000000000020000000000000000080000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000800000108040000000000000000000001000000000000000000000000000000000000000000000100000",
"miner":"0xbe188d6641e8b680743a4815dfa0f6208038960f",
"mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce":"0x0000000000000000",
"number":"0x133dd79",
"parentHash":"0xf216e2cf632cdfa6c2ffe95c9f0533bec8bed70c52da3e70003992b9551fff28",
"receiptsRoot":"0xa4e0c20235370f0cce6e6d1b69deab6deb03e3b6510a80e50beab8586b8cfd44",
"sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size":"0x2db",
"stateRoot":"0x406b7fdcd0fa2a1a44ead0807bb49023503717465f7cfb227a51719c8ee15e7e",
"timestamp":"0x61685e3f",
"totalDifficulty":"0x8c9bd47",
"transactions":[
{
"blockHash":"0xf4cf092ea99eb59c84626253c2307ed1b9650e3f0eb3080089db6b447e15542d",
"blockNumber":"0x133dd79",
"from":"0xe84d601e5d945031129a83e5602be0cc7f182cf3",
"gas":"0x249f0",
"gasPrice":"0x6fc23ac00",
"hash":"0x3535217f1703de12a205a1b310c528ff3cf3822b1b1f77e5572514d54d755d05",
"input":"0x",
"nonce":"0x1940ed",
"to":"0x8098446b07c0d2c45ec831cf81bc2431c80ed4ac",
"transactionIndex":"0x0",
"value":"0x16345785d8a0000",
"type":"0x0",
"v":"0x27125",
"r":"0x2dfffce90729d050e6f20156de333e5c4226541722569855a26bd82ece86794e",
"s":"0x228c3ffe2f74dc48b5d613ddd8f29fbd0233dcb54358eeb8445fa608b77ede5e"
}
],
"transactionsRoot":"0x011ce35f1c3be54e6e8eb7b38311e7028e58f706349939d058877de82afe0013",
"uncles":[
]
}
}
Returns the number of transactions in a block.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x133dd79
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
tag | the block number, in hex eg. 0x10FB78 |
Sample response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x1"
}
Returns information about a transaction requested by transaction hash.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0x6a449853ea7101e486bdb2bac8bbff0fc1234d352bedecce448eec3b384f23a9
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
txhash | the string representing the hash of the transaction |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0x3207cbe841a8e5f0a31b9a3967753de5e1289f629bd81c29fca000d21201ff3e",
"blockNumber":"0x133dda9",
"from":"0x68cf221a2c91e961b8818eeef6f356afd92de94b",
"gas":"0x5ad75",
"gasPrice":"0x55ae82600",
"hash":"0x6a449853ea7101e486bdb2bac8bbff0fc1234d352bedecce448eec3b384f23a9",
"input":"0x46c8e1a600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ff30000000000000000000000000000000000000000000000000000000002ce69050000000000000000000000000000000000000000000000000000000000066c45000000000000000000000000000000000000000000000000000000000006698200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000006168c48000000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000000989680",
"nonce":"0x15f5",
"to":"0x53244b438261f483662a1cccb86221e292e87aa8",
"transactionIndex":"0x0",
"value":"0x0",
"type":"0x0",
"v":"0x27125",
"r":"0x1f556b5c311a175e615cf03790a5bfd8bf06aa8bfbb9c61789e17732aef23520",
"s":"0xe25eef1bdbd6c1b5fd998e1f511ec6c259d8a7f2f044305b7c67019dcfbc31"
}
}
Returns information about a transaction by block number and transaction index position.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=0x12bad94
&index=0x1
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
tag | the block number, in hex eg. 0x10FB78 |
index | the position of the uncle's index in the block, in hex eg. 0x1 |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0xb74b93bfab74e594b00929f8d86f914061a1608a4fc270819dd661352bd08a31",
"blockNumber":"0x12bad94",
"from":"0xc0012c30a5f333bb5de24752cf82ce5d95d4c444",
"gas":"0x7a120",
"gasPrice":"0xee6b2800",
"hash":"0x2615b95113d5429eeec394cc4c2b0c54510f6c96852dfe3844ea8b35a5184326",
"input":"0xf91b6e68000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000000670000000000000000000000000000000099a9efc022ec11ec94a9fb49b166e18c000000000000000000000000f9997b4032635e18daebb0f7575b655742d5f2f00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000149b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017284f043d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020653335653962306263613032633934363461363732366432386132346536383800000000000000000000000000000000000000000000000000000000000000415d3fd9644c4232f6311ae09d9be80a60fd8061c8ac0ce6364815608e023456d851d8b9eeaaccd143a958f2cfbf6c2db7ebfce9430ff0dcde84fc3a78ff0621c11b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000245c15bf2e2ab28e9dcc46210ea172c42dd1c00b000000000000000000000000475056af4d4e64a960b4ba10dacf6d5bd1d653d100000000000000000000000000000000000000000000000000000000000149b50000000000000000000000000000000000000000000000000000000005073a5c00000000000000000000000000000000000000000000000000000000000148e3000000000000000000000000000000000000000000000000000000000504028800000000000000000000000000000000000000000000000000000000000000a8000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000dac00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000344494c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035553440000000000000000000000000000000000000000000000000000000000",
"nonce":"0x147b",
"to":"0x86c6a85e3772b7e2bc04495d6732754555d685f7",
"transactionIndex":"0x1",
"value":"0x0",
"type":"0x0",
"v":"0x27125",
"r":"0x6689c4c92865d464b64fe7402ee71f4773bcb1c5a01f58f8776e19f773155d3e",
"s":"0x339f2d6b60a6047fd23dda57fe9475042698ac27b89f2d1862215ec0ff14bde8"
}
}
Returns the number of transactions performed by an address.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getTransactionCount
&address=0x68cf221a2c91e961b8818eeef6f356afd92de94b
&tag=latest
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to get transaction count |
tag | the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x15f9"
}
Submits a pre-signed transaction for broadcast to the Polygon POS Chain network.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0xf904808000831cfde080
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
hex | the string representing the signed raw transaction data to broadcast. |
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.
Returns the receipt of a transaction that has been validated.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0xf28095331242e1fd7c50c2a0064f4f7babe85ec7174f671761991d62fd8b22b9
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
txhash | the string representing the hash of the transaction |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":{
"blockHash":"0xcd0b2790ec914999fa1a07182825b4ba5038788a1a7c9a2af69f9fd0cf69baa3",
"blockNumber":"0x133dfad",
"contractAddress":null,
"cumulativeGasUsed":"0x1e6db",
"effectiveGasPrice":"0x3b9aca00",
"from":"0x7d72db0c2db675ea5107caba80acac2154ca362b",
"gasUsed":"0xdfe8",
"logs":[
{
"address":"0xb923b52b60e247e34f9afe6b3fa5accbaea829e8",
"topics":[
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000007d72db0c2db675ea5107caba80acac2154ca362b",
"0x0000000000000000000000004619721b6b9e7b89a1716ddf7bac745a89cb4de3"
],
"data":"0x0000000000000000000000000000000000000000000000000de100ffb3e1f030",
"blockNumber":"0x133dfad",
"transactionHash":"0xf28095331242e1fd7c50c2a0064f4f7babe85ec7174f671761991d62fd8b22b9",
"transactionIndex":"0x1",
"blockHash":"0xcd0b2790ec914999fa1a07182825b4ba5038788a1a7c9a2af69f9fd0cf69baa3",
"logIndex":"0x2",
"removed":false
},
{
"address":"0x0000000000000000000000000000000000001010",
"topics":[
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x0000000000000000000000007d72db0c2db675ea5107caba80acac2154ca362b",
"0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8"
],
"data":"0x00000000000000000000000000000000000000000000000000003421da3d10000000000000000000000000000000000000000000000000002b96626b1e83765000000000000000000000000000000000000000000000019ea437f9990943d6bf0000000000000000000000000000000000000000000000002b962e494446665000000000000000000000000000000000000000000000019ea4382dbae380e6bf",
"blockNumber":"0x133dfad",
"transactionHash":"0xf28095331242e1fd7c50c2a0064f4f7babe85ec7174f671761991d62fd8b22b9",
"transactionIndex":"0x1",
"blockHash":"0xcd0b2790ec914999fa1a07182825b4ba5038788a1a7c9a2af69f9fd0cf69baa3",
"logIndex":"0x3",
"removed":false
}
],
"logsBloom":"0x00000008000000020000020008000000000000000000000000000000080000000000000000000000100000000000000000008000000000000000000000000000000000000000000000000008000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000010000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000002000000000001000000000000000040000000080000100000000000000000000000000000000000000000000000000000000000000000000800102000",
"status":"0x1",
"to":"0xb923b52b60e247e34f9afe6b3fa5accbaea829e8",
"transactionHash":"0xf28095331242e1fd7c50c2a0064f4f7babe85ec7174f671761991d62fd8b22b9",
"transactionIndex":"0x1",
"type":"0x0"
}
}
Executes a new message call immediately without creating a transaction on the block chain.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_call
&to=0x42088174635391921b5a50d36e37ca816a0f3ee0
&data=0xdbdff2c1
&tag=latest
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
to | the string representing the address to interact with |
data | the hash of the method signature and encoded parameters |
tag | 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":"0x00000000000000000000000000000000000000000000000000601d8888141c00"
}
Returns code at a given address.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getCode
&address=0x0835c8c4ab282b5dbf06d59e1489ef17f1c40d96
&tag=latest
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to get code |
tag | the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063af32b60511610081578063d33219b41161005b578063d33219b4146101a3578063e30c3978146101b6578063f2fde38b146101c757600080fd5b8063af32b60514610146578063ce343bb614610159578063d0ebdbe71461018057600080fd5b80634e71e0c8116100b25780634e71e0c814610123578063715018a61461012d5780638da5cb5b1461013557600080fd5b80630840bbdd146100ce578063481c6a7514610112575b600080fd5b6100f57f000000000000000000000000b671ba3b1e3dd0ac7f8070d278f21da88ce22da781565b6040516001600160a01b0390911681526020015b60405180910390f35b6002546001600160a01b03166100f5565b61012b6101da565b005b61012b61026d565b6000546001600160a01b03166100f5565b61012b610154366004610a50565b6102e2565b6100f57f000000000000000000000000caaf0f45b07b17b85e32306e553603be14dd6ab481565b61019361018e3660046109fe565b610629565b6040519015158152602001610109565b6003546100f5906001600160a01b031681565b6001546001600160a01b03166100f5565b61012b6101d53660046109fe565b6106a5565b6001546001600160a01b031633146102395760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c652f63616c6c65722d6e6f742d70656e64696e674f776e65720060448201526064015b60405180910390fd5b60015461024e906001600160a01b03166107e1565b6001805473ffffffffffffffffffffffffffffffffffffffff19169055565b336102806000546001600160a01b031690565b6001600160a01b0316146102d65760405162461bcd60e51b815260206004820152601860248201527f4f776e61626c652f63616c6c65722d6e6f742d6f776e657200000000000000006044820152606401610230565b6102e060006107e1565b565b336102f56002546001600160a01b031690565b6001600160a01b031614806103235750336103186000546001600160a01b031690565b6001600160a01b0316145b6103955760405162461bcd60e51b815260206004820152602660248201527f4d616e61676561626c652f63616c6c65722d6e6f742d6d616e616765722d6f7260448201527f2d6f776e657200000000000000000000000000000000000000000000000000006064820152608401610230565b6003546020830151608084015160408501516001600160a01b0390931692638871189b92916103cc9163ffffffff90911690610dd0565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815263ffffffff92909216600483015267ffffffffffffffff166024820152604401602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a9190610a2e565b506040517f089eb9250000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000caaf0f45b07b17b85e32306e553603be14dd6ab4169063089eb925906104d0908590600401610ca8565b602060405180830381600087803b1580156104ea57600080fd5b505af11580156104fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105229190610ba5565b5060208201516040517f1124e1dc0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000b671ba3b1e3dd0ac7f8070d278f21da88ce22da71691631124e1dc9161058e91908590600401610d68565b602060405180830381600087803b1580156105a857600080fd5b505af11580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e09190610a2e565b50816020015163ffffffff167f4b2c9bed31045ac093e453f0c6fcdde124408fae75b3e3b3f788c1c0a8775f95838360405161061d929190610d04565b60405180910390a25050565b60003361063e6000546001600160a01b031690565b6001600160a01b0316146106945760405162461bcd60e51b815260206004820152601860248201527f4f776e61626c652f63616c6c65722d6e6f742d6f776e657200000000000000006044820152606401610230565b61069d8261083e565b90505b919050565b336106b86000546001600160a01b031690565b6001600160a01b03161461070e5760405162461bcd60e51b815260206004820152601860248201527f4f776e61626c652f63616c6c65722d6e6f742d6f776e657200000000000000006044820152606401610230565b6001600160a01b03811661078a5760405162461bcd60e51b815260206004820152602560248201527f4f776e61626c652f70656e64696e674f776e65722d6e6f742d7a65726f2d616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610230565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f239a2ddded15777fa246aed5f7e1a9bc69a39d4eb4a397034d1d85766cca7d4c90600090a250565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002546000906001600160a01b039081169083168114156108c75760405162461bcd60e51b815260206004820152602360248201527f4d616e61676561626c652f6578697374696e672d6d616e616765722d6164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610230565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385811691821790925560405190918316907f9cb45c728de594dab506a1f1a8554e24c8eeaf983618d5ec5dd7bc6f3c49feee90600090a350600192915050565b600082601f83011261093b57600080fd5b60405161020080820182811067ffffffffffffffff8211171561096057610960610e23565b604052818482810187101561097457600080fd5b600092505b60108310156109a257803561098d81610e52565b82526001929092019160209182019101610979565b509195945050505050565b80356cffffffffffffffffffffffffff811681146106a057600080fd5b80356106a081610e52565b803567ffffffffffffffff811681146106a057600080fd5b803560ff811681146106a057600080fd5b600060208284031215610a1057600080fd5b81356001600160a01b0381168114610a2757600080fd5b9392505050565b600060208284031215610a4057600080fd5b81518015158114610a2757600080fd5b6000808284036103a0811215610a6557600080fd5b60a0811215610a7357600080fd5b610a7b610d83565b843581526020850135610a8d81610e52565b6020820152610a9e604086016109d5565b6040820152610aaf606086016109d5565b60608201526080850135610ac281610e52565b608082015292506103007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6082011215610afa57600080fd5b50610b03610dac565b610b0f60a085016109ed565b8152610b1d60c085016109ed565b6020820152610b2e60e085016109ca565b6040820152610100610b418186016109ca565b6060830152610b5361012086016109ca565b6080830152610b6561014086016109ca565b60a0830152610b7761016086016109ad565b60c0830152610b8a86610180870161092a565b60e08301526103808501358183015250809150509250929050565b600060208284031215610bb757600080fd5b8151610a2781610e52565b8060005b6010811015610beb57815163ffffffff16845260209384019390910190600101610bc6565b50505050565b60ff815116825260ff60208201511660208301526040810151610c1c604084018263ffffffff169052565b506060810151610c34606084018263ffffffff169052565b506080810151610c4c608084018263ffffffff169052565b5060a0810151610c6460a084018263ffffffff169052565b5060c0810151610c8560c08401826cffffffffffffffffffffffffff169052565b5060e0810151610c9860e0840182610bc2565b5061010001516102e09190910152565b60a08101610cfe828480518252602081015163ffffffff80821660208501526040830151915067ffffffffffffffff80831660408601528060608501511660608601525080608084015116608085015250505050565b92915050565b6103a08101610d5b828580518252602081015163ffffffff80821660208501526040830151915067ffffffffffffffff80831660408601528060608501511660608601525080608084015116608085015250505050565b610a2760a0830184610bf1565b63ffffffff831681526103208101610a276020830184610bf1565b60405160a0810167ffffffffffffffff81118282101715610da657610da6610e23565b60405290565b604051610120810167ffffffffffffffff81118282101715610da657610da6610e23565b600067ffffffffffffffff808316818516808303821115610e1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b63ffffffff81168114610e6457600080fd5b5056fea2646970667358221220a4b7fe6c79b22fccb47848e6173f519c17dc9b4a302ef49c2cb46a2d9866d34c64736f6c63430008060033"
}
Returns the value from a storage position at a given address.
This endpoint is still experimental and may have potential issues
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_getStorageAt
&address=0x4Cdb645521a15cF757b6d54c58b55B824c1447DE
&position=0x0
&tag=latest
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to get code |
position | the hex code of the position in storage, eg 0x0 |
tag | the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x0000000000000000000000009b6d7b08460e3c2a1f4dff3b2881a854b4f3b859"
}
Returns the current price per gas in wei.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
Request
Response
No parameters required.
Sample Response
{
"jsonrpc":"2.0",
"id":73,
"result":"0xd693a400"
}
Tip: The
📖
result
is returned in wei.Makes a call or transaction, which won't be added to the blockchain and returns the gas used.
https://api-testnet.polygonscan.com/api
?module=proxy
&action=eth_estimateGas
&data=0x4e71d92d
&to=0xEeee7341f206302f2216e39D715B96D8C6901A1C
&value=0xff22
&gasPrice=0x51da038cc
&gas=0x5f5e0ff
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
data | the hash of the method signature and encoded parameters |
to | the string representing the address to interact with |
value | the value sent in this transaction, in hex eg. 0xff22 |
gas | the amount of gas provided for the transaction, in hex eg. 0x5f5e0ff |
gasPrice | the gas price paid for each unit of gas, in wei |
Note: The
⛽
gas
parameter is capped at 2x the current block gas limit.Sample Response
{
"jsonrpc":"2.0",
"id":1,
"result":"0x5248"
}
Last modified 10mo ago