Skip to content

Commit

Permalink
Updated token distro with latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Mar 3, 2024
1 parent 09e05a0 commit a3dadee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/TokenDistro.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ contract TokenDistro is Initializable, IDistro, AccessControlEnumerableUpgradeab
*/
event GivBackPaid(address distributor);

/**
* @dev Emitted when the DISTRIBUTOR allocate an amount of praise rewards to a recipient
*/
event PraiseRewardPaid(address distributor);

/**
* @dev Emitted when the duration is changed
*/
Expand Down Expand Up @@ -207,6 +212,11 @@ contract TokenDistro is Initializable, IDistro, AccessControlEnumerableUpgradeab
emit GivBackPaid(msg.sender);
}

function sendPraiseRewards(address[] memory recipients, uint256[] memory amounts) external override {
_allocateMany(recipients, amounts);
emit PraiseRewardPaid(msg.sender);
}

/**
* Function that allows a recipient to change its address
* @dev The change can only be made to an address that has not previously received an allocation &
Expand Down
2 changes: 2 additions & 0 deletions contracts/interfaces/IDistro.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ interface IDistro {

function sendGIVbacks(address[] memory recipients, uint256[] memory amounts) external;

function sendPraiseRewards(address[] memory recipients, uint256[] memory amounts) external;

/**
* Function that allows a recipient to change its address
* @dev The change can only be made to an address that has not previously received an allocation &
Expand Down
2 changes: 2 additions & 0 deletions test/interfaces/IDistro.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ interface IDistro {

function sendGIVbacks(address[] memory recipients, uint256[] memory amounts) external;

function sendPraiseRewards(address[] memory recipients, uint256[] memory amounts) external;

/**
* Function that allows a recipient to change its address
* @dev The change can only be made to an address that has not previously received an allocation &
Expand Down

0 comments on commit a3dadee

Please sign in to comment.