Skip to content
LogoLogo

HubPeripheryFactory

Git Source

Inherits: AccessManagedUpgradeable, MakinaPeripheryContext, IHubPeripheryFactory

Constants

HubPeripheryFactoryStorageLocation

bytes32 private constant HubPeripheryFactoryStorageLocation =
        0x6b50a937759edff8a6a5b23fe11eb54a74c1c4f4d159fd3622707013a01a1e00;

Functions

_getHubPeripheryFactoryStorage

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

Returns

NameTypeDescription
$HubPeripheryFactoryStorage

constructor

constructor(address _peripheryRegistry) MakinaPeripheryContext(_peripheryRegistry);

Parameters

NameTypeDescription
_peripheryRegistryaddress

initialize

function initialize(address _initialAuthority) external initializer;

Parameters

NameTypeDescription
_initialAuthorityaddress

isDepositor

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

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

Parameters

NameTypeDescription
_depositoraddress

Returns

NameTypeDescription
<none>bool

isRedeemer

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

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

Parameters

NameTypeDescription
_redeemeraddress

Returns

NameTypeDescription
<none>bool

isFeeManager

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

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

Parameters

NameTypeDescription
_feeManageraddress

Returns

NameTypeDescription
<none>bool

isSecurityModule

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

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

Parameters

NameTypeDescription
_securityModuleaddress

Returns

NameTypeDescription
<none>bool

depositorImplemId

Depositor => Implementation ID

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

Parameters

NameTypeDescription
_depositoraddress

Returns

NameTypeDescription
<none>uint16

redeemerImplemId

Redeemer => Implementation ID

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

Parameters

NameTypeDescription
_redeemeraddress

Returns

NameTypeDescription
<none>uint16

feeManagerImplemId

Fee manager => Implementation ID

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

Parameters

NameTypeDescription
_feeManageraddress

Returns

NameTypeDescription
<none>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
_implemIduint16The ID of the depositor implementation to be used.
_initializationDatabytesAdditional initialization data.

Returns

NameTypeDescription
<none>addressThe 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
_implemIduint16The ID of the redeemer implementation to be used.
_initializationDatabytesAdditional initialization data.

Returns

NameTypeDescription
<none>addressThe 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
_implemIduint16The ID of the fee manager implementation to be used.
_initializationDatabytesAdditional initialization data.

Returns

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

NameTypeDescription
_isDepositormapping(address depositor => bool isDepositor)
_isRedeemermapping(address redeemer => bool isRedeemer)
_isFeeManagermapping(address feeManager => bool isFeeManager)
_isSecurityModulemapping(address securityModule => bool isSecurityModule)
_depositorImplemIdmapping(address depositor => uint16 implemId)
_redeemerImplemIdmapping(address redeemer => uint16 implemId)
_feeManagerImplemIdmapping(address feeManager => uint16 implemId)