Skip to content
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

Missing event type actions #126

Open
roninjin10 opened this issue Oct 3, 2023 · 1 comment
Open

Missing event type actions #126

roninjin10 opened this issue Oct 3, 2023 · 1 comment
Labels
state: backlog This is pending further review type: enhancement New feature or request

Comments

@roninjin10
Copy link
Contributor

roninjin10 commented Oct 3, 2023

There is no action for getting deposits by address or getting withdrawals by address. These are utils that most folks should be using an indexer for but it's a good idea to offer an RPC only way of doing it too.

This could be an action like the current sdk:

getDepositsByAddress({
  address: Address,
  bridgeAddress: Address
  startBlock,
  endBlock
})

Alternatively we could reexport the abis for these events and document how to use them in viem. This is likely the best option because then it can be composed with all the existing viem methods like watchEvent.

The third alternative is to wrap existing viem methods

watchDepositEvents()
watchDepositEvents({bridgeAddress})
getBridgeDepositLogs({bridgeAddress, fromAddress, toAddress})
@roninjin10
Copy link
Contributor Author

Personally I like the third alternative of wrapping existing viem methods with bridge specific stuff but believe alternative 2 is the lightest lift so would start there anyways

@wbnns wbnns added state: backlog This is pending further review type: enhancement New feature or request labels Oct 4, 2023
@zencephalon zencephalon removed their assignment Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: backlog This is pending further review type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants