v1

latestOpenAPI 3.0.3Apache-2.02026-07-1348142206.6 KB
contracts

Get contract by id

Return the contract information given an id

get/api/v1/contracts/{contractIdOrAddress}

Path parameters

contractIdOrAddressstring required

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

Query parameters

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.

Response

OK

auto_renew_accountstring nullable

Network entity ID in the format of shard.realm.num

auto_renew_periodinteger nullable
contract_idstring nullable

Network entity ID in the format of shard.realm.num

created_timestampstring nullable

A Unix timestamp in seconds.nanoseconds format

deletedboolean
evm_addressstring binary

A network entity encoded as an EVM address in hex.

expiration_timestampstring nullable

A Unix timestamp in seconds.nanoseconds format

file_idstring nullable

Network entity ID in the format of shard.realm.num

max_automatic_token_associationsinteger nullable
memostring
nonceinteger nullable

The nonce of the contract

obtainer_idstring nullable

Network entity ID in the format of shard.realm.num

permanent_removalboolean nullable
proxy_account_idstring nullable

Network entity ID in the format of shard.realm.num

bytecodestring binary nullable

The contract bytecode in hex during deployment

runtime_bytecodestring binary nullable

The contract bytecode in hex after deployment

Example response

{
  "admin_key": {
    "_type": "ProtobufEncoded",
    "key": "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743"
  },
  "auto_renew_account": "0.0.2",
  "auto_renew_period": 7776000,
  "contract_id": "0.0.2",
  "created_timestamp": "1586567700.453054000",
  "evm_address": "0000000000000000000000000000000000001f41",
  "expiration_timestamp": "1586567700.453054000",
  "file_id": "0.0.2",
  "memo": "contract memo",
  "nonce": 1,
  "obtainer_id": "0.0.2",
  "proxy_account_id": "0.0.2",
  "timestamp": {
    "from": "1586567700.453054000",
    "to": "1586567700.453054000"
  },
  "bytecode": "0x01021a1fdc9b",
  "runtime_bytecode": "0x0302fa1ad39c"
}