Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename cleanup v2 #188

Merged
merged 8 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/auth-server/stores/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export const contractsByChain: Record<SupportedChainId, ChainContracts> = {
},
cpb8010 marked this conversation as resolved.
Show resolved Hide resolved
[zksyncInMemoryNode.id]: {
session: "0x8543528a4561E3a5EC7d51Bfd3776457b0E7b7dc",
passkey: "0x07734BA326b6AD13BfC0115b0903EB14268F1617",
passkey: "0x975df0c7f5CB728ae9F96480491Ec5d1E17296f4",
accountFactory: "0xaAF5f437fB0524492886fbA64D703df15BF619AE",
accountPaymaster: "0x2879853afd8d066ca66e224A8E85621aC43d6F59",
accountPaymaster: "0x351cB880A2B9E1Cf3060ea58Ec5280CBCe87579A",
},
};

Expand Down
16 changes: 12 additions & 4 deletions packages/contracts/src/AAFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.24;
import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol";
import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol";

import { IClaveAccount } from "./interfaces/IClaveAccount.sol";
import { ISsoAccount } from "./interfaces/ISsoAccount.sol";
import { UpgradeableBeacon } from "./UpgradeableBeacon.sol";

import "./helpers/Logger.sol";
Expand All @@ -19,14 +19,22 @@ contract AAFactory is UpgradeableBeacon {
beaconProxyBytecodeHash = _beaconProxyBytecodeHash;
}

function addNewUniqueId(bytes32 uniqueAccountId) external {}

function deployProxy7579Account(
bytes32 salt,
string calldata uniqueAccountId,
bytes[] calldata initialValidators,
bytes[] calldata initialModules,
address[] calldata initialK1Owners
) external returns (address) {
return this.deployProxySsoAccount(salt, uniqueAccountId, initialValidators, initialModules, initialK1Owners);
}

function deployProxySsoAccount(
bytes32 salt,
string calldata uniqueAccountId,
bytes[] calldata initialValidators,
bytes[] calldata initialModules,
address[] calldata initialK1Owners
) external returns (address accountAddress) {
(bool success, bytes memory returnData) = SystemContractsCaller.systemCallWithReturndata(
uint32(gasleft()),
Expand All @@ -50,7 +58,7 @@ contract AAFactory is UpgradeableBeacon {
Logger.logAddress(accountAddress);

// add session-key/spend-limit module (similar code)
IClaveAccount(accountAddress).initialize(initialValidators, initialModules, initialK1Owners);
ISsoAccount(accountAddress).initialize(initialValidators, initialModules, initialK1Owners);

if (accountMappings[uniqueAccountId] != address(0)) {
revert("Account already exists");
Expand Down
289 changes: 0 additions & 289 deletions packages/contracts/src/ERC7579Account.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ModeCode } from "./libraries/ERC7579Mode.sol";
import { ERC1271Handler } from "./handlers/ERC1271Handler.sol";
import { BatchCaller } from "./batch/BatchCaller.sol";

import { IClaveAccount } from "./interfaces/IClaveAccount.sol";
import { ISsoAccount } from "./interfaces/ISsoAccount.sol";

import "./helpers/Logger.sol";

Expand All @@ -32,15 +32,15 @@ import "./helpers/Logger.sol";
* @author https://getclave.io
*/

contract ClaveAccount is
contract SsoAccount is
Initializable,
UpgradeManager,
HookManager,
ModuleManager,
ERC1271Handler,
TokenCallbackHandler,
BatchCaller,
IClaveAccount
ISsoAccount
{
// Helper library for the Transaction struct
using TransactionHelper for Transaction;
Expand Down Expand Up @@ -201,9 +201,9 @@ contract ClaveAccount is
transaction.processPaymasterInput();
}

/// @dev type(IClave).interfaceId indicates Clave accounts
/// @dev type(ISsoAccount).interfaceId indicates SSO accounts
function supportsInterface(bytes4 interfaceId) public view override(IERC165, TokenCallbackHandler) returns (bool) {
return interfaceId == type(IClaveAccount).interfaceId || super.supportsInterface(interfaceId);
return interfaceId == type(ISsoAccount).interfaceId || super.supportsInterface(interfaceId);
}

function _validateTransaction(
Expand Down
Loading
Loading