VotingReward

Git Source

Inherits: Reward

Base contract for rewards distributed based on voting power

Extends Reward with voting-specific reward logic

Functions

constructor

Configures voting rewards with initial reward tokens

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

Parameters

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

getReward

Validates caller is token owner or voter before processing claim

function getReward(uint256 tokenId, address[] memory tokens)
    external
    override
    nonReentrant;

notifyRewardAmount

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