Package com.jelurida.ardor.contracts
Class ForgingReward
java.lang.Object
nxt.addons.AbstractContract
com.jelurida.ardor.contracts.ForgingReward
- All Implemented Interfaces:
Contract
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 -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class nxt.addons.AbstractContract
isDuplicate, processInvocation, processRequest, 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
-
ForgingReward
public ForgingReward()
-
-
Method Details
-
processBlock
- Specified by:
processBlockin interfaceContract- Overrides:
processBlockin classAbstractContract
-