Skip to main content
GET
/
api
/
v1
/
contracts
/
{contractIdOrAddress}
Get contract by id
curl --request GET \
  --url https://mainnet.mirrornode.hedera.com/api/v1/contracts/{contractIdOrAddress}
{
  "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",
  "deleted": false,
  "expiration_timestamp": "1586567700.453054000",
  "file_id": "0.0.2",
  "max_automatic_token_associations": 123,
  "memo": "contract memo",
  "obtainer_id": "0.0.2",
  "permanent_removal": true,
  "proxy_account_id": "0.0.2",
  "timestamp": {
    "from": "1586567700.453054000",
    "to": "1586567700.453054000"
  }
}

Path Parameters

contractIdOrAddress
string
required

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

Query Parameters

timestamp
string[]

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

admin_key
object | null

The public key which controls access to various network entities.

auto_renew_account
string | null

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

Example:

"0.0.2"

auto_renew_period
integer | null
Example:

7776000

contract_id
string | null

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

Example:

"0.0.2"

created_timestamp
string | null

A Unix timestamp in seconds.nanoseconds format

Example:

"1586567700.453054000"

deleted
boolean
Example:

false

evm_address
file

A network entity encoded as an EVM address in hex.

expiration_timestamp
string | null

A Unix timestamp in seconds.nanoseconds format

Example:

"1586567700.453054000"

file_id
string | null

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

Example:

"0.0.2"

max_automatic_token_associations
integer | null
memo
string
Example:

"contract memo"

obtainer_id
string | null

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

Example:

"0.0.2"

permanent_removal
boolean | null
proxy_account_id
string | null

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

Example:

"0.0.2"

timestamp
object

A timestamp range an entity is valid for

bytecode
file | null

The contract bytecode in hex during deployment

runtime_bytecode
file | null

The contract bytecode in hex after deployment