-
Notifications
You must be signed in to change notification settings - Fork 2
feat: adding start and end block filters to Deposits api #560
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ import { CctpFinalizerJob } from "../CctpFinalizerJob"; | |
| ]) | ||
| @Index("IX_depositForBurn_finalised", ["finalised"]) | ||
| @Index("IX_depositForBurn_deletedAt", ["deletedAt"]) | ||
| @Index("IX_depositForBurn_chainId_blockNumber", ["chainId", "blockNumber"]) | ||
|
Contributor
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. Will the Also, I think this index is redundant and doesn't bring any performance improvements because we already have
Contributor
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. Given the conversation we had, we can remove this index |
||
| export class DepositForBurn { | ||
| @PrimaryGeneratedColumn() | ||
| id: number; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,10 @@ import { RelayHashInfo } from "../RelayHashInfo"; | |
| "originChainId", | ||
| "depositId", | ||
| ]) | ||
| @Index("IX_v3FundsDeposited_originChainId_blockNumber", [ | ||
| "originChainId", | ||
| "blockNumber", | ||
| ]) | ||
|
Comment on lines
+39
to
+42
Contributor
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. I am not 100% sure but I think we can remove this because we have the |
||
| @Index("IX_v3FundsDeposited_internalHash", ["internalHash"]) | ||
| export class V3FundsDeposited { | ||
| @PrimaryGeneratedColumn() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
|
||
| export class AddOriginChainAndBlockIndexes1766172349662 | ||
| implements MigrationInterface | ||
| { | ||
| name = "AddOriginChainAndBlockIndexes1766172349662"; | ||
|
|
||
| public async up(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query( | ||
| `CREATE INDEX "IX_v3FundsDeposited_originChainId_blockNumber" ON "evm"."v3_funds_deposited" ("originChainId", "blockNumber") `, | ||
| ); | ||
| await queryRunner.query( | ||
| `CREATE INDEX "IX_depositForBurn_chainId_blockNumber" ON "evm"."deposit_for_burn" ("chainId", "blockNumber") `, | ||
| ); | ||
| await queryRunner.query( | ||
| `CREATE INDEX "IX_oftSent_chainId_blockNumber" ON "evm"."oft_sent" ("chainId", "blockNumber") `, | ||
| ); | ||
| } | ||
|
|
||
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query( | ||
| `DROP INDEX "evm"."IX_oftSent_chainId_blockNumber"`, | ||
| ); | ||
| await queryRunner.query( | ||
| `DROP INDEX "evm"."IX_depositForBurn_chainId_blockNumber"`, | ||
| ); | ||
| await queryRunner.query( | ||
| `DROP INDEX "evm"."IX_v3FundsDeposited_originChainId_blockNumber"`, | ||
| ); | ||
| } | ||
| } |
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.
Is it possible we might get into some trouble with the naming here?
fillBlockNumberis not really a fill, but a mint, no?