Skip to content

Commit

Permalink
js/tracers: make OpenEthereum calltracer report value in selfdestructs
Browse files Browse the repository at this point in the history
js/tracers: make calltracer report value in selfdestructs (ethereum#21549)

ethereum@71c37d8
  • Loading branch information
ziogaschr committed Oct 14, 2020
1 parent 8a2dd93 commit 5ddf481
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion eth/tracers/internal/tracers/call_tracer_open_ethereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@
if (typeof 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 5ddf481

Please sign in to comment.