Skip to content

Commit

Permalink
move events to tokenWrappr
Browse files Browse the repository at this point in the history
  • Loading branch information
vm06007 committed Sep 30, 2024
1 parent 5903eda commit 1bdda13
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 140 deletions.
31 changes: 0 additions & 31 deletions contracts/DualRewardFarm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ contract DualRewardFarm is TokenWrapper {
_;
}

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardsAdded(
uint256 rewardRateA,
uint256 rewardRateB,
Expand All @@ -96,27 +86,6 @@ contract DualRewardFarm is TokenWrapper {
uint256 tokenAmountB
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event OwnerProposed(
address proposedOwner
);

event OwnerChanged(
address newOwner
);

event ManagerChanged(
address newManager
);

function initialize(
address _stakeToken,
address _rewardTokenA,
Expand Down
31 changes: 0 additions & 31 deletions contracts/SimpleFarm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ contract SimpleFarm is TokenWrapper {
_;
}

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardAdded(
uint256 rewardRate,
uint256 tokenAmount
Expand All @@ -78,27 +68,6 @@ contract SimpleFarm is TokenWrapper {
uint256 tokenAmount
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event OwnerProposed(
address proposedOwner
);

event OwnerChanged(
address newOwner
);

event ManagerChanged(
address newManager
);

function initialize(
address _stakeToken,
address _rewardToken,
Expand Down
31 changes: 0 additions & 31 deletions contracts/SimpleFarm2X.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ contract SimpleFarm2X is TokenWrapper {
_;
}

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardAdded(
uint256 rewardRateA,
uint256 rewardRateB,
Expand All @@ -110,27 +100,6 @@ contract SimpleFarm2X is TokenWrapper {
uint256 tokenAmountB
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event OwnerProposed(
address proposedOwner
);

event OwnerChanged(
address newOwner
);

event ManagerChanged(
address newManager
);

constructor(
IERC20 _stakeToken,
IERC20 _rewardTokenA,
Expand Down
23 changes: 0 additions & 23 deletions contracts/TimeLockFarm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ contract TimeLockFarm is TokenWrapper {
_;
}

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardAdded(
uint256 rewardRate,
uint256 tokenAmount
Expand All @@ -83,19 +73,6 @@ contract TimeLockFarm is TokenWrapper {
uint256 tokenAmount
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event ManagerChanged(
address newManager
);

constructor(
IERC20 _stakeToken,
IERC20 _rewardToken,
Expand Down
23 changes: 0 additions & 23 deletions contracts/TimeLockFarmV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ contract TimeLockFarmV2 is TokenWrapper {
_;
}

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardAdded(
uint256 rewardRate,
uint256 tokenAmount
Expand All @@ -85,19 +75,6 @@ contract TimeLockFarmV2 is TokenWrapper {
uint256 tokenAmount
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event ManagerChanged(
address newManager
);

constructor(
IERC20 _stakeToken,
IERC20 _rewardToken,
Expand Down
44 changes: 43 additions & 1 deletion contracts/TokenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pragma solidity =0.8.26;

import "./SafeERC20.sol";
import "./Babylonian.sol";

contract TokenWrapper is SafeERC20 {

Expand Down Expand Up @@ -31,6 +30,49 @@ contract TokenWrapper is SafeERC20 {
uint256 value
);

event Staked(
address indexed user,
uint256 tokenAmount
);

event Withdrawn(
address indexed user,
uint256 tokenAmount
);

event RewardAdded(
address indexed rewardToken,
uint256 rewardRate,
uint256 tokenAmount
);

event RewardPaid(
address indexed user,
address indexed rewardToken,
uint256 tokenAmount
);

event Recovered(
IERC20 indexed token,
uint256 tokenAmount
);

event RewardsDurationUpdated(
uint256 newRewardDuration
);

event OwnerProposed(
address proposedOwner
);

event OwnerChanged(
address newOwner
);

event ManagerChanged(
address newManager
);

/**
* @dev Returns total amount of staked tokens
*/
Expand Down

0 comments on commit 1bdda13

Please sign in to comment.