-
Notifications
You must be signed in to change notification settings - Fork 7
Upgradeable staker (DO NOT MERGE) #154
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
base: main
Are you sure you want to change the base?
Conversation
src/extensions/StakerCapDeposits.sol
Outdated
uint256 _totalStakeCap; | ||
} | ||
|
||
// keccak256(abi.encode(uint256(keccak256("storage.StakerCapDeposits")) - 1)) &~bytes32(uint256(0xff)) |
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.
Add vendor subdomain
|
||
/// @notice Delegable governance token which users stake to earn rewards. | ||
IERC20 public immutable STAKE_TOKEN; | ||
struct StakerStorage { |
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.
Does cause multiple slot reads? Make sure gas estimations are still reasonable
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.
Targeting zksync, not a huge change so we will not optimize
// Public getter functions for storage variables | ||
|
||
/// @notice ERC20 token in which rewards are denominated and distributed. | ||
function REWARD_TOKEN() public view virtual returns (IERC20) { |
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.
Should these still be capitalized
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.
Also are there any of these getters we should remove
|
||
/// @notice Initializes the the contract. | ||
/// @param _initialTotalStakeCap The initial maximum total stake allowed. | ||
function __StakerCapDepositsUpgradeable_init_unchained(uint256 _initialTotalStakeCap) |
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.
Kept these to match convention, but they seem to only be used as a passthrough
} | ||
|
||
/// @notice Current configuration parameters for the fee assessed on claiming. | ||
function claimFeeParameters() public view virtual returns (ClaimFeeParameters memory) { |
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.
Should this return a tuple to maintain compatibility with the regular Staker?
__StakerDelegateSurrogateVotesUpgradeable_init_unchained(_votingToken); | ||
} | ||
|
||
/// @notice Initializes the the contract. |
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.
/// @notice Initializes the the contract. | |
/// @notice Initializes the `StakerDelegateSurrogateVotesUpgradeable` contract. |
return _domainSeparatorV4(); | ||
} | ||
|
||
/// @notice Initializes the the contract. |
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.
/// @notice Initializes the the contract. | |
/// @notice Initializes the `StakerOnBehalfUpgradeable` contract. |
Coverage after merging upgradeable-staker into main will be
Coverage Report
|
Description