com.jelurida.ardor.contracts

## Class ForgingReward

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

- All Implemented Interfaces:
    Contract

      public class ForgingReward
      extends AbstractContract

  The forging reward contract is used to reward forgers for generating blocks on the Ardor and Nxt blockchains. Rewards are paid in IGNIS, one IGNIS per block since the last reward distribution. This reward tops whatever reward the forgers already received from transaction fees. The reward is submitted every predefined blocks interval, one of the block generators is chosen randomly by the contract, based on its weighted number of blocks generated during the interval. This forger receives the full reward. The contract accepts the following parameters: interval - the number of blocks between reward distribution isRewardArdor - when set to true, reward is distributed to Ardor forgers ardorNodeAddress - if sending Ardor rewards, specify a URL of a full Ardor node, do not specify to use the existing mainnet node isRewardNxt - when set to true, reward is distributed to Nxt forgers nxtNodeAddress - if sending Nxt rewards, specify a URL of a full Nxt node, the default is to use the NXT node listening on localhost rewardChain - the name of the chain whose tokens will be provided as forging rewards rewardAmountNQT - the forging reward amount Note the invocation of another contract to calculate the random distribution Note the access to a remote Nxt node which serves as an Oracle for information about the Nxt blockchain

- - ### Nested Class Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForgingReward()`

  - ### Method Summary

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

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

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

    - #### ForgingReward

          public ForgingReward()

  - ### Method Detail

    - #### processBlock

          public JO processBlock(BlockContext context)

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