MintFacet
Asset Tokenization Studio Team
MintFacet
Diamond facet exposing the consolidated token issuance entry points.
Registers four selectors: initializeERC1594, isIssuable, issue and mint. Inherits the business logic from the Mint abstract contract.
Methods
disableIssuance
function disableIssuance() external nonpayable
Permanently disables issuance of new tokens.
Restricted to DEFAULT_ADMIN_ROLE. Sets the issuance flag to false and emits IssuanceDisabled. Reverts if issuance has already been disabled.
finalizeIssuance
function finalizeIssuance() external nonpayable
Permanently finalizes issuance of new tokens.
Restricted to DEFAULT_ADMIN_ROLE. Sets the issuance flag to false and emits IssuanceFinalized. Reverts if issuance has already been disabled.
getStaticFunctionSelectors
function getStaticFunctionSelectors() external pure returns (bytes4[])
Gets all function selectors of a facet
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face functions selectors |
getStaticInterfaceIds
function getStaticInterfaceIds() external pure returns (bytes4[])
Gets all interfaces ids of a facet.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face interface ids |
getStaticResolverKey
function getStaticResolverKey() external pure returns (bytes32 staticResolverKey_)
Gets the static resolver key
Returns
| Name | Type | Description |
|---|---|---|
| staticResolverKey_ | bytes32 | Static resolver key |
initializeERC1594
function initializeERC1594() external nonpayable
Initialises the ERC-1594 StorageWrapper on the calling contract.
Can only be invoked once per contract; subsequent calls revert via onlyFacetNotRegistered.
isIssuable
function isIssuable() external view returns (bool)
Returns whether further issuance is permitted for this security.
Once a token returns false it must never return true again. Implementations read the issuance flag maintained by ERC1594StorageWrapper.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | True while new tokens may still be issued or minted. |
issue
function issue(address _tokenHolder, uint256 _value, bytes _data) external nonpayable
Issues new tokens to a token holder under the ERC-1594 semantics.
Restricted to issuer or agent roles. Increases the total supply and emits IERC1594.Issued. Only callable in single-partition mode and when the token is unpaused; the destination must pass identity and compliance checks.
Parameters
| Name | Type | Description |
|---|---|---|
| _tokenHolder | address | Recipient of the newly issued tokens. |
| _value | uint256 | Amount of tokens to issue, denominated in base units. |
| _data | bytes | Arbitrary data forwarded alongside the issuance for off-chain consumers. |
mint
function mint(address _to, uint256 _amount) external nonpayable
Mints new tokens to a recipient under the ERC-3643 semantics.
Behaves as a thin alias over issue with an empty data payload. Restricted to issuer or agent roles and subject to the same pause, supply, identity and compliance constraints. Emits IERC1594.Issued.
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Recipient of the newly minted tokens. |
| _amount | uint256 | Amount of tokens to mint, denominated in base units. |
Events
ERC1594Initialized
event ERC1594Initialized()
/**Emitted once when the ERC-1594 capability is initialised on a token.
Fires exclusively from initializeERC1594 after the storage write succeeds.
IssuanceDisabled
event IssuanceDisabled(address indexed operator)
Emitted when token issuance is disabled.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Account that disabled issuance. |
IssuanceFinalized
event IssuanceFinalized(address indexed operator)
Emitted when token issuance is finalized.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Account that finalized issuance. |
Issued
event Issued(address indexed operator, address indexed to, uint256 value, bytes data)
Emitted when new tokens are issued to a holder.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Account that invoked the issuance (issuer or agent). |
to indexed | address | Recipient of the newly issued tokens. |
| value | uint256 | Amount of tokens issued, denominated in base units. |
| data | bytes | Arbitrary payload forwarded alongside the issuance. |
Errors
AccountHasNoRole
error AccountHasNoRole(address account, bytes32 role)
Thrown when an account does not hold a required role.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The account that lacks the role. |
| role | bytes32 | The role that is not held. |
AccountHasNoRoles
error AccountHasNoRoles(address account, bytes32[] roles)
Thrown when an account does not hold any of the specified roles.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The account that lacks the roles. |
| roles | bytes32[] | The roles that are not held. |
AssetNotOperational
error AssetNotOperational(bytes32 configId, uint256 versionId)
Raised by InitializerStorageWrapper.checkOperational (and the related isConfigVersionOperational helper) when an operation is attempted on a configuration version that has not yet been marked operational.
Parameters
| Name | Type | Description |
|---|---|---|
| configId | bytes32 | Resolver-proxy configuration whose operational status was checked. |
| versionId | uint256 | Configuration version whose operational status was checked. |
Deactivated
error Deactivated()
Thrown when an operation guarded by onlyActivated is attempted on a token whose deactivation flag has already been set.
FacetAlreadyRegistered
error FacetAlreadyRegistered(bytes32 facetId, uint256 lastVersion)
Raised when an initialiser tries to register a facet that already has a non-zero last registered version (i.e. the facet is being re-initialised on a fresh install).
Parameters
| Name | Type | Description |
|---|---|---|
| facetId | bytes32 | Identifier of the offending facet. |
| lastVersion | uint256 | Last version recorded for that facet at the time of the check. |
IsPaused
error IsPaused()
Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).
IssuanceIsDisabled
error IssuanceIsDisabled()
Thrown when an issuance operation is attempted after issuance has been permanently disabled.
MaxSupplyReached
error MaxSupplyReached(uint256 maxSupply)
Thrown when a mint would cause the total supply to exceed the global maximum.
Parameters
| Name | Type | Description |
|---|---|---|
| maxSupply | uint256 | The current global maximum supply. |
NotAllowedInMultiPartitionMode
error NotAllowedInMultiPartitionMode()
Thrown when a single-partition operation is attempted on a multi-partition token.
UnrecognizedResolverProxyVersion
error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)
Thrown when the provided proxy version does not match any BLR compatible standard.
Parameters
| Name | Type | Description |
|---|---|---|
| _resolverProxyVersion | bytes8 | proxy version that is not compatible with the BLR. |
WalletRecovered
error WalletRecovered()
Thrown when attempting to recover a wallet that has already been recovered.