-
Notifications
You must be signed in to change notification settings - Fork 8
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: upgradeable beacon proxy #11
feat: upgradeable beacon proxy #11
Conversation
address poolImplementation = address(new KatanaV3Pool()); | ||
beacon = address(new UpgradeableBeacon(poolImplementation)); |
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.
Any reason to deploy UpgradeableBeacon
and pool implementation
within factory constructor?
function initializeImmutables(address factory_, address token0_, address token1_, uint24 fee_, int24 tickSpacing_) | ||
public | ||
{ | ||
require(!_immutablesInitialized); |
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 revert message
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.
Please provide some explanations for choosing this approach/design
constructor() BeaconProxy(address(0), "") { } | ||
|
||
/// @dev This function will be called with zero arguments but modified to include the pool's immutable parameters. | ||
function _setBeacon(address beacon, bytes memory data) internal virtual 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.
This param should be ignored since we always set the beacon using the address stored in factory.
function _setBeacon(address beacon, bytes memory data) internal virtual override { | |
function _setBeacon(address, bytes memory data) internal virtual override { |
/// @dev This function will be called with zero arguments but modified to include the pool's immutable parameters. | ||
function _setBeacon(address beacon, bytes memory data) internal virtual override { | ||
(address factory, address token0, address token1, uint24 fee, int24 tickSpacing) = | ||
IKatanaV3PoolDeployer(msg.sender).parameters(); |
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.
This method is called whenever the UpgradeableBeacon
is updated. However by this time, the parameters stored in PoolDeployer has already been deleted and always return 0 for all.
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.
provide some comment in the PR description.
…upgradeable-beacon-proxy chore(`upgradeable-beacon-proxy`): merge from `release/v1.0.0`
Already refactored in PR#13 |
Description
Checklist