Function: addReward(address _token, uint256 _amount)
Added reward tokens from the caller to the last epoch. The caller should be whitelisted by owner.
Inputs
_tokenControl: Full control.
Constraints: No.
Impact: The reward token address.
_amountControl: Full control.
Constraints: Caller should have enough amount of tokens to transfer.
Impact: The amount of reward tokens will be transferred.
Branches and code coverage (including function calls)
Intended branches
The balance of
msg.senderwas decreased by_amount.The
rewardDatawas updated properly.
Negative behavior
msg.senderis not whitelisted._tokenis zero._amountis zero.
Function call analysis
auraLocker.checkpointEpoch()External/internal?: External.
Argument control?: N/A.
Impact: Added new checkpoint.
_addReward(_token, _amount, latestEpoch)External/internal?: External.
Argument control?:
_tokenand_amount.Impact: Add reward to the last epoch.