diff --git a/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ProxyEOA.sol b/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ProxyEOA.sol index 4bed6f8e7dfe..81b1225022c2 100644 --- a/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ProxyEOA.sol +++ b/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ProxyEOA.sol @@ -11,6 +11,8 @@ import { Lib_SafeExecutionManagerWrapper } from "../../libraries/wrappers/Lib_Sa */ contract OVM_ProxyEOA { + bytes32 constant IMPLEMENTATION_KEY = 0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddead; + /*************** * Constructor * ***************/ @@ -72,7 +74,7 @@ contract OVM_ProxyEOA { { return address(uint160(uint256( Lib_SafeExecutionManagerWrapper.safeSLOAD( - bytes32(uint256(0)) + IMPLEMENTATION_KEY ) ))); } @@ -87,7 +89,7 @@ contract OVM_ProxyEOA { internal { Lib_SafeExecutionManagerWrapper.safeSSTORE( - bytes32(uint256(0)), + IMPLEMENTATION_KEY, bytes32(uint256(uint160(_implementation))) ); } diff --git a/packages/contracts/test/contracts/OVM/accounts/OVM_ProxyEOA.spec.ts b/packages/contracts/test/contracts/OVM/accounts/OVM_ProxyEOA.spec.ts index 3dd4f71fde75..52c2b4b7a33f 100644 --- a/packages/contracts/test/contracts/OVM/accounts/OVM_ProxyEOA.spec.ts +++ b/packages/contracts/test/contracts/OVM/accounts/OVM_ProxyEOA.spec.ts @@ -100,6 +100,7 @@ describe('OVM_ProxyEOA', () => { }) }) describe('upgrade()', () => { + const implSlotKey = '0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddead' it(`should upgrade the proxy implementation`, async () => { const newImpl = `0x${'81'.repeat(20)}` const newImplBytes32 = addrToBytes32(newImpl) @@ -108,7 +109,7 @@ describe('OVM_ProxyEOA', () => { ]) const ovmSSTORE: any = Mock__OVM_ExecutionManager.smocked.ovmSSTORE.calls[0] - expect(ovmSSTORE._key).to.equal(`0x${'00'.repeat(32)}`) + expect(ovmSSTORE._key).to.equal(implSlotKey) expect(ovmSSTORE._value).to.equal(newImplBytes32) }) it(`should not allow upgrade of the proxy implementation by another account`, async () => { diff --git a/packages/contracts/test/contracts/OVM/execution/OVM_ExecutionManager/ovmCREATEEOA.spec.ts b/packages/contracts/test/contracts/OVM/execution/OVM_ExecutionManager/ovmCREATEEOA.spec.ts index 42dfa2050934..3e5a83e4f698 100644 --- a/packages/contracts/test/contracts/OVM/execution/OVM_ExecutionManager/ovmCREATEEOA.spec.ts +++ b/packages/contracts/test/contracts/OVM/execution/OVM_ExecutionManager/ovmCREATEEOA.spec.ts @@ -65,7 +65,7 @@ const test_ovmCREATEEOA: TestDefinition = { address: '0x17ec8597ff92C3F44523bDc65BF0f1bE632917ff', }, expectedReturnStatus: true, - expectedReturnValue: 1619, + expectedReturnValue: 1682, }, ], },