Skip to content

Commit

Permalink
Included Reset Lock Event for patch v0.1.6 (#477)
Browse files Browse the repository at this point in the history
* Added event for reset lock (#425)

* Added enum for stakeChange Reason (#427)

* Added enum for stakeChange Reason

* testcase

* lintfixes

* removed typecasting

* revert

* revert

* lint:fixes

* lint:fixes

* fixed asset Manager

* resetLock
  • Loading branch information
adi44 authored Sep 29, 2021
1 parent 87dcb2b commit 27e6629
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/Core/StakeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ contract StakeManager is Initializable, ACL, StakeStorage, StateManager, Pause {

event DelegationAcceptanceChanged(bool delegationEnabled, address staker, uint32 indexed stakerId);

event ResetLock(address staker, uint32 epoch);

/// @param razorAddress The address of the Razor token ERC20 contract
/// @param rewardManagerAddress The address of the RewardManager contract
/// @param voteManagersAddress The address of the VoteManager contract
Expand Down Expand Up @@ -396,5 +398,6 @@ contract StakeManager is Initializable, ACL, StakeStorage, StateManager, Pause {

function _resetLock(uint32 stakerId) private {
locks[msg.sender][stakers[stakerId].tokenAddress] = Structs.Lock({amount: 0, withdrawAfter: 0});
emit ResetLock(msg.sender, parameters.getEpoch());
}
}

0 comments on commit 27e6629

Please sign in to comment.