public class InitializationContext extends AbstractContractContext
AbstractContractContext.EventSource
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 and Description |
---|
InitializationContext(ContractRunnerConfig config,
ContractAndSetupParameters contractAndSetupParameters,
AbstractContractContext.EventSource source) |
Modifier and Type | Method and Description |
---|---|
JO |
createTransaction(APICall.Builder builder)
Submit a transaction to the blockchain
|
JO |
createTransaction(APICall.Builder builder,
boolean reduceFeeFromAmount)
Submit a transaction to the blockchain
|
BlockResponse |
getBlock()
Returns the Json representation of the current block
|
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
public InitializationContext(ContractRunnerConfig config, ContractAndSetupParameters contractAndSetupParameters, AbstractContractContext.EventSource source)
public BlockResponse getBlock()
AbstractContractContext
getBlock
in class AbstractContractContext
public JO createTransaction(APICall.Builder builder)
AbstractContractContext
createTransaction
in class AbstractContractContext
builder
- the API caller for the specific transaction typepublic JO createTransaction(APICall.Builder builder, boolean reduceFeeFromAmount)
AbstractContractContext
createTransaction
in class AbstractContractContext
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