Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck depending on contract being indexed #4

Open
Chiplis opened this issue Feb 14, 2025 · 0 comments
Open

Stuck depending on contract being indexed #4

Chiplis opened this issue Feb 14, 2025 · 0 comments

Comments

@Chiplis
Copy link

Chiplis commented Feb 14, 2025

The following is the contract address for Kriya's AMM:

https://suiscan.xyz/mainnet/object/0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66

Indexing for this contract works as expected, although we do encounter an error while inserting into the PSQL table:

prisma:query INSERT INTO "public"."LiquidityRemovedEvent" ("lsp_burned","amount_y","dbId","liquidity_provider","amount_x","pool_id") VALUES ($1,$2,$3,$4,$5,$6), ($7,$8,$9,$10,$11,$12), ($13,$14,$15,$16,$17,$18), ($19,$20,$21,$22,$23,$24), ($25,$26,$27,$28,$29,$30), ($31,$32,$33,$34,$35,$36)
prisma:query INSERT INTO "public"."LiquidityAddedEvent" ("dbId","liquidity_provider","pool_id","lsp_minted","amount_y","amount_x") VALUES ($1,$2,$3,$4,$5,$6), ($7,$8,$9,$10,$11,$12), ($13,$14,$15,$16,$17,$18), ($19,$20,$21,$22,$23,$24), ($25,$26,$27,$28,$29,$30), ($31,$32,$33,$34,$35,$36)
prisma:query COMMIT
Created LiquidityRemovedEvent events
prisma:query COMMIT
Created LiquidityAddedEvent events
prisma:query INSERT INTO "public"."cursor" ("id","eventSeq","txDigest") VALUES ($1,$2,$3) ON CONFLICT ("id") DO UPDATE SET "eventSeq" = $4, "txDigest" = $5 WHERE ("public"."cursor"."id" = $6 AND 1=1) RETURNING "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest"
Unknown event type: COIN>
Unknown event type: COIN>
Unknown event type: SUI>
Unknown event type: COIN>

If we try Kriya's new CLMM contract though:

https://suiscan.xyz/mainnet/object/0xbd8d4489782042c6fafad4de4bc6a5e0b84a43c6c00647ffd7062d1e2bb7549e/tx-blocks

The indexing gets stuck after the following statements, no inserts appear to be executing:

> [email protected] indexer
> npx ts-node indexer.ts

prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."cursor"."id", "public"."cursor"."eventSeq", "public"."cursor"."txDigest" FROM "public"."cursor" WHERE ("public"."cursor"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant