From dcad5b79df5b41aa8ba84fd4889ff17d3797b25d Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Tue, 21 Feb 2023 10:53:56 +0100 Subject: [PATCH] Ignore DELEGATECALL in EVM call trace Geth v1.11 changed the tracer and are now returning the delegated value. See https://github.com/ethereum/go-ethereum/issues/26726 --- bchain/coins/eth/ethrpc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index c4210fb9..61173b05 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -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,