-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
93 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ pragma solidity ^0.8.24; | |
// /_/ |_/\___/_/|_\__,_/____/ | ||
// | ||
// ────────────────────────────────────────────────────────────────────────────── | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, | ||
// using Entrypoint version 0.7.0, developed by Biconomy. Learn more at https://biconomy.io/ | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, developed by Biconomy. | ||
// Learn more at https://biconomy.io/ | ||
|
||
import { UUPSUpgradeable } from "solady/src/utils/UUPSUpgradeable.sol"; | ||
import { PackedUserOperation } from "account-abstraction/contracts/interfaces/PackedUserOperation.sol"; | ||
|
@@ -20,7 +20,7 @@ import { Execution } from "./types/DataTypes.sol"; | |
import { INexus } from "./interfaces/INexus.sol"; | ||
import { BaseAccount } from "./base/BaseAccount.sol"; | ||
import { ModuleManager } from "./base/ModuleManager.sol"; | ||
import { ExecutionManager } from "./base/ExecutionManager.sol"; | ||
import { ExecutionHelper } from "./base/ExecutionHelper.sol"; | ||
import { IValidator } from "./interfaces/modules/IValidator.sol"; | ||
import { MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, VALIDATION_FAILED } from "./types/Constants.sol"; | ||
import { ModeLib, ExecutionMode, ExecType, CallType, CALLTYPE_BATCH, CALLTYPE_SINGLE, EXECTYPE_DEFAULT, EXECTYPE_TRY } from "./lib/ModeLib.sol"; | ||
|
@@ -33,7 +33,7 @@ import { ModeLib, ExecutionMode, ExecType, CallType, CALLTYPE_BATCH, CALLTYPE_SI | |
/// @author @filmakarov | Biconomy | [email protected] | ||
/// @author @zeroknots | Rhinestone.wtf | zeroknots.eth | ||
/// Special thanks to the Solady team for foundational contributions: https://github.com/Vectorized/solady | ||
contract Nexus is INexus, BaseAccount, ExecutionManager, ModuleManager, UUPSUpgradeable { | ||
contract Nexus is INexus, BaseAccount, ExecutionHelper, ModuleManager, UUPSUpgradeable { | ||
using ModeLib for ExecutionMode; | ||
using ExecLib for bytes; | ||
|
||
|
@@ -204,6 +204,7 @@ contract Nexus is INexus, BaseAccount, ExecutionManager, ModuleManager, UUPSUpgr | |
/// @param firstValidator The first validator to install upon initialization. | ||
/// @param initData Initialization data for setting up the validator. | ||
/// @dev This function sets the foundation for the smart account's operational logic and security. | ||
/// @notice Implementation details may be adjusted based on factory requirements. | ||
function initialize(address firstValidator, bytes calldata initData) external payable virtual { | ||
// checks if already initialized and reverts before setting the state to initialized | ||
_initModuleManager(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,13 @@ pragma solidity ^0.8.24; | |
// /_/ |_/\___/_/|_\__,_/____/ | ||
// | ||
// ────────────────────────────────────────────────────────────────────────────── | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, | ||
// using Entrypoint version 0.7.0, developed by Biconomy. Learn more at https://biconomy.io/ | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, developed by Biconomy. | ||
// Learn more at https://biconomy.io/ | ||
|
||
import { Execution } from "../types/DataTypes.sol"; | ||
import { IExecutionManagerEventsAndErrors } from "../interfaces/base/IExecutionManager.sol"; | ||
import { IExecutionHelperEventsAndErrors } from "../interfaces/base/IExecutionHelper.sol"; | ||
|
||
/// @title Nexus - ExecutionManager | ||
/// @title Nexus - ExecutionHelper | ||
/// @notice Implements execution management within the Nexus suite, facilitating transaction execution strategies and | ||
/// error handling. | ||
/// @dev Provides mechanisms for direct and batched transactions with both committed and tentative execution strategies | ||
|
@@ -25,7 +25,7 @@ import { IExecutionManagerEventsAndErrors } from "../interfaces/base/IExecutionM | |
/// @author @filmakarov | Biconomy | [email protected] | ||
/// @author @zeroknots | Rhinestone.wtf | zeroknots.eth | ||
/// Special thanks to the Solady team for foundational contributions: https://github.com/Vectorized/solady | ||
contract ExecutionManager is IExecutionManagerEventsAndErrors { | ||
contract ExecutionHelper is IExecutionHelperEventsAndErrors { | ||
/// @notice Executes a call to a target address with specified value and data. | ||
/// @param target The address to execute the call on. | ||
/// @param value The amount of wei to send with the call. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,23 +9,23 @@ pragma solidity ^0.8.24; | |
// /_/ |_/\___/_/|_\__,_/____/ | ||
// | ||
// ────────────────────────────────────────────────────────────────────────────── | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, | ||
// using Entrypoint version 0.7.0, developed by Biconomy. Learn more at https://biconomy.io/ | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, developed by Biconomy. | ||
// Learn more at https://biconomy.io/ | ||
|
||
import { IAccountConfig } from "./base/IAccountConfig.sol"; | ||
import { IExecutionManager } from "./base/IExecutionManager.sol"; | ||
import { IExecutionHelper } from "./base/IExecutionHelper.sol"; | ||
import { IModuleManager } from "./base/IModuleManager.sol"; | ||
|
||
/// @title Nexus - IERC7579Account | ||
/// @notice This interface integrates the functionalities required for a modular smart account compliant with ERC-7579 and ERC-4337 standards. | ||
/// @dev Combines configurations and operational management for smart accounts, bridging IAccountConfig, IExecutionManager, and IModuleManager. | ||
/// @dev Combines configurations and operational management for smart accounts, bridging IAccountConfig, IExecutionHelper, and IModuleManager. | ||
/// Interfaces designed to support the comprehensive management of smart account operations including execution management and modular configurations. | ||
/// @author @livingrockrises | Biconomy | [email protected] | ||
/// @author @aboudjem | Biconomy | [email protected] | ||
/// @author @filmakarov | Biconomy | [email protected] | ||
/// @author @zeroknots | Rhinestone.wtf | zeroknots.eth | ||
/// Special thanks to the Solady team for foundational contributions: https://github.com/Vectorized/solady | ||
interface IERC7579Account is IAccountConfig, IExecutionManager, IModuleManager { | ||
interface IERC7579Account is IAccountConfig, IExecutionHelper, IModuleManager { | ||
/// @dev Validates a smart account signature according to ERC-1271 standards. | ||
/// This method may delegate the call to a validator module to check the signature. | ||
/// @param hash The hash of the data being validated. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,22 +9,22 @@ pragma solidity ^0.8.24; | |
// /_/ |_/\___/_/|_\__,_/____/ | ||
// | ||
// ────────────────────────────────────────────────────────────────────────────── | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, | ||
// using Entrypoint version 0.7.0, developed by Biconomy. Learn more at https://biconomy.io/ | ||
// Nexus: A suite of contracts for Modular Smart Account compliant with ERC-7579 and ERC-4337, developed by Biconomy. | ||
// Learn more at https://biconomy.io/ | ||
|
||
import { ExecutionMode } from "../../lib/ModeLib.sol"; | ||
|
||
import { IExecutionManagerEventsAndErrors } from "./IExecutionManagerEventsAndErrors.sol"; | ||
import { IExecutionHelperEventsAndErrors } from "./IExecutionHelperEventsAndErrors.sol"; | ||
|
||
/// @title Nexus - IExecutionManager | ||
/// @title Nexus - IExecutionHelper | ||
/// @notice Interface for executing transactions on behalf of smart accounts within the Nexus system. | ||
/// @dev Extends functionality for transaction execution with error handling as defined in IExecutionManagerEventsAndErrors. | ||
/// @dev Extends functionality for transaction execution with error handling as defined in IExecutionHelperEventsAndErrors. | ||
/// @author @livingrockrises | Biconomy | [email protected] | ||
/// @author @aboudjem | Biconomy | [email protected] | ||
/// @author @filmakarov | Biconomy | [email protected] | ||
/// @author @zeroknots | Rhinestone.wtf | zeroknots.eth | ||
/// Special thanks to the Solady team for foundational contributions: https://github.com/Vectorized/solady | ||
interface IExecutionManager is IExecutionManagerEventsAndErrors { | ||
interface IExecutionHelper is IExecutionHelperEventsAndErrors { | ||
/// @notice Executes a transaction with specified execution mode and calldata. | ||
/// @param mode The execution mode, defining how the transaction is processed. | ||
/// @param executionCalldata The calldata to execute. | ||
|
Oops, something went wrong.