com.jelurida.ardor.contracts

## Class PropertyBasedLottery

- java.lang.Object
- - nxt.addons.AbstractContract
  - - com.jelurida.ardor.contracts.PropertyBasedLottery

- All Implemented Interfaces:
    Contract

      public class PropertyBasedLottery
      extends AbstractContract

  Sample contract which sets a property based on random selection. Warning: This design is inappropriate for gambling applications. The reason is that users can trigger this contract using a phased transaction and later not approve the trigger and response transactions in case they do not like the results. For a better approach to lottery application see the AllForOnePayment sample contract.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `PropertyBasedLottery.Params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyBasedLottery()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JO` | `processTransaction(TransactionContext context)`

    - ### Methods inherited from class nxt.addons.AbstractContract

      `isDuplicate, processBlock, processInvocation, processRequest, processVoucher`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface nxt.addons.Contract

      `minProductVersion`

- - ### Constructor Detail

    - #### PropertyBasedLottery

          public PropertyBasedLottery()

  - ### Method Detail

    - #### processTransaction

          public JO processTransaction(TransactionContext context)

      Specified by:
        `processTransaction` in interface `Contract`
      Overrides:
        `processTransaction` in class `AbstractContract`