Skip to content

Commit 725e697

Browse files
committed
fix: add sepolia
1 parent 4f19550 commit 725e697

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/deploy-auth-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Build apps
6161
env:
62-
NUXT_PUBLIC_DEFAULT_CHAIN_ID: 300
62+
NUXT_PUBLIC_DEFAULT_CHAIN_ID: 11155111
6363
NUXT_PUBLIC_SALT_SERVICE_URL: "https://sso-oidc.zksync.dev/salt"
6464
run: pnpm nx build auth-server
6565

packages/auth-server/stores/client.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ import { useAppKitProvider } from "@reown/appkit/vue";
22
import { type Address, createPublicClient, createWalletClient, custom, type Hex, http, publicActions, walletActions } from "viem";
33
import { createBundlerClient } from "viem/account-abstraction";
44
import { /* generatePrivateKey, */ privateKeyToAccount } from "viem/accounts";
5-
import { localhost } from "viem/chains";
5+
import { localhost, sepolia } from "viem/chains";
66
import { createPasskeyClient } from "zksync-sso-4337/client";
77

88
// TODO: OIDC and guardian recovery are not yet available in sdk-4337
99
// import { createZkSyncOidcClient, type ZkSyncSsoClient } from "zksync-sso/client/oidc";
1010
// import { createZksyncRecoveryGuardianClient } from "zksync-sso/client/recovery";
1111
import localChainData from "./local-node.json";
1212

13-
export const supportedChains = [localhost];
13+
export const supportedChains = [localhost, sepolia];
1414
export type SupportedChainId = (typeof supportedChains)[number]["id"];
1515
export const blockExplorerUrlByChain: Record<SupportedChainId, string> = {
1616
[localhost.id]: "http://localhost:3010",
17+
[sepolia.id]: "https://sepolia.etherscan.io",
1718
};
1819
export const blockExplorerApiByChain: Record<SupportedChainId, string> = {
1920
[localhost.id]: "http://localhost:3020",
21+
[sepolia.id]: "https://api-sepolia.etherscan.io/api",
2022
};
2123

2224
type ChainContracts = {
@@ -30,12 +32,23 @@ type ChainContracts = {
3032

3133
export const contractsByChain: Record<SupportedChainId, ChainContracts> = {
3234
[localhost.id]: localChainData as ChainContracts,
35+
[sepolia.id]: {
36+
eoaValidator: "0x027ce1d8244318e38c3B65E3EABC2537BD712077",
37+
webauthnValidator: "0xAbcB5AB6eBb69F4F5F8cf1a493F56Ad3d28562bd",
38+
sessionValidator: "0x09fbd5b956AF5c64C7eB4fb473E7E64DAF0f79D7",
39+
factory: "0xF33128d7Cd2ab37Af12B3a22D9dA79f928c2B450",
40+
bundlerUrl: "https://bundler-api.sso.zksync.dev",
41+
beacon: "0xd1Ab9B640995124D3FD311d70BA4F216AD5b1aD5",
42+
},
3343
};
3444

3545
export const chainParameters: Record<SupportedChainId, { blockTime: number }> = {
3646
[localhost.id]: {
3747
blockTime: 1,
3848
},
49+
[sepolia.id]: {
50+
blockTime: 12,
51+
},
3952
};
4053

4154
export const useClientStore = defineStore("client", () => {

0 commit comments

Comments
 (0)