Skip to main content
GET
Get contract by id
Return the contract information given an id. This method will use 20 Compute Units.

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 in seconds.nanoseconds format with an optional comparison operator

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

Response

OK

admin_key
object | null
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.1.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.1.2"

created_timestamp
string | null
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
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.1.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.1.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.1.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