-
Notifications
You must be signed in to change notification settings - Fork 1
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:l2 proxy admin #233
feat:l2 proxy admin #233
Conversation
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.
I believe that there are missing changes at L2Genesis, the L2ProxyAdmin is not being deployed right now as far as i can see (maybe im wrong) and we don't have a test to be sure about it.
Also the L2Genesis.s.sol
has an owner slot override when deploying the admin that should not be there anymore
// Constants | ||
import { Constants } from "src/libraries/Constants.sol"; | ||
|
||
contract L2ProxyAdmin_Test is Test { |
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 only problem im seeing here is that we are not really testing the the L2ProxyAdmin is integrated
For this we usually use CommonTest
that setups the L2
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.
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!
address impl = _setImplementationCode(Predeploys.PROXY_ADMIN); | ||
|
||
bytes32 _ownerSlot = bytes32(0); | ||
|
||
// there is no initialize() function, so we just set the storage manually. | ||
vm.store(Predeploys.PROXY_ADMIN, _ownerSlot, bytes32(uint256(uint160(cfg.proxyAdminOwner())))); | ||
// update the proxy to not be uninitialized (although not standard initialize pattern) | ||
vm.store(impl, _ownerSlot, bytes32(uint256(uint160(cfg.proxyAdminOwner())))); | ||
_setImplementationCode(Predeploys.PROXY_ADMIN); |
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 is good! The old PR initialized the slot with a dead address tho, are we sure there is no risk having the slot not initialized?
Closes OPT-635