|
|
@ -1,19 +1,16 @@ |
|
|
|
'use strict' |
|
|
|
'use strict' |
|
|
|
|
|
|
|
|
|
|
|
var vmCall = require('../vmCall') |
|
|
|
import { sendTx } from '../vmCall' |
|
|
|
var remixLib = require('@remix-project/remix-lib') |
|
|
|
import { TraceManager } from '../../../src/trace/traceManager' |
|
|
|
|
|
|
|
import { CodeManager } from '../../../src/code/codeManager' |
|
|
|
var TraceManager = require('../../../src/trace/traceManager') |
|
|
|
import { contractCreationToken } from '../../../src/trace/traceHelper' |
|
|
|
var CodeManager = require('../../../src/code/codeManager') |
|
|
|
import { SolidityProxy } from '../../../src/solidity-decoder/solidityProxy' |
|
|
|
|
|
|
|
import { InternalCallTree } from '../../../src/solidity-decoder/internalCallTree' |
|
|
|
var traceHelper = require('../../../src/trace/traceHelper') |
|
|
|
import { EventManager } from '../../../src/eventManager' |
|
|
|
var SolidityProxy = require('../../../src/solidity-decoder/solidityProxy') |
|
|
|
import * as helper from './helper' |
|
|
|
var InternalCallTree = require('../../../src/solidity-decoder/internalCallTree') |
|
|
|
|
|
|
|
var EventManager = require('../../../src/eventManager') |
|
|
|
|
|
|
|
var helper = require('./helper') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { |
|
|
|
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { |
|
|
|
vmCall.sendTx(vm, { nonce: 0, privateKey: privateKey }, null, 0, contractBytecode, function (error, txHash) { |
|
|
|
sendTx(vm, { nonce: 0, privateKey: privateKey }, null, 0, contractBytecode, function (error, txHash) { |
|
|
|
if (error) { |
|
|
|
if (error) { |
|
|
|
return st.fail(error) |
|
|
|
return st.fail(error) |
|
|
|
} |
|
|
|
} |
|
|
@ -21,7 +18,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu |
|
|
|
if (error) { |
|
|
|
if (error) { |
|
|
|
return st.fail(error) |
|
|
|
return st.fail(error) |
|
|
|
} |
|
|
|
} |
|
|
|
tx.to = traceHelper.contractCreationToken('0') |
|
|
|
tx.to = contractCreationToken('0') |
|
|
|
var traceManager = new TraceManager({ web3: vm.web3 }) |
|
|
|
var traceManager = new TraceManager({ web3: vm.web3 }) |
|
|
|
var codeManager = new CodeManager(traceManager) |
|
|
|
var codeManager = new CodeManager(traceManager) |
|
|
|
codeManager.clear() |
|
|
|
codeManager.clear() |
|
|
|