contracts
Get the contract result from a contract on the network executed at a given timestamp
Returns a single ContractResult for a contract's function executions at a specific timestamp.
get/api/v1/contracts/{contractIdOrAddress}/results/{timestamp}
Path parameters
contractIdOrAddressstring required
The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract.
timestampstring required
The Unix timestamp in seconds.nanoseconds format, the timestamp at which the associated transaction reached consensus. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
Query parameters
hbarboolean
Controls the unit used for monetary fields (amount, gas_price, max_fee_per_gas, max_priority_fee_per_gas). When true (default), values are returned in tinybars. When false, values are returned in weibars (the native Ethereum unit, where 1 tinybar = 10,000,000,000 weibars).
Response
OK
Example response
{
"access_list": "0xabcd",
"address": "0x25fe26adc577cc89172e6156c9e24f7b9751b762",
"amount": 10,
"block_gas_used": 2000,
"block_hash": "0x6ceecd8bb224da491",
"block_number": 10,
"bloom": "0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398",
"call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
"chain_id": "0x0127",
"contract_id": "0.0.2",
"created_contract_ids": [
"0.0.2"
],
"error_message": "Out of gas",
"failed_initcode": "0x856739",
"from": "0x0000000000000000000000000000000000001f41",
"function_parameters": "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b",
"gas_consumed": 35000,
"gas_limit": 100000,
"gas_price": "0x4a817c800",
"gas_used": 80000,
"hash": "0x3531396130303866616264653464",
"max_fee_per_gas": "0x5",
"max_priority_fee_per_gas": "0x100",
"nonce": 1,
"r": "0xd693b532a80fed6392b428604171fb32fdbf953728a3a7ecc7d4062b1652c043",
"result": "SUCCESS",
"s": "0x24e9c602ac800b983b035700a14b23f78a253ab762deab5dc27e3555a750b355",
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41",
"transaction_index": 1,
"type": 2,
"v": 1,
"logs": [
{
"address": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"bloom": "0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398",
"contract_id": "0.0.2",
"data": "0x00000000000000000000000000000000000000000000000000000000000000fa",
"topics": [
"0xf4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad300"
]
}
],
"state_changes": [
{
"address": "0000000000000000000000000000000000001f41",
"contract_id": "0.0.2",
"slot": "0x00000000000000000000000000000000000000000000000000000000000000fa",
"value_read": "0x97c1fc0a6ed5551bc831571325e9bdb365d06803100dc20648640ba24ce69750",
"value_written": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
}
]
}