From 439815e1d989e0c41ce889d337a506246359e8c0 Mon Sep 17 00:00:00 2001
From: Tyson Battistella <tysonbattistella@gmail.com>
Date: Tue, 27 Feb 2024 16:57:00 -0500
Subject: [PATCH] [feat] add Zora Network and Zora Sepolia Support (#121)

---
 src/addresses.ts | 21 +++++++++++++++++++++
 src/chains.ts    |  8 ++++++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/addresses.ts b/src/addresses.ts
index c48461ac..19cfd5ce 100644
--- a/src/addresses.ts
+++ b/src/addresses.ts
@@ -195,6 +195,25 @@ const BASE_GOERLI_ADDRESSES: ChainAddresses = {
   swapRouter02Address: '0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d'
 }
 
+const ZORA_ADDRESSES: ChainAddresses = {
+  v3CoreFactoryAddress: '0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb',
+  multicallAddress: '0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15',
+  quoterAddress: '0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df',
+  v3MigratorAddress: '0x048352d8dCF13686982C799da63fA6426a9D0b60',
+  nonfungiblePositionManagerAddress: '0xbC91e8DfA3fF18De43853372A3d7dfe585137D78',
+  tickLensAddress: '0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044',
+  swapRouter02Address: '0x7De04c96BE5159c3b5CeffC82aa176dc81281557'
+}
+
+const ZORA_SEPOLIA_ADDRESSES: ChainAddresses = {
+  v3CoreFactoryAddress: '0x4324A677D74764f46f33ED447964252441aA8Db6',
+  multicallAddress: '0xA1E7e3A69671C4494EC59Dbd442de930a93F911A',
+  quoterAddress: '0xC195976fEF0985886E37036E2DF62bF371E12Df0',
+  v3MigratorAddress: '0x65ef259b31bf1d977c37e9434658694267674897',
+  nonfungiblePositionManagerAddress: '0xB8458EaAe43292e3c1F7994EFd016bd653d23c20',
+  tickLensAddress: '0x23C0F71877a1Fc4e20A78018f9831365c85f3064',
+}
+
 const ROOTSTOCK_ADDRESSES: ChainAddresses = {
   v3CoreFactoryAddress: '0xaF37EC98A00FD63689CF3060BF3B6784E00caD82',
   multicallAddress: '0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386',
@@ -223,6 +242,8 @@ export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>
   [ChainId.AVALANCHE]: AVALANCHE_ADDRESSES,
   [ChainId.BASE]: BASE_ADDRESSES,
   [ChainId.BASE_GOERLI]: BASE_GOERLI_ADDRESSES,
+  [ChainId.ZORA]: ZORA_ADDRESSES,
+  [ChainId.ZORA_SEPOLIA]: ZORA_SEPOLIA_ADDRESSES,
   [ChainId.ROOTSTOCK]: ROOTSTOCK_ADDRESSES
 }
 
diff --git a/src/chains.ts b/src/chains.ts
index c90c80d0..882d777c 100644
--- a/src/chains.ts
+++ b/src/chains.ts
@@ -18,7 +18,9 @@ export enum ChainId {
   AVALANCHE = 43114,
   BASE_GOERLI = 84531,
   BASE = 8453,
-  ROOTSTOCK = 30
+  ZORA = 7777777,
+  ZORA_SEPOLIA = 999999999,
+  ROOTSTOCK = 30,
 }
 
 export const SUPPORTED_CHAINS = [
@@ -39,7 +41,9 @@ export const SUPPORTED_CHAINS = [
   ChainId.AVALANCHE,
   ChainId.BASE,
   ChainId.BASE_GOERLI,
-  ChainId.ROOTSTOCK
+  ChainId.ZORA,
+  ChainId.ZORA_SEPOLIA,
+  ChainId.ROOTSTOCK,
 ] as const
 export type SupportedChainsType = typeof SUPPORTED_CHAINS[number]