public class VoucherContext extends AbstractOperationContext
AbstractContractContext.EventSource
blockId, chain, fullHash
chainById, chainByName, config, contractName, contractSetupParameters, FEE_CANNOT_CALCULATE, FEE_EXCEEDS_AMOUNT, INTERNAL_ERROR_CODE_THRESHOLD, MESSAGE_TO_ENCRYPT_WITHOUT_SECRET_PHRASE, response, source, VALIDATE_SAME_ACCOUNT_CODE, VALIDATE_SAME_CHAIN, VALIDATE_SAME_TRANSACTION_TYPE
Constructor and Description |
---|
VoucherContext(JO voucher,
ContractRunnerConfig config,
java.lang.String contractName) |
Modifier and Type | Method and Description |
---|---|
protected JO |
addTriggerData(JO jo) |
BlockResponse |
getBlock()
Returns the Json representation of the current block
|
protected java.lang.String |
getReferencedTransaction() |
TransactionResponse |
getTransaction()
Returns an object representing the trigger transaction data
|
protected JO |
getTransactionJson()
Returns the Json representation of the trigger transaction data
|
JO |
getVoucher()
Returns the transaction voucher which triggered this contract execution
|
getAmountNQT, getChainOfTransaction, getPhasingAttachment, getRandomSeed, getRecipientId, getRuntimeParams, getSenderId, isSameChain, isSameRecipient, isSameSender, notPaymentTransaction, notSameChain, notSameRecipient, notSameSender, validateSameAccount
canSetResponse, createTransaction, createTransaction, fullHashToId, fullHashToId, generateErrorResponse, generateInfoResponse, generateInternalErrorResponse, generateResponse, getAccount, getAccountRs, getBlockchainConstants, getBlockchainHeight, getChain, getChain, getConfig, getContext, getContractName, getContractRunnerConfigParams, getContractSetupParameters, getHash, getHash, getNetworkType, getParams, getParentChain, getPublicKey, getPublicKey, getPublicKeyHexString, getRandomnessSource, getResponse, getSource, initRandom, isPermissionGranted, loadContract, logErrorMessage, logInfoMessage, parseAccountId, parseHexString, publicKeyToAccountId, publicKeyToAccountId, rsAccount, setContractSetupParameters, setResponse, sign, toHexString, verify
public VoucherContext(JO voucher, ContractRunnerConfig config, java.lang.String contractName)
protected JO getTransactionJson()
AbstractOperationContext
getTransactionJson
in class AbstractOperationContext
public TransactionResponse getTransaction()
AbstractOperationContext
getTransaction
in class AbstractOperationContext
public BlockResponse getBlock()
AbstractContractContext
getBlock
in class AbstractContractContext
protected JO addTriggerData(JO jo)
addTriggerData
in class AbstractContractContext
public JO getVoucher()
protected java.lang.String getReferencedTransaction()
getReferencedTransaction
in class AbstractContractContext