Class HelloWorld

java.lang.Object
nxt.addons.AbstractContract
com.jelurida.ardor.contracts.HelloWorld
All Implemented Interfaces:
Contract

public class HelloWorld extends AbstractContract
Sample contract to demonstrate the basic operations. To trigger the contract, send a message transaction or transaction with an attached message. Set the recipient to the contract runner account, set the message text to {"contract":"HelloWorld"}, use prunable message. In response the contract will send a message transaction back to the sender account. Note the validation at the beginning, the code to create the new transaction, and the usage of Json objects.
  • Constructor Details

    • HelloWorld

      public HelloWorld()
  • Method Details

    • processTransaction

      public JO processTransaction(TransactionContext context)
      processTransaction is invoked in the following cases: 1. Simple (non-phased) transaction is accepted in a block 2. Phased transaction with by-hash voting model is accepted in a block. In this case the transaction submitted by the contract will be phased as well. 3. Phased transaction with any other model when it is approved and applied by the blockchain.
      Specified by:
      processTransaction in interface Contract
      Overrides:
      processTransaction in class AbstractContract
      Parameters:
      context - the transaction context