Skip to main content

MISOFermenter

MISOFermenter is a factory to conveniently deploy your own token vault contracts.

The full contract can be found here.

Functions

initMISOFermenter

function initMISOFermenter(address _accessControls) external

Single gateway to initialize the MISO Market with the proper address. Can only be initialized once.

Parameters

NameTypeDescription
accessControlsaddressaddress to get the access controls from

setLocked

function setLocked(bool _locked) external

Sets the factory to be locked or unlocked.

Parameters

NameTypeDescription
_lockedbooltrue if locked, false if unlocked

hasVaultMinterRole

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

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

Parameters

NameTypeDescription
addressaddressaddress of account or contract being checked

createEscrow

function createEscrow(uint256 _templateId) external returns (address newEscrow)

Creates a new escrow corresponding to the given template ID. If the contract is locked, only admin and minters can deploy.

Parameters

NameTypeDescription
_templateIduint256template ID of escrow to create

Returns

NameTypeDescription
newEscrowaddressnew escrow address

addEscrowTemplate

function addEscrowTemplate(address _escrowTemplate) external

Adds an escrow template to create through factory. Must have operator access.

Parameters

NameTypeDescription
_escrowTemplateaddressaddress of escrow template to create a token

removeEscrowTemplate

function removeEscrowTemplate(uint256 _templateId) external

Removes an escrow template. Must have operator access.

Parameters

NameTypeDescription
_templateIduint256template ID of escrow to delete

getEscrowTemplate

getEscrowTemplate(uint256 _templateId) external view returns (address)

View function that returns the address of the escrow template based on the template ID.

Parameters

NameTypeDescription
_templateIduint256template ID of escrow to get address of

getTemplateId

function getTemplateId(address _escrowTemplate) external view returns (uint256 templateId)

View function that returns the template ID based on the template address.

Parameters

NameTypeDescription
_escrowTemplateaddresstemplate address of escrow to get ID of

Returns

NameTypeDescription
_templateIduint256escrow template ID of given template address

numberOfTokens

numberOfTokens() external view returns (uint256)

View function that returns the total number of escrows in the factory.