trace import updated

pull/697/head
aniket-engg 4 years ago committed by Aniket
parent 5d81881456
commit 1b2ce7bbc2
  1. 2
      libs/remix-debug/src/trace/traceAnalyser.ts
  2. 6
      libs/remix-debug/src/trace/traceCache.ts
  3. 2
      libs/remix-debug/src/trace/traceHelper.ts
  4. 14
      libs/remix-debug/src/trace/traceManager.ts
  5. 9
      libs/remix-debug/src/trace/traceStepManager.ts

@ -1,5 +1,5 @@
'use strict'
const traceHelper = require('./traceHelper')
import * as traceHelper from './traceHelper'
export class TraceAnalyser {

@ -1,6 +1,6 @@
'use strict'
const remixLib = require('@remix-project/remix-lib')
const helper = remixLib.util
import { util } from '@remix-project/remix-lib'
const { sha3_256 } = util
export class TraceCache {
@ -105,7 +105,7 @@ export class TraceCache {
'address': address,
'key': key,
'value': value,
'hashedKey': helper.sha3_256(key)
'hashedKey': sha3_256(key)
}
this.storageChanges.push(index)
}

@ -1,6 +1,6 @@
'use strict'
import { helpers } from '@remix-project/remix-lib'
const ui = helpers.ui
const { ui } = helpers
// vmTraceIndex has to point to a CALL, CODECALL, ...
export function resolveCalledAddress (vmTraceIndex, trace) {

@ -1,11 +1,9 @@
'use strict'
const TraceAnalyser = require('./traceAnalyser')
const TraceCache = require('./traceCache')
const TraceStepManager = require('./traceStepManager')
const traceHelper = require('./traceHelper')
const remixLib = require('@remix-project/remix-lib')
const util = remixLib.util
import { TraceAnalyser } from './traceAnalyser'
import { TraceCache } from './traceCache'
import { TraceStepManager } from './traceStepManager'
import { isCreateInstruction } from './traceHelper'
import { util } from '@remix-project/remix-lib'
export class TraceManager {
@ -241,7 +239,7 @@ export class TraceManager {
}
isCreationStep (stepIndex) {
return traceHelper.isCreateInstruction(this.trace[stepIndex])
return isCreateInstruction(this.trace[stepIndex])
}
// step section

@ -1,8 +1,7 @@
'use strict'
const traceHelper = require('./traceHelper')
const remixLib = require('@remix-project/remix-lib')
const util = remixLib.util
import { isCallInstruction, isCallToPrecompiledContract, isReturnInstruction } from './traceHelper'
import { util } from '@remix-project/remix-lib'
export class TraceStepManager {
@ -14,12 +13,12 @@ export class TraceStepManager {
isCallInstruction (index) {
const state = this.traceAnalyser.trace[index]
return traceHelper.isCallInstruction(state) && !traceHelper.isCallToPrecompiledContract(index, this.traceAnalyser.trace)
return isCallInstruction(state) && !isCallToPrecompiledContract(index, this.traceAnalyser.trace)
}
isReturnInstruction (index) {
const state = this.traceAnalyser.trace[index]
return traceHelper.isReturnInstruction(state)
return isReturnInstruction(state)
}
findStepOverBack (currentStep) {

Loading…
Cancel
Save