move executionContext initialization to blockchain object

pull/5370/head
Iuri Matias 5 years ago
parent f8aa54ad3a
commit d6f2de6ca6
  1. 4
      src/app.js
  2. 3
      src/app/tabs/runTab/model/blockchain.js

@ -23,8 +23,6 @@ var toolTip = require('./app/ui/tooltip')
var CompilerMetadata = require('./app/files/compiler-metadata') var CompilerMetadata = require('./app/files/compiler-metadata')
var CompilerImport = require('./app/compiler/compiler-imports') var CompilerImport = require('./app/compiler/compiler-imports')
var executionContext = remixLib.execution.executionContext
const Blockchain = require('./app/tabs/runTab/model/blockchain.js') const Blockchain = require('./app/tabs/runTab/model/blockchain.js')
const PluginManagerComponent = require('./app/components/plugin-manager-component') const PluginManagerComponent = require('./app/components/plugin-manager-component')
@ -225,7 +223,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const fileManager = new FileManager(editor) const fileManager = new FileManager(editor)
registry.put({api: fileManager, name: 'filemanager'}) registry.put({api: fileManager, name: 'filemanager'})
const blockchain = new Blockchain(registry.get('config').api, executionContext) const blockchain = new Blockchain(registry.get('config').api)
// ----------------- compilation metadata generation servive ---------------------------- // ----------------- compilation metadata generation servive ----------------------------
const compilerMetadataGenerator = new CompilerMetadata(blockchain, fileManager, registry.get('config').api) const compilerMetadataGenerator = new CompilerMetadata(blockchain, fileManager, registry.get('config').api)

@ -4,6 +4,7 @@ const txExecution = remixLib.execution.txExecution
const typeConversion = remixLib.execution.typeConversion const typeConversion = remixLib.execution.typeConversion
const Txlistener = remixLib.execution.txListener const Txlistener = remixLib.execution.txListener
const EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
const executionContext = remixLib.execution.executionContext
const ethJSUtil = require('ethereumjs-util') const ethJSUtil = require('ethereumjs-util')
const Personal = require('web3-eth-personal') const Personal = require('web3-eth-personal')
const Web3 = require('web3') const Web3 = require('web3')
@ -13,7 +14,7 @@ import { UniversalDApp } from 'remix-lib'
class Blockchain { class Blockchain {
// NOTE: the config object will need to be refactored out in remix-lib // NOTE: the config object will need to be refactored out in remix-lib
constructor (config, executionContext) { constructor (config) {
this.event = new EventManager() this.event = new EventManager()
this.executionContext = executionContext this.executionContext = executionContext
this.udapp = new UniversalDApp(config, this.executionContext) this.udapp = new UniversalDApp(config, this.executionContext)

Loading…
Cancel
Save