11import { useAppKitProvider } from "@reown/appkit/vue" ;
2- import { type Address , createPublicClient , createWalletClient , custom , type Hex , http , publicActions , walletActions } from "viem" ;
2+ import { type Address , createPublicClient , createWalletClient , custom , defineChain , type Hex , http , publicActions , walletActions } from "viem" ;
33import { createBundlerClient } from "viem/account-abstraction" ;
44import { /* generatePrivateKey, */ privateKeyToAccount } from "viem/accounts" ;
5- import { localhost , sepolia } from "viem/chains" ;
5+ import { localhost } from "viem/chains" ;
66import { 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";
1111import localChainData from "./local-node.json" ;
1212
13- export const supportedChains = [ localhost , sepolia ] ;
13+ const zksyncOsTestnet = defineChain ( {
14+ id : 8022833 ,
15+ name : "ZKsyncOS Testnet" ,
16+ nativeCurrency : {
17+ name : "Ether" ,
18+ symbol : "ETH" ,
19+ decimals : 18 ,
20+ } ,
21+ rpcUrls : {
22+ default : {
23+ http : [ "https://zksync-os-testnet-alpha.zksync.dev" ] ,
24+ } ,
25+ } ,
26+ blockExplorers : {
27+ default : {
28+ name : "ZKsyncOS Testnet Explorer" ,
29+ url : "https://zksync-os-testnet-alpha.staging-scan-v2.zksync.dev" ,
30+ } ,
31+ } ,
32+ } ) ;
33+
34+ export const supportedChains = [ localhost , zksyncOsTestnet ] ;
1435export type SupportedChainId = ( typeof supportedChains ) [ number ] [ "id" ] ;
1536export const blockExplorerUrlByChain : Record < SupportedChainId , string > = {
1637 [ localhost . id ] : "http://localhost:3010" ,
17- [ sepolia . id ] : "https://sepolia.etherscan.io " ,
38+ [ zksyncOsTestnet . id ] : "https://zksync-os-testnet-alpha.staging-scan-v2.zksync.dev " ,
1839} ;
1940export const blockExplorerApiByChain : Record < SupportedChainId , string > = {
2041 [ localhost . id ] : "http://localhost:3020" ,
21- [ sepolia . id ] : "https://api-sepolia.etherscan.io /api" ,
42+ [ zksyncOsTestnet . id ] : "https://block-explorer- api.zksync-os-testnet-alpha.zksync.dev /api" ,
2243} ;
2344
2445type ChainContracts = {
@@ -32,22 +53,22 @@ type ChainContracts = {
3253
3354export const contractsByChain : Record < SupportedChainId , ChainContracts > = {
3455 [ localhost . id ] : localChainData as ChainContracts ,
35- [ sepolia . id ] : {
36- eoaValidator : "0x027ce1d8244318e38c3B65E3EABC2537BD712077 " ,
37- webauthnValidator : "0xAbcB5AB6eBb69F4F5F8cf1a493F56Ad3d28562bd " ,
38- sessionValidator : "0x09fbd5b956AF5c64C7eB4fb473E7E64DAF0f79D7 " ,
39- factory : "0xF33128d7Cd2ab37Af12B3a22D9dA79f928c2B450 " ,
56+ [ zksyncOsTestnet . id ] : {
57+ eoaValidator : "0x3497392f9662Da3de1EC2AfE8724CdBF6b884088 " ,
58+ webauthnValidator : "0xa5C2c5C723239C0cD11a5691954CdAC4369C874b " ,
59+ sessionValidator : "0x2bF3B894aA2C13A1545C6982bBbee435B5168b52 " ,
60+ factory : "0x757b5c9854d327A6B76840c996dfAac0F6b3Dc1f " ,
4061 bundlerUrl : "https://bundler-api.stage-sso.zksync.dev" ,
41- beacon : "0xd1Ab9B640995124D3FD311d70BA4F216AD5b1aD5 " ,
62+ beacon : "0x1D779D791B55a093dE60da664C3F301a87f96C62 " ,
4263 } ,
4364} ;
4465
4566export const chainParameters : Record < SupportedChainId , { blockTime : number } > = {
4667 [ localhost . id ] : {
4768 blockTime : 1 ,
4869 } ,
49- [ sepolia . id ] : {
50- blockTime : 12 ,
70+ [ zksyncOsTestnet . id ] : {
71+ blockTime : 1 ,
5172 } ,
5273} ;
5374
0 commit comments