8000 Missing event type actions · Issue #126 · base/op-viem · GitHub
[go: up one dir, main page]

Skip to content

Missing event type actions #126

Open

Description

@roninjin10

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})

Activity

  1. roninjin10 commented on Oct 3, 2023

    @roninjin10
    ContributorAuthor

    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

  2. removed their assignment
    on Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0