Skip to content

Use our sdk for fetching logs and transactions #393

@g1nt0ki

Description

@g1nt0ki

We have our own indexer v2 which is quite efficient in fetching logs and transaction info, we should leverage on that as much as possible.

Can you update all the adapters to use

  • sdk.getLogs (if we have indexer support for given chain and indexer env is set, it is automatically picked up) for fetching event logs
  • getTransactions to get transaction info, unlike getLogs, this doesnt have a fallback atm, so, you can either update sdk to add fallbacks for the chains used in bridges-server or add a wrapper with try catch block, so if indexer is not set/doesnt support given chain, it will use current code for fetching transactions.

additionally, you can pass ChainApi object as third param here and use it (you can check usage in dimensions repo), also, why is topic0 needed if you have the event abi? sdk.getLogs works with only the event abi and returns parsed data by default (you can pass entireLog: true, parseLog: true to get both the log metadata and the parsed log )

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions