Get contract

Get contract by its hash.

GET /contracts/{contract_hash}

Query params

None

Sorting

None

Optional properties

Property
Type
Description

contract_package

Contract package, this contract version is a part of

Response

Contract

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/contracts/8a2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e732' \
  -H 'Accept: application/json' \
  -H 'Authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": {
    "contract_hash": "8a2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e732",
    "contract_package_hash": "ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744",
    "deploy_hash": "1a2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e755",
    "block_height": 2404577,
    "contract_type_id": 2,
    "timestamp": "2023-01-01T12:00:00Z",
    "contract_version": 1,
    "is_disabled": false
  }
}

Last updated