Tutorial for JavaScript tracing
A simple filter
tracer = function (tx) {
return debug.traceTransaction(tx, {
tracer:
'{' +
'retVal: [],' +
'step: function(log,db) {this.retVal.push(log.getPC() + ":" + log.op.toString())},' +
'fault: function(log,db) {this.retVal.push("FAULT: " + JSON.stringify(log))},' +
'result: function(ctx,db) {return this.retVal}' +
'}'
}); // return debug.traceTransaction ...
}; // tracer = function ...loadScript('filterTrace_1.js');tracer('<hash of transaction>');"3366:POP", "3367:JUMP", "1355:JUMPDEST", "1356:PUSH1", "1358:MLOAD", "1359:DUP1", "1360:DUP3", "1361:ISZERO", "1362:ISZERO", "1363:ISZERO", "1364:ISZERO", "1365:DUP2", "1366:MSTORE", "1367:PUSH1", "1369:ADD", "1370:SWAP2", "1371:POP", "1372:POP", "1373:PUSH1", "1375:MLOAD", "1376:DUP1", "1377:SWAP2", "1378:SUB", "1379:SWAP1", "1380:RETURN"console.log(JSON.stringify(tracer('<hash of transaction>'), null, 2));
Filtering with conditions
Stack Information
Storage Information
Operation Results
Dealing With Calls Between Contracts
Last updated
Was this helpful?