Skip to main content

NoteTokenFactory

NoteTokenFactory

TOKEN_INIT_FUNC_SELECTOR

bytes4 TOKEN_INIT_FUNC_SELECTOR

registry

contract Registry registry

tokens

contract INoteToken[] tokens

noteTokenImplementation

address noteTokenImplementation

isExistingTokens

mapping(address => bool) isExistingTokens

onlySecuritizationManager

modifier onlySecuritizationManager()

initialize

function initialize(contract Registry _registry, address _factoryAdmin) public

setFactoryAdmin

function setFactoryAdmin(address _factoryAdmin) public

Sets the address that can manage the factory contract.

Parameters

NameTypeDescription
_factoryAdminaddressThe new address for the factory admin.

changeMinterRole

function changeMinterRole(address tokenAddress, address newController) external

Changes the minter role for a given token

Only callable by the securitization manager

Parameters

NameTypeDescription
tokenAddressaddressAddress of the token to change the minter role for
newControlleraddressNew controller that will have the minter role

setNoteTokenImplementation

function setNoteTokenImplementation(address newAddress) external

This function allows an admin to set a new implementation address for NoteToken.

Parameters

NameTypeDescription
newAddressaddressThe new address of the NoteToken implementation. It cannot be zero.

createToken

function createToken(address _poolAddress, enum Configuration.NOTE_TOKEN_TYPE _noteTokenType, uint8 _nDecimals, string ticker) external returns (address)

Creates a new note token instance.

Parameters

NameTypeDescription
_poolAddressaddressThe address of the pool that will own this note token.
_noteTokenTypeenum Configuration.NOTE_TOKEN_TYPEThe type of the note token (Senior or Junior).
_nDecimalsuint8The number of decimals for the note token's underlying asset.
tickerstringThe ticker symbol for the note token.

Return Values

NameTypeDescription
[0]addressaddress Returns the address of the newly created note token instance.

pauseUnpauseToken

function pauseUnpauseToken(address tokenAddress) external

This function allows an admin to pause or unpause any ERC20 token. If the token is currently paused, it will be unpaused; if not, it will be paused.

Parameters

NameTypeDescription
tokenAddressaddressThe address of the ERC20 token that needs to be paused/unpaused.

pauseAllTokens

function pauseAllTokens() external

Pauses all tokens that are not already paused.

This function can only be called by the default admin role and cannot be re-entered until it finishes execution. It will loop through each token in the tokens array, check if it is not paused, and if so, pause it.

unPauseAllTokens

function unPauseAllTokens() external

This function unpauses all paused ERC20 tokens in the contract. Only callable by admins.