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.
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
BigIntvia theoutputSchemazod schemas for each service.Next
cachecannot serializeBigInt, so in a rush to launch we converted all of theBigIntfields to eitherstringornumber.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.