diff --git a/remix-core/test/codeManager.js b/remix-core/test/codeManager.js index 9b15e46a09..a0709226de 100644 --- a/remix-core/test/codeManager.js +++ b/remix-core/test/codeManager.js @@ -19,7 +19,7 @@ tape('CodeManager', function (t) { t.fail(mes) } else { web3 = obj - var traceManager = new TraceManager() + var traceManager = new TraceManager({web3: web3}) codeManager = new CodeManager(traceManager) var contractCode = web3.eth.getCode('0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5') codeManager.codeResolver.cacheExecutingCode('0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', contractCode) // so a call to web3 is not necessary diff --git a/remix-core/test/traceManager.js b/remix-core/test/traceManager.js index c45ba3fd1d..053b07ea3c 100644 --- a/remix-core/test/traceManager.js +++ b/remix-core/test/traceManager.js @@ -3,9 +3,10 @@ var TraceManager = require('../src/trace/traceManager') var tape = require('tape') var remixLib = require('remix-lib') var Web3Providers = remixLib.vm.Web3Providers -var global = remixLib.global var web3Test = require('./resources/testWeb3') +let web3 = null + tape('TraceManager', function (t) { var traceManager @@ -18,16 +19,15 @@ tape('TraceManager', function (t) { console.log(mes) st.fail(mes) } else { - global.web3 = obj - global.web3Debug = obj - traceManager = new TraceManager() + web3 = obj + traceManager = new TraceManager({web3: web3}) st.end() } }) }) t.test('TraceManager.resolveTrace', function (st) { - var tx = global.web3.eth.getTransaction('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') + var tx = web3.eth.getTransaction('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') traceManager.resolveTrace(tx, function (error, result) { if (error) { st.fail(' - traceManager.resolveTrace - failed ' + result)