-
Notifications
You must be signed in to change notification settings - Fork 5
Bootstrap
Inherits: ModuleManager
Manages the installation of modules into Nexus smart accounts using delegatecalls.
Initializes the Nexus account with a single validator.
Intended to be called by the Nexus with a delegatecall.
function initNexusWithSingleValidator(IModule validator, bytes calldata data) external;
Parameters
Name | Type | Description |
---|---|---|
validator |
IModule |
The address of the validator module. |
data |
bytes |
The initialization data for the validator module. |
Note
Use this function to quickly set up a Nexus account with a single validator for simpler configurations.
Initializes the Nexus account with multiple modules.
Intended to be called by the Nexus with a delegatecall.
function initNexus(
BootstrapConfig[] calldata validators,
BootstrapConfig[] calldata executors,
BootstrapConfig calldata hook,
BootstrapConfig[] calldata fallbacks
)
external;
Parameters
Name | Type | Description |
---|---|---|
validators |
BootstrapConfig[] |
The configuration array for validator modules. |
executors |
BootstrapConfig[] |
The configuration array for executor modules. |
hook |
BootstrapConfig |
The configuration for the hook module. |
fallbacks |
BootstrapConfig[] |
The configuration array for fallback handler modules. |
Important
This function allows for a comprehensive setup of the Nexus account with all necessary modules, ensuring robust and versatile functionality.
Initializes the Nexus account with a scoped set of modules.
Intended to be called by the Nexus with a delegatecall.
function initNexusScoped(BootstrapConfig[] calldata validators, BootstrapConfig calldata hook) external;
Parameters
Name | Type | Description |
---|---|---|
validators |
BootstrapConfig[] |
The configuration array for validator modules. |
hook |
BootstrapConfig |
The configuration for the hook module. |
Caution
This function is useful for initializing the Nexus with essential modules while leaving out non-essential ones, offering a streamlined setup.
Prepares calldata for the initNexus function.
function getInitNexusCalldata(
BootstrapConfig[] calldata validators,
BootstrapConfig[] calldata executors,
BootstrapConfig calldata hook,
BootstrapConfig[] calldata fallbacks
)
external
view
returns (bytes memory init);
Parameters
Name | Type | Description |
---|---|---|
validators |
BootstrapConfig[] |
The configuration array for validator modules. |
executors |
BootstrapConfig[] |
The configuration array for executor modules. |
hook |
BootstrapConfig |
The configuration for the hook module. |
fallbacks |
BootstrapConfig[] |
The configuration array for fallback handler modules. |
Returns
Name | Type | Description |
---|---|---|
init |
bytes |
The prepared calldata for initNexus. |
Note
This function helps in preparing the required calldata to initialize Nexus, ensuring that the process is smooth and error-free.
Prepares calldata for the initNexusScoped function.
function getInitNexusScopedCalldata(BootstrapConfig[] calldata validators, BootstrapConfig calldata hook) external view returns (bytes memory init);
Parameters
Name | Type | Description |
---|---|---|
validators |
BootstrapConfig[] |
The configuration array for validator modules. |
hook |
BootstrapConfig |
The configuration for the hook module. |
Returns
Name | Type | Description |
---|---|---|
init |
bytes |
The prepared calldata for initNexusScoped. |
Prepares calldata for the initNexusWithSingleValidator function.
function getInitNexusWithSingleValidatorCalldata(BootstrapConfig calldata validator) external view returns (bytes memory init);
Parameters
Name | Type | Description |
---|---|---|
validator |
BootstrapConfig |
The configuration for the validator module. |
Returns
Name | Type | Description |
---|---|---|
init |
bytes |
The prepared calldata for initNexusWithSingleValidator. |
Important
This function is crucial for setting up the initialization calldata for a single validator, facilitating the setup process.
Provides configuration and initialization for Nexus smart accounts.
struct BootstrapConfig {
address module;
bytes data;
}
- Home
- Nexus Architecture
- Access Control
- Execution Framework
- Modules
- Factories
- Migration Guide
- Testing Documentation
- Configuration and Security
- Libraries
- FAQ
- Biconomy Solidity Style Guide
- Security Considerations
- Team
-
Contracts
- Nexus
- Base
- Common
- Factory
- AbstractNexusFactory
- BiconomyMetaFactory
- K1ValidatorFactory
- ModuleWhitelistFactory
- NexusAccountFactory
- Modules
- Utils