Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
29b58fef
Unverified
Commit
29b58fef
authored
Apr 04, 2023
by
OptimismBot
Committed by
GitHub
Apr 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5294 from ethereum-optimism/sc/ctb-proxy-inheritable
feat(ctb): make Proxy inheritable
parents
43bc507d
56a30acd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
olive-students-love.md
.changeset/olive-students-love.md
+5
-0
Proxy.sol
packages/contracts-bedrock/contracts/universal/Proxy.sol
+6
-5
No files found.
.changeset/olive-students-love.md
0 → 100644
View file @
29b58fef
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Makes the Proxy contract inheritable by making functions (public virtual).
packages/contracts-bedrock/contracts/universal/Proxy.sol
View file @
29b58fef
...
@@ -84,7 +84,7 @@ contract Proxy {
...
@@ -84,7 +84,7 @@ contract Proxy {
*
*
* @param _implementation Address of the implementation contract.
* @param _implementation Address of the implementation contract.
*/
*/
function upgradeTo(address _implementation)
extern
al proxyCallIfNotAdmin {
function upgradeTo(address _implementation)
public virtu
al proxyCallIfNotAdmin {
_setImplementation(_implementation);
_setImplementation(_implementation);
}
}
...
@@ -96,8 +96,9 @@ contract Proxy {
...
@@ -96,8 +96,9 @@ contract Proxy {
* @param _data Calldata to delegatecall the new implementation with.
* @param _data Calldata to delegatecall the new implementation with.
*/
*/
function upgradeToAndCall(address _implementation, bytes calldata _data)
function upgradeToAndCall(address _implementation, bytes calldata _data)
external
public
payable
payable
virtual
proxyCallIfNotAdmin
proxyCallIfNotAdmin
returns (bytes memory)
returns (bytes memory)
{
{
...
@@ -112,7 +113,7 @@ contract Proxy {
...
@@ -112,7 +113,7 @@ contract Proxy {
*
*
* @param _admin New owner of the proxy contract.
* @param _admin New owner of the proxy contract.
*/
*/
function changeAdmin(address _admin)
extern
al proxyCallIfNotAdmin {
function changeAdmin(address _admin)
public virtu
al proxyCallIfNotAdmin {
_changeAdmin(_admin);
_changeAdmin(_admin);
}
}
...
@@ -121,7 +122,7 @@ contract Proxy {
...
@@ -121,7 +122,7 @@ contract Proxy {
*
*
* @return Owner address.
* @return Owner address.
*/
*/
function admin()
extern
al proxyCallIfNotAdmin returns (address) {
function admin()
public virtu
al proxyCallIfNotAdmin returns (address) {
return _getAdmin();
return _getAdmin();
}
}
...
@@ -130,7 +131,7 @@ contract Proxy {
...
@@ -130,7 +131,7 @@ contract Proxy {
*
*
* @return Implementation address.
* @return Implementation address.
*/
*/
function implementation()
extern
al proxyCallIfNotAdmin returns (address) {
function implementation()
public virtu
al proxyCallIfNotAdmin returns (address) {
return _getImplementation();
return _getImplementation();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment