Skip to content

Commit b42c3a2

Browse files
authored
Merge branch 'main' into siyujiang/bump-sor-for-split-routes-cached-routesfix
2 parents e8e441d + f109b18 commit b42c3a2

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-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: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ export const TOKENWORKS_HOOK_ON_MAINNET_4 = '0xe3c63a9813ac03be0e8618b627cb8170c
104104
// example pool: https://app.uniswap.org/explore/pools/ethereum/0xb0214c79008d1d71816166fbe17c01884386ccfc5560ce8b3cbb7a15dba93dce
105105
export const TOKENWORKS_HOOK_ON_MAINNET_5 = '0x5d8a61fa2ced43eeabffc00c85f705e3e08c28c4'
106106

107+
// V1 Punk Strategic Reserve Hooks on Mainnet
108+
// example pool: https://app.uniswap.org/explore/pools/ethereum/0x1b7cc22f2c6593851dbb0d42ab89eb92d2e02a8ea4822d68ef899581f630c33c
109+
export const STRATEGICRESERVE_HOOK_ON_MAINNET = '0x6e1babe41d708f6d46a89cda1ae46de95458e444'
110+
107111
// example pool: https://app.uniswap.org/explore/pools/ethereum/0xeea2c1344c876f4c8d7545cba9ed8b199e124d6dc3e2063e3f90ba94e7b53093
108112
export const ENS_WHEEL_HOOK_ON_MAINNET = '0xf13bdafb90c79f2201e2ce42010c8ef75fede8c4'
109113

@@ -169,6 +173,27 @@ export const MEME_STRATEGY_HOOK_ON_MAINNET = '0x3ba779bad405d9b68a7a7a86ff6916c8
169173
// example pool: https://app.uniswap.org/explore/pools/base/0x6f104dafea59868dfee9883a56d666393633115c2fda5dca6da4aa6e39f18e2f
170174
export const FARSTR_HOOKS_ADDRESS_ON_BASE = '0xc3b8e77ac038aa260035a1911827086c34a9e844'
171175

