Skip to content

Commit 09c1003

Browse files
committed
feat: add addresses
also try to fix the server in prod
1 parent 09eb1d7 commit 09c1003

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

packages/auth-server/app.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ import { createAppKit } from "@reown/appkit/vue";
1010
const { defaultChain } = useClientStore();
1111
const { metadata, projectId, wagmiAdapter } = useAppKit();
1212
13-
createAppKit({
14-
adapters: [wagmiAdapter],
15-
networks: [defaultChain],
16-
projectId,
17-
metadata,
13+
// Defer AppKit initialization until after mount to avoid SSR/initialization issues
14+
onMounted(() => {
15+
createAppKit({
16+
adapters: [wagmiAdapter],
17+
networks: [defaultChain],
18+
projectId,
19+
metadata,
20+
});
1821
});
1922
2023
// BigInt polyfill

packages/auth-server/stores/client.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,40 @@ const zksyncOsLocal = defineChain({
4242
},
4343
});
4444

45-
export const supportedChains = [localhost, zksyncOsTestnet, zksyncOsLocal];
45+
const dawnMainnet = defineChain({
46+
id: 30715,
47+
name: "Dawn Mainnet",
48+
nativeCurrency: {
49+
name: "Ether",
50+
symbol: "ETH",
51+
decimals: 18,
52+
},
53+
rpcUrls: {
54+
default: {
55+
http: ["https://zksync-os-mainnet-dawn.zksync.io"],
56+
},
57+
},
58+
blockExplorers: {
59+
default: {
60+
name: "Dawn Mainnet Explorer",
61+
url: "https://zksync-os-mainnet-dawn.staging-scan-v2.zksync.dev",
62+
},
63+
},
64+
});
65+
66+
export const supportedChains = [localhost, zksyncOsTestnet, zksyncOsLocal, dawnMainnet];
4667
export type SupportedChainId = (typeof supportedChains)[number]["id"];
4768
export const blockExplorerUrlByChain: Record<SupportedChainId, string> = {
4869
[localhost.id]: "http://localhost:3010",
4970
[zksyncOsTestnet.id]: "https://zksync-os-testnet-alpha.staging-scan-v2.zksync.dev",
5071
[zksyncOsLocal.id]: "",
72+
[dawnMainnet.id]: "https://zksync-os-mainnet-dawn.staging-scan-v2.zksync.dev",
5173
};
5274
export const blockExplorerApiByChain: Record<SupportedChainId, string> = {
5375
[localhost.id]: "http://localhost:3020",
5476
[zksyncOsTestnet.id]: "https://block-explorer-api.zksync-os-testnet-alpha.zksync.dev/api",
5577
[zksyncOsLocal.id]: "",
78+
[dawnMainnet.id]: "https://block-explorer-api.zksync-os-mainnet-dawn.zksync.io",
5679
};
5780

5881
type ChainContracts = {
@@ -79,6 +102,16 @@ export const contractsByChain: Record<SupportedChainId, ChainContracts> = {
79102
bundlerUrl: "https://bundler-api.stage-sso.zksync.dev",
80103
beacon: "0x1D779D791B55a093dE60da664C3F301a87f96C62",
81104
},
105+
[dawnMainnet.id]: {
106+
eoaValidator: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
107+
webauthnValidator: "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
108+
sessionValidator: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
109+
factory: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
110+
bundlerUrl: "https://bundler-api.dawn-mainnet.zksync.io", // Update with actual bundler URL when available
111+
beacon: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
112+
guardianExecutor: "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
113+
accountPaymaster: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", // MockPaymaster
114+
},
82115
};
83116

84117
export const chainParameters: Record<SupportedChainId, { blockTime: number }> = {
@@ -91,6 +124,9 @@ export const chainParameters: Record<SupportedChainId, { blockTime: number }> =
91124
[zksyncOsTestnet.id]: {
92125
blockTime: 1,
93126
},
127+
[dawnMainnet.id]: {
128+
blockTime: 1,
129+
},
94130
};
95131

96132
export const useClientStore = defineStore("client", () => {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"eoaValidator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
3+
"sessionValidator": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
4+
"webauthnValidator": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
5+
"guardianExecutor": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
6+
"accountImplementation": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
7+
"beacon": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
8+
"factory": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
9+
"entryPoint": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE"
10+
}

0 commit comments

Comments
 (0)