BribeVotingReward

Git Source

Inherits: VotingReward

Implementation of voting rewards for bribes based on user votes

Final implementation of voting rewards specifically for bribe distribution

Functions

constructor

Initializes bribe voting rewards

constructor(address _voter, address[] memory _rewards)
    VotingReward(_voter, _rewards);

Parameters

NameTypeDescription
_voteraddressAddress of voter contract
_rewardsaddress[]Initial array of reward token addresses

notifyRewardAmount

Validates and whitelists reward tokens before processing

function notifyRewardAmount(address token, uint256 amount)
    external
    override
    nonReentrant;

removeNoLongerWhitelistedTokens

Removes tokens from the rewards list that are no longer whitelisted

function removeNoLongerWhitelistedTokens(address[] calldata tokens) external;

Parameters

NameTypeDescription
tokensaddress[]The list of tokens to remove

Events

NoLongerWhitelistedTokenRemoved

event NoLongerWhitelistedTokenRemoved(address indexed token);