Skip to main content

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​

NameTypeDescriptionRequired
contractNamestringContract nameYes
contractParamsstringContract parametersOptional
contractstringContract transaction full hashYes
isValidatorbooleanAccount is validatorNo
autoFeeRatebooleanEnable automatic fee rateNo
transactionPrioritystringFee rate priorityNo
minBinderBalanceFXTlongMinimum binder balanceNo
minBinderFeeLimitFQTlongMinimum binder fee limitNo
feeRatePerChainStrstringFee rate per chainNo
secretPhrasestringSender's secret passphraseYes

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"