js/tracers: make calltracer report value in selfdestructs (#21549)

pull/21564/head
Julian Koh 4 years ago committed by GitHub
parent 4eb9296910
commit 71c37d82ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      eth/tracers/internal/tracers/call_tracer.js

@ -61,7 +61,14 @@
if (this.callstack[left-1].calls === undefined) { if (this.callstack[left-1].calls === undefined) {
this.callstack[left-1].calls = []; this.callstack[left-1].calls = [];
} }
this.callstack[left-1].calls.push({type: op}); this.callstack[left-1].calls.push({
type: op,
from: toHex(log.contract.getAddress()),
to: toHex(toAddress(log.stack.peek(0).toString(16))),
gasIn: log.getGas(),
gasCost: log.getCost(),
value: '0x' + db.getBalance(log.contract.getAddress()).toString(16)
});
return return
} }
// If a new method invocation is being done, add to the call stack // If a new method invocation is being done, add to the call stack

Loading…
Cancel
Save