-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(staking): implement new staking design changes #189
Conversation
9303ab4
to
7713851
Compare
9621114
to
5b1b16e
Compare
* feat(evmstaking): unit tests feat(evmstaking): new staking events feat(evmstaking): unit tests for new staking events feat(evmstaking): unit tests for new staking events feat(evmstaking): rebase latest changes * feat(evmstaking): rebase latest changes
82925ed
to
6b0fe86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setup a single node network locally based on this branc, it works
LGTM
Binary uploaded successfully 🎉📦 Version Name: 0.12.0-unstable-f021bb9 |
) | ||
external | ||
payable | ||
override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The override modifier might not be necessary here, since this contract doesn’t inherit from any other contract.
(uint256 stakeAmount, ) = roundedStakeAmount(msg.value); | ||
if (stakeAmount < minStakeAmount) { | ||
revert Errors.IPTokenStaking__StakeAmountUnderMin(); | ||
} | ||
emit Redelegate(delegatorUncmpPubkey, validatorUncmpSrcPubkey, validatorUncmpDstPubkey, delegationId, amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be add comments to explain why we don't need to refund remainder of roundedStakeAmount().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the remainder will stay in the source validator. If that’s the case, we might explain how do we handle the remainder in the source validator, especially since it’s likely that the remainder will be less than the minStakeAmount
. we might better add comments to explain why it is expected state/behavior.
issue: #184