Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

FM-137: Ethereum API filter methods #139

Merged
merged 13 commits into from
Jul 11, 2023
Merged

Conversation

aakoshh
Copy link
Contributor

@aakoshh aakoshh commented Jul 5, 2023

Part of consensus-shipyard/ipc#342
Closes consensus-shipyard/ipc#328

Adds API methods related to filters:

  • eth_newFilter
  • eth_newBlockFilter
  • eth_pendingTransactionFilter
  • eth_uninstallFilter
  • eth_getFilterChanges

Caveats:

  • Instead of pending transactions, we return transactions which are included in blocks, as that's what we are able to subscribe to
  • Logs returned in subscriptions don't have block_hash, transaction_index and log_start_index fields as these would require further queries to the API, with caching to avoid hammering the node.

TODO:

  • Check how Etherscan deals with the extra fields in logs.
  • Follow up with a test to parse the logs with the ethers machinery.

@aakoshh aakoshh force-pushed the fm-137-eth-filter-methods branch from 1ad6152 to d1e96ed Compare July 5, 2023 16:34
@aakoshh aakoshh changed the title FM-137: Ethereum filter methods FM-137: Ethereum API filter methods Jul 7, 2023
@aakoshh aakoshh marked this pull request as ready for review July 11, 2023 10:13
@aakoshh aakoshh requested a review from adlrocha July 11, 2023 10:18
@aakoshh aakoshh merged commit 2a81d56 into master Jul 11, 2023
5 checks passed
@aakoshh aakoshh deleted the fm-137-eth-filter-methods branch July 11, 2023 11:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ethereum API filter methods
1 participant