Package nxt.addons
Interface Contract<InvocationData,ReturnedData>
- All Known Implementing Classes:
AbstractContract,AccountBalanceNotifier,AllForOnePayment,AllowedActions,ChainMonitor,ChildToParentExchange,CoinExchangeTradingBot,ContractWithInnerInterface,DatabaseAccess,DistributedRandomNumberGenerator,ForbiddenActions,ForgingReward,GetRandomNumber,HelloWorld,HelloWorldForwarder,IgnisArdorRates,LeaseRenewal,LiberlandCitizenRegistry,NewAccountFaucet,PropertyBasedLottery,RandomPayment,SlackNotifier,SplitPayment,TelegramNotifier,WhaleAlert
public interface Contract<InvocationData,ReturnedData>
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidinit(InitializationContext context) Contract initialization.<T extends TransactionResponse>
booleanisDuplicate(T myTransaction, List<T> existingUnconfirmedTransactions) default StringprocessBlock(BlockContext context) processInvocation(DelegatedContext context, InvocationData data) processRequest(RequestContext context) processTransaction(TransactionContext context) processVoucher(VoucherContext context) default voidshutdown(ShutdownContext context) Contract shutdown
-
Method Details
-
processBlock
-
processTransaction
-
processRequest
- Throws:
NxtException
-
processVoucher
-
processInvocation
-
isDuplicate
<T extends TransactionResponse> boolean isDuplicate(T myTransaction, List<T> existingUnconfirmedTransactions) -
minProductVersion
-
init
Contract initialization.Invoked once after loading the contract class, before any other callback. Use this callback to initialize long running services required by the contract.
- Parameters:
context- the contract context
-
shutdown
Contract shutdownInvoked once before destroying the contract class, after any other callback. Use this callback to clean up long running services.
- Parameters:
context- the contract context
-