Skip to content

Commit

Permalink
fix: add ink support (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
amateima authored Jan 2, 2025
1 parent 1c150ff commit 3f7c978
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 86 deletions.
4 changes: 2 additions & 2 deletions packages/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"@across-protocol/constants": "^3.1.20",
"@across-protocol/contracts": "^3.0.16",
"@across-protocol/constants": "^3.1.25",
"@across-protocol/contracts": "^3.0.19",
"@across-protocol/sdk": "^3.3.23",
"@repo/error-handling": "workspace:*",
"@repo/webhooks": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/indexer/src/data-indexing/service/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const finalisedBlockBufferDistances: Record<number, number> = {
[CHAIN_IDs.REDSTONE]: 60,
[CHAIN_IDs.BASE]: 60,
[CHAIN_IDs.BLAST]: 60,
[CHAIN_IDs.INK]: 60,
[CHAIN_IDs.MODE]: 120,
[CHAIN_IDs.POLYGON]: 128,
[CHAIN_IDs.ZK_SYNC]: 120,
Expand Down Expand Up @@ -39,6 +40,7 @@ const loopWaitTimeSeconds: Record<number, number> = {
[CHAIN_IDs.REDSTONE]: 4,
[CHAIN_IDs.BASE]: 4,
[CHAIN_IDs.BLAST]: 4,
[CHAIN_IDs.INK]: 4,
[CHAIN_IDs.MODE]: 3,
[CHAIN_IDs.POLYGON]: 3,
[CHAIN_IDs.ZK_SYNC]: 3,
Expand Down
4 changes: 4 additions & 0 deletions packages/indexer/src/web3/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const DEFAULT_NO_TTL_DISTANCE: { [chainId: number]: number } = {
[CHAIN_IDs.BASE]: 86400,
[CHAIN_IDs.BLAST]: 86400,
[CHAIN_IDs.BOBA]: 86400,
[CHAIN_IDs.INK]: 86400,
[CHAIN_IDs.LINEA]: 57600,
[CHAIN_IDs.LISK]: 86400,
[CHAIN_IDs.MAINNET]: 14400,
Expand Down Expand Up @@ -41,6 +42,7 @@ export const CHAIN_CACHE_FOLLOW_DISTANCE: { [chainId: number]: number } = {
[CHAIN_IDs.BASE]: 120,
[CHAIN_IDs.BLAST]: 120,
[CHAIN_IDs.BOBA]: 0,
[CHAIN_IDs.INK]: 120,
[CHAIN_IDs.LISK]: 120,
[CHAIN_IDs.LINEA]: 100, // Linea has a soft-finality of 1 block. This value is padded - but at 3s/block the padding is 5 minutes
[CHAIN_IDs.MAINNET]: 128,
Expand Down Expand Up @@ -79,6 +81,7 @@ const MAX_BLOCK_LOOK_BACK = {
[CHAIN_IDs.OPTIMISM]: 10000,
[CHAIN_IDs.POLYGON]: 10000,
[CHAIN_IDs.BOBA]: 4990,
[CHAIN_IDs.INK]: 10000,
[CHAIN_IDs.ZK_SYNC]: 10000,
[CHAIN_IDs.REDSTONE]: 500, // TODO: Update when Quicknode is enable as a provider
[CHAIN_IDs.LISK]: 10000,
Expand Down Expand Up @@ -115,6 +118,7 @@ export const BLOCK_TIME_SECONDS: { [chainId: number]: number } = {
[CHAIN_IDs.BASE]: 2,
[CHAIN_IDs.BLAST]: 2,
[CHAIN_IDs.BOBA]: 2,
[CHAIN_IDs.INK]: 1,
[CHAIN_IDs.LINEA]: 3,
[CHAIN_IDs.LISK]: 2,
[CHAIN_IDs.MAINNET]: 12,
Expand Down
Loading

0 comments on commit 3f7c978

Please sign in to comment.