Skip to content

Commit

Permalink
Merge pull request #34 from soramitsu/feature/merge_penaltyclaim_to_c…
Browse files Browse the repository at this point in the history
…laim_

[Update] removed totalPenalties in claim event
  • Loading branch information
SergeyPoslavskiy authored Jun 19, 2024
2 parents f026729 + 3cc8601 commit cbeae50
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions contracts/interfaces/IERC20Pool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ interface IPoolERC20 {
* @param user The address of the user who claims rewards
* @param amount The amount of rewards claimed
* @param penaltyAmount The amount deducted as penalty fee
* @param totalPenalties The total amount of deducted penalty fee
*/
event Claim(
address indexed user,
uint256 amount,
uint256 penaltyAmount,
uint256 totalPenalties
uint256 penaltyAmount
);

/**
Expand Down
4 changes: 1 addition & 3 deletions contracts/interfaces/IERC721Pool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ interface IPoolERC721 {
* @param user The address of the user who claimed the rewards.
* @param pending The amount of rewards claimed.
* @param penaltyAmount The amount deducted as penalty fee
* @param totalPenalties The total amount of deducted penalty fee
*/
event Claim(
address indexed user,
uint256 pending,
uint256 penaltyAmount,
uint256 totalPenalties
uint256 penaltyAmount
);

/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/pools/ERC20LockUpStakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ contract ERC20LockUpPool is ReentrancyGuard, Ownable, IPoolERC20, ILockUpPoolSto
}
pool.totalClaimed += pending;
IERC20(pool.rewardToken).safeTransfer(msg.sender, pending);
emit Claim(msg.sender, pending, 0, 0);
emit Claim(msg.sender, pending, 0);
} else {
revert NothingToClaim();
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/pools/ERC20PenaltyFeePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ contract ERC20PenaltyFeePool is ReentrancyGuard, Ownable, IPoolERC20, IPenaltyFe
pool.totalClaimed += pending;
pool.totalPenalties += penaltyAmount;
IERC20(pool.rewardToken).safeTransfer(msg.sender, pending);
emit Claim(msg.sender, pending, penaltyAmount, pool.totalPenalties);
emit Claim(msg.sender, pending, penaltyAmount);
} else {
revert NothingToClaim();
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/pools/ERC721/ERC721LockUpStakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ contract ERC721LockUpPool is
}
pool.totalClaimed += pending;
IERC20(pool.rewardToken).safeTransfer(msg.sender, pending);
emit Claim(msg.sender, pending, 0, 0);
emit Claim(msg.sender, pending, 0);
} else {
revert NothingToClaim();
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/pools/ERC721/ERC721PenaltyFeePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ contract draftERC721PenaltyFeepPool is
pool.totalClaimed += pending;
pool.totalPenalties += penaltyAmount;
IERC20(pool.rewardToken).safeTransfer(msg.sender, pending);
emit Claim(msg.sender, pending, penaltyAmount, pool.totalPenalties);
emit Claim(msg.sender, pending, penaltyAmount);
} else {
revert NothingToClaim();
}
Expand Down

0 comments on commit cbeae50

Please sign in to comment.