Skip to main content

GetContractFile

Retrieves contract file metadata by transaction full hash, with optional file data.

Request

GET /nxt?requestType=getContractFile

All endpoints use port 22024 by default.

Parameters

NameTypeDescriptionRequired
transactionFullHashstringTransaction full hashYes
includeDatabooleanInclude file data (default true)No
retrievebooleanRetrieve pruned data (default false)No

Response

{
"transactionFullHash": "abc123...",
"name": "mycontract",
"description": "Smart contract",
"keywords": "contract, wasm",
"type": "text/plain",
"group": "default",
"isText": true,
"filename": "contract.wasm",
"timestamp": 1700000000,
"errorCode": 0,
"errorDescription": ""
}

Example

curl "http://localhost:22024/nxt?requestType=getContractFile&transactionFullHash=abc123..."