trace import updated

pull/5370/head
aniket-engg 4 years ago committed by Aniket
parent daa84c6e69
commit c02554e98c
  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' 'use strict'
const traceHelper = require('./traceHelper') import * as traceHelper from './traceHelper'
export class TraceAnalyser { export class TraceAnalyser {

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

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

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

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

Loading…
Cancel
Save