-
Notifications
You must be signed in to change notification settings - Fork 30
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
PufferDepositor and access #42
Conversation
bxmmm1
commented
Feb 16, 2024
•
edited
Loading
edited
- Remove unused code from the PufferDepositor
- Create a helper script for access management
bytes4[] memory publicSelectors = new bytes4[](6); | ||
publicSelectors[0] = PufferVaultMainnet.withdraw.selector; | ||
publicSelectors[1] = PufferVaultMainnet.redeem.selector; | ||
publicSelectors[2] = PufferVaultMainnet.redeem.selector; |
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.
Why 2 selectors for redeem?
@@ -189,6 +228,8 @@ contract PufferVaultMainnet is PufferVault { | |||
|
|||
/** | |||
* @notice Allows the `msg.sender` to burn his shares | |||
* @dev Restricted to PufferProtocol smart contract | |||
* We use it to burn the bond if the node operator gets slashed | |||
* @param shares The amount of shares to burn | |||
*/ | |||
function burn(uint256 shares) public restricted { |
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.
Nbd, but we mentioned we could allow anyone to call this to basically make a donation. The alternative they'd have is to send to something like address(0), but doesn't really burn the token / change the exchange ratio.
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.
Less things to think about. If somebody wants to donate, they can do so by depositing ETH/stETH/WETH
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.
duplicate selector and public burn (see comments)