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
.openFile('Untitled.sol')
.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"]')
.execute(function () {
const modal = document.querySelector('[data-id="basic-http-provider-modal-footer-ok-react"]') as any
@ -96,7 +96,7 @@ module.exports = {
return env.value
}, [], 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('udapp')

@ -78,7 +78,7 @@ module.exports = {
browser
.openFile('Untitled.sol')
.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"]')
.execute(function () {
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')
.addFile('useDebugNodes.sol', sources[5]['useDebugNodes.sol']) // compile contract
.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"]')
.setValue('*[data-id="modalDialogCustomPromp"]', 'https://remix-rinkeby.ethdevops.io')
.modalFooterOKClick('basic-http-provider')

@ -50,7 +50,7 @@ module.exports = {
browser
.click('*[data-id="terminalClearConsole"]') // clear the terminal
.clickLaunchIcon('udapp')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="Basic Http Provider"]')
.click('*[data-id="settingsSelectEnvOptions"] *[data-id="External Http Provider"]')
.modalFooterOKClick('basic-http-provider')
.executeScript('web3.eth.getAccounts()')
.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 { GanacheProvider } from './app/tabs/ganache-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')
@ -180,7 +180,7 @@ class AppComponent {
const hardhatProvider = new HardhatProvider(blockchain)
const ganacheProvider = new GanacheProvider(blockchain)
const foundryProvider = new FoundryProvider(blockchain)
const basicHttpProvider = new BasicHttpProvider(blockchain)
const externalHttpProvider = new ExternalHttpProvider(blockchain)
// ----------------- convert offset to line/column service -----------
const offsetToLineColumnConverter = new OffsetToLineColumnConverter()
Registry.getInstance().put({
@ -238,7 +238,7 @@ class AppComponent {
hardhatProvider,
ganacheProvider,
foundryProvider,
basicHttpProvider,
externalHttpProvider,
this.walkthroughService,
search
])

@ -1,21 +1,17 @@
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 { Blockchain } from '../../blockchain/blockchain'
import { ethers } from 'ethers'
import { AbstractProvider } from './abstract-provider'
const profile = {
name: 'basic-http-provider',
displayName: 'Basic Http Provider',
displayName: 'External Http Provider',
kind: 'provider',
description: '',
methods: ['sendAsync'],
version: packageJson.version
}
export class BasicHttpProvider extends AbstractProvider {
export class ExternalHttpProvider extends AbstractProvider {
constructor (blockchain) {
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 />
<br />
Web3 Provider Endpoint
External HTTP Provider Endpoint
</div>
</>
)

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

Loading…
Cancel
Save