Skip to content

Commit

Permalink
chore: bump sor to 4.17.0 - feat: v4 for zora unichain blast L1 (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 authored Jan 24, 2025
1 parent 62f7adf commit 4413319
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 94 deletions.
80 changes: 80 additions & 0 deletions lib/cron/cache-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ export const v4SubgraphUrlOverride = (chainId: ChainId) => {
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-base/api`
case ChainId.POLYGON:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-polygon/api`
case ChainId.WORLDCHAIN:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-worldchain/api`
case ChainId.ZORA:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-zora/api`
case ChainId.UNICHAIN:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-unichain/api`
case ChainId.BLAST:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-blast/api`
case ChainId.MAINNET:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-mainnet/api`
default:
return undefined
}
Expand Down Expand Up @@ -414,4 +424,74 @@ export const chainProtocols = [
v4SubgraphUrlOverride(ChainId.POLYGON)
),
},
{
protocol: Protocol.V4,
chainId: ChainId.WORLDCHAIN,
timeout: 90000,
provider: new V4SubgraphProvider(
ChainId.WORLDCHAIN,
3,
90000,
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4SubgraphUrlOverride(ChainId.WORLDCHAIN)
),
},
{
protocol: Protocol.V4,
chainId: ChainId.ZORA,
timeout: 90000,
provider: new V4SubgraphProvider(
ChainId.ZORA,
3,
90000,
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4SubgraphUrlOverride(ChainId.ZORA)
),
},
{
protocol: Protocol.V4,
chainId: ChainId.UNICHAIN,
timeout: 90000,
provider: new V4SubgraphProvider(
ChainId.UNICHAIN,
3,
90000,
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4SubgraphUrlOverride(ChainId.UNICHAIN)
),
},
{
protocol: Protocol.V4,
chainId: ChainId.BLAST,
timeout: 90000,
provider: new V4SubgraphProvider(
ChainId.BLAST,
3,
90000,
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4SubgraphUrlOverride(ChainId.BLAST)
),
},
{
protocol: Protocol.V4,
chainId: ChainId.MAINNET,
timeout: 90000,
provider: new V4SubgraphProvider(
ChainId.MAINNET,
3,
90000,
true,
v4TrackedEthThreshold,
v4UntrackedUsdThreshold,
v4SubgraphUrlOverride(ChainId.MAINNET)
),
},
]
4 changes: 4 additions & 0 deletions lib/handlers/injector-sor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ export abstract class InjectorSOR<Router, QueryParams> extends Injector<
ChainId.OPTIMISM,
ChainId.AVALANCHE,
ChainId.WORLDCHAIN,
ChainId.ZORA,
ChainId.UNICHAIN,
ChainId.BLAST,
ChainId.MAINNET,
]

const mixedSupported = [ChainId.MAINNET, ChainId.SEPOLIA, ChainId.GOERLI]
Expand Down
Loading

0 comments on commit 4413319

Please sign in to comment.