From 4adbb7517b37bf6ff20625a59b283fac7cf9bf38 Mon Sep 17 00:00:00 2001 From: Alex Miao Date: Tue, 14 Nov 2023 11:53:45 -0800 Subject: [PATCH] feat: add base sepolia and opt sepolia --- packages/accounts/src/light-account/utils.ts | 4 ++++ packages/alchemy/src/chains.ts | 6 +++++- packages/core/src/utils/defaults.ts | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/accounts/src/light-account/utils.ts b/packages/accounts/src/light-account/utils.ts index 6814c13f8b..804b26ac3b 100644 --- a/packages/accounts/src/light-account/utils.ts +++ b/packages/accounts/src/light-account/utils.ts @@ -5,10 +5,12 @@ import { arbitrumSepolia, base, baseGoerli, + baseSepolia, goerli, mainnet, optimism, optimismGoerli, + optimismSepolia, polygon, polygonMumbai, sepolia, @@ -30,11 +32,13 @@ export const getDefaultLightAccountFactoryAddress = (chain: Chain): Address => { case polygonMumbai.id: case optimism.id: case optimismGoerli.id: + case optimismSepolia.id: case arbitrum.id: case arbitrumGoerli.id: case arbitrumSepolia.id: case base.id: case baseGoerli.id: + case baseSepolia.id: return "0x00000055C0b4fA41dde26A74435ff03692292FBD"; } throw new Error( diff --git a/packages/alchemy/src/chains.ts b/packages/alchemy/src/chains.ts index 3da115c560..a88dd6c736 100644 --- a/packages/alchemy/src/chains.ts +++ b/packages/alchemy/src/chains.ts @@ -2,16 +2,18 @@ import type { Chain } from "viem"; import { arbitrum, arbitrumGoerli, + arbitrumSepolia, goerli, mainnet, optimism, optimismGoerli, + optimismSepolia, polygon, polygonMumbai, sepolia, base, baseGoerli, - arbitrumSepolia, + baseSepolia, } from "viem/chains"; export const SupportedChains = new Map([ @@ -25,6 +27,8 @@ export const SupportedChains = new Map([ [arbitrum.id, arbitrum], [optimism.id, optimism], [optimismGoerli.id, optimismGoerli], + [optimismSepolia.id, optimismSepolia], [base.id, base], [baseGoerli.id, baseGoerli], + [baseSepolia.id, baseSepolia], ]); diff --git a/packages/core/src/utils/defaults.ts b/packages/core/src/utils/defaults.ts index 2fbcc6ebac..8b490f0e2e 100644 --- a/packages/core/src/utils/defaults.ts +++ b/packages/core/src/utils/defaults.ts @@ -5,10 +5,12 @@ import { arbitrumSepolia, base, baseGoerli, + baseSepolia, goerli, mainnet, optimism, optimismGoerli, + optimismSepolia, polygon, polygonMumbai, sepolia, @@ -30,11 +32,13 @@ export const getDefaultEntryPointAddress = (chain: Chain): Address => { case polygonMumbai.id: case optimism.id: case optimismGoerli.id: + case optimismSepolia.id: case arbitrum.id: case arbitrumGoerli.id: case arbitrumSepolia.id: case base.id: case baseGoerli.id: + case baseSepolia.id: return "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"; } throw new Error( @@ -56,9 +60,11 @@ export const getDefaultSimpleAccountFactoryAddress = ( case mainnet.id: case polygon.id: case optimism.id: + case optimismSepolia.id: case arbitrum.id: case base.id: case baseGoerli.id: + case baseSepolia.id: case arbitrumSepolia.id: return "0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232"; case sepolia.id: