default to london

pull/1432/head
yann300 3 years ago committed by Aniket
parent f82e5d4b09
commit 455d0cf05d
  1. 2
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  2. 2
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts
  3. 2
      apps/remix-ide/src/app/tabs/hardhat-provider.js
  4. 4
      apps/remix-ide/src/blockchain/execution-context.js
  5. 2
      libs/remix-debug/src/code/codeUtils.ts
  6. 2
      libs/remix-debug/src/trace/traceManager.ts
  7. 2
      libs/remix-debug/test/decoder/vmCall.ts
  8. 2
      libs/remix-lib/src/execution/forkAt.ts
  9. 2
      libs/remix-lib/src/execution/txRunnerVM.ts
  10. 2
      libs/remix-simulator/src/vm-context.ts

@ -49,7 +49,7 @@ module.exports = {
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) {
browser.pause(500) browser.pause(500)
.click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') .debugTransaction(1)
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000) .pause(2000)

@ -45,7 +45,7 @@ module.exports = {
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) {
browser.pause(500) browser.pause(500)
.click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') .debugTransaction(1)
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')

@ -65,7 +65,7 @@ export default class HardhatProvider extends Plugin {
if (error) { if (error) {
this.blocked = true this.blocked = true
modalDialogCustom.alert('Hardhat Provider', `Error while connecting to the hardhat provider: ${error.message}`) 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 this.provider = null
setTimeout(_ => { this.blocked = false }, 1000) // we wait 1 second for letting remix to switch to vm setTimeout(_ => { this.blocked = false }, 1000) // we wait 1 second for letting remix to switch to vm
return reject(error) return reject(error)

@ -23,7 +23,7 @@ export class ExecutionContext {
this.lastBlock = null this.lastBlock = null
this.blockGasLimitDefault = 4300000 this.blockGasLimitDefault = 4300000
this.blockGasLimit = this.blockGasLimitDefault this.blockGasLimit = this.blockGasLimitDefault
this.currentFork = 'berlin' this.currentFork = 'london'
this.mainNetGenesisHash = '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' this.mainNetGenesisHash = '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3'
this.customNetWorks = {} this.customNetWorks = {}
this.blocks = {} this.blocks = {}
@ -181,7 +181,7 @@ export class ExecutionContext {
try { try {
this.currentFork = execution.forkAt(await web3.eth.net.getId(), block.number) this.currentFork = execution.forkAt(await web3.eth.net.getId(), block.number)
} catch (e) { } catch (e) {
this.currentFork = 'berlin' this.currentFork = 'london'
console.log(`unable to detect fork, defaulting to ${this.currentFork}..`) console.log(`unable to detect fork, defaulting to ${this.currentFork}..`)
console.error(e) console.error(e)
} }

@ -46,7 +46,7 @@ type Opcode = {
* information about the opcode. * information about the opcode.
*/ */
export function parseCode (raw) { 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 opcodes = getOpcodesForHF(common)
const code = [] const code = []

@ -40,7 +40,7 @@ export class TraceManager {
const networkId = await this.web3.eth.net.getId() const networkId = await this.web3.eth.net.getId()
this.fork = execution.forkAt(networkId, tx.blockNumber) this.fork = execution.forkAt(networkId, tx.blockNumber)
} catch (e) { } catch (e) {
this.fork = 'berlin' this.fork = 'london'
console.log(`unable to detect fork, defaulting to ${this.fork}..`) console.log(`unable to detect fork, defaulting to ${this.fork}..`)
console.error(e) console.error(e)
} }

@ -55,7 +55,7 @@ async function createVm (hardfork) {
Init VM / Send Transaction Init VM / Send Transaction
*/ */
export async function initVM (st, privateKey) { export async function initVM (st, privateKey) {
var VM = await createVm('berlin') var VM = await createVm('london')
const vm = VM.vm const vm = VM.vm
var address = Address.fromPrivateKey(privateKey) var address = Address.fromPrivateKey(privateKey)

@ -17,7 +17,7 @@ export function forkAt (networkId, blockNumber) {
} }
return currentForkName return currentForkName
} }
return 'berlin' return 'london'
} }
// see https://github.com/ethereum/go-ethereum/blob/master/params/config.go // see https://github.com/ethereum/go-ethereum/blob/master/params/config.go

@ -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 let tx
if (!EIP1559) { if (!EIP1559) {
tx = Transaction.fromTxData({ tx = Transaction.fromTxData({

@ -99,7 +99,7 @@ export class VMContext {
constructor (fork?) { constructor (fork?) {
this.blockGasLimitDefault = 4300000 this.blockGasLimitDefault = 4300000
this.blockGasLimit = this.blockGasLimitDefault this.blockGasLimit = this.blockGasLimitDefault
this.currentFork = fork || 'berlin' this.currentFork = fork || 'london'
this.currentVm = this.createVm(this.currentFork) this.currentVm = this.createVm(this.currentFork)
this.blocks = {} this.blocks = {}
this.latestBlockNumber = 0 this.latestBlockNumber = 0

Loading…
Cancel
Save