rename basic provider to external provider

pull/2547/head
yann300 2 years ago
parent d157b91424
commit ab2e4cff10
  1. 4
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  2. 2
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts
  3. 2
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  4. 2
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  5. 6
      apps/remix-ide/src/app.js
  6. 10
      apps/remix-ide/src/app/tabs/external-http-provider.tsx
  7. 2
      apps/remix-ide/src/app/udapp/run-tab.js

@ -83,7 +83,7 @@ module.exports = {
browser browser
.openFile('Untitled.sol') .openFile('Untitled.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="Basic Http Provider"]') .click('*[data-id="settingsSelectEnvOptions"] *[data-id="External Http Provider"]')
.waitForElementPresent('[data-id="basic-http-provider-modal-footer-ok-react"]') .waitForElementPresent('[data-id="basic-http-provider-modal-footer-ok-react"]')
.execute(function () { .execute(function () {
const modal = document.querySelector('[data-id="basic-http-provider-modal-footer-ok-react"]') as any const modal = document.querySelector('[data-id="basic-http-provider-modal-footer-ok-react"]') as any
@ -96,7 +96,7 @@ module.exports = {
return env.value return env.value
}, [], function (result) { }, [], function (result) {
browser.assert.ok(result.value === 'Basic Http Provider', 'Web3 Provider not selected') browser.assert.ok(result.value === 'External Http Provider', 'Web3 Provider not selected')
}) })
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')

@ -78,7 +78,7 @@ module.exports = {
browser browser
.openFile('Untitled.sol') .openFile('Untitled.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="Basic Http Provider"]') .click('*[data-id="settingsSelectEnvOptions"] *[data-id="External Http Provider"]')
.waitForElementPresent('[data-id="basic-http-provider-modal-footer-ok-react"]') .waitForElementPresent('[data-id="basic-http-provider-modal-footer-ok-react"]')
.execute(function () { .execute(function () {
const modal = document.querySelector('[data-id="basic-http-provider-modal-footer-ok-react"]') as any const modal = document.querySelector('[data-id="basic-http-provider-modal-footer-ok-react"]') as any

@ -214,7 +214,7 @@ module.exports = {
.setSolidityCompilerVersion('soljson-v0.8.7+commit.e28d00a7.js') .setSolidityCompilerVersion('soljson-v0.8.7+commit.e28d00a7.js')
.addFile('useDebugNodes.sol', sources[5]['useDebugNodes.sol']) // compile contract .addFile('useDebugNodes.sol', sources[5]['useDebugNodes.sol']) // compile contract
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="Basic Http Provider"]') // select web3 provider with debug nodes URL .click('*[data-id="settingsSelectEnvOptions"] *[data-id="External Http Provider"]') // select web3 provider with debug nodes URL
.clearValue('*[data-id="modalDialogCustomPromp"]') .clearValue('*[data-id="modalDialogCustomPromp"]')
.setValue('*[data-id="modalDialogCustomPromp"]', 'https://remix-rinkeby.ethdevops.io') .setValue('*[data-id="modalDialogCustomPromp"]', 'https://remix-rinkeby.ethdevops.io')
.modalFooterOKClick('basic-http-provider') .modalFooterOKClick('basic-http-provider')

@ -50,7 +50,7 @@ module.exports = {
browser browser
.click('*[data-id="terminalClearConsole"]') // clear the terminal .click('*[data-id="terminalClearConsole"]') // clear the terminal
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="Basic Http Provider"]') .click('*[data-id="settingsSelectEnvOptions"] *[data-id="External Http Provider"]')
.modalFooterOKClick('basic-http-provider') .modalFooterOKClick('basic-http-provider')
.executeScript('web3.eth.getAccounts()') .executeScript('web3.eth.getAccounts()')
.waitForElementContainsText('*[data-id="terminalJournal"]', '["', 60000) // we check if an array is present, don't need to check for the content .waitForElementContainsText('*[data-id="terminalJournal"]', '["', 60000) // we check if an array is present, don't need to check for the content

@ -28,7 +28,7 @@ import { Blockchain } from './blockchain/blockchain.js'
import { HardhatProvider } from './app/tabs/hardhat-provider' import { HardhatProvider } from './app/tabs/hardhat-provider'
import { GanacheProvider } from './app/tabs/ganache-provider' import { GanacheProvider } from './app/tabs/ganache-provider'
import { FoundryProvider } from './app/tabs/foundry-provider' import { FoundryProvider } from './app/tabs/foundry-provider'
import { BasicHttpProvider } from './app/tabs/basic-http-provider' import { ExternalHttpProvider } from './app/tabs/external-http-provider'
const isElectron = require('is-electron') const isElectron = require('is-electron')
@ -180,7 +180,7 @@ class AppComponent {
const hardhatProvider = new HardhatProvider(blockchain) const hardhatProvider = new HardhatProvider(blockchain)
const ganacheProvider = new GanacheProvider(blockchain) const ganacheProvider = new GanacheProvider(blockchain)
const foundryProvider = new FoundryProvider(blockchain) const foundryProvider = new FoundryProvider(blockchain)
const basicHttpProvider = new BasicHttpProvider(blockchain) const externalHttpProvider = new ExternalHttpProvider(blockchain)
// ----------------- convert offset to line/column service ----------- // ----------------- convert offset to line/column service -----------
const offsetToLineColumnConverter = new OffsetToLineColumnConverter() const offsetToLineColumnConverter = new OffsetToLineColumnConverter()
Registry.getInstance().put({ Registry.getInstance().put({
@ -238,7 +238,7 @@ class AppComponent {
hardhatProvider, hardhatProvider,
ganacheProvider, ganacheProvider,
foundryProvider, foundryProvider,
basicHttpProvider, externalHttpProvider,
this.walkthroughService, this.walkthroughService,
search search
]) ])

@ -1,21 +1,17 @@
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import { Plugin } from '@remixproject/engine'
import { AppModal, AlertModal, ModalTypes } from '@remix-ui/app'
import React from 'react' // eslint-disable-line import React from 'react' // eslint-disable-line
import { Blockchain } from '../../blockchain/blockchain'
import { ethers } from 'ethers'
import { AbstractProvider } from './abstract-provider' import { AbstractProvider } from './abstract-provider'
const profile = { const profile = {
name: 'basic-http-provider', name: 'basic-http-provider',
displayName: 'Basic Http Provider', displayName: 'External Http Provider',
kind: 'provider', kind: 'provider',
description: '', description: '',
methods: ['sendAsync'], methods: ['sendAsync'],
version: packageJson.version version: packageJson.version
} }
export class BasicHttpProvider extends AbstractProvider { export class ExternalHttpProvider extends AbstractProvider {
constructor (blockchain) { constructor (blockchain) {
super(profile, blockchain, 'http://127.0.0.1:8545') super(profile, blockchain, 'http://127.0.0.1:8545')
} }
@ -37,7 +33,7 @@ export class BasicHttpProvider extends AbstractProvider {
<br />For more info: <a href="https://remix-ide.readthedocs.io/en/latest/run.html#more-about-web3-provider" target="_blank" rel="noreferrer">Remix Docs on Web3 Provider</a> <br />For more info: <a href="https://remix-ide.readthedocs.io/en/latest/run.html#more-about-web3-provider" target="_blank" rel="noreferrer">Remix Docs on Web3 Provider</a>
<br /> <br />
<br /> <br />
Web3 Provider Endpoint External HTTP Provider Endpoint
</div> </div>
</> </>
) )

@ -157,7 +157,7 @@ export class RunTab extends ViewPlugin {
}) })
await this.call('blockchain', 'addProvider', { await this.call('blockchain', 'addProvider', {
name: 'Basic Http Provider', name: 'External Http Provider',
provider: { provider: {
async sendAsync (payload, callback) { async sendAsync (payload, callback) {
try { try {

Loading…
Cancel
Save