Package nxt.addons
Class ShutdownContext
java.lang.Object
nxt.addons.AbstractContractContext
nxt.addons.ShutdownContext
-
Nested Class Summary
Nested classes/interfaces inherited from class nxt.addons.AbstractContractContext
AbstractContractContext.EventSource -
Field Summary
Fields inherited from class nxt.addons.AbstractContractContext
chainById, chainByName, config, contractName, contractSetupParameters, FEE_CANNOT_CALCULATE, FEE_EXCEEDS_AMOUNT, INTERNAL_ERROR_CODE_THRESHOLD, MANAGED_ACCOUNTS_INDEX_HINT_FIELD, MESSAGE_TO_ENCRYPT_WITHOUT_SECRET_PHRASE, response, source, VALIDATE_SAME_ACCOUNT_CODE, VALIDATE_SAME_CHAIN, VALIDATE_SAME_TRANSACTION_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionShutdownContext(ContractRunnerConfig config, ContractAndSetupParameters contractAndSetupParameters, AbstractContractContext.EventSource source) -
Method Summary
Modifier and TypeMethodDescriptioncreateTransaction(APICall.Builder builder) Submit a transaction to the blockchaincreateTransaction(APICall.Builder builder, boolean reduceFeeFromAmount) Submit a transaction to the blockchaingetBlock()Returns the Json representation of the current blockvoidshutdown(ExecutorService executorService) Methods inherited from class nxt.addons.AbstractContractContext
addTriggerData, canSetResponse, createTransaction, fullHashToId, fullHashToId, generateErrorResponse, generateInfoResponse, generateInternalErrorResponse, generateResponse, getAccount, getAccountRs, getBlockchainConstants, getBlockchainHeight, getChain, getChain, getConfig, getContext, getContractName, getContractRunnerConfigParams, getContractSetupParameters, getHash, getHash, getNetworkType, getParams, getParentChain, getPhasingAttachment, getPublicKey, getPublicKey, getPublicKey, getPublicKeyHexString, getRandomnessSource, getResponse, getRuntimeParams, getSource, initRandom, isPermissionGranted, loadContract, logErrorMessage, logInfoMessage, parseAccountId, parseHexString, publicKeyToAccountId, publicKeyToAccountId, rsAccount, setContractSetupParameters, setResponse, sign, toHexString, verify
-
Constructor Details
-
ShutdownContext
public ShutdownContext(ContractRunnerConfig config, ContractAndSetupParameters contractAndSetupParameters, AbstractContractContext.EventSource source)
-
-
Method Details
-
getBlock
Description copied from class:AbstractContractContextReturns the Json representation of the current block- Specified by:
getBlockin classAbstractContractContext- Returns:
- the current block represented as Json
-
createTransaction
Description copied from class:AbstractContractContextSubmit a transaction to the blockchain- Overrides:
createTransactionin classAbstractContractContext- Parameters:
builder- the API caller for the specific transaction type- Returns:
- the response of the transaction creation
-
createTransaction
Description copied from class:AbstractContractContextSubmit a transaction to the blockchain- Overrides:
createTransactionin classAbstractContractContext- Parameters:
builder- the API caller for the specific transaction typereduceFeeFromAmount- set to true to reduce the transaction fee from the transaction amount if applicable, false otherwise- Returns:
- the response of the transaction creation
-
shutdown
-