Skip to content

Commit

Permalink
Ignore DELEGATECALL in EVM call trace
Browse files Browse the repository at this point in the history
Geth v1.11 changed the tracer and are now returning the delegated value.
See ethereum/go-ethereum#26726
  • Loading branch information
martinboehm authored and mohsenmottaghi committed Mar 5, 2023
1 parent 59ce1f3 commit 62865ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bchain/coins/eth/ethrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ func (b *EthereumRPC) processCallTrace(call *rpcCallTrace, d *bchain.EthereumInt
To: call.To,
})
contracts = append(contracts, bchain.ContractInfo{Contract: call.From, DestructedInBlock: blockHeight})
} else if call.Type == "DELEGATECALL" {
// ignore DELEGATECALL (geth v1.11 the changed tracer behavior)
// https://github.com/ethereum/go-ethereum/issues/26726
} else if err == nil && (value.BitLen() > 0 || b.ChainConfig.ProcessZeroInternalTransactions) {
d.Transfers = append(d.Transfers, bchain.EthereumInternalTransfer{
Value: *value,
Expand Down

0 comments on commit 62865ee

Please sign in to comment.