-
Notifications
You must be signed in to change notification settings - Fork 9
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: Adding third party stakes using the address of the user #84
Conversation
Summary by OctaneNew Contracts
Updated Contracts
🔗 Commit Hash: d298001 |
Overview
Detailed findings
|
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.
Left several questions.
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.
Left some comments.
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.
Two small changes on emission of Unstaked
and UnstakeInitiated
events.
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.
lgtm
(pending event checks for unstake
and initiateUnstake
in the new tests)
@ogarciarevett feel free to merge once you've added those tests. Thanks for the contribution.
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.
lgtm
This pull request introduces significant changes to the staking contract system, primarily focused on enhancing the staking functionality and updating the test cases accordingly. The most important changes include the addition of a new interface for staking operations, modifications to the staking functions to include a
positionHolder
parameter, and updates to the test cases to reflect these changes.Enhancements to Staking Functionality:
web3/contracts/interfaces/IStaker.sol
: Added a new interfaceIStaker
that defines various staking-related functions and events, includingcreatePool
,updatePoolConfiguration
,stakeNative
,stakeERC20
,stakeERC721
,stakeERC1155
,initiateUnstake
, andunstake
.Modifications to Staking Functions:
web3/contracts/staking/Staker.sol
: Updated the staking functions (stakeNative
,stakeERC20
,stakeERC721
,stakeERC1155
) to include apositionHolder
parameter, allowing the specification of the position holder address. This change also includes updates to the corresponding_mint
andemit
statements to usepositionHolder
instead ofmsg.sender
. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Updates to Access Control:
web3/contracts/staking/Staker.sol
: Modified theinitiateUnstake
andunstake
functions to allow the pool administrator to initiate and complete unstaking operations, in addition to the position owner. [1] [2] [3]Test Case Updates:
web3/test/Staker.test.1.ts
: Updated the test cases to include thepositionHolder
parameter in the staking function calls, ensuring that the tests reflect the new functionality. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Miscellaneous:
web3/contracts/mock/tokens.sol
: Added SPDX license identifier and updated the Solidity version.web3/package.json
: Added the package name@game7/protocol
.