{
  "opencollection": "1.0.0",
  "info": {
    "name": "Mirror Node REST accounts contracts API",
    "version": "0.156.0"
  },
  "items": [
    {
      "info": {
        "name": "contracts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Invoke a smart contract",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "/api/v1/contracts/call",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Returns 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."
        },
        {
          "info": {
            "name": "List contract entities on network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts",
            "params": [
              {
                "name": "contract.id",
                "value": "",
                "type": "query",
                "description": "The ID of the smart contract"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "asc",
                "type": "query",
                "description": "The order in which items are listed"
              }
            ]
          },
          "docs": "Returns a list of all contract entity items on the network."
        },
        {
          "info": {
            "name": "Get contract by id",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/:contractIdOrAddress",
            "params": [
              {
                "name": "contractIdOrAddress",
                "value": "",
                "type": "path",
                "description": "Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix)."
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              }
            ]
          },
          "docs": "Return the contract information given an id"
        },
        {
          "info": {
            "name": "List contract results from a contract on the network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/:contractIdOrAddress/results",
            "params": [
              {
                "name": "contractIdOrAddress",
                "value": "",
                "type": "path",
                "description": "Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix)."
              },
              {
                "name": "block.hash",
                "value": "",
                "type": "query",
                "description": "The block's hash. If multiple values are provided the last value will be the only value used."
              },
              {
                "name": "block.number",
                "value": "",
                "type": "query",
                "description": "The block's number"
              },
              {
                "name": "from",
                "value": "",
                "type": "query",
                "description": "Account ID or EVM address executing the contract"
              },
              {
                "name": "internal",
                "value": "true",
                "type": "query",
                "description": "Whether to include child transactions or not"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "asc",
                "type": "query",
                "description": "The order in which items are listed"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              },
              {
                "name": "transaction.index",
                "value": "1",
                "type": "query",
                "description": "The transaction index in the block"
              }
            ]
          },
          "docs": "Returns a list of all ContractResults for a contract's function executions."
        },
        {
          "info": {
            "name": "The contract state from a contract on the network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/:contractIdOrAddress/state",
            "params": [
              {
                "name": "contractIdOrAddress",
                "value": "",
                "type": "path",
                "description": "Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix)."
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "desc",
                "type": "query",
                "description": "The order in which items are listed"
              },
              {
                "name": "slot",
                "value": "",
                "type": "query",
                "description": "The slot's number"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp of the contract state as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              }
            ]
          },
          "docs": "Returns a list of all contract's slots. If no timestamp is provided, returns the current state."
        },
        {
          "info": {
            "name": "Get the contract result from a contract on the network executed at a given timestamp",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/:contractIdOrAddress/results/:timestamp",
            "params": [
              {
                "name": "contractIdOrAddress",
                "value": "",
                "type": "path",
                "description": "Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix)."
              },
              {
                "name": "hbar",
                "value": "false",
                "type": "query",
                "description": "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)."
              },
              {
                "name": "timestamp",
                "value": "1234567890.0000007",
                "type": "path",
                "description": "The Unix timestamp in seconds.nanoseconds format, the timestamp at which the associated transaction reached consensus. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              }
            ]
          },
          "docs": "Returns a single ContractResult for a contract's function executions at a specific timestamp."
        },
        {
          "info": {
            "name": "List contract results from all contracts on the network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/results",
            "params": [
              {
                "name": "from",
                "value": "",
                "type": "query",
                "description": "Account ID or EVM address executing the contract"
              },
              {
                "name": "block.hash",
                "value": "",
                "type": "query",
                "description": "The block's hash. If multiple values are provided the last value will be the only value used."
              },
              {
                "name": "block.number",
                "value": "",
                "type": "query",
                "description": "The block's number"
              },
              {
                "name": "hbar",
                "value": "false",
                "type": "query",
                "description": "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)."
              },
              {
                "name": "internal",
                "value": "true",
                "type": "query",
                "description": "Whether to include child transactions or not"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "asc",
                "type": "query",
                "description": "The order in which items are listed"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              },
              {
                "name": "transaction.index",
                "value": "1",
                "type": "query",
                "description": "The transaction index in the block"
              }
            ]
          },
          "docs": "Returns a list of all ContractResults for all contract's function executions."
        },
        {
          "info": {
            "name": "Get the contract result from a contract on the network for a given transactionId or ethereum transaction hash",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/results/:transactionIdOrHash",
            "params": [
              {
                "name": "transactionIdOrHash",
                "value": "",
                "type": "path",
                "description": "Transaction Id or a 32 byte hash with optional 0x prefix"
              },
              {
                "name": "hbar",
                "value": "false",
                "type": "query",
                "description": "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)."
              },
              {
                "name": "nonce",
                "value": "1",
                "type": "query",
                "description": "Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions while a non-zero nonce is generated by main nodes. The filter honors the last value. Default is 0 when not specified."
              }
            ]
          },
          "docs": "Returns a single ContractResult for a contract's function executions for a given transactionId or ethereum transaction hash."
        },
        {
          "info": {
            "name": "Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/results/:transactionIdOrHash/actions",
            "params": [
              {
                "name": "transactionIdOrHash",
                "value": "",
                "type": "path",
                "description": "Transaction Id or a 32 byte hash with optional 0x prefix"
              },
              {
                "name": "index",
                "value": "",
                "type": "query",
                "description": "The index of a contract action"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "desc",
                "type": "query",
                "description": "The order in which items are listed"
              }
            ]
          },
          "docs": "Returns a list of ContractActions for a contract's function executions for a given transactionId or ethereum transaction hash."
        },
        {
          "info": {
            "name": "Get the opcode traces for a historical transaction on the network with the given transaction ID or hash",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/results/:transactionIdOrHash/opcodes",
            "params": [
              {
                "name": "transactionIdOrHash",
                "value": "",
                "type": "path",
                "description": "Transaction Id or a 32 byte hash with optional 0x prefix"
              },
              {
                "name": "stack",
                "value": "true",
                "type": "query",
                "description": "If provided and set to false, stack information will not be included in the response"
              },
              {
                "name": "memory",
                "value": "false",
                "type": "query",
                "description": "If provided and set to true, memory information will be included in the response"
              },
              {
                "name": "storage",
                "value": "false",
                "type": "query",
                "description": "If provided and set to true, storage information will be included in the response"
              }
            ]
          },
          "docs": "Re-executes a transaction and returns a result containing detailed information for the execution,\nincluding all values from the {@code stack}, {@code memory} and {@code storage}\nand the entire trace of opcodes that were executed during the replay.\n\nNote that to provide the output, the transaction needs to be re-executed on the EVM,\nwhich may take a significant amount of time to complete if stack and memory information is requested.\n"
        },
        {
          "info": {
            "name": "List contract logs from a contract on the network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/:contractIdOrAddress/results/logs",
            "params": [
              {
                "name": "contractIdOrAddress",
                "value": "",
                "type": "path",
                "description": "Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix)."
              },
              {
                "name": "index",
                "value": "",
                "type": "query",
                "description": "Contract log index"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "asc",
                "type": "query",
                "description": "The order in which items are listed"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              },
              {
                "name": "topic0",
                "value": "",
                "type": "query",
                "description": "The first topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic1",
                "value": "",
                "type": "query",
                "description": "The second topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic2",
                "value": "",
                "type": "query",
                "description": "The third topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic3",
                "value": "",
                "type": "query",
                "description": "The fourth topic associated with a contract log. Requires a timestamp range also be populated."
              }
            ]
          },
          "docs": "Search the logs of a specific contract across multiple contract calls. Chained logs are not\nincluded but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`\nor `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied\nand span a time range of at most seven days.\n\n## Ordering\nThe order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only."
        },
        {
          "info": {
            "name": "List contracts logs across many contracts on the network",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "/api/v1/contracts/results/logs",
            "params": [
              {
                "name": "index",
                "value": "",
                "type": "query",
                "description": "Contract log index"
              },
              {
                "name": "limit",
                "value": "2",
                "type": "query",
                "description": "The maximum number of items to return"
              },
              {
                "name": "order",
                "value": "asc",
                "type": "query",
                "description": "The order in which items are listed"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time."
              },
              {
                "name": "topic0",
                "value": "",
                "type": "query",
                "description": "The first topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic1",
                "value": "",
                "type": "query",
                "description": "The second topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic2",
                "value": "",
                "type": "query",
                "description": "The third topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "topic3",
                "value": "",
                "type": "query",
                "description": "The fourth topic associated with a contract log. Requires a timestamp range also be populated."
              },
              {
                "name": "transaction.hash",
                "value": "",
                "type": "query",
                "description": "A hex encoded 32-byte ethereum transaction hash or 48-byte hedera transaction hash."
              }
            ]
          },
          "docs": "Search the logs across many contracts with multiple contract calls. Chained logs are not\nincluded but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`\nor `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied\nand span a time range of at most seven days.\n\n## Ordering\nThe order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.\n\nN"
        }
      ]
    }
  ],
  "bundled": true
}