src imports updated

pull/697/head
aniket-engg 4 years ago committed by Aniket
parent 1b2ce7bbc2
commit a9e1b5b6ac
  1. 24
      libs/remix-debug/src/Ethdebugger.ts
  2. 25
      libs/remix-debug/src/index.ts
  3. 4
      libs/remix-debug/src/init.ts

@ -1,14 +1,12 @@
'use strict'
const StorageViewer = require('./storage/storageViewer')
const StorageResolver = require('./storage/storageResolver')
const TraceManager = require('./trace/traceManager')
const CodeManager = require('./code/codeManager')
const traceHelper = require('./trace/traceHelper')
const EventManager = require('./eventManager')
const {SolidityProxy, stateDecoder, localDecoder, InternalCallTree} = require('./solidity-decoder')
import { StorageViewer } from './storage/storageViewer'
import { StorageResolver } from './storage/storageResolver'
import { TraceManager } from './trace/traceManager'
import { CodeManager } from './code/codeManager'
import { contractCreationToken } from './trace/traceHelper'
import { EventManager } from './eventManager'
import { SolidityProxy, stateDecoder, localDecoder, InternalCallTree } from './solidity-decoder'
/**
* Ethdebugger is a wrapper around a few classes that helps debugging a transaction
@ -109,9 +107,9 @@ export class Ethdebugger {
const address = this.traceManager.getCurrentCalledAddressAt(step)
try {
const storageViewer = new StorageViewer({ stepIndex: step, tx: this.tx, address: address }, this.storageResolver, this.traceManager)
const locals = await localDecoder.solidityLocals(step, this.callTree, stack, memory, storageViewer, sourceLocation)
if (locals.error) {
return callback(locals.error)
const locals = await localDecoder.solidityLocals(step, this.callTree, stack, memory, storageViewer, sourceLocation, null)
if (locals['error']) {
return callback(locals['error'])
}
return callback(null, locals)
} catch (e) {
@ -157,7 +155,7 @@ export class Ethdebugger {
if (this.traceManager.isLoading) {
return
}
tx.to = tx.to || traceHelper.contractCreationToken('0')
tx.to = tx.to || contractCreationToken('0')
this.tx = tx
this.traceManager.resolveTrace(tx).then(async (result) => {

@ -1,19 +1,14 @@
'use strict'
const init = require('./src/init')
const EthDebugger = require('./src/Ethdebugger')
const TransactionDebugger = require('./src/debugger/debugger')
const CmdLine = require('./src/cmdline')
const StorageViewer = require('./src/storage/storageViewer')
const StorageResolver = require('./src/storage/storageResolver')
const SolidityDecoder = require('./src/solidity-decoder')
const BreakpointManager = require('./src/code/breakpointManager')
const SourceMappingDecoder = require('./src/source/sourceMappingDecoder')
const traceHelper = require('./src/trace/traceHelper')
import init from './init'
import { Ethdebugger as EthDebugger } from './Ethdebugger'
import { Debugger as TransactionDebugger } from './debugger/debugger'
import { CmdLine } from './cmdline'
import { StorageViewer } from './storage/storageViewer'
import { StorageResolver } from './storage/storageResolver'
import * as SolidityDecoder from './solidity-decoder'
import { BreakpointManager } from './code/breakpointManager'
import * as SourceMappingDecoder from './source/sourceMappingDecoder'
import * as traceHelper from './trace/traceHelper'
/*
Use of breakPointManager :

@ -1,11 +1,11 @@
'use strict'
const Web3 = require('web3')
import Web3 from 'web3'
export = {
loadWeb3: function (url) {
if (!url) url = 'http://localhost:8545'
const web3 = new Web3()
web3.setProvider(new web3.providers.HttpProvider(url))
web3.setProvider(new Web3.providers.HttpProvider(url))
this.extend(web3)
return web3
},

Loading…
Cancel
Save