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,
  "evm_address": "0000000000000000000000000000000000001f41",
  "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"
  },
  "bytecode": "0x01021a1fdc9b",
  "runtime_bytecode": "0x0302fa1ad39c"
}

Documentation Index

Fetch the complete documentation index at: https://hedera-0c6e0218-feat-hip-1313-high-volume-entity-creation.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

contractIdOrAddress
string
required

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

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.

Pattern: ^((eq|gt|gte|lt|lte|ne):)?\d{1,10}(.\d{1,9})?$

Response

OK

admin_key
object

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

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
Example:

"0.0.2"

auto_renew_period
integer<int64> | null
Example:

7776000

contract_id
string | null

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

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
Example:

"0.0.2"

created_timestamp
string | null

A Unix timestamp in seconds.nanoseconds format

Pattern: ^\d{1,10}(\.\d{1,9})?$
Example:

"1586567700.453054000"

deleted
boolean
Example:

false

evm_address
file

A network entity encoded as an EVM address in hex.

Required string length: 40 - 42
Pattern: ^(0x)?[A-Fa-f0-9]{40}$
expiration_timestamp
string | null

A Unix timestamp in seconds.nanoseconds format

Pattern: ^\d{1,10}(\.\d{1,9})?$
Example:

"1586567700.453054000"

file_id
string | null

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

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
Example:

"0.0.2"

max_automatic_token_associations
integer<int32> | null
memo
string
Example:

"contract memo"

obtainer_id
string | null

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

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
Example:

"0.0.2"

permanent_removal
boolean | null
proxy_account_id
string | null

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

Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
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