diff --git a/.gitignore b/.gitignore index 7e3a79b..8ff8178 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ yarn-error.log* # Ponder /generated/ /.ponder/ +ponder-env.d.ts diff --git a/ponder-env.d.ts b/ponder-env.d.ts deleted file mode 100644 index e7f3009..0000000 --- a/ponder-env.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// This file enables type checking and editor autocomplete for this Ponder project. -// After upgrading, you may find that changes have been made to this file. -// If this happens, please commit the changes. Do not manually edit this file. -// See https://ponder.sh/docs/getting-started/installation#typescript for more information. - -declare module "@/generated" { - import type { Virtual } from "@ponder/core"; - - type config = typeof import("./ponder.config.ts").default; - type schema = typeof import("./ponder.schema.ts"); - - export const ponder: Virtual.Registry; - - export type EventNames = Virtual.EventNames; - export type Event = Virtual.Event< - config, - name - >; - export type Context = Virtual.Context< - config, - schema, - name - >; - export type ApiContext = Virtual.ApiContext; - export type IndexingFunctionArgs = - Virtual.IndexingFunctionArgs; -} diff --git a/ponder.schema.ts b/ponder.schema.ts index b251334..044cb05 100644 --- a/ponder.schema.ts +++ b/ponder.schema.ts @@ -94,7 +94,7 @@ export const userDataTable = onchainTable("UserData", (t) => ({ id: t.text().primaryKey().notNull(), linkedToTokenId: t.bigint().notNull(), isMainWallet: t.boolean().notNull(), - chainId: t.bigint().notNull(), + chainId: t.integer().notNull(), })); export const allProtocolsTable = onchainTable("AllProtocols", (t) => ({ diff --git a/src/helpers.ts b/src/helpers.ts index bc29858..cde0cb4 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -151,7 +151,7 @@ export async function getOrCreateUserData( id: `${address}-${chainId}`, linkedToTokenId: tokenId, isMainWallet: address === mainWallet, - chainId: BigInt(chainId), + chainId: chainId, }); }