Skip to content

Standardize the return type of CDP SQL services #45

@jasonhedman

Description

@jasonhedman

x402 scan uses CDP SQL to make aggregate queries over on-chain x402 data.

All numeric values come back from CDP as strings, which we originally cast to BigInt via the outputSchema zod schemas for each service.

Next cache cannot serialize BigInt, so in a rush to launch we converted all of the BigInt fields to either string or number.

Come up with a standard way to treat these values (total_amount, unique_buyers, etc.) and update the services.

The strong type safety provided by tRPC will catch all usages of the newly-typed values and highlight where changes are necessary in the rest of the app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MeritBounties claimable on terminal.merit.systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions