Commit 0821c23d authored by Iuri Matias's avatar Iuri Matias Committed by yann300

move udapp reference to blockchain class

parent 04801f56
...@@ -50,7 +50,6 @@ import { HiddenPanel } from './app/components/hidden-panel' ...@@ -50,7 +50,6 @@ import { HiddenPanel } from './app/components/hidden-panel'
import { VerticalIcons } from './app/components/vertical-icons' import { VerticalIcons } from './app/components/vertical-icons'
import { LandingPage } from './app/ui/landing-page/landing-page' import { LandingPage } from './app/ui/landing-page/landing-page'
import { MainPanel } from './app/components/main-panel' import { MainPanel } from './app/components/main-panel'
import { UniversalDApp } from 'remix-lib'
import migrateFileSystem from './migrateFileSystem' import migrateFileSystem from './migrateFileSystem'
...@@ -225,9 +224,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -225,9 +224,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'})
// ----------------- universal dapp: run transaction, listen on transactions, decode events const blockchain = new Blockchain(registry.get('config').api, executionContext)
const udapp = new UniversalDApp(registry.get('config').api, executionContext)
const blockchain = new Blockchain(executionContext, udapp)
// ----------------- 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)
......
...@@ -8,12 +8,15 @@ const ethJSUtil = require('ethereumjs-util') ...@@ -8,12 +8,15 @@ 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')
import { UniversalDApp } from 'remix-lib'
class Blockchain { class Blockchain {
constructor (executionContext, udapp) { // NOTE: the config object will need to be refactored out in remix-lib
constructor (config, executionContext) {
this.event = new EventManager() this.event = new EventManager()
this.executionContext = executionContext this.executionContext = executionContext
this.udapp = udapp this.udapp = new UniversalDApp(config, this.executionContext)
this.networkcallid = 0 this.networkcallid = 0
this.setupEvents() this.setupEvents()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment