From 455d0cf05dc49485dcb9e5249a9f12beaab037cd Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 28 Jul 2021 14:44:21 +0200 Subject: [PATCH] default to london --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 2 +- apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts | 2 +- apps/remix-ide/src/app/tabs/hardhat-provider.js | 2 +- apps/remix-ide/src/blockchain/execution-context.js | 4 ++-- libs/remix-debug/src/code/codeUtils.ts | 2 +- libs/remix-debug/src/trace/traceManager.ts | 2 +- libs/remix-debug/test/decoder/vmCall.ts | 2 +- libs/remix-lib/src/execution/forkAt.ts | 2 +- libs/remix-lib/src/execution/txRunnerVM.ts | 2 +- libs/remix-simulator/src/vm-context.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index aa6d507120..866ce3149b 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -49,7 +49,7 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) - .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') + .debugTransaction(1) .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) diff --git a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts index a3bf500ec0..5c768859f8 100644 --- a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts +++ b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts @@ -45,7 +45,7 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) - .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') + .debugTransaction(1) .pause(2000) .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') diff --git a/apps/remix-ide/src/app/tabs/hardhat-provider.js b/apps/remix-ide/src/app/tabs/hardhat-provider.js index 8152d61332..75c20a90cd 100644 --- a/apps/remix-ide/src/app/tabs/hardhat-provider.js +++ b/apps/remix-ide/src/app/tabs/hardhat-provider.js @@ -65,7 +65,7 @@ export default class HardhatProvider extends Plugin { if (error) { this.blocked = true modalDialogCustom.alert('Hardhat Provider', `Error while connecting to the hardhat provider: ${error.message}`) - await this.call('udapp', 'setEnvironmentMode', { context: 'vm', fork: 'berlin' }) + await this.call('udapp', 'setEnvironmentMode', { context: 'vm', fork: 'london' }) this.provider = null setTimeout(_ => { this.blocked = false }, 1000) // we wait 1 second for letting remix to switch to vm return reject(error) diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index 69b7a1cc2c..2623ab0dcf 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -23,7 +23,7 @@ export class ExecutionContext { this.lastBlock = null this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.currentFork = 'berlin' + this.currentFork = 'london' this.mainNetGenesisHash = '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' this.customNetWorks = {} this.blocks = {} @@ -181,7 +181,7 @@ export class ExecutionContext { try { this.currentFork = execution.forkAt(await web3.eth.net.getId(), block.number) } catch (e) { - this.currentFork = 'berlin' + this.currentFork = 'london' console.log(`unable to detect fork, defaulting to ${this.currentFork}..`) console.error(e) } diff --git a/libs/remix-debug/src/code/codeUtils.ts b/libs/remix-debug/src/code/codeUtils.ts index b44dd2be61..da777d4b71 100644 --- a/libs/remix-debug/src/code/codeUtils.ts +++ b/libs/remix-debug/src/code/codeUtils.ts @@ -46,7 +46,7 @@ type Opcode = { * information about the opcode. */ export function parseCode (raw) { - const common = new Common({ chain: 'mainnet', hardfork: 'berlin' }) + const common = new Common({ chain: 'mainnet', hardfork: 'london' }) const opcodes = getOpcodesForHF(common) const code = [] diff --git a/libs/remix-debug/src/trace/traceManager.ts b/libs/remix-debug/src/trace/traceManager.ts index f4bf488392..49ba500889 100644 --- a/libs/remix-debug/src/trace/traceManager.ts +++ b/libs/remix-debug/src/trace/traceManager.ts @@ -40,7 +40,7 @@ export class TraceManager { const networkId = await this.web3.eth.net.getId() this.fork = execution.forkAt(networkId, tx.blockNumber) } catch (e) { - this.fork = 'berlin' + this.fork = 'london' console.log(`unable to detect fork, defaulting to ${this.fork}..`) console.error(e) } diff --git a/libs/remix-debug/test/decoder/vmCall.ts b/libs/remix-debug/test/decoder/vmCall.ts index 89417ac698..ef6665ca12 100644 --- a/libs/remix-debug/test/decoder/vmCall.ts +++ b/libs/remix-debug/test/decoder/vmCall.ts @@ -55,7 +55,7 @@ async function createVm (hardfork) { Init VM / Send Transaction */ export async function initVM (st, privateKey) { - var VM = await createVm('berlin') + var VM = await createVm('london') const vm = VM.vm var address = Address.fromPrivateKey(privateKey) diff --git a/libs/remix-lib/src/execution/forkAt.ts b/libs/remix-lib/src/execution/forkAt.ts index 2a8120dc18..c5f1a1e981 100644 --- a/libs/remix-lib/src/execution/forkAt.ts +++ b/libs/remix-lib/src/execution/forkAt.ts @@ -17,7 +17,7 @@ export function forkAt (networkId, blockNumber) { } return currentForkName } - return 'berlin' + return 'london' } // see https://github.com/ethereum/go-ethereum/blob/master/params/config.go diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index ce079856fc..ac6e629b89 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -72,7 +72,7 @@ export class TxRunnerVM { } } - const EIP1559 = this.commonContext.hardfork() !== 'berlin' + const EIP1559 = this.commonContext.hardfork() !== 'berlin' // berlin is the only pre eip1559 fork that we handle. let tx if (!EIP1559) { tx = Transaction.fromTxData({ diff --git a/libs/remix-simulator/src/vm-context.ts b/libs/remix-simulator/src/vm-context.ts index 363e9ab50e..b9cb6a4151 100644 --- a/libs/remix-simulator/src/vm-context.ts +++ b/libs/remix-simulator/src/vm-context.ts @@ -99,7 +99,7 @@ export class VMContext { constructor (fork?) { this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.currentFork = fork || 'berlin' + this.currentFork = fork || 'london' this.currentVm = this.createVm(this.currentFork) this.blocks = {} this.latestBlockNumber = 0