only keep the "merge" provider

pull/3378/head
yann300 2 years ago
parent 44f6948a57
commit 913e84883e
  1. 2
      apps/remix-ide-e2e/src/tests/plugin_api.ts
  2. 2
      apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts
  3. 2
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  4. 2
      apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
  5. 8
      apps/remix-ide/src/app.js
  6. 2
      apps/remix-ide/src/app/providers/abstract-provider.tsx
  7. 25
      apps/remix-ide/src/app/providers/vm-provider.tsx
  8. 9
      apps/remix-ide/src/app/udapp/run-tab.js
  9. 6
      apps/remix-ide/src/blockchain/execution-context.js
  10. 11
      libs/remix-ui/run-tab/src/lib/components/account.tsx
  11. 4
      libs/remix-ui/run-tab/src/lib/reducers/runTab.ts

@ -183,7 +183,7 @@ module.exports = {
},
'Should select another provider #group1': async function (browser: NightwatchBrowser) {
await clickAndCheckLog(browser, 'udapp:setEnvironmentMode', null, null, { context: 'vm-berlin' })
await clickAndCheckLog(browser, 'udapp:setEnvironmentMode', null, null, { context: 'vm-merge' })
await browser
.frameParent()
.useCss()

@ -32,7 +32,7 @@ module.exports = {
'Should sign message using account key #group2': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="settingsRemixRunSignMsg"]')
.switchEnvironment('vm-berlin')
.switchEnvironment('vm-merge')
.pause(2000)
.click('*[data-id="settingsRemixRunSignMsg"]')
.pause(2000)

@ -94,7 +94,7 @@ module.exports = {
browser
.clickLaunchIcon('settings')
.clickLaunchIcon('udapp')
.switchEnvironment('vm-london')
.switchEnvironment('vm-merge')
.click('*[data-id="terminalClearConsole"]') // clear the terminal
.clickLaunchIcon('filePanel')
.click('*[data-id="treeViewDivtreeViewItem"]') // make sure we create the file at the root folder

@ -159,7 +159,7 @@ module.exports = {
browser
.clickLaunchIcon('udapp')
.clearTransactions()
.switchEnvironment('vm-london') // switch to London fork
.switchEnvironment('vm-merge') // switch to London fork
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite
.click('.udapp_contractActionsContainerSingle > button')
.clickInstance(0)

@ -27,7 +27,7 @@ import { StoragePlugin } from './app/plugins/storage'
import { Layout } from './app/panels/layout'
import { NotificationPlugin } from './app/plugins/notification'
import { Blockchain } from './blockchain/blockchain.js'
import { BerlinVMProvider, LondonVMProvider } from './app/providers/vm-provider'
import { MergeVMProvider } from './app/providers/vm-provider'
import { MainnetForkVMProvider } from './app/providers/mainnet-vm-fork-provider'
import { SepoliaForkVMProvider } from './app/providers/sepolia-vm-fork-provider'
import { GoerliForkVMProvider } from './app/providers/goerli-vm-fork-provider'
@ -211,8 +211,7 @@ class AppComponent {
const vmProviderMainnetFork = new MainnetForkVMProvider(blockchain)
const vmProviderSepoliaFork = new SepoliaForkVMProvider(blockchain)
const vmProviderGoerliFork = new GoerliForkVMProvider(blockchain)
const vmProviderBerlin = new BerlinVMProvider(blockchain)
const vmProviderLondon = new LondonVMProvider(blockchain)
const vmProviderMerge = new MergeVMProvider(blockchain)
const hardhatProvider = new HardhatProvider(blockchain)
const ganacheProvider = new GanacheProvider(blockchain)
const foundryProvider = new FoundryProvider(blockchain)
@ -279,8 +278,7 @@ class AppComponent {
fetchAndCompile,
dGitProvider,
storagePlugin,
vmProviderBerlin,
vmProviderLondon,
vmProviderMerge,
vmProviderSepoliaFork,
vmProviderGoerliFork,
vmProviderMainnetFork,

@ -113,7 +113,7 @@ export abstract class AbstractProvider extends Plugin implements IProvider {
}
this.call('notification', 'alert', modalContent)
}
await this.call('udapp', 'setEnvironmentMode', { context: 'vm-london'})
await this.call('udapp', 'setEnvironmentMode', { context: 'vm-merge'})
return
}

@ -42,32 +42,17 @@ export class BasicVMProvider extends Plugin implements IProvider {
}
}
export class BerlinVMProvider extends BasicVMProvider {
export class MergeVMProvider extends BasicVMProvider {
constructor (blockchain) {
super({
name: 'vm-berlin',
displayName: 'Remix VM (Berlin)',
name: 'vm-merge',
displayName: 'Remix VM (Merge)',
kind: 'provider',
description: 'Remix VM (Berlin)',
description: 'Remix VM (Merge)',
methods: ['sendAsync', 'init'],
version: packageJson.version
}, blockchain)
this.blockchain = blockchain
this.fork = 'berlin'
}
}
export class LondonVMProvider extends BasicVMProvider {
constructor (blockchain) {
super({
name: 'vm-london',
displayName: 'Remix VM (London)',
kind: 'provider',
description: 'Remix VM (London)',
methods: ['sendAsync', 'init'],
version: packageJson.version
}, blockchain)
this.blockchain = blockchain
this.fork = 'london'
this.fork = 'merge'
}
}

@ -133,11 +133,10 @@ export class RunTab extends ViewPlugin {
// VM
const titleVM = 'Execution environment is local to Remix. Data is only saved to browser memory and will vanish upon reload.'
await addProvider('vm-london', 'Remix VM (London)', false, true, 'london', 'settingsVMLondonMode', titleVM)
await addProvider('vm-berlin', 'Remix VM (Berlin)', false, true, 'berlin', 'settingsVMBerlinMode', titleVM)
await addProvider('vm-mainnet-fork', 'Remix VM - Mainnet fork', false, true, 'london', 'settingsVMMainnetMode', titleVM)
await addProvider('vm-sepolia-fork', 'Remix VM - Sepolia fork', false, true, '', 'settingsVMSepoliaMode', titleVM)
await addProvider('vm-goerli-fork', 'Remix VM - Goerli fork', false, true, '', 'settingsVMGoerliMode', titleVM)
await addProvider('vm-merge', 'Remix VM (Merge)', false, true, 'merge', 'settingsVMMergeMode', titleVM)
await addProvider('vm-mainnet-fork', 'Remix VM - Mainnet fork', false, true, 'merge', 'settingsVMMainnetMode', titleVM)
await addProvider('vm-sepolia-fork', 'Remix VM - Sepolia fork', false, true, 'merge', 'settingsVMSepoliaMode', titleVM)
await addProvider('vm-goerli-fork', 'Remix VM - Goerli fork', false, true, 'merge', 'settingsVMGoerliMode', titleVM)
await addProvider('vm-custom-fork', 'Remix VM - Custom fork', false, true, '', 'settingsVMCustomMode', titleVM)
// external provider

@ -20,7 +20,7 @@ if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') {
export class ExecutionContext {
constructor () {
this.event = new EventManager()
this.executionContext = 'vm-london'
this.executionContext = 'vm-merge'
this.lastBlock = null
this.blockGasLimitDefault = 4300000
this.blockGasLimit = this.blockGasLimitDefault
@ -35,7 +35,7 @@ export class ExecutionContext {
init (config) {
if (config.get('settings/always-use-vm')) {
this.executionContext = 'vm-london'
this.executionContext = 'vm-merge'
}
}
@ -102,7 +102,7 @@ export class ExecutionContext {
removeProvider (name) {
if (name && this.customNetWorks[name]) {
if (this.executionContext === name) this.setContext('vm-london', null, null, null)
if (this.executionContext === name) this.setContext('vm-merge', null, null, null)
delete this.customNetWorks[name]
this.event.trigger('removeProvider', [name])
}

@ -30,14 +30,7 @@ export function AccountUI (props: AccountProps) {
})
break
case 'vm-london':
setPlusOpt({
classList: '',
title: 'Create a new account'
})
break
case 'vm-berlin':
case 'vm-merge':
setPlusOpt({
classList: '',
title: 'Create a new account'
@ -76,7 +69,7 @@ export function AccountUI (props: AccountProps) {
return props.tooltip('Account list is empty, please make sure the current provider is properly connected to remix')
}
if (props.selectExEnv !== 'vm-london' && props.selectExEnv !== 'vm-berlin' && props.selectExEnv !== 'injected') {
if (props.selectExEnv !== 'vm-merge' && props.selectExEnv !== 'injected') {
return props.modal('Passphrase to sign a message',
<PassphrasePrompt
message='Enter your passphrase for this account to sign the message'

@ -115,7 +115,7 @@ export const runTabInitialState: RunTabState = {
sendValue: '0',
sendUnit: 'wei',
gasLimit: 3000000,
selectExEnv: 'vm-london',
selectExEnv: 'vm-merge',
personalMode: false,
networkName: 'VM',
providers: {
@ -263,7 +263,7 @@ export const runTabReducer = (state: RunTabState = runTabInitialState, action: A
return {
...state,
selectExEnv: payload,
networkName: state.selectExEnv === 'vm-london' || state.selectExEnv === 'vm-berlin' ? 'VM' : state.networkName,
networkName: state.selectExEnv === 'vm-merge' ? 'VM' : state.networkName,
accounts: {
...state.accounts,
selectedAccount: '',

Loading…
Cancel
Save