Get smart contract

Retrieves a deployed smart contract, along with the transaction that deployed it. Only successfully deployed contracts are returned; a contract id whose deploy transaction failed is not found.

GET

Parameters

Path Parameters

contract_id
REQUIRED
string Smart Contract ID

Query Parameters

include
array Heavy fields to include in the response.
Status codeDescription
200Default Response
4XXDefault Response
cURL
curl -L \
"https://api.hiro.so/extended/v3/smart-contracts/{contract_id}?include={include}" \
-H 'Accept: application/json'
Response
{
"contract_id": "SP000000000000000000002Q6VF78.pox-3",
"clarity_version": 0,
"tx_id": "0xf6bd5f4a7b26184a3466340b2e99fd003b4962c0e382a7e4b6a13df3dd7a91c6",
"block": {
"height": 144000,
"hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"index_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"time": 144000,
"tx_index": 0
},
"bitcoin_block": {
"height": 144000,
"time": 144000
},
"source_code": "SP000000000000000000002Q6VF78.pox-3"
}

How is this guide?