Skip to content

Commit 67d40b1

Browse files
committed
fix: add monad v2,v3,v4 subgraph
1 parent a78f79d commit 67d40b1

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

lib/cron/cache-config.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ export const v4SubgraphUrlOverride = (chainId: ChainId) => {
7676
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY_2}/uniswap-2/uniswap-v4-soneium-mainnet/api`
7777
case ChainId.OPTIMISM:
7878
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY_2}/uniswap-2/uniswap-v4-optimism/api`
79+
case ChainId.MONAD:
80+
return `https://api.goldsky.com/api/private/${process.env.GOLDSKY_API_KEY}/subgraphs/uniswap-v4-monad/prod/gn`
7981
default:
8082
return undefined
8183
}
@@ -111,6 +113,8 @@ export const v3SubgraphUrlOverride = (chainId: ChainId) => {
111113
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY_2}/uniswap-2/uniswap-v3-zora/api`
112114
case ChainId.SONEIUM:
113115
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY_2}/uniswap-2/uniswap-v3-soneium-mainnet/api`
116+
case ChainId.MONAD:
117+
return `https://api.goldsky.com/api/private/${process.env.GOLDSKY_API_KEY}/subgraphs/uniswap-v3-monad/prod/gn`
114118
default:
115119
return undefined
116120
}
@@ -144,6 +148,8 @@ export const v2SubgraphUrlOverride = (chainId: ChainId) => {
144148
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-unichain-mainnet/api`
145149
case ChainId.SONEIUM:
146150
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-soneium-mainnet/api`
151+
case ChainId.MONAD:
152+
return `https://api.goldsky.com/api/private/${process.env.GOLDSKY_API_KEY}/subgraphs/uniswap-v2-monad/prod/gn`
147153
default:
148154
return undefined
149155
}
@@ -355,6 +361,20 @@ export const chainProtocols = [
355361
v3SubgraphUrlOverride(ChainId.SONEIUM)
356362
),
357363
},
364+
{
365+
protocol: Protocol.V3,
366+
chainId: ChainId.MONAD,
367+
timeout: 90000,
368+
provider: new V3SubgraphProvider(
369+
ChainId.MONAD,
370+
3,
371+
90000,
372+
true,
373+
v3TrackedEthThreshold,
374+
v3UntrackedUsdThreshold,
375+
v3SubgraphUrlOverride(ChainId.MONAD)
376+
),
377+
},
358378
// V2.
359379
{
360380
protocol: Protocol.V2,
@@ -536,6 +556,21 @@ export const chainProtocols = [
536556
v2SubgraphUrlOverride(ChainId.SONEIUM)
537557
),
538558
},
559+
{
560+
protocol: Protocol.V2,
561+
chainId: ChainId.MONAD,
562+
timeout: 90000,
563+
provider: new V2SubgraphProvider(
564+
ChainId.MONAD,
565+
3,
566+
90000,
567+
true,
568+
1000,
569+
v2TrackedEthThreshold,
570+
v2UntrackedUsdThreshold,
571+
v2SubgraphUrlOverride(ChainId.MONAD)
572+
),
573+
},
539574
// V4
540575
{
541576
protocol: Protocol.V4,
@@ -744,4 +779,20 @@ export const chainProtocols = [
744779
v4SubgraphUrlOverride(ChainId.BNB)
745780
),
746781
},
782+
{
783+
protocol: Protocol.V4,
784+
chainId: ChainId.MONAD,
785+
timeout: 90000,
786+
provider: new V4SubgraphProvider(
787+
ChainId.MONAD,
788+
3,
789+
90000,
790+
true,
791+
v4TrackedEthThreshold,
792+
v4BaseZoraTrackedEthThreshold,
793+
ZORA_HOOKS_FOR_V4_SUBGRAPH_FILTERING,
794+
v4UntrackedUsdThreshold,
795+
v4SubgraphUrlOverride(ChainId.MONAD)
796+
),
797+
},
747798
]

0 commit comments

Comments
 (0)