com.jelurida.ardor.contracts

## Class AllForOnePayment

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

- All Implemented Interfaces:
    Contract

      public class AllForOnePayment
      extends AbstractContract

  The AllForOnePayment contract is triggered every pre-defined number of blocks, sums the received transactions and sends all of the amount back to one of the payers at random. This is a block based contract. Contract Parameters chain - chain to monitor frequency - how many blocks to wait between payments

- - ### Nested Class Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllForOnePayment()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JO` | `processBlock(BlockContext context)` This contract is triggered every block
    `JO` | `processRequest(RequestContext context)` Check the contract status - invoked by the invoke contract API before the distribution occurs.

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

      `isDuplicate, processInvocation, processTransaction, 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

    - #### AllForOnePayment

          public AllForOnePayment()

  - ### Method Detail

    - #### processBlock

          public JO processBlock(BlockContext context)

      This contract is triggered every block
      Specified by:
        `processBlock` in interface `Contract`
      Overrides:
        `processBlock` in class `AbstractContract`
      Parameters:
        `context` - contract context

    - #### processRequest

          public JO processRequest(RequestContext context)

      Check the contract status - invoked by the invoke contract API before the distribution occurs. Returns the existing payments made to the contract since the last payment.
      Specified by:
        `processRequest` in interface `Contract`
      Overrides:
        `processRequest` in class `AbstractContract`
      Parameters:
        `context` - contract contract