Commit 9a02079e authored by Kelvin Fichter's avatar Kelvin Fichter

feat(ctb): make Proxy inheritable

Makes the Proxy contract inheritable by making external functions into
(public virtual) functions. Does not impact generated bytecode or gas
snapshot.
parent 0fad37ea
---
'@eth-optimism/contracts-bedrock': patch
---
Makes the Proxy contract inheritable by making functions (public virtual).
......@@ -84,7 +84,7 @@ contract Proxy {
*
* @param _implementation Address of the implementation contract.
*/
function upgradeTo(address _implementation) external proxyCallIfNotAdmin {
function upgradeTo(address _implementation) public virtual proxyCallIfNotAdmin {
_setImplementation(_implementation);
}
......@@ -96,8 +96,9 @@ contract Proxy {
* @param _data Calldata to delegatecall the new implementation with.
*/
function upgradeToAndCall(address _implementation, bytes calldata _data)
external
public
payable
virtual
proxyCallIfNotAdmin
returns (bytes memory)
{
......@@ -112,7 +113,7 @@ contract Proxy {
*
* @param _admin New owner of the proxy contract.
*/
function changeAdmin(address _admin) external proxyCallIfNotAdmin {
function changeAdmin(address _admin) public virtual proxyCallIfNotAdmin {
_changeAdmin(_admin);
}
......@@ -121,7 +122,7 @@ contract Proxy {
*
* @return Owner address.
*/
function admin() external proxyCallIfNotAdmin returns (address) {
function admin() public virtual proxyCallIfNotAdmin returns (address) {
return _getAdmin();
}
......@@ -130,7 +131,7 @@ contract Proxy {
*
* @return Implementation address.
*/
function implementation() external proxyCallIfNotAdmin returns (address) {
function implementation() public virtual proxyCallIfNotAdmin returns (address) {
return _getImplementation();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment