From 41142e47d01993a531910c28938622ec11bcdb1e Mon Sep 17 00:00:00 2001 From: tbtstl Date: Thu, 22 Feb 2024 11:36:50 -0500 Subject: [PATCH] [feat] Zora Support --- src/providers/v3/subgraph-provider.ts | 1 + src/util/addresses.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/providers/v3/subgraph-provider.ts b/src/providers/v3/subgraph-provider.ts index 1eaf9d8d5..b37dfcf31 100644 --- a/src/providers/v3/subgraph-provider.ts +++ b/src/providers/v3/subgraph-provider.ts @@ -67,6 +67,7 @@ const SUBGRAPH_URL_BY_CHAIN: { [chainId in ChainId]?: string } = { 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax', [ChainId.BASE]: 'https://api.studio.thegraph.com/query/48211/uniswap-v3-base/version/latest', + [ChainId.ZORA]: 'https://api.goldsky.com/api/public/project_clhk16b61ay9t49vm6ntn4mkz/subgraphs/uniswap-zora-mainnet/v1.0.0/gn' }; const PAGE_SIZE = 1000; // 1k is max possible query size from subgraph. diff --git a/src/util/addresses.ts b/src/util/addresses.ts index 1c13f4cc8..b26709b9f 100644 --- a/src/util/addresses.ts +++ b/src/util/addresses.ts @@ -33,6 +33,7 @@ export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { [ChainId.BASE_GOERLI]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE_GOERLI].v3CoreFactoryAddress, [ChainId.BASE]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE].v3CoreFactoryAddress, + [ChainId.ZORA]: CHAIN_TO_ADDRESSES_MAP[ChainId.ZORA].v3CoreFactoryAddress, // TODO: Gnosis + Moonbeam contracts to be deployed }; @@ -55,6 +56,7 @@ export const QUOTER_V2_ADDRESSES: AddressMap = { [ChainId.BASE_GOERLI]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE_GOERLI].quoterAddress, [ChainId.BASE]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE].quoterAddress, + [ChainId.ZORA]: CHAIN_TO_ADDRESSES_MAP[ChainId.ZORA].quoterAddress, // TODO: Gnosis + Moonbeam contracts to be deployed }; @@ -85,6 +87,7 @@ export const UNISWAP_MULTICALL_ADDRESSES: AddressMap = { [ChainId.BASE_GOERLI]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE_GOERLI].multicallAddress, [ChainId.BASE]: CHAIN_TO_ADDRESSES_MAP[ChainId.BASE].multicallAddress, + [ChainId.ZORA]: CHAIN_TO_ADDRESSES_MAP[ChainId.ZORA].multicallAddress, // TODO: Gnosis + Moonbeam contracts to be deployed }; @@ -212,6 +215,13 @@ export const WETH9: { 'WETH', 'Wrapped Ether' ), + [ChainId.ZORA]: new Token( + ChainId.ZORA, + '0x4200000000000000000000000000000000000006', + 18, + 'WETH', + 'Wrapped Ether' + ), }; export const BEACON_CHAIN_DEPOSIT_ADDRESS =