Skip to content
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[contracts]: temporarily disable EOA upgrades #857

Merged
merged 5 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chatty-walls-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts': minor
---

Disables EOA contract upgrades until further notice
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract OVM_ProxyEOA {
/**********
* Events *
**********/

event Upgraded(
address indexed implementation
);
Expand Down Expand Up @@ -71,13 +71,17 @@ contract OVM_ProxyEOA {
)
external
{
require(
msg.sender == Lib_ExecutionManagerWrapper.ovmADDRESS(),
"EOAs can only upgrade their own EOA implementation"
);
// NOTE: Upgrades are temporarily disabled because users can, in theory, modify their EOA
// so that they don't have to pay any fees to the sequencer. Function will remain disabled
// until a robust solution is in place.

// require(
// msg.sender == Lib_ExecutionManagerWrapper.ovmADDRESS(),
// "EOAs can only upgrade their own EOA implementation"
// );

_setImplementation(_implementation);
emit Upgraded(_implementation);
// _setImplementation(_implementation);
// emit Upgraded(_implementation);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ describe('OVM_ProxyEOA', () => {
})
})

describe('upgrade()', () => {
// NOTE: Upgrades are disabled for now but will be re-enabled at a later point in time. See
// comment in OVM_ProxyEOA.sol for additional information.
describe.skip('upgrade()', () => {
it(`should upgrade the proxy implementation`, async () => {
const newImpl = `0x${'81'.repeat(20)}`
Mock__OVM_ExecutionManager.smocked.ovmADDRESS.will.return.with(
Expand Down