Skip to main content

HubPeripheryFactory

Git Source

Inherits: AccessManagedUpgradeable, MakinaPeripheryContext, IHubPeripheryFactory

State Variables

HubPeripheryFactoryStorageLocation

bytes32 private constant HubPeripheryFactoryStorageLocation =
0x6b50a937759edff8a6a5b23fe11eb54a74c1c4f4d159fd3622707013a01a1e00;

Functions

_getHubPeripheryFactoryStorage

function _getHubPeripheryFactoryStorage() internal pure returns (HubPeripheryFactoryStorage storage $);

constructor

constructor(address _peripheryRegistry) MakinaPeripheryContext(_peripheryRegistry);

initialize

function initialize(address _initialAuthority) external initializer;

isDepositor

Address => Whether this is a depositor deployed by this factory

function isDepositor(address _depositor) external view override returns (bool);

isRedeemer

Address => Whether this is a redeemer deployed by this factory

function isRedeemer(address _redeemer) external view override returns (bool);

isFeeManager

Address => Whether this is a fee manager deployed by this factory

function isFeeManager(address _feeManager) external view override returns (bool);

isSecurityModule

Address => Whether this is a security module deployed by this factory

function isSecurityModule(address _securityModule) external view override returns (bool);

depositorImplemId

Depositor => Implementation ID

function depositorImplemId(address _depositor) external view override returns (uint16);

redeemerImplemId

Redeemer => Implementation ID

function redeemerImplemId(address _redeemer) external view override returns (uint16);

feeManagerImplemId

Fee manager => Implementation ID

function feeManagerImplemId(address _feeManager) external view override returns (uint16);

setMachine

Sets the machine address in the machine periphery contract.

function setMachine(address machinePeriphery, address machine) external override restricted;

Parameters

NameTypeDescription
machinePeripheryaddressThe address of the machine periphery contract.
machineaddressThe 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

NameTypeDescription
feeManageraddressThe address of the fee manager contract.
securityModuleaddressThe 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

NameTypeDescription
_implemIduint16
_initializationDatabytes

Returns

NameTypeDescription
<none>addressdepositor 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

NameTypeDescription
_implemIduint16
_initializationDatabytes

Returns

NameTypeDescription
<none>addressredeemer 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

NameTypeDescription
_implemIduint16
_initializationDatabytes

Returns

NameTypeDescription
<none>addressfeeManager 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

NameTypeDescription
smParamsISecurityModule.SecurityModuleInitParamsThe security module initialization parameters.

Returns

NameTypeDescription
<none>addresssecurityModule 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;
}