contracts
Invoke a smart contract
Changed onReturns a result from EVM execution such as cost-free execution of read-only smart contract queries, gas estimation, and transient simulation of read-write operations. If the estimate field is set to true gas estimation is executed. This API can process calls against the latest block or specific historical blocks when a hexadecimal or decimal block number is provided in the block field.
post/api/v1/contracts/call
Request
- Base URL(relative, and the document was published on a file host, not at the API’s origin)
- URL/api/v1/contracts/call
- Authnone declared
Request body
Example request
{
"block": "latest",
"data": "0x47f1aae7",
"estimate": true,
"from": "00000000000000000000000000000000000004e2",
"gas": 15000000,
"gasPrice": 100000000,
"state_overrides": [
{
"address": "0000000000000000000000000000000000001f41",
"balance": "0x1",
"code": "0x6080604052",
"nonce": "0x1",
"state": [
{
"key": "0x0000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
],
"state_diff": [
{
"key": "0x0000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
]
}
],
"to": "0xd9d0c5c0ff85758bdf05a7636f8036d4d065f5b6"
}Response
OK
Example response
{
"result": "0x0000000000006d8d"
}Changes
- info
added the new optional request property
- info
- breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable
- breaking