onflow / flow-evm-gateway

FlowEVM Gateway implements an Ethereum-equivalent JSON-RPC API for EVM clients to use
https://developers.flow.com/evm/about
Apache License 2.0
11 stars 9 forks source link

`Index` field on receipt logs does not return correct value for blocks with multiple transactions & logs #461

Closed m-Peter closed 1 month ago

m-Peter commented 1 month ago

As we can read in https://docs.infura.io/api/networks/ethereum/json-rpc-methods/eth_getlogs:

logIndex: Hexadecimal of the log index position in the block.

The log index field should be the index position in the entire block, not scoped to the receipt it was emitted. Code location: https://github.com/onflow/flow-evm-gateway/blob/main/storage/pebble/receipts.go#L153