- 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