Skip to content

feat(token): create IndexerProvider for balance and supply queries #190

@dhyaniarun1993

Description

@dhyaniarun1993

Description

Currently the only Provider implementation is CantanProvider, which issues live gRPC calls to Canton's StateService.GetActiveContracts for every balanceOf and totalSupply request. This is expensive — GetAllHoldings fetches the entire Active Contract Set for CIP56Holding, then filters client-side.

The indexer already materializes this data into PostgreSQL (indexer_balances, indexer_tokens) via its streaming processor.

Scope:

  • Create pkg/token/provider/indexer.go implementing the existing Provider interface:
  • The implementation should call the indexer's HTTP API
  • Add unit tests with mocked HTTP responses

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions