contracts

List contract results from a contract on the network

Changed on

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

get/api/v1/contracts/{contractIdOrAddress}/results

Request

  • Base URL
    (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/contracts/{contractIdOrAddress}/results
  • Auth
    none declared

Path parameters

contractIdOrAddressstring required

Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix).

Query parameters

block.hashstring

The block's hash. If multiple values are provided the last value will be the only value used.

block.numberstring

The block's number

fromstring

Account ID or EVM address executing the contract

internalboolean

Whether to include child transactions or not

limitinteger

The maximum number of items to return

order'asc' | 'desc'

The order in which items are listed

timestampstring[]

The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.

transaction.indexinteger

The transaction index in the block

Response

OK

Example response

{
  "results": [
    {
      "access_list": [
        {
          "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
          "storage_keys": [
            "0x0000000000000000000000000000000000000000000000000000000000000081"
          ]
        }
      ],
      "address": "0x25fe26adc577cc89172e6156c9e24f7b9751b762",
      "authorization_list": [
        {
          "address": "0x0000000000000000000000000000000000000001",
          "chain_id": "0x127",
          "nonce": 5,
          "r": "0x2222222222222222222222222222222222222222222222222222222222222222",
          "s": "0x3333333333333333333333333333333333333333333333333333333333333333",
          "y_parity": "0x1"
        }
      ],
      "amount": 10,
      "block_gas_used": 2000,
      "block_hash": "0x6ceecd8bb224da491",
      "block_number": 10,
      "bloom": "0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398",
      "call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
      "chain_id": "0x127",
      "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": "0xfebbaa29c513d124a6377246ea3506ad917d740c21a88f61a1c55ba338fc2bb1",
      "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
    }
  ]
}

Changes

    • info

      added the optional property // to the response with the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status