Skip to content

Commit

Permalink
feat[contracts]: temporarily disable EOA upgrades (#857)
Browse files Browse the repository at this point in the history
* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix
  • Loading branch information
smartcontracts authored and gakonst committed May 20, 2021
1 parent 54b1043 commit 88f2f6a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
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

0 comments on commit 88f2f6a

Please sign in to comment.