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
This commit is contained in:
Martin Boehm 2023-02-21 10:53:56 +01:00
parent 324a4446ec
commit dcad5b79df

View File

@ -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,