Missing event type actions
- Dominant language
- TypeScript
- Stars
- 371
- Forks
- 248
- PR merge metrics
- No merged PRs in 30d
Description
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:
```typescript
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
```typescript
watchDepositEvents()
watchDepositEvents({bridgeAddress})
getBridgeDepositLogs({bridgeAddress, fromAddress, toAddress})
Contributor guide
Research direction
No file or test is named. Start by comparing the current SDK action with the existing viem methods and event ABIs mentioned in the issue, then resolve which of the three alternatives is intended. Done means the chosen deposit and withdrawal access path is implemented or documented consistently with the project’s existing viem extensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100