BlockRewardAuRaCoins
contract BlockRewardAuRaCoins
Reference
Functions
_coinInflationAmount
function _coinInflationAmount(uint256 _stakingEpoch, address[] _validators) internal view returns (uint256)
Calculates and returns inflation amount based on the specified staking epoch and validator set. Uses NATIVE_COIN_INFLATION_RATE constant. Used by `_distributeNativeRewards` internal function.
- Parameters:
_stakingEpoch
- The number of the current staking epoch._validators
- The array of the current validators (their mining addresses).- Returns:
- uint256
_distributeTokenRewards
function _distributeTokenRewards(address , uint256 , uint256 , uint256 , address[] , uint256[] , uint256 ) internal
- Parameters:
- address
- uint256
- uint256
- uint256
- address[]
- uint256[]
- uint256
getDelegatorReward
function getDelegatorReward(uint256 _delegatorStake, uint256 _stakingEpoch, address _poolMiningAddress) external view returns (uint256)
Returns the reward amount in native coins for some delegator with the specified stake amount placed into the specified pool before the specified staking epoch. Used by the `StakingAuRa.claimReward` function.
- Parameters:
_delegatorStake
- The stake amount placed by some delegator into the `_poolMiningAddress` pool._stakingEpoch
- The serial number of staking epoch._poolMiningAddress
- The pool mining address.- Returns:
- `uint256 nativeReward` - the reward amount in native coins.
getValidatorReward
function getValidatorReward(uint256 _stakingEpoch, address _poolMiningAddress) external view returns (uint256)
Returns the reward amount in native coins for the specified validator and for the specified staking epoch. Used by the `StakingAuRa.claimReward` function.
- Parameters:
_stakingEpoch
- The serial number of staking epoch._poolMiningAddress
- The pool mining address.- Returns:
- `uint256 nativeReward` - the reward amount in native coins.
transferReward
function transferReward(uint256 _nativeCoins, address _to) external
Called by the `StakingAuRa.claimReward` function to transfer native coins from the balance of the `BlockRewardAuRa` contract to the specified address as a reward.
- Modifiers:
- onlyStakingContract
- Parameters:
_nativeCoins
- The amount of native coins to transfer as a reward._to
- The target address to transfer the amounts to.