+ // Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see
Geth Docs on rpc server)
+ //
geth --http --http.corsdomain https://remix.ethereum.org
+ //
+ // To run Remix & a local Geth test node, use this command: (see
Geth Docs on Dev mode)
+ //
geth --http --http.corsdomain="${window.origin}" --http.api web3,eth,debug,personal,net --vmdebug --datadir ${thePath} --dev console
+ //
+ //
+ //
WARNING: It is not safe to use the --http.corsdomain flag with a wildcard:
--http.corsdomain *
+ //
+ //
For more info:
Remix Docs on Web3 Provider
+ //
+ //
+ // Web3 Provider Endpoint
+ //
+ // `
+ // }
+
+ // /**
+ // * generate a value used by the env dropdown list.
+ // * @return {String} - can return 'vm-berlin, 'vm-london', 'injected' or 'web3'
+ // */
+ // _getProviderDropdownValue () {
+ // const provider = this.blockchain.getProvider()
+ // const fork = this.blockchain.getCurrentFork()
+ // return provider === 'vm' ? provider + '-' + fork : provider
+ // }
+
+ // setFinalContext () {
+ // // set the final context. Cause it is possible that this is not the one we've originaly selected
+ // this.selectExEnv.value = this._getProviderDropdownValue()
+ // this.event.trigger('clearInstance', [])
+ // this.updatePlusButton()
+ // }
+
+ // onPersonalChange () {
+ // const plusBtn = document.getElementById('remixRunPlus')
+ // const plusTitle = document.getElementById('remixRunPlusWraper')
+ // if (!this._deps.config.get('settings/personal-mode')) {
+ // plusBtn.classList.add(css.disableMouseEvents)
+ // plusTitle.title = 'Creating an account is possible only in Personal mode. Please go to Settings to enable it.'
+ // } else {
+ // plusBtn.classList.remove(css.disableMouseEvents)
+ // plusTitle.title = 'Create a new account'
+ // }
+ // }
+
+ // getSelectedAccount () {
+ // return this.el.querySelector('#txorigin').selectedOptions[0].value
+ // }
+
+ // getEnvironment () {
+ // return this.blockchain.getProvider()
+ // }
+
+ return (
+ // this.blockchain.event.register('contextChanged', (context, silent) => {
+ // this.setFinalContext()
+ // })
+
+ // this.blockchain.event.register('networkStatus', ({ error, network }) => {
+ // if (error) {
+ // this.netUI.innerHTML = 'can\'t detect network '
+ // return
+ // }
+ // const networkProvider = this._components.networkModule.getNetworkProvider.bind(this._components.networkModule)
+ // this.netUI.innerHTML = (networkProvider() !== 'vm') ? `${network.name} (${network.id || '-'}) network` : ''
+ // })
+
+ // setInterval(() => {
+ // this.fillAccountsList()
+ // }, 1000)
+
+ // this.el = el
+
+ // this.fillAccountsList()
+ // return el
+