From fb6da93d357775db303a5dc81a704d2cde7b5aff Mon Sep 17 00:00:00 2001 From: tbtstl Date: Thu, 22 Feb 2024 11:26:16 -0500 Subject: [PATCH] [feat] add Zora Network and Zora Sepolia Support --- src/addresses.ts | 23 ++++++++++++++++++++++- src/chains.ts | 8 ++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/addresses.ts b/src/addresses.ts index 960264e5..a4ef58d5 100644 --- a/src/addresses.ts +++ b/src/addresses.ts @@ -192,6 +192,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', +} + export const CHAIN_TO_ADDRESSES_MAP: Record = { [ChainId.MAINNET]: MAINNET_ADDRESSES, [ChainId.OPTIMISM]: OPTIMISM_ADDRESSES, @@ -209,7 +228,9 @@ export const CHAIN_TO_ADDRESSES_MAP: Record [ChainId.SEPOLIA]: SEPOLIA_ADDRESSES, [ChainId.AVALANCHE]: AVALANCHE_ADDRESSES, [ChainId.BASE]: BASE_ADDRESSES, - [ChainId.BASE_GOERLI]: BASE_GOERLI_ADDRESSES + [ChainId.BASE_GOERLI]: BASE_GOERLI_ADDRESSES, + [ChainId.ZORA]: ZORA_ADDRESSES, + [ChainId.ZORA_SEPOLIA]: ZORA_SEPOLIA_ADDRESSES, } /* V3 Contract Addresses */ diff --git a/src/chains.ts b/src/chains.ts index 1ccee823..4b2e6390 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -17,7 +17,9 @@ export enum ChainId { BNB = 56, AVALANCHE = 43114, BASE_GOERLI = 84531, - BASE = 8453 + BASE = 8453, + ZORA = 7777777, + ZORA_SEPOLIA = 999999999, } export const SUPPORTED_CHAINS = [ @@ -37,7 +39,9 @@ export const SUPPORTED_CHAINS = [ ChainId.BNB, ChainId.AVALANCHE, ChainId.BASE, - ChainId.BASE_GOERLI + ChainId.BASE_GOERLI, + ChainId.ZORA, + ChainId.ZORA_SEPOLIA, ] as const export type SupportedChainsType = typeof SUPPORTED_CHAINS[number]