176+
// example pool: https://app.uniswap.org/explore/pools/unichain/0x03f7cea23a0c6f2bbbaca94eeaf292290d9a4950e3f806495683a9fb1a941faf
177+
export const UNIVERSAL_HOOK_ON_UNICHAIN = '0xcdfcab084b2d29025772141d3bf473bd9673aaa8'
178+
// example pool: https://app.uniswap.org/explore/pools/avalanche/0xc09399b17e189ba3528aa516eb4f9c134720316bc7b3b5f8003c3967ec11f7cd
179+
export const AVAXSTRATEGIES_STATIC_FEE_HOOKS_ADDRESS_ON_AVAX = '0x3b48f794a1d67febe95f66b6dff38c0a7e934044'
180+
181+
// example pool: https://app.uniswap.org/explore/pools/base/0x796b074977701c1156e7fc95d84dfa739963f2de33af8b61c2b7ad5b7018e0e9
182+
export const ARTACLE_INDEX_TOKEN_HOOK_ON_BASE = '0xd577f945b6025ce1e60ac1a82f2ee8ff3fb428c4'
183+
184+
// example pool: https://app.uniswap.org/explore/pools/ethereum/0x0c1b00338ecfc1f4894a309420c2d8d654e500036268dd251b99decc66bd2b51
185+
export const TOKEN_FLOW_TAX_HOOK_ON_MAINNET = '0x74803bd586fa5ce3a9ab38b49a7ca633af8700cc'
186+
187+
// example pool: https://app.uniswap.org/explore/pools/base/0xe6b8b2f7320759927c826e663ba1a77eaf8156bad1422234d5282c17c5e8f637
188+
export const GPO_HOOKS = '0x6cabe2fd9fb60c5afcab7de732b0a224fc382eec'
189+
// example pool: https://app.uniswap.org/explore/pools/base/0xe6b8b2f7320759927c826e663ba1a77eaf8156bad1422234d5282c17c5e8f637
190+
export const GPX_HOOKS = '0x4519e2b040ff1b64fa03abe2aef0bc99d7cceaa8'
191+
192+
// example pool: https://app.uniswap.org/explore/pools/base/0x20aab1b33d63b7d6fc95deed43dfdf986a23a2d82857025533d2c18e2fef9e4b
193+
export const ARRAKIS_PRIVATE_HOOK_ON_BASE = '0xf9527fb5a34ac6fbc579e4fbc3bf292ed57d4880'
194+
// example pool: https://app.uniswap.org/explore/pools/ethereum/0x8679ef619b4ae7a464f8c208df1c49f294df41a237671d98882b50554c20a5c8
195+
export const ARRAKIS_PRIVATE_HOOK_ON_MAINNET = '0xf9527fb5a34ac6fbc579e4fbc3bf292ed57d4880'
196+
172197
// we do not allow v4 pools with non-zero hook address to be routed through in the initial v4 launch.
173198
// this is the ultimate safeguard in the routing subgraph pool cron job.
174199
export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } = {
@@ -182,6 +207,7 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
182207
// TOKENWORKS_HOOK_ON_MAINNET_3,
183208
TOKENWORKS_HOOK_ON_MAINNET_4,
184209
TOKENWORKS_HOOK_ON_MAINNET_5,
210+
STRATEGICRESERVE_HOOK_ON_MAINNET,
185211
ENS_WHEEL_HOOK_ON_MAINNET,
186212
ASTERIX_HOOK_ADDRESS_ON_MAINNET,
187213
ACTION_HOOK_ON_MAINNET,
@@ -197,6 +223,8 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
197223
RING_FEW_WEETH_HOOK_ON_MAINNET,
198224
RING_FEW_WSTETH_HOOK_ON_MAINNET,
199225
MEME_STRATEGY_HOOK_ON_MAINNET,
226+
TOKEN_FLOW_TAX_HOOK_ON_MAINNET,
227+
ARRAKIS_PRIVATE_HOOK_ON_MAINNET,
200228
],
201229
[ChainId.GOERLI]: [ADDRESS_ZERO],
202230
[ChainId.SEPOLIA]: [ADDRESS_ZERO, extraHooksAddressesOnSepolia, FEY_ON_SEPOLIA],
@@ -220,7 +248,7 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
220248
[ChainId.GNOSIS]: [ADDRESS_ZERO],
221249
[ChainId.MOONBEAM]: [ADDRESS_ZERO],
222250
[ChainId.BNB]: [ADDRESS_ZERO],
223-
[ChainId.AVALANCHE]: [ADDRESS_ZERO],
251+
[ChainId.AVALANCHE]: [ADDRESS_ZERO, AVAXSTRATEGIES_STATIC_FEE_HOOKS_ADDRESS_ON_AVAX],
224252
[ChainId.BASE_GOERLI]: [ADDRESS_ZERO],
225253
[ChainId.BASE_SEPOLIA]: [ADDRESS_ZERO],
226254
[ChainId.BASE]: [
@@ -268,6 +296,10 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
268296
WASSBLASTER_HOOK_ON_BASE,
269297
AEGIS_V3,
270298
FARSTR_HOOKS_ADDRESS_ON_BASE,
299+
ARTACLE_INDEX_TOKEN_HOOK_ON_BASE,
300+
GPO_HOOKS,
301+
GPX_HOOKS,
302+
ARRAKIS_PRIVATE_HOOK_ON_BASE,
271303
],
272304
[ChainId.ZORA]: [ADDRESS_ZERO],
273305
[ChainId.ZORA_SEPOLIA]: [ADDRESS_ZERO],
@@ -288,6 +320,7 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
288320
LIMIT_ORDER_HOOKS_ADDRESS_ON_UNICHAIN,
289321
PANOPTIC_ORACLE_HOOK_ON_UNICHAIN,
290322
UNIDERP_HOOK_ON_UNICHAIN,
323+
UNIVERSAL_HOOK_ON_UNICHAIN,
291324
],
292325
[ChainId.MONAD_TESTNET]: [ADDRESS_ZERO],
293326
[ChainId.MONAD]: [

0 commit comments

Comments
 (0)