Skip to content

Commit

Permalink
js/tracers: make calltracer report value in selfdestructs (ethereum#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Koh authored Sep 14, 2020
1 parent 4eb9296 commit 71c37d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion eth/tracers/internal/tracers/call_tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@
if (this.callstack[left-1].calls === undefined) {
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
}
// If a new method invocation is being done, add to the call stack
Expand Down

0 comments on commit 71c37d8

Please sign in to comment.