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 Details

    • processBlock

      JO processBlock(BlockContext context)
    • processTransaction

      JO processTransaction(TransactionContext context)
    • processRequest

      JO processRequest(RequestContext context) throws NxtException
      Throws:
      NxtException
    • processVoucher

      JO processVoucher(VoucherContext context)
    • processInvocation

      ReturnedData processInvocation(DelegatedContext context, InvocationData data)
    • isDuplicate

      <T extends TransactionResponse> boolean isDuplicate(T myTransaction, List<T> existingUnconfirmedTransactions)
    • minProductVersion

      default String minProductVersion()
    • init

      default void init(InitializationContext context)
      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

      default void shutdown(ShutdownContext context)
      Contract shutdown

      Invoked once before destroying the contract class, after any other callback. Use this callback to clean up long running services.

      Parameters:
      context - the contract context