Skip to main content

GetAllContractFiles

Retrieves all contract files across the network with pagination support.

Request

GET /nxt?requestType=getAllContractFiles

All endpoints use port 22024 by default.

Parameters

NameTypeDescriptionRequired
firstIndexintPagination startNo
lastIndexintPagination endNo
includeDatabooleanInclude file data (default false)No

Response

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

Example

curl "http://localhost:22024/nxt?requestType=getAllContractFiles&firstIndex=0&lastIndex=10"