Package com.jelurida.ardor.contracts
Class AllForOnePayment
java.lang.Object
nxt.addons.AbstractContract
com.jelurida.ardor.contracts.AllForOnePayment
- All Implemented Interfaces:
Contract
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessBlock(BlockContext context) This contract is triggered every blockprocessRequest(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, processVoucherMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nxt.addons.Contract
init, minProductVersion, shutdown
-
Constructor Details
-
AllForOnePayment
public AllForOnePayment()
-
-
Method Details
-
processBlock
This contract is triggered every block- Specified by:
processBlockin interfaceContract- Overrides:
processBlockin classAbstractContract- Parameters:
context- contract context
-
processRequest
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:
processRequestin interfaceContract- Overrides:
processRequestin classAbstractContract- Parameters:
context- contract contract
-