|
|
@ -88,15 +88,17 @@ TraceManager.prototype.getAddresses = function () { |
|
|
|
return this.traceCache.addresses |
|
|
|
return this.traceCache.addresses |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TraceManager.prototype.getCallDataAt = function (stepIndex, callback) { |
|
|
|
TraceManager.prototype.getCallDataAt = function (stepIndex) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
this.checkRequestedStep(stepIndex) |
|
|
|
this.checkRequestedStep(stepIndex) |
|
|
|
} catch (check) { |
|
|
|
} catch (check) { |
|
|
|
return callback(check, null) |
|
|
|
throw new Error(check) |
|
|
|
} |
|
|
|
} |
|
|
|
const callDataChange = util.findLowerBoundValue(stepIndex, this.traceCache.callDataChanges) |
|
|
|
const callDataChange = util.findLowerBoundValue(stepIndex, this.traceCache.callDataChanges) |
|
|
|
if (callDataChange === null) return callback('no calldata found', null) |
|
|
|
if (callDataChange === null) { |
|
|
|
callback(null, [this.traceCache.callsData[callDataChange]]) |
|
|
|
throw new Error('no calldata found') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return [this.traceCache.callsData[callDataChange]] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TraceManager.prototype.buildCallPath = function (stepIndex, callback) { |
|
|
|
TraceManager.prototype.buildCallPath = function (stepIndex, callback) { |
|
|
|