HubPeripheryFactory
Inherits: AccessManagedUpgradeable, MakinaPeripheryContext, IHubPeripheryFactory
Constants
HubPeripheryFactoryStorageLocation
bytes32 private constant HubPeripheryFactoryStorageLocation =
0x6b50a937759edff8a6a5b23fe11eb54a74c1c4f4d159fd3622707013a01a1e00;Functions
_getHubPeripheryFactoryStorage
function _getHubPeripheryFactoryStorage() internal pure returns (HubPeripheryFactoryStorage storage $);Returns
| Name | Type | Description |
|---|---|---|
| $ | HubPeripheryFactoryStorage |
constructor
constructor(address _peripheryRegistry) MakinaPeripheryContext(_peripheryRegistry);Parameters
| Name | Type | Description |
|---|---|---|
| _peripheryRegistry | address |
initialize
function initialize(address _initialAuthority) external initializer;Parameters
| Name | Type | Description |
|---|---|---|
| _initialAuthority | address |
isDepositor
Address => Whether this is a depositor deployed by this factory
function isDepositor(address _depositor) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| _depositor | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isRedeemer
Address => Whether this is a redeemer deployed by this factory
function isRedeemer(address _redeemer) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| _redeemer | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isFeeManager
Address => Whether this is a fee manager deployed by this factory
function isFeeManager(address _feeManager) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| _feeManager | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isSecurityModule
Address => Whether this is a security module deployed by this factory
function isSecurityModule(address _securityModule) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| _securityModule | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
depositorImplemId
Depositor => Implementation ID
function depositorImplemId(address _depositor) external view override returns (uint16);Parameters
| Name | Type | Description |
|---|---|---|
| _depositor | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint16 |
redeemerImplemId
Redeemer => Implementation ID
function redeemerImplemId(address _redeemer) external view override returns (uint16);Parameters
| Name | Type | Description |
|---|---|---|
| _redeemer | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint16 |
feeManagerImplemId
Fee manager => Implementation ID
function feeManagerImplemId(address _feeManager) external view override returns (uint16);Parameters
| Name | Type | Description |
|---|---|---|
| _feeManager | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint16 |
setMachine
Sets the machine address in the machine periphery contract.
function setMachine(address machinePeriphery, address machine) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| machinePeriphery | address | The address of the machine periphery contract. |
| machine | address | The address of the machine to be set. |
setSecurityModule
Sets the security module address in the fee manager contract.
function setSecurityModule(address feeManager, address securityModule) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| feeManager | address | The address of the fee manager contract. |
| securityModule | address | The address of the security module to be set. |
createDepositor
Creates a new machine depositor using the specified implementation ID.
function createDepositor(uint16 _implemId, bytes calldata _initializationData)
external
override
restricted
returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| _implemId | uint16 | The ID of the depositor implementation to be used. |
| _initializationData | bytes | Additional initialization data. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address | The address of the newly created depositor. |
createRedeemer
Creates a new machine redeemer using the specified implementation ID.
function createRedeemer(uint16 _implemId, bytes calldata _initializationData)
external
override
restricted
returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| _implemId | uint16 | The ID of the redeemer implementation to be used. |
| _initializationData | bytes | Additional initialization data. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address | The address of the newly created redeemer. |
createFeeManager
Creates a new machine fee manager using the specified implementation ID.
function createFeeManager(uint16 _implemId, bytes calldata _initializationData)
external
override
restricted
returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| _implemId | uint16 | The ID of the fee manager implementation to be used. |
| _initializationData | bytes | Additional initialization data. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address | The address of the newly created fee manager. |
createSecurityModule
Creates a new security module.
function createSecurityModule(ISecurityModule.SecurityModuleInitParams calldata smParams)
external
override
restricted
returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| smParams | ISecurityModule.SecurityModuleInitParams | The security module initialization parameters. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address | The address of the newly created security module. |
Structs
HubPeripheryFactoryStorage
Note:
- storage-location: erc7201:makina.storage.HubPeripheryFactory
struct HubPeripheryFactoryStorage {
mapping(address depositor => bool isDepositor) _isDepositor;
mapping(address redeemer => bool isRedeemer) _isRedeemer;
mapping(address feeManager => bool isFeeManager) _isFeeManager;
mapping(address securityModule => bool isSecurityModule) _isSecurityModule;
mapping(address depositor => uint16 implemId) _depositorImplemId;
mapping(address redeemer => uint16 implemId) _redeemerImplemId;
mapping(address feeManager => uint16 implemId) _feeManagerImplemId;
}Properties
| Name | Type | Description |
|---|---|---|
| _isDepositor | mapping(address depositor => bool isDepositor) | |
| _isRedeemer | mapping(address redeemer => bool isRedeemer) | |
| _isFeeManager | mapping(address feeManager => bool isFeeManager) | |
| _isSecurityModule | mapping(address securityModule => bool isSecurityModule) | |
| _depositorImplemId | mapping(address depositor => uint16 implemId) | |
| _redeemerImplemId | mapping(address redeemer => uint16 implemId) | |
| _feeManagerImplemId | mapping(address feeManager => uint16 implemId) |