Skip to main content

VerifyContract

Verifies that a contract file matches the hash stored in a blockchain transaction attachment.

Request​

POST /nxt?requestType=verifyContract

All endpoints use port 22024 by default.

Parameters​

NameTypeDescriptionRequired
transactionFullHashstringTransaction full hashYes
filefileContract file to verifyYes
namestringFile nameOptional
descriptionstringFile descriptionOptional
keywordsstringSearch keywordsOptional
typestringMIME content typeOptional
groupstringFile groupingOptional
isTextbooleanFile is textNo
filenamestringOriginal filenameOptional
datastringFile dataOptional

Response​

{
"verify": true,
"name": "mycontract",
"description": "Smart contract",
"errorCode": 0,
"errorDescription": ""
}

Error Codes​

CodeDescription
1Unknown transaction
2Incorrect transaction
3Hashes mismatch

Example​

curl -X POST "http://localhost:22024/nxt?requestType=verifyContract" \
-d "transactionFullHash=abc123..." \
-d "file=@contract.wasm"