Skip to content

Commit e3234d1

Browse files
jsy1218Ponx
andauthored
feat: Allowlist AVAXSTRATEGIES_STATIC_FEE_HOOK (#1334)
* feat: Allowlist AVAXSTRATEGIES_STATIC_FEE_HOOK * fix prettier --------- Co-authored-by: Alex <alex.francisci@gmail.com>
1 parent 3e1207f commit e3234d1

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

lib/cron/cache-config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export const v4SubgraphUrlOverride = (chainId: ChainId) => {
130130
return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v4-monad/prod/gn`
131131
case ChainId.XLAYER:
132132
return `https://gateway.thegraph.com/api/subgraphs/id/${process.env.GRAPH_XLAYER_V4_ID}`
133+
case ChainId.AVALANCHE:
134+
return `https://api.aws-us-east-1.goldsky.com/c/uniswap2/gn/subgraphs/id/${process.env.GOLD_SKY_AVALANCHE_V4_ID}`
133135
default:
134136
return undefined
135137
}
@@ -902,4 +904,20 @@ export const chainProtocols = [
902904
process.env.GRAPH_BEARER_TOKEN
903905
),
904906
},
907+
{
908+
protocol: Protocol.V4,
909+
chainId: ChainId.AVALANCHE,
910+
timeout: 90000,
911+
provider: new V4SubgraphProvider(
912+
ChainId.AVALANCHE,
913+
3,
914+
90000,
915+
true,
916+
v4TrackedEthThreshold,
917+
v4BaseZoraTrackedEthThreshold,
918+
ZORA_HOOKS_FOR_V4_SUBGRAPH_FILTERING,
919+
v4UntrackedUsdThreshold,
920+
v4SubgraphUrlOverride(ChainId.AVALANCHE)
921+
),
922+
},
905923
]

lib/util/hooksAddressesAllowlist.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ export const MEME_STRATEGY_HOOK_ON_MAINNET = '0x3ba779bad405d9b68a7a7a86ff6916c8
169169
// example pool: https://app.uniswap.org/explore/pools/base/0x6f104dafea59868dfee9883a56d666393633115c2fda5dca6da4aa6e39f18e2f
170170
export const FARSTR_HOOKS_ADDRESS_ON_BASE = '0xc3b8e77ac038aa260035a1911827086c34a9e844'
171171

172+
// example pool: https://app.uniswap.org/explore/pools/avalanche/0xc09399b17e189ba3528aa516eb4f9c134720316bc7b3b5f8003c3967ec11f7cd
173+
export const AVAXSTRATEGIES_STATIC_FEE_HOOKS_ADDRESS_ON_AVAX = '0x3b48f794A1D67FeBe95f66B6Dff38c0A7e934044'
172174
// example pool: https://app.uniswap.org/explore/pools/ethereum/0x0c1b00338ecfc1f4894a309420c2d8d654e500036268dd251b99decc66bd2b51
173175
export const TOKEN_FLOW_TAX_HOOK_ON_MAINNET = '0x74803bd586fa5ce3a9ab38b49a7ca633af8700cc'
174176
// example pool: https://app.uniswap.org/explore/pools/base/0xe6b8b2f7320759927c826e663ba1a77eaf8156bad1422234d5282c17c5e8f637
@@ -229,7 +231,7 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
229231
[ChainId.GNOSIS]: [ADDRESS_ZERO],
230232
[ChainId.MOONBEAM]: [ADDRESS_ZERO],
231233
[ChainId.BNB]: [ADDRESS_ZERO],
232-
[ChainId.AVALANCHE]: [ADDRESS_ZERO],
234+
[ChainId.AVALANCHE]: [ADDRESS_ZERO, AVAXSTRATEGIES_STATIC_FEE_HOOKS_ADDRESS_ON_AVAX],
233235
[ChainId.BASE_GOERLI]: [ADDRESS_ZERO],
234236
[ChainId.BASE_SEPOLIA]: [ADDRESS_ZERO],
235237
[ChainId.BASE]: [

0 commit comments

Comments
 (0)