-
Notifications
You must be signed in to change notification settings - Fork 2
feat: send cctp burn transactions to pubsub #391
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
Merged
amateima
merged 9 commits into
amatei/acx-4462-index-mint-and-burn-events-in-the-indexer
from
amatei/acx-4576-send-burn-txns-to-finalization-bot
Nov 5, 2025
+757
−20
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d094f8e
feat: add oft transfers table (#390)
amateima 1632114
feat: index solana cctp burn transactions (#396)
melisaguevara 0bb9b26
feat: send cctp burn transactions to pubsub
amateima c0a2345
Integrate pubsub lib
amateima 45cbd27
Fix
amateima a89f06f
Fix
amateima c121f7c
Update packages/indexer/src/data-indexing/service/CctpFinalizerServic…
amateima 0aaf2fd
Fix
amateima ffca0dd
Remove oft transfers aggregator
amateima File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
packages/indexer-database/src/entities/CctpFinalizerJob.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import { | ||
| Column, | ||
| CreateDateColumn, | ||
| Entity, | ||
| JoinColumn, | ||
| OneToOne, | ||
| PrimaryGeneratedColumn, | ||
| Unique, | ||
| UpdateDateColumn, | ||
| } from "typeorm"; | ||
| import { DepositForBurn } from "./evm/DepositForBurn"; | ||
|
|
||
| /** | ||
| * Table to store the burn events sent to be finalized by the | ||
| * finalizer bot. Each row points to a burn event that has | ||
| * been sent successfully to the finalizer bot. | ||
| */ | ||
| @Entity() | ||
| @Unique("UK_cctpFinalizerJob_burnEventId", ["burnEventId"]) | ||
| export class CctpFinalizerJob { | ||
| @PrimaryGeneratedColumn() | ||
| id: number; | ||
|
|
||
| @Column() | ||
| attestation: string; | ||
|
|
||
| @Column() | ||
| message: string; | ||
|
|
||
| @Column() | ||
| burnEventId: number; | ||
|
|
||
| @OneToOne(() => DepositForBurn, (burnEvent) => burnEvent.id) | ||
| @JoinColumn({ name: "burnEventId" }) | ||
| burnEvent: DepositForBurn; | ||
|
|
||
| @CreateDateColumn() | ||
| createdAt: Date; | ||
|
|
||
| @UpdateDateColumn() | ||
| updatedAt: Date; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/indexer-database/src/migrations/1760541259411-CctpFinalizerJob.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
|
||
| export class CctpFinalizerJob1760541259411 implements MigrationInterface { | ||
| name = "CctpFinalizerJob1760541259411"; | ||
|
|
||
| public async up(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(` | ||
| CREATE TABLE "cctp_finalizer_job" ( | ||
| "id" SERIAL NOT NULL, | ||
| "attestation" character varying NOT NULL, | ||
| "message" character varying NOT NULL, | ||
| "burnEventId" integer NOT NULL, | ||
| "createdAt" TIMESTAMP NOT NULL DEFAULT now(), | ||
| "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), | ||
| CONSTRAINT "REL_955f0780d44fb1b785425d7b56" UNIQUE ("burnEventId"), | ||
| CONSTRAINT "PK_f6a74f608a35916f58fbb1da6ba" PRIMARY KEY ("id") | ||
| )`); | ||
| await queryRunner.query( | ||
| `ALTER TABLE "cctp_finalizer_job" ADD CONSTRAINT "FK_955f0780d44fb1b785425d7b567" FOREIGN KEY ("burnEventId") REFERENCES "evm"."deposit_for_burn"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, | ||
| ); | ||
| } | ||
|
|
||
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query( | ||
| `ALTER TABLE "cctp_finalizer_job" DROP CONSTRAINT "FK_955f0780d44fb1b785425d7b567"`, | ||
| ); | ||
| await queryRunner.query(`DROP TABLE "cctp_finalizer_job"`); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,7 +74,8 @@ export class CCTPIndexerManager { | |
| ); | ||
| const indexer = new EvmIndexer( | ||
| { | ||
| indexingDelaySeconds: getIndexingDelaySeconds(chainId, this.config), | ||
| indexingDelaySeconds: | ||
| getIndexingDelaySeconds(chainId, this.config) * 2, | ||
|
Comment on lines
+77
to
+78
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indexing CCTP events is much fast than SpokePool events via the SDK, so we can increase the delay a bit here |
||
| finalisedBlockBufferDistance: | ||
| getFinalisedBlockBufferDistance(chainId), | ||
| maxBlockRangeSize: MAX_BLOCK_RANGE_SIZE, | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same function and
fetchAttestationsForTxnis being used in the finalizer service too. Maybe we can consolidate in the SDK later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @ashwinrava. Nick just merged a PR with CCTP utils which is going to be integrated soon in the indexer 👍