remove global web3 references from remix-solidity tests

pull/3094/head
Iuri Matias 7 years ago
parent 1072cf0196
commit 7c9cd9bdaf
  1. 3
      remix-solidity/test/decoder/localsTests/int.js
  2. 3
      remix-solidity/test/decoder/localsTests/misc.js
  3. 3
      remix-solidity/test/decoder/localsTests/misc2.js
  4. 3
      remix-solidity/test/decoder/localsTests/structArray.js
  5. 4
      remix-solidity/test/decoder/stateTests/mapping.js
  6. 2
      remix-solidity/test/decoder/vmCall.js

@ -6,7 +6,6 @@ var vmCall = require('../vmCall')
var remixLib = require('remix-lib')
var traceHelper = remixLib.helpers.trace
var global = remixLib.global
var SolidityProxy = require('../../../src/decoder/solidityProxy')
var InternalCallTree = require('../../../src/decoder/internalCallTree')
var EventManager = remixLib.EventManager
@ -17,7 +16,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
if (error) {
st.fail(error)
} else {
global.web3.getTransaction(txHash, function (error, tx) {
vm.web3.eth.getTransaction(txHash, function (error, tx) {
if (error) {
st.fail(error)
} else {

@ -5,7 +5,6 @@ var CodeManager = remixCore.code.CodeManager
var vmCall = require('../vmCall')
var remixLib = require('remix-lib')
var traceHelper = remixLib.helpers.trace
var global = remixLib.global
var SolidityProxy = require('../../../src/decoder/solidityProxy')
var InternalCallTree = require('../../../src/decoder/internalCallTree')
var EventManager = remixLib.EventManager
@ -16,7 +15,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
if (error) {
st.fail(error)
} else {
global.web3.getTransaction(txHash, function (error, tx) {
vm.web3.eth.getTransaction(txHash, function (error, tx) {
if (error) {
st.fail(error)
} else {

@ -5,7 +5,6 @@ var CodeManager = remixCore.code.CodeManager
var vmCall = require('../vmCall')
var remixLib = require('remix-lib')
var traceHelper = remixLib.helpers.trace
var global = remixLib.global
var SolidityProxy = require('../../../src/decoder/solidityProxy')
var InternalCallTree = require('../../../src/decoder/internalCallTree')
var EventManager = remixLib.EventManager
@ -16,7 +15,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
if (error) {
st.fail(error)
} else {
global.web3.getTransaction(txHash, function (error, tx) {
vm.web3.eth.getTransaction(txHash, function (error, tx) {
if (error) {
st.fail(error)
} else {

@ -5,7 +5,6 @@ var CodeManager = remixCore.code.CodeManager
var vmCall = require('../vmCall')
var remixLib = require('remix-lib')
var traceHelper = remixLib.helpers.trace
var global = remixLib.global
var SolidityProxy = require('../../../src/decoder/solidityProxy')
var InternalCallTree = require('../../../src/decoder/internalCallTree')
var EventManager = remixLib.EventManager
@ -16,7 +15,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
if (error) {
st.fail(error)
} else {
global.web3.getTransaction(txHash, function (error, tx) {
vm.web3.eth.getTransaction(txHash, function (error, tx) {
if (error) {
st.fail(error)
} else {

@ -15,7 +15,7 @@ module.exports = function testMappingStorage (st, cb) {
console.log(error)
st.end(error)
} else {
remixLib.global.web3.eth.getTransaction(txHash, (error, tx) => {
vm.web3.eth.getTransaction(txHash, (error, tx) => {
if (error) {
console.log(error)
st.end(error)
@ -35,7 +35,7 @@ function testMapping (st, vm, privateKey, contractAddress, output, cb) {
st.end(error)
} else {
console.log(txHash)
remixLib.global.web3.eth.getTransaction(txHash, (error, tx) => {
vm.web3.eth.getTransaction(txHash, (error, tx) => {
if (error) {
console.log(error)
st.end(error)

@ -51,8 +51,8 @@ function initVM (st, privateKey) {
console.log(mes)
st.fail(mes)
} else {
remixLib.global.web3 = obj
remixLib.global.web3Debug = obj
vm.web3 = obj
}
})
return vm

Loading…
Cancel
Save