Get Contract Results

Returns a list of all ContractResults for a contract's function executions.

This method will use 20 Compute Units.


List contract results from a contract on the network

get

Returns a list of all ContractResults for a contract's function executions.

Path parameters
contractIdOrAddressstringRequired

The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract.

Pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40})$
Query parameters
block.hashstringOptional

The block's hash

Example: {"summary":"--","value":""}Pattern: ^(eq:)?(0x)?([0-9A-Fa-f]{64}|[0-9A-Fa-f]{96})$
block.numberstringOptional

The block's number

Example: {"summary":"--","value":""}Pattern: ^(eq:)?(\d{1,19}|0x[a-fA-f0-9]+)$
fromstringOptional

Account ID or EVM address executing the contract

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}|(0x)?[A-Fa-f0-9]{40}$
internalbooleanOptional

Whether to include child transactions or not

Default: falseExample: true
limitinteger · int32 · min: 1 · max: 100Optional

The maximum number of items to return

Default: 25Example: 2
orderundefined · enumOptional

The order in which items are listed

Default: descExample: ascPossible values:
timestampstring[]Optional

The consensus timestamp in seconds.nanoseconds format with an optional comparison operator

Example: {"summary":"--","value":""}
transaction.indexinteger · int32Optional

The transaction index in the block

Example: 1
Responses
200
OK
application/json
get
GET /v1/YOUR_API_KEY/api/v1/contracts/{contractIdOrAddress}/results HTTP/1.1
Host: mainnet.hedera.validationcloud.io
Accept: */*
{
  "results": [
    {
      "access_list": "0xabcd",
      "address": "0x25fe26adc577cc89172e6156c9e24f7b9751b762",
      "amount": 10,
      "block_gas_used": 2000,
      "block_hash": "0x6ceecd8bb224da491",
      "block_number": 10,
      "bloom": null,
      "call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
      "chain_id": "0x0127",
      "contract_id": "0.1.2",
      "created_contract_ids": [
        "0.1.2"
      ],
      "error_message": "Out of gas",
      "failed_initcode": "0x856739",
      "from": "0000000000000000000000000000000000001f41",
      "function_parameters": "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b",
      "gas_limit": 100000,
      "gas_price": "0x4a817c800",
      "gas_used": 1000,
      "hash": "0xfebbaa29c513d124a6377246ea3506ad917d740c21a88f61a1c55ba338fc2bb1",
      "max_fee_per_gas": "0x5",
      "max_priority_fee_per_gas": "0x100",
      "nonce": 1,
      "r": "0xd693b532a80fed6392b428604171fb32fdbf953728a3a7ecc7d4062b1652c043",
      "result": "SUCCESS",
      "s": "0x24e9c602ac800b983b035700a14b23f78a253ab762deab5dc27e3555a750b355",
      "status": 1,
      "timestamp": "1586567700.453054000",
      "to": "0x0000000000000000000000000000000000001f41",
      "transaction_index": 1,
      "type": 2,
      "v": 1
    }
  ],
  "links": {
    "next": "/api/v1/transactions?timestamp=lt:1657598275.517984411"
  }
}

Last updated

Was this helpful?