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 committed Feb 21, 2023
1 parent 324a444 commit dcad5b7
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 dcad5b7

Please sign in to comment.