Skip to main content

MISOLauncher

MISOLauncher is a factory contract to conveniently deploy your own liquidity contracts.

The full contract can be found here.

Functions

initMISOLauncher

function initMISOLauncher(address _accessControls, address _bentoBox) external

Single gateway to initialize the MISO Launcher with the proper addresses. Can only be initialized once.

Parameters

NameTypeDescription
accessControlsaddressaddress to get the access controls from
_bentoBoxaddressBentoBox address

setMinimumFee

function setMinimumFee(uint256 _amount) external

Sets the minimum fee. Must have operator access.

Parameters

NameTypeDescription
amountuint256fee amount to set

setIntegratorFeePct

function setIntegratorFeePct(uint256 _amount) external

Sets the integrator fee percentage. Must have operator access.

Parameters

NameTypeDescription
amountuint256fee percentage to set

setDividends

function setDividends(address payable _divaddr) external

Sets the dividend address. Must have operator access.

Parameters

NameTypeDescription
_divaddraddress payabledividend address to set

setLocked

function setLocked(bool _locked) external

Sets the factory to be locked or unlocked.

Parameters

NameTypeDescription
_lockedbooltrue if locked, false if unlocked

setCurrentTemplateId

function setCurrentTemplateId(uint256 _templateType, uint256 _templateId) external

Sets the current template ID for any type. Must have operator access.

Parameters

NameTypeDescription
_templateTypeuint256type of template
_templateIduint256ID of the current template for that type

hasLauncherMinterRole

function hasLauncherMinterRole(address _address) public view returns (bool)

Used to check whether an address has the minter role, returns a boolean.

Parameters

NameTypeDescription
_addressaddressaddress of account or contract being checked

deployLauncher

function deployLauncher(
uint256 _templateId,
address payable _integratorFeeAccount
)
public payable returns (address launcher)

Deploys a launcher corresponding to the _templateId.

Parameters

NameTypeDescription
_templateIduint256template ID of the launcher to create
_integratorFeeAccountaddress payableaddress to pay the fee to

Returns

NameTypeDescription
launcheraddressnew launcher address

createLauncher

function createLauncher(
uint256 _templateId,
address _token,
uint256 _tokenSupply,
address payable _integratorFeeAccount,
bytes calldata _data
)
external payable returns (address newLauncher)

Creates a new MISOLauncher using the _templateId.

Parameters

NameTypeDescription
_templateIduint256template ID of the auction template to create
_tokenaddressaddress of the token to be sold
_tokenSupplyuint256amount of tokens to be sold at market
_integratorFeeAccountaddress payableaddress to send referral bonus to, if set
_databytesdata passed to the template for init

Returns

NameTypeDescription
newLauncheraddressnew launcher address

addLiquidityLauncherTemplate

function addLiquidityLauncherTemplate(address _template) external

Adds a launcher template to create through factory. Must have operator access.

Parameters

NameTypeDescription
_templateaddresslauncher template address

removeLiquidityLauncherTemplate

function removeLiquidityLauncherTemplate(uint256 _templateId) external

Removes a launcher template from factory. Must have operator access.

Parameters

NameTypeDescription
_templateIduint256id of launcher template to be deleted

getLiquidityLauncherTemplate

function getLiquidityLauncherTemplate(uint256 _templateId) external view returns (address)

Returns the address of the launcher template given its ID.

Parameters

NameTypeDescription
_templateIduint256id of launcher template to get address of

getTemplateId

getTemplateId(address _launcherTemplate) external view returns (uint256)

Returns the template ID of a launcher template given its address.

Parameters

NameTypeDescription
_launcherTemplateaddressaddress of launcher template to get ID of

numberOfLiquidityLauncherContracts

function numberOfLiquidityLauncherContracts() external view returns (uint256)

View function that returns the total number of launchers in the contract.

minimumFee

function minimumFee() external view returns(uint128)

View function that returns the minimumFee of the launchers in the contract.

getLauncherTemplateId

function getLauncherTemplateId(address _launcher) external view returns(uint64)

View function that returns the launcher template ID from the launcher address.

Parameters

NameTypeDescription
_launcheraddressaddress of launcher to get ID of

getLaunchers

function getLaunchers() external view returns(address[] memory)

View function that returns an array of all the addresses from all of the launchers in the contract.