Skip to content

Commit

Permalink
feat: add base sepolia and opt sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-miao committed Nov 14, 2023
1 parent c30760b commit 4adbb75
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/accounts/src/light-account/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import {
arbitrumSepolia,
base,
baseGoerli,
baseSepolia,
goerli,
mainnet,
optimism,
optimismGoerli,
optimismSepolia,
polygon,
polygonMumbai,
sepolia,
Expand All @@ -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(
Expand Down
6 changes: 5 additions & 1 deletion packages/alchemy/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number, Chain>([
Expand All @@ -25,6 +27,8 @@ export const SupportedChains = new Map<number, Chain>([
[arbitrum.id, arbitrum],
[optimism.id, optimism],
[optimismGoerli.id, optimismGoerli],
[optimismSepolia.id, optimismSepolia],
[base.id, base],
[baseGoerli.id, baseGoerli],
[baseSepolia.id, baseSepolia],
]);
6 changes: 6 additions & 0 deletions packages/core/src/utils/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import {
arbitrumSepolia,
base,
baseGoerli,
baseSepolia,
goerli,
mainnet,
optimism,
optimismGoerli,
optimismSepolia,
polygon,
polygonMumbai,
sepolia,
Expand All @@ -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(
Expand All @@ -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:
Expand Down

0 comments on commit 4adbb75

Please sign in to comment.