Skip to content

Commit fc6380e

Browse files
committed
feat: guardian recovery
1 parent 3220cbf commit fc6380e

File tree

115 files changed

+3431
-3434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3431
-3434
lines changed

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-cli/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ enum Commands {
4040

4141
#[arg(long)]
4242
session_validator_address: String,
43+
44+
#[arg(long)]
45+
guardian_executor_address: String,
4346
},
4447
}
4548

@@ -53,6 +56,7 @@ async fn handle_command(command: Commands) -> eyre::Result<()> {
5356
webauthn_validator_address,
5457
eoa_validator_address,
5558
session_validator_address,
59+
guardian_executor_address,
5660
} => {
5761
let config = CoreConfig::new(
5862
rpc_url.parse()?,
@@ -68,6 +72,7 @@ async fn handle_command(command: Commands) -> eyre::Result<()> {
6872
webauthn_validator_address,
6973
eoa_validator_address,
7074
session_validator_address.to_string(),
75+
guardian_executor_address.to_string(),
7176
)?,
7277
);
7378

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-core/src/config/contracts.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub struct Contracts {
99
pub webauthn_validator: Address,
1010
pub eoa_validator: Address,
1111
pub session_validator: Address,
12+
pub guardian_executor: Address,
1213
}
1314

1415
impl Contracts {
@@ -18,13 +19,15 @@ impl Contracts {
1819
webauthn_validator: Address,
1920
eoa_validator: Address,
2021
session_validator: Address,
22+
guardian_executor: Address,
2123
) -> Self {
2224
Self {
2325
entry_point,
2426
account_factory,
2527
webauthn_validator,
2628
eoa_validator,
2729
session_validator,
30+
guardian_executor,
2831
}
2932
}
3033

@@ -34,6 +37,7 @@ impl Contracts {
3437
webauthn_validator: String,
3538
eoa_validator: String,
3639
session_validator: String,
40+
guardian_executor: String,
3741
) -> Result<Self> {
3842
Ok(Self::new(
3943
entry_point.parse::<Address>().map_err(|e| {
@@ -51,6 +55,9 @@ impl Contracts {
5155
session_validator.parse::<Address>().map_err(|e| {
5256
ZkSyncSsoError::InvalidConfiguration(e.to_string())
5357
})?,
58+
guardian_executor.parse::<Address>().map_err(|e| {
59+
ZkSyncSsoError::InvalidConfiguration(e.to_string())
60+
})?,
5461
))
5562
}
5663
}

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-core/src/erc4337.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
pub mod account;
22
pub mod bundler;
3-
pub mod client;
43
pub mod entry_point;
54
pub mod paymaster;
65
pub mod send_call;
7-
pub mod signature;
86
pub mod signer;
97
pub mod transaction;
108
pub mod user_operation;
Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
pub mod add_module;
21
pub mod calls;
3-
pub mod module_installed;
2+
pub mod module;
43

5-
use alloy::sol;
6-
7-
sol!(
8-
#[sol(rpc)]
9-
#[derive(Debug, Default)]
10-
#[allow(missing_docs)]
11-
IERC7579Account,
12-
"../../../../../../packages/erc4337-contracts/out/IERC7579Account.sol/IERC7579Account.json"
13-
);
14-
15-
sol! {
16-
#[sol(rpc)]
17-
#[derive(Debug, Default)]
18-
struct Execution {
19-
address target;
20-
uint256 value;
21-
bytes data;
22-
}
23-
24-
function execute(bytes32 mode, bytes memory execution);
25-
}
4+
mod contract;

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-core/src/erc4337/account/erc7579/add_module.rs

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)