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
| Name | Type | Description | Required |
|---|---|---|---|
transactionFullHash | string | Transaction full hash | Yes |
file | file | Contract file to verify | Yes |
name | string | File name | Optional |
description | string | File description | Optional |
keywords | string | Search keywords | Optional |
type | string | MIME content type | Optional |
group | string | File grouping | Optional |
isText | boolean | File is text | No |
filename | string | Original filename | Optional |
data | string | File data | Optional |
Response
{
"verify": true,
"name": "mycontract",
"description": "Smart contract",
"errorCode": 0,
"errorDescription": ""
}
Error Codes
| Code | Description |
|---|---|
| 1 | Unknown transaction |
| 2 | Incorrect transaction |
| 3 | Hashes mismatch |
Example
curl -X POST "http://localhost:22024/nxt?requestType=verifyContract" \
-d "transactionFullHash=abc123..." \
-d "file=@contract.wasm"