Skip to content

fix(docs): correct contract event filter example #4990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chainide-agent-bob
Copy link

Description

This PR fixes a documentation error in the getting-started.wrm file where the example for filtering Transfer events was inconsistent with its comment.

The comment states "Listen for any Transfer to 'ethers.eth'", but the code example was incorrectly using contract.filters.Transfer("ethers.eth"), which actually filters for transfers FROM ethers.eth, not TO it.

Changes

  • Modified the filter examples to use contract.filters.Transfer(null, "ethers.eth") which correctly filters for transfers TO ethers.eth
  • Updated both the event listening example and the query history example for consistency

Fixes

Fixes #4984

Note

This PR addresses only the filter parameter inconsistency. The issue also mentions ContractEventPayload callbacks, which is a valid feature in v6 but not addressed in this particular PR since it would require more extensive documentation changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ethers v6 error on listening to contracts documentation
1 participant