From 58caabdce38e584097b01a4c17a660624caa012f Mon Sep 17 00:00:00 2001 From: eagle Date: Fri, 16 Feb 2024 19:32:41 +0530 Subject: [PATCH] Add sepolia in manager & explorer (#2947) * feat: add sepolia to common * feat: add sepolia in explorer and manager * fix: build issues * chore: fix issues * fix: logo issue --- packages/builder/.env.example | 1 + packages/builder/.env.test | 1 + packages/builder/src/utils/chains.ts | 1 + packages/common/.env.test | 3 +- packages/common/src/allo/addresses/allo-v1.ts | 7 +++++ packages/common/src/chain-ids.ts | 1 + packages/common/src/config.ts | 3 ++ packages/common/src/graphql_fetch.ts | 1 + packages/common/src/payoutTokens.ts | 21 +++++++++++++ packages/grant-explorer/.env.example | 1 + packages/grant-explorer/.env.test | 1 + .../grant-explorer/src/app/chainConfig.ts | 2 ++ .../src/features/api/contracts.ts | 1 + .../grant-explorer/src/features/api/utils.ts | 30 +++++++++++++++++++ packages/round-manager/.env.example | 1 + packages/round-manager/.env.test | 3 +- packages/round-manager/src/app/wagmi.ts | 2 ++ .../src/features/api/contracts.ts | 11 +++++++ .../src/features/api/payoutTokens.ts | 21 +++++++++++++ .../round-manager/src/features/api/utils.ts | 5 ++++ 20 files changed, 115 insertions(+), 2 deletions(-) diff --git a/packages/builder/.env.example b/packages/builder/.env.example index daedc99ebc..ba79cd8a00 100644 --- a/packages/builder/.env.example +++ b/packages/builder/.env.example @@ -82,6 +82,7 @@ REACT_APP_SUBGRAPH_POLYGON_MUMBAI_API="https://api.thegraph.com/subgraphs/name/a REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-testnet" REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2" REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” # -------------------------------- # Optional for local development diff --git a/packages/builder/.env.test b/packages/builder/.env.test index 4145d1c963..56ad709d51 100644 --- a/packages/builder/.env.test +++ b/packages/builder/.env.test @@ -17,6 +17,7 @@ REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/g REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2" REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev" REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” REACT_APP_PINATA_GATEWAY="https://pinata-gateway.com" REACT_APP_PINATA_JWT="abcedfg" diff --git a/packages/builder/src/utils/chains.ts b/packages/builder/src/utils/chains.ts index 9315946fe7..bc875bb5d3 100644 --- a/packages/builder/src/utils/chains.ts +++ b/packages/builder/src/utils/chains.ts @@ -62,6 +62,7 @@ const stagingChains = [ avalancheFuji, zkSyncEraMainnet, zkSyncEraTestnet, + sepolia, ]; const productionChains = [ diff --git a/packages/common/.env.test b/packages/common/.env.test index ce2e8a77c2..a218f09e8b 100644 --- a/packages/common/.env.test +++ b/packages/common/.env.test @@ -17,4 +17,5 @@ REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/g REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2" REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev" REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" -REACT_APP_ALLO_API_URL="https://indexer-staging.fly.dev/graphql" \ No newline at end of file +REACT_APP_ALLO_API_URL="https://indexer-staging.fly.dev/graphql" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” \ No newline at end of file diff --git a/packages/common/src/allo/addresses/allo-v1.ts b/packages/common/src/allo/addresses/allo-v1.ts index 1aa41229e4..d6352885cc 100644 --- a/packages/common/src/allo/addresses/allo-v1.ts +++ b/packages/common/src/allo/addresses/allo-v1.ts @@ -29,6 +29,7 @@ export const projectRegistryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0xb0F4882184EB6e3ed120c5181651D50719329788", [ChainId.BASE]: "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918", + [ChainId.SEPOLIA]: "0x2420EABfA2C0e6f77E435B0B7615c848bF4963AF", }; export const programFactoryMap: ChainIdToStringMap = { @@ -54,6 +55,7 @@ export const programFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x6D341814Be4E2316142D9190E390b494F1dECFAf", [ChainId.BASE]: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + [ChainId.SEPOLIA]: "0x79Ba35cb31620db1b5b101A9A13A1b0A82B5BC9e", }; export const roundFactoryMap: ChainIdToStringMap = { @@ -79,6 +81,7 @@ export const roundFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x0Bb6e2dfEaef0Db5809B3979717E99e053Cbae72", [ChainId.BASE]: "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", + [ChainId.SEPOLIA]: "0xF1d4F5f21746bCD75fD71eB18992443f4F0edb6f", }; export const qfVotingStrategyFactoryMap: ChainIdToStringMap = { @@ -104,6 +107,7 @@ export const qfVotingStrategyFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x8c28F21D2d8C53eedC58bF9cdCfb7DCF7d809d97", [ChainId.BASE]: "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + [ChainId.SEPOLIA]: "0xf5D111B57de221774866AC32c4435841F5c141D5", }; export const dgVotingStrategyDummyContractMap: ChainIdToStringMap = { @@ -129,6 +133,7 @@ export const dgVotingStrategyDummyContractMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x0c0B71BA1427cb46424d38133E8187365Cc5466b", [ChainId.BASE]: "0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27", + [ChainId.SEPOLIA]: "0xB9dDcd73278C7f472867bf3D844E2Cc53a3d3D90", }; export const merklePayoutStrategyFactoryMap: ChainIdToStringMap = { @@ -154,6 +159,7 @@ export const merklePayoutStrategyFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0xbA160C13F8F626e3232078aDFD6eD2f2B2289563", [ChainId.BASE]: "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + [ChainId.SEPOLIA]: "0xB5CF3fFD3BDfC6A124aa9dD96fE14118Ed8083e5", }; export const directPayoutStrategyFactoryContractMap: ChainIdToStringMap = { @@ -179,4 +185,5 @@ export const directPayoutStrategyFactoryContractMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x4170665B31bC10009f8a69CeaACf3265C3d66797", [ChainId.BASE]: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + [ChainId.SEPOLIA]: "0xC2B0d8dAdB88100d8509534BB8B5778d1901037d", }; diff --git a/packages/common/src/chain-ids.ts b/packages/common/src/chain-ids.ts index 25acf07774..e54bf756d3 100644 --- a/packages/common/src/chain-ids.ts +++ b/packages/common/src/chain-ids.ts @@ -16,6 +16,7 @@ export enum ChainId { BASE = 8453, DEV1 = 313371, DEV2 = 313372, + SEPOLIA = 11155111, } export const RedstoneTokenIds = { diff --git a/packages/common/src/config.ts b/packages/common/src/config.ts index e34f48bbab..eecc8663ea 100644 --- a/packages/common/src/config.ts +++ b/packages/common/src/config.ts @@ -156,6 +156,9 @@ export function getConfig(): Config { [ChainId.BASE]: z .string() .parse(process.env.REACT_APP_SUBGRAPH_BASE_API), + [ChainId.SEPOLIA]: z + .string() + .parse(process.env.REACT_APP_SUBGRAPH_SEPOLIA_API), }, gsIndexerEndpoint: z .string() diff --git a/packages/common/src/graphql_fetch.ts b/packages/common/src/graphql_fetch.ts index e95e352869..30d8460c0d 100644 --- a/packages/common/src/graphql_fetch.ts +++ b/packages/common/src/graphql_fetch.ts @@ -70,4 +70,5 @@ export const graphQlEndpoints: Record = { [ChainId.ZKSYNC_ERA_MAINNET_CHAIN_ID]: process.env.REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API!, [ChainId.BASE]: process.env.REACT_APP_SUBGRAPH_BASE_API!, + [ChainId.SEPOLIA]: process.env.REACT_APP_SUBGRAPH_SEPOLIA_API!, }; diff --git a/packages/common/src/payoutTokens.ts b/packages/common/src/payoutTokens.ts index 15767c2e55..f8544f112f 100644 --- a/packages/common/src/payoutTokens.ts +++ b/packages/common/src/payoutTokens.ts @@ -65,6 +65,26 @@ const MAINNET_TOKENS: PayoutToken[] = [ redstoneTokenId: RedstoneTokenIds["mkUSD"], }, ]; + +const SEPOLIA_TOKENS: PayoutToken[] = [ + { + name: "ETH", + chainId: ChainId.SEPOLIA, + address: ethers.constants.AddressZero, + decimal: 18, + logo: TokenNamesAndLogos["ETH"], + redstoneTokenId: RedstoneTokenIds["ETH"], + }, + { + name: "DAI", + chainId: ChainId.SEPOLIA, + address: "0x8db0F9eE54753B91ec1d81Bf68074Be82ED30fEb", + decimal: 18, + logo: TokenNamesAndLogos["DAI"], + redstoneTokenId: RedstoneTokenIds["DAI"], + }, +]; + const OPTIMISM_MAINNET_TOKENS: PayoutToken[] = [ { name: "DAI", @@ -408,6 +428,7 @@ export const payoutTokens = [ ...ZKSYNC_ERA_MAINNET_TOKENS, ...ZKSYNC_ERA_TESTNET_TOKENS, ...BASE_TOKENS, + ...SEPOLIA_TOKENS, ]; export const getPayoutTokenOptions = (chainId: ChainId): PayoutToken[] => { diff --git a/packages/grant-explorer/.env.example b/packages/grant-explorer/.env.example index d0b76eff44..d30b4e7e86 100644 --- a/packages/grant-explorer/.env.example +++ b/packages/grant-explorer/.env.example @@ -44,6 +44,7 @@ REACT_APP_SUBGRAPH_POLYGON_MUMBAI_API="https://api.thegraph.com/subgraphs/name/a REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-testnet" REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-mainnet" REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” # Variables below are optional for local development REACT_APP_DATADOG_APPLICATION_ID= diff --git a/packages/grant-explorer/.env.test b/packages/grant-explorer/.env.test index 5d0cf4bfa1..834dfc9b30 100644 --- a/packages/grant-explorer/.env.test +++ b/packages/grant-explorer/.env.test @@ -18,3 +18,4 @@ REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/453 REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev" REACT_APP_ENV="test" REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” \ No newline at end of file diff --git a/packages/grant-explorer/src/app/chainConfig.ts b/packages/grant-explorer/src/app/chainConfig.ts index 45019edbc0..f6d7b2c7ea 100644 --- a/packages/grant-explorer/src/app/chainConfig.ts +++ b/packages/grant-explorer/src/app/chainConfig.ts @@ -16,6 +16,7 @@ import { base, zkSyncEraMainnet, zkSyncEraTestnet, + sepolia, } from "common/src/chains"; import { ChainId } from "common/src/chain-ids"; @@ -34,6 +35,7 @@ const TESTNET_CHAINS = [ avalancheFuji, polygonMumbai, zkSyncEraTestnet, + sepolia, ].map(ensureValidChainId); const MAINNET_CHAINS = [ diff --git a/packages/grant-explorer/src/features/api/contracts.ts b/packages/grant-explorer/src/features/api/contracts.ts index 4362147fec..2e75b86fa7 100644 --- a/packages/grant-explorer/src/features/api/contracts.ts +++ b/packages/grant-explorer/src/features/api/contracts.ts @@ -25,4 +25,5 @@ export const MRC_CONTRACTS: Record = { [ChainId.ZKSYNC_ERA_MAINNET_CHAIN_ID]: "0x88e91283d97A482A9e0851dE335d58D97dCfF7b0", [ChainId.BASE]: "0x7C24f3494CC958CF268a92b45D7e54310d161794", + [ChainId.SEPOLIA]: "0xa54A0c7Bcd37745f7F5817e06b07E2563a07E309", }; diff --git a/packages/grant-explorer/src/features/api/utils.ts b/packages/grant-explorer/src/features/api/utils.ts index ec12d48ee6..60abd75669 100644 --- a/packages/grant-explorer/src/features/api/utils.ts +++ b/packages/grant-explorer/src/features/api/utils.ts @@ -117,6 +117,11 @@ export const CHAINS: Record< name: "Base", logo: "./logos/base-logo.svg", }, + [ChainId.SEPOLIA]: { + id: ChainId.SEPOLIA, + name: "Sepolia", + logo: "./logos/ethereum-eth-logo.svg", + }, }; export const TokenNamesAndLogos = { @@ -161,6 +166,29 @@ export const MAINNET_TOKENS: VotingToken[] = [ }, ]; +export const SEPOLIA_TOKENS: VotingToken[] = [ + { + name: "ETH", + chainId: ChainId.SEPOLIA, + address: zeroAddress, + decimal: 18, + logo: TokenNamesAndLogos["ETH"], + redstoneTokenId: RedstoneTokenIds["ETH"], + defaultForVoting: true, + canVote: true, + }, + { + name: "DAI", + chainId: ChainId.SEPOLIA, + address: "0x8db0F9eE54753B91ec1d81Bf68074Be82ED30fEb", + decimal: 18, + logo: TokenNamesAndLogos["DAI"], + redstoneTokenId: RedstoneTokenIds["DAI"], + defaultForVoting: false, + canVote: true, + }, +]; + export const OPTIMISM_MAINNET_TOKENS: VotingToken[] = [ { name: "DAI", @@ -589,6 +617,7 @@ export const votingTokensMap: VotingTokensMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: ZKSYNC_ERA_TESTNET_TOKENS, [ChainId.ZKSYNC_ERA_MAINNET_CHAIN_ID]: ZKSYNC_ERA_MAINNET_TOKENS, [ChainId.BASE]: BASE_TOKENS, + [ChainId.SEPOLIA]: SEPOLIA_TOKENS, }; export const getVotingTokenOptions = (chainId: ChainId): VotingToken[] => @@ -623,6 +652,7 @@ export const txExplorerLinks: Record = { "https://goerli.explorer.zksync.io/tx/", [ChainId.ZKSYNC_ERA_MAINNET_CHAIN_ID]: "https://explorer.zksync.io/tx/", [ChainId.BASE]: "https://basescan.org/tx/", + [ChainId.SEPOLIA]: "https://sepolia.etherscan.io//tx/", }; /** diff --git a/packages/round-manager/.env.example b/packages/round-manager/.env.example index e29de8b492..3d4e328067 100644 --- a/packages/round-manager/.env.example +++ b/packages/round-manager/.env.example @@ -51,6 +51,7 @@ REACT_APP_SUBGRAPH_POLYGON_API="https://api.thegraph.com/subgraphs/name/allo-pro REACT_APP_SUBGRAPH_POLYGON_MUMBAI_API="https://api.thegraph.com/subgraphs/name/allo-protocol/grants-round-mumbai" REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-testnet" REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” # Variables below are optional for local development REACT_APP_DATADOG_APPLICATION_ID= diff --git a/packages/round-manager/.env.test b/packages/round-manager/.env.test index 46bd7c8c3b..7086d589b1 100644 --- a/packages/round-manager/.env.test +++ b/packages/round-manager/.env.test @@ -16,4 +16,5 @@ REACT_APP_SUBGRAPH_POLYGON_MUMBAI_API="https://api.thegraph.com/subgraphs/name/a REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-testnet" REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2" REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev" -REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" \ No newline at end of file +REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1" +REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet” \ No newline at end of file diff --git a/packages/round-manager/src/app/wagmi.ts b/packages/round-manager/src/app/wagmi.ts index abeb275b3f..2581f8b4d4 100644 --- a/packages/round-manager/src/app/wagmi.ts +++ b/packages/round-manager/src/app/wagmi.ts @@ -28,6 +28,7 @@ import { base, zkSyncEraMainnet, zkSyncEraTestnet, + sepolia, } from "common/src/chains"; import { publicProvider } from "wagmi/providers/public"; import { infuraProvider } from "wagmi/providers/infura"; @@ -41,6 +42,7 @@ const testnetChains = () => { arbitrumGoerli, polygonMumbai, avalancheFuji, + sepolia, ]; }; diff --git a/packages/round-manager/src/features/api/contracts.ts b/packages/round-manager/src/features/api/contracts.ts index 06a91ca31a..5807b3969c 100644 --- a/packages/round-manager/src/features/api/contracts.ts +++ b/packages/round-manager/src/features/api/contracts.ts @@ -35,6 +35,7 @@ const projectRegistryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0xb0F4882184EB6e3ed120c5181651D50719329788", [ChainId.BASE]: "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918", + [ChainId.SEPOLIA]: "0x2420EABfA2C0e6f77E435B0B7615c848bF4963AF", }; /* GrantHub's ProjectRegistry */ @@ -76,6 +77,7 @@ const programFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x6D341814Be4E2316142D9190E390b494F1dECFAf", [ChainId.BASE]: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + [ChainId.SEPOLIA]: "0x79Ba35cb31620db1b5b101A9A13A1b0A82B5BC9e", }; /* ProgramFactory */ export const programFactoryContract = (chainId: ChainId): Contract => { @@ -111,6 +113,7 @@ const roundFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x0Bb6e2dfEaef0Db5809B3979717E99e053Cbae72", [ChainId.BASE]: "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", + [ChainId.SEPOLIA]: "0xF1d4F5f21746bCD75fD71eB18992443f4F0edb6f", }; /* RoundFactory */ export const roundFactoryContract = ( @@ -153,6 +156,7 @@ const qfVotingStrategyFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x8c28F21D2d8C53eedC58bF9cdCfb7DCF7d809d97", [ChainId.BASE]: "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + [ChainId.SEPOLIA]: "0xf5D111B57de221774866AC32c4435841F5c141D5", }; /* QuadraticFundingVotingStrategy */ export const qfVotingStrategyFactoryContract = ( @@ -238,6 +242,10 @@ export const dgVotingStrategyDummyContract = (chainId: ChainId): string => { address = "0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27"; break; } + case ChainId.SEPOLIA: { + address = "0xB9dDcd73278C7f472867bf3D844E2Cc53a3d3D90"; + break; + } default: { address = "0x717A2cCDD81944e64c8BD9BB1D179A241dE14B46"; break; @@ -273,6 +281,7 @@ const merklePayoutStrategyFactoryMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0xbA160C13F8F626e3232078aDFD6eD2f2B2289563", [ChainId.BASE]: "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + [ChainId.SEPOLIA]: "0xB5CF3fFD3BDfC6A124aa9dD96fE14118Ed8083e5", }; export const merklePayoutStrategyFactoryContract = ( chainId: ChainId @@ -309,6 +318,7 @@ const alloSettingsContractMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x0FD600678475C03f28baE59A2d55f7a911383e2B", [ChainId.BASE]: "", + [ChainId.SEPOLIA]: "", }; /* AlloSettingsContract */ @@ -347,6 +357,7 @@ const directPayoutStrategyFactoryContractMap: ChainIdToStringMap = { [ChainId.ZKSYNC_ERA_TESTNET_CHAIN_ID]: "0x4170665B31bC10009f8a69CeaACf3265C3d66797", [ChainId.BASE]: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + [ChainId.SEPOLIA]: "0xC2B0d8dAdB88100d8509534BB8B5778d1901037d", }; /* DirectPayoutStrategyFactoryContract */ diff --git a/packages/round-manager/src/features/api/payoutTokens.ts b/packages/round-manager/src/features/api/payoutTokens.ts index 5732ecf0dd..9a724abac8 100644 --- a/packages/round-manager/src/features/api/payoutTokens.ts +++ b/packages/round-manager/src/features/api/payoutTokens.ts @@ -67,6 +67,26 @@ const MAINNET_TOKENS: PayoutToken[] = [ redstoneTokenId: RedstoneTokenIds["mkUSD"], }, ]; + +const SEPOLIA_TOKENS: PayoutToken[] = [ + { + name: "ETH", + chainId: ChainId.SEPOLIA, + address: ethers.constants.AddressZero, + decimal: 18, + logo: TokenNamesAndLogos["ETH"], + redstoneTokenId: RedstoneTokenIds["ETH"], + }, + { + name: "DAI", + chainId: ChainId.SEPOLIA, + address: "0x8db0F9eE54753B91ec1d81Bf68074Be82ED30fEb", + decimal: 18, + logo: TokenNamesAndLogos["DAI"], + redstoneTokenId: RedstoneTokenIds["DAI"], + }, +]; + const OPTIMISM_MAINNET_TOKENS: PayoutToken[] = [ { name: "DAI", @@ -418,6 +438,7 @@ export const payoutTokens = [ ...ZKSYNC_ERA_MAINNET_TOKENS, ...ZKSYNC_ERA_TESTNET_TOKENS, ...BASE_TOKENS, + ...SEPOLIA_TOKENS, ]; export const getPayoutTokenOptions = (chainId: ChainId): PayoutToken[] => { diff --git a/packages/round-manager/src/features/api/utils.ts b/packages/round-manager/src/features/api/utils.ts index 2511dc5487..b0628d83f9 100644 --- a/packages/round-manager/src/features/api/utils.ts +++ b/packages/round-manager/src/features/api/utils.ts @@ -96,6 +96,11 @@ export const CHAINS: Record = { name: "zkSync Era Testnet", logo: "/logos/zksync-logo.svg", }, + [ChainId.SEPOLIA]: { + id: ChainId.SEPOLIA, + name: "Sepolia", + logo: "/logos/ethereum-eth-logo.svg", + }, }; export type SupportType = {