Get contract by its hash.
None
None
contract_package
Contract package, this contract version is a part of
The Contract
entity offers a normalized representation of the Casper Network Contract without including entry point hashes, which can be queried separately using the Contract entry point API. Additionally, this entity omits the contract's named keys but utilizes them for identifying the contract's type.
The Contract
entity has the following properties:
contract_hash
string(64)
Contract hash represented as a hexadecimal string. Unique contract identifier
contract_package_hash
string(64)
Hash of the contract package, this contract version is a part of, represented as a hexadecimal string
block_height
uint64
Height of the block in which the contract was deployed to the network
deploy_hash
string(64)
Hash of the deploy that deployed the contract to the network represented as a hexadecimal string
contract_type_id
uint8
timestamp
uint16
Timestamp indicating when the contract was created
contract_version
uint16
Version number associated with the contract
is_disabled
bool
Indicates whether the contract is currently disabled
timestamp
datetime
Timestamp indicating when the contract was created
contract_version
uint16
Version number associated with the contract
is_disabled
bool
Indicates whether the contract is currently disabled
Example
Depending on the endpoint, the following optional properties may be included in the Contract
entity:
contract_package
Contract package, this contract version is a part of
The Contract
entity has the following relations with other entities:
contract_hash, deploy_hash
Contracts are deployed to the network with a deploy call. Deploys can be the contract call
contract_hash
Contracts can have endpoints
contract_package_hash
Contracts are different versions of the same smart contract under the contract package
The Contract
entity has the following endpoints:
The Contract
entity has the following relation endpoints:
Retrieve contracts associated with a specific contract package.
This endpoint allows you to retrieve contracts associated with a specific contract package. You can filter the results by deploy hash and choose to include optional fields such as contract package data. The example demonstrates a sample response with details for each contract, including contract hash, contract package hash, deploy hash, contract type ID, timestamp, contract version, and disabled status.
deploy_hash
Hash of the deploy that deployed the contract to the network
None
contract_package
Contract package, this contract version is a part of
timestamp
Sort contracts by timestamp
Default sorting is timestamp DESC
Identifier representing the type of the contract, check the types list
deploy_hash
Hash of the deploy that deployed the contract to the network
contract_package_hash
Contract Package hash.
from_block_height
From block height range
to_block_height
To block height range
timestamp
Sort contracts by timestamp
contract_package
Contract package, this contract version is a part of