Skip to content

Commit 8209e12

Browse files
committed
fix: more import changes
1 parent 71b3da7 commit 8209e12

File tree

7 files changed

+240
-12
lines changed

7 files changed

+240
-12
lines changed

packages/auth-server/components/account-recovery/oidc-recovery-flow/Step2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<script setup lang="ts">
1414
import { type Address, bytesToHex } from "viem";
15-
import { OidcRecoveryValidatorAbi } from "zksync-sso/abi";
15+
import { OidcRecoveryValidatorAbi } from "zksync-sso-4337/abi";
1616
import type { OidcDigest } from "zksync-sso-circuits";
1717
1818
const { startGoogleOauth } = useGoogleOauth();

packages/auth-server/components/account-recovery/oidc-recovery-flow/Step4.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ import type { Address, Hex } from "viem";
202202
import { bytesToBigInt, encodeAbiParameters, keccak256, pad, zeroAddress } from "viem";
203203
import { waitForTransactionReceipt } from "viem/actions";
204204
import { sendTransaction } from "viem/zksync";
205-
import { OidcRecoveryValidatorAbi } from "zksync-sso/abi";
205+
import { OidcRecoveryValidatorAbi } from "zksync-sso-4337/abi";
206206
import { createNonceV2 } from "zksync-sso-circuits";
207207
208208
import { GOOGLE_CERTS_URL, GOOGLE_ISS } from "./constants";

packages/auth-server/composables/useCheckSsoAccount.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
// TODO: This composable uses AAFactoryAbi which is only for guardian logic (not available in sdk-4337)
2-
// This composable has been commented out as it's only used in recovery flows
3-
4-
/*
51
import type { Address } from "viem";
6-
import { AAFactoryAbi } from "zksync-sso/abi";
2+
import { AAFactoryAbi } from "zksync-sso-4337/abi";
73

84
export const useCheckSsoAccount = (_chainId: MaybeRef<SupportedChainId>) => {
95
const chainId = toRef(_chainId);
@@ -29,4 +25,3 @@ export const useCheckSsoAccount = (_chainId: MaybeRef<SupportedChainId>) => {
2925
error,
3026
};
3127
};
32-
*/

packages/auth-server/composables/useConfigurableAccount.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Address } from "viem";
2-
import { WebAuthValidatorAbi } from "zksync-sso/abi";
32
import { fetchAccount } from "zksync-sso/client";
3+
import { WebAuthnValidatorAbi } from "zksync-sso-4337/abi";
44

55
export const useConfigurableAccount = () => {
66
const { getPublicClient, getConfigurableClient, defaultChain } = useClientStore();
@@ -15,7 +15,7 @@ export const useConfigurableAccount = () => {
1515
const [events, removedEvents] = await Promise.all([
1616
publicClient.getContractEvents({
1717
address: factoryAddress,
18-
abi: WebAuthValidatorAbi,
18+
abi: WebAuthnValidatorAbi,
1919
eventName: "PasskeyCreated",
2020
args: {
2121
keyOwner: address,
@@ -25,7 +25,7 @@ export const useConfigurableAccount = () => {
2525
}),
2626
publicClient.getContractEvents({
2727
address: factoryAddress,
28-
abi: WebAuthValidatorAbi,
28+
abi: WebAuthnValidatorAbi,
2929
eventName: "PasskeyRemoved",
3030
args: {
3131
keyOwner: address,

packages/oidc-server/src/contractUpdater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createWalletClient, type Hex, http, publicActions } from "viem";
22
import { privateKeyToAccount } from "viem/accounts";
33
import { zksync, zksyncInMemoryNode, zksyncSepoliaTestnet } from "viem/chains";
4-
import { OidcKeyRegistryAbi } from "zksync-sso/abi";
4+
import { OidcKeyRegistryAbi } from "zksync-sso-4337/abi";
55
import { CircomBigInt } from "zksync-sso-circuits";
66

77
import { type BaseKey, type Key, keySchema, type ValidNetworks } from "./types.js";
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
export const AAFactoryAbi = [
2+
{
3+
inputs: [
4+
{
5+
internalType: "bytes32",
6+
name: "_beaconProxyBytecodeHash",
7+
type: "bytes32",
8+
},
9+
{
10+
internalType: "address",
11+
name: "_beacon",
12+
type: "address",
13+
},
14+
{
15+
internalType: "address",
16+
name: "_passKeyModule",
17+
type: "address",
18+
},
19+
{
20+
internalType: "address",
21+
name: "_sessionKeyModule",
22+
type: "address",
23+
},
24+
],
25+
stateMutability: "nonpayable",
26+
type: "constructor",
27+
},
28+
{
29+
inputs: [
30+
{
31+
internalType: "address",
32+
name: "account",
33+
type: "address",
34+
},
35+
],
36+
name: "ACCOUNT_ALREADY_EXISTS",
37+
type: "error",
38+
},
39+
{
40+
inputs: [],
41+
name: "EMPTY_BEACON_ADDRESS",
42+
type: "error",
43+
},
44+
{
45+
inputs: [],
46+
name: "EMPTY_BEACON_BYTECODE_HASH",
47+
type: "error",
48+
},
49+
{
50+
inputs: [],
51+
name: "EMPTY_PASSKEY_ADDRESS",
52+
type: "error",
53+
},
54+
{
55+
inputs: [],
56+
name: "EMPTY_SESSIONKEY_ADDRESS",
57+
type: "error",
58+
},
59+
{
60+
inputs: [],
61+
name: "INVALID_ACCOUNT_KEYS",
62+
type: "error",
63+
},
64+
{
65+
anonymous: false,
66+
inputs: [
67+
{
68+
indexed: true,
69+
internalType: "address",
70+
name: "accountAddress",
71+
type: "address",
72+
},
73+
{
74+
indexed: false,
75+
internalType: "bytes32",
76+
name: "uniqueAccountId",
77+
type: "bytes32",
78+
},
79+
],
80+
name: "AccountCreated",
81+
type: "event",
82+
},
83+
{
84+
inputs: [
85+
{
86+
internalType: "bytes32",
87+
name: "accountId",
88+
type: "bytes32",
89+
},
90+
],
91+
name: "accountMappings",
92+
outputs: [
93+
{
94+
internalType: "address",
95+
name: "deployedAccount",
96+
type: "address",
97+
},
98+
],
99+
stateMutability: "view",
100+
type: "function",
101+
},
102+
{
103+
inputs: [],
104+
name: "beacon",
105+
outputs: [
106+
{
107+
internalType: "address",
108+
name: "",
109+
type: "address",
110+
},
111+
],
112+
stateMutability: "view",
113+
type: "function",
114+
},
115+
{
116+
inputs: [],
117+
name: "beaconProxyBytecodeHash",
118+
outputs: [
119+
{
120+
internalType: "bytes32",
121+
name: "",
122+
type: "bytes32",
123+
},
124+
],
125+
stateMutability: "view",
126+
type: "function",
127+
},
128+
{
129+
inputs: [
130+
{
131+
internalType: "bytes32",
132+
name: "uniqueId",
133+
type: "bytes32",
134+
},
135+
{
136+
internalType: "bytes",
137+
name: "passKey",
138+
type: "bytes",
139+
},
140+
{
141+
internalType: "bytes",
142+
name: "sessionKey",
143+
type: "bytes",
144+
},
145+
{
146+
internalType: "address[]",
147+
name: "ownerKeys",
148+
type: "address[]",
149+
},
150+
],
151+
name: "deployModularAccount",
152+
outputs: [
153+
{
154+
internalType: "address",
155+
name: "accountAddress",
156+
type: "address",
157+
},
158+
],
159+
stateMutability: "nonpayable",
160+
type: "function",
161+
},
162+
{
163+
inputs: [
164+
{
165+
internalType: "bytes32",
166+
name: "uniqueId",
167+
type: "bytes32",
168+
},
169+
{
170+
internalType: "bytes[]",
171+
name: "initialValidators",
172+
type: "bytes[]",
173+
},
174+
{
175+
internalType: "address[]",
176+
name: "initialK1Owners",
177+
type: "address[]",
178+
},
179+
],
180+
name: "deployProxySsoAccount",
181+
outputs: [
182+
{
183+
internalType: "address",
184+
name: "accountAddress",
185+
type: "address",
186+
},
187+
],
188+
stateMutability: "nonpayable",
189+
type: "function",
190+
},
191+
{
192+
inputs: [],
193+
name: "getEncodedBeacon",
194+
outputs: [
195+
{
196+
internalType: "bytes",
197+
name: "",
198+
type: "bytes",
199+
},
200+
],
201+
stateMutability: "view",
202+
type: "function",
203+
},
204+
{
205+
inputs: [],
206+
name: "passKeyModule",
207+
outputs: [
208+
{
209+
internalType: "address",
210+
name: "",
211+
type: "address",
212+
},
213+
],
214+
stateMutability: "view",
215+
type: "function",
216+
},
217+
{
218+
inputs: [],
219+
name: "sessionKeyModule",
220+
outputs: [
221+
{
222+
internalType: "address",
223+
name: "",
224+
type: "address",
225+
},
226+
],
227+
stateMutability: "view",
228+
type: "function",
229+
},
230+
] as const;

packages/sdk-4337/src/abi/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
export * from "./AAFactory.js";
2+
export * from "./OidcKeyRegistry.js";
3+
export * from "./OidcRecoveryValidator.js";
14
export * from "./SessionKeyValidator.js";
25
export * from "./WebAuthnValidator.js";

0 commit comments

Comments
 (0)