Skip to main content
Version: 0.9.1

Contracts

GET /explorer/contract/{address}

Returns information about a Tezos smart contract. For balance details call the explorer account endpoint using the contracts KT1 address.

FieldDescription
account_id uint64Id of the related account.
address hashContract address.
creator hashCreator account (called manager before Babylon.
baker hashBaker the contract delegates to (may be empty).
storage_size int64Storage size allocated in bytes.
storage_paid int64Storage bytes paid for in bytes.
storage_burn moneyTotal value burned for storage allocations.
total_fees_used moneyTotal sum of fees accrued as tx receiver.
first_seen int64Block height of account creation.
last_seen int64Block height of last activity.
delegated_since int64Block height of most recent delegation.
first_seen_time datetimeBlock time of account creation.
last_seen_time datetimeBlock time of last activity.
n_calls_in int64Lifetime total number of successful calls received.
n_calls_out int64Lifetime total number of successful internal calls sent.
n_calls_failed int64Lifetime total number of calls failed.
bigmaps objectNamed bigmaps owned by this contract, map between annotation used in storage spec and bigmap id.
iface_hash bytesShort hash to uniquely identify the contract interface, first 8 bytes of the SHA256 hash over binary encoded Michelson script parameters.
code_hash bytesShort hash to uniquely identify the contract code, first 8 bytes of the SHA256 hash over binary encoded Michelson script code.
storage_hash bytesShort hash to uniquely identify the contract code, first 8 bytes of the SHA256 hash over binary encoded Michelson storage.
call_stats objectPer-entrypoint call statistics, as named key/value pairs.
features arrayMichelson features used by this contract. Any of account_factory, contract_factory, set_delegate, lambda, transfer_tokens, chain_id, ticket, sapling, view, global_constant, timelock.
interfaces arrayStandard interfaces implemented by this contract. Any of MANAGER, SET_DELEGATE, TZIP-005, TZIP-007, TZIP-012 (list may be extended).

Contract Scripts​

GET /explorer/contract/{address}/script

Returns the native Michelson JSON encoding of the deployed smart contract code as well as type specifications for call parameters, storage and bigmaps. Also contains decoded entrypoints and unfolded storage type.

Entrypoint names are extracted from type annotations and appear without prefix @. In rare cases when the entrypoint name is missing we use the convention @entrypoint_<num>, or if duplicate we suffix the name with a counter <name>_<num>.

FieldDescription
script objectNative Micheline primitives (optional, use prim=1).
storage_type objectTypedef for contract storage.
entrypoints objectList of named entrypoints.
entrypoints.$.id int64Position of the entrypoint in the Michelson parameter tree.
entrypoints.$.branch stringPath of left (L) or right (R) branches to reach the entrypoint's code in the Michelson code tree.
entrypoints.$.call stringAnnotated name of the entrypoint.
entrypoints.$.type polymorphArray of typedef for entrypoint arguments.
entrypoints.$.prim objectNative Micheline primitives (optional, use prim=1).
views objectList of named on-chain views.
views.$.name stringName of the view.
views.$.type objectArray of typedefs for view input and return arguments.
views.$.code arrayNative Micheline primitives for the Michelson script that implements the view (optional, use prim=1).
views.$.prim objectNative Micheline primitives for the entire view (optional, use prim=1).

Contract Storage​

GET /explorer/contract/{address}/storage

Returns the most recent or a historic version of the contracts storage. Supports

  • historic values when using block (int64|hash)
  • metadata about the contract and most recent update time/block with meta=1
  • native Micheline primitives prim=1
  • unpacking of packed data with unpack=1
FieldDescription
meta objectMetadata for the current storage entry (optional, use meta=1).
meta.contract hashOwner contract.
meta.time datetimeUpdate timestamp.
meta.height int64Update height.
meta.block hashBlock hash of latest update.
value objectUnfolded storage using type annotations.
prim objectNative Micheline primitives (optional, use prim=1).

Contract Calls​

GET /explorer/contract/{address}/calls

Returns contract calls (transactions) sent to the contract with embedded parameters, storage and bigmap updates. Supports

  • metadata with meta=1
  • native Micheline primitives prim=1
  • unpacking of packed data withh unpack=1
  • listing of newer updates with since (int64|hash)
  • ordering of calls with order (asc|desc)
  • filtering by entrypoint (int64|string) using id, name or branch
FieldDescription
entrypoint stringNamed entrypoint used in call params, e.g. 'default' or 'entrypoint_00.
branch stringPath of left (L) or right (R) branches to reach the entrypoint's code in the Michelson code tree.
call stringName of the executed entrypoint. This is useful if call parameters reference a different entrypoint name, but include a sub-tree of primitives that unpacks to this concrete entrypoint.
id int64Position of the entrypoint in the Michelson parameter tree.
value objectCall parameters in order of type definition.
prim objectNative Micheline primitives (optional, use prim=1).