hedera-json-rpc-relay icon indicating copy to clipboard operation
hedera-json-rpc-relay copied to clipboard

Update `eth_getTransactionByBlockHashAndIndex` and `eth_getTransactionByBlockNumberAndIndex` to pass a timestamp range in mirror node queries

Open victor-yanev opened this issue 1 year ago • 0 comments
trafficstars

In the eth_getTransactionByBlockHashAndIndex and eth_getTransactionByBlockNumberAndIndex methods, fetch the block from the blocks/{hashOrNumber} endpoint and use the timestamp.from and timestamp.to fields of the block to construct a timestamp query parameter for subsequent calls to the mirror node.

This timestamp parameter should be used when calling getContractResults and resolveEvmAddress to comply with the 60-day time range restriction imposed by the new mirror node API changes.

victor-yanev avatar Sep 30 '24 10:09 victor-yanev