SetContractReference
Links an account to a contract file on the Shamwari Network, optionally configuring validation and fee rate parameters.
Request
POST /nxt?requestType=setContractReference
All endpoints use port 22024 by default.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
contractName | string | Contract name | Yes |
contractParams | string | Contract parameters | Optional |
contract | string | Contract transaction full hash | Yes |
isValidator | boolean | Account is validator | No |
autoFeeRate | boolean | Enable automatic fee rate | No |
transactionPriority | string | Fee rate priority | No |
minBinderBalanceFXT | long | Minimum binder balance | No |
minBinderFeeLimitFQT | long | Minimum binder fee limit | No |
feeRatePerChainStr | string | Fee rate per chain | No |
secretPhrase | string | Sender's secret passphrase | Yes |
Response
{
"transaction": "1234567890123456789",
"fullHash": "abc123def456...",
"errorCode": 0,
"errorDescription": ""
}
Example
curl -X POST "http://localhost:22024/nxt?requestType=setContractReference" \
-d "contractName=mycontract" \
-d "contract=abc123..." \
-d "isValidator=true" \
-d "secretPhrase=your_secret_passphrase"