Skip to content

Commit

Permalink
Refactored AbstractStaking and AbstractValueDistributor contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
mllwchrry committed Jan 22, 2024
1 parent ca2e18a commit 338f93d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion contracts/staking/AbstractStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ abstract contract AbstractStaking is AbstractValueDistributor, Initializable {
/**
* @notice Initializes the contract setting the values provided as shares token, rewards token, reward rate and staking start time.
*
* Warning: when shares and rewards tokens are the same, users may accidentally withdraw other users' shares as a reward.
* Warning: when shares and rewards tokens are the same, users may accidentally withdraw
* other users' shares as a reward if the rewards token balance is improperly handled.
*
* @param sharesToken_ The address of the shares token.
* @param rewardsToken_ The address of the rewards token.
Expand Down
6 changes: 3 additions & 3 deletions contracts/staking/AbstractValueDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ abstract contract AbstractValueDistributor {

mapping(address => UserDistribution) private _userDistributions;

event SharesAdded(address user_, uint256 amount_);
event SharesRemoved(address user_, uint256 amount_);
event ValueDistributed(address user_, uint256 amount_);
event SharesAdded(address user, uint256 amount);
event SharesRemoved(address user, uint256 amount);
event ValueDistributed(address user, uint256 amount);

/**
* @notice Returns the total number of shares.
Expand Down

0 comments on commit 338f93d

Please sign in to comment.