-
Notifications
You must be signed in to change notification settings - Fork 15
OZ contract upgrade #118
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
OZ contract upgrade #118
Conversation
| * @notice ProxyAdmin with 2-step ownership transfer | ||
| * @dev Adds 2-step ownership transfer to the OpenZeppelin ProxyAdmin contract, both for the owner of the ProxyAdmin | ||
| * and to the proxy ownership transfer. | ||
| * @dev Adds 2-step ownership transfer to the OpenZeppelin ProxyAdmin contract for the owner of the ProxyAdmin. |
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 actually a lot cleaner / glad they made admin's immutable in the proxy layer.
test/access/ProxyOwner.t.sol
Outdated
| proxyAdmin.transferOwnership(address(proxyOwner)); | ||
| proxyOwner2 = new ProxyOwner(); | ||
| vm.stopPrank(); | ||
| console.log("owner %s proxyOwner %s admin %s", owner, address(proxyOwner), address(proxyAdmin)); |
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.
nit: console logging
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.
removed in 08d3c8d
linter should have caught this; I will configure it outside of this PR
| */ | ||
| function _constructing() private view returns (bool) { | ||
| return !Address.isContract(address(this)); | ||
| return !(address(this).code.length > 0); |
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.
Little nervous that they removed this, I think I read that EOF will break this check also.
How does their version of Initializable handle this initialization now?
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.
Oh nvm looks like they removed it for misuse reasons: OpenZeppelin/openzeppelin-contracts#3945.
src/token/types/Token18.sol
Outdated
| */ | ||
| function approve(Token18 self, address grantee, UFixed18 amount) internal { | ||
| IERC20(Token18.unwrap(self)).safeApprove(grantee, UFixed18.unwrap(amount)); | ||
| IERC20 token = IERC20(Token18.unwrap(self)); |
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.
Yeah, I agree with you that we shouldn't pull this safe logic in.
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.
removed in 3a84ed3
| // SPDX-License-Identifier: MIT | ||
| // OpenZeppelin Contracts (introduced v4.6.0, adapted from v4.9) (crosschain/CrossChainEnabled.sol) | ||
|
|
||
| pragma solidity ^0.8.20; |
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'm thinking we should follow OZ's lead and remove this cross stuff as well for now.
If we need it again in the future we can either pull it back in or find a more modern way of constructing it.
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.
removed in 33c6427
Unit Test Coverage ReportCoverage after merging ed/pe-2399 into v3 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
prateekdefi
left a comment
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!
Some notes: