Interface that any module factory contract should implement (ModuleFactory.sol)
View Source: contracts/modules/ModuleFactory.sol
↗ Extends: IModuleFactory, Ownable ↘ Derived Contracts: KYCTransferManagerFactory, ScheduledCheckpointFactory, SignedTransferManagerFactory, TrackedRedemptionFactory, UpgradableModuleFactory
ModuleFactory
Contract is abstract
Contract Members
Constants & Variables
//public members
contract IPolymathRegistry public polymathRegistry;
bytes32 public name;
string public title;
string public description;
bool public isCostInPoly;
uint256 public setupCost;
//internal members
string internal initialVersion;
uint8[] internal typesData;
bytes32[] internal tagsData;
string internal constant POLY_ORACLE;
mapping(string => uint24) internal compatibleSTVersionRange;
Functions
Constructor
function (uint256 _setupCost, address _polymathRegistry, bool _isCostInPoly) public nonpayable
Arguments
Name
Type
Description
_setupCost
uint256
_polymathRegistry
address
_isCostInPoly
bool
getTypes
⤾ overrides IModuleFactory.getTypes
⤿ Overridden Implementation(s): MockFactory.getTypes,MockWrongTypeFactory.getTypes
Type of the Module factory
function getTypes() external view
returns(uint8[])
Arguments
Name
Type
Description
getTags
⤾ overrides IModuleFactory.getTags
⤿ Overridden Implementation(s): TestSTOFactory.getTags
Get the tags related to the module factory
function getTags() external view
returns(bytes32[])
Arguments
Name
Type
Description
version
⤾ overrides IModuleFactory.version
⤿ Overridden Implementation(s): UpgradableModuleFactory.version
Get the version related to the module factory
function version() external view
returns(string)
Arguments
Name
Type
Description
changeSetupCost
⤾ overrides IModuleFactory.changeSetupCost
Used to change the fee of the setup cost
function changeSetupCost(uint256 _setupCost) public nonpayable onlyOwner
Arguments
Name
Type
Description
_setupCost
uint256
new setup cost
changeCostAndType
⤾ overrides IModuleFactory.changeCostAndType
Used to change the currency and amount of setup cost
function changeCostAndType(uint256 _setupCost, bool _isCostInPoly) public nonpayable onlyOwner
Arguments
Name
Type
Description
_setupCost
uint256
new setup cost
_isCostInPoly
bool
new setup cost currency. USD or POLY
changeTitle
⤾ overrides IModuleFactory.changeTitle
Updates the title of the ModuleFactory
function changeTitle(string _title) public nonpayable onlyOwner
Arguments
Name
Type
Description
_title
string
New Title that will replace the old one.
changeDescription
⤾ overrides IModuleFactory.changeDescription
Updates the description of the ModuleFactory
function changeDescription(string _description) public nonpayable onlyOwner
Arguments
Name
Type
Description
_description
string
New description that will replace the old one.
changeName
⤾ overrides IModuleFactory.changeName
Updates the name of the ModuleFactory
function changeName(bytes32 _name) public nonpayable onlyOwner
Arguments
Name
Type
Description
_name
bytes32
New name that will replace the old one.
changeTags
⤾ overrides IModuleFactory.changeTags
Updates the tags of the ModuleFactory
function changeTags(bytes32[] _tagsData) public nonpayable onlyOwner
Arguments
Name
Type
Description
_tagsData
bytes32[]
New list of tags
changeSTVersionBounds
⤾ overrides IModuleFactory.changeSTVersionBounds
Function use to change the lower and upper bound of the compatible version st
function changeSTVersionBounds(string _boundType, uint8[] _newVersion) external nonpayable onlyOwner
Arguments
Name
Type
Description
_boundType
string
Type of bound
_newVersion
uint8[]
new version array
getLowerSTVersionBounds
⤾ overrides IModuleFactory.getLowerSTVersionBounds
Used to get the lower bound
function getLowerSTVersionBounds() external view
returns(uint8[])
Returns
lower bound
Arguments
Name
Type
Description
getUpperSTVersionBounds
⤾ overrides IModuleFactory.getUpperSTVersionBounds
Used to get the upper bound
function getUpperSTVersionBounds() external view
returns(uint8[])
Returns
upper bound
Arguments
Name
Type
Description
setupCostInPoly
⤾ overrides IModuleFactory.setupCostInPoly
Get the setup cost of the module
function setupCostInPoly() public nonpayable
returns(uint256)
Arguments
Name
Type
Description
_takeFee
Calculates fee in POLY
function _takeFee() internal nonpayable
returns(uint256)
Arguments
Name
Type
Description
_initializeModule
⤿ Overridden Implementation(s): UpgradableModuleFactory._initializeModule
Used to initialize the module
function _initializeModule(address _module, bytes _data) internal nonpayable
Arguments
Name
Type
Description
_module
address
Address of module
_data
bytes
Data used for the intialization of the module factory variables
Last updated
Was this helpful?