Maturity
Asset Tokenization Studio Team
Maturity
Maturity facet for token redemption and maturity date management.
fullRedeemAtMaturity, redeemAtMaturityByPartitionRange and updateMaturityDate manage the token maturity lifecycle, registered under RESOLVER_KEY_MATURITY. Events: MaturityInitialized, MaturityDateUpdated, FullyRedeemedAtMaturity, RedeemedAtMaturityByPartitionRange. Errors: MaturityDateInvalid.
Methods
fullRedeemAtMaturity
function fullRedeemAtMaturity(address _tokenHolder) external nonpayable
Redeems all token partitions held by a token holder at maturity.
Intentionally does not enforce onlyListedAllowed or onlyValidKycStatus on _tokenHolder: this is an issuer-driven mandatory settlement, and the holder's own compliance status must not be able to block redemption of what they are owed.
Parameters
| Name | Type | Description |
|---|---|---|
| _tokenHolder | address | Address of the token holder whose partitions are to be redeemed. |
getMaturityDate
function getMaturityDate() external view returns (uint256 maturityDate_)
Returns the current token maturity date.
Reads directly from MaturityDateStorageWrapper storage slot. No access-control gate — maturity date is public information.
Returns
| Name | Type | Description |
|---|---|---|
| maturityDate_ | uint256 | Current maturity timestamp (Unix epoch, in seconds). Returns zero if the date has not been set yet. |
initializeMaturity
function initializeMaturity(uint256 _maturityDate) external nonpayable
Sets the token maturity date exactly once during deployment.
Called by the Factory immediately after the proxy is deployed. No role gate — the one-time guard is enforced by onlyNotMaturityInitialized, which reverts with AlreadyInitialized on any subsequent call. Persists the date via MaturityDateStorageWrapper.initializeMaturity.Emits {MaturityInitialized} with the contract address and the maturity date.
Parameters
| Name | Type | Description |
|---|---|---|
| _maturityDate | uint256 | Maturity timestamp to set (Unix epoch, in seconds). Must be strictly greater than zero and in the future at deployment time. |
redeemAtMaturityByPartitionRange
function redeemAtMaturityByPartitionRange(address _tokenHolder, uint256 _pageIndex, uint256 _pageLength) external nonpayable
Redeems a bounded page of the token partitions held by a token holder at maturity.
Intentionally does not enforce onlyListedAllowed or onlyValidKycStatus on _tokenHolder: this is an issuer-driven mandatory settlement, and the holder's own compliance status must not be able to block redemption of what they are owed.
Parameters
| Name | Type | Description |
|---|---|---|
| _tokenHolder | address | Address of the token holder whose partitions are to be redeemed. |
| _pageIndex | uint256 | Zero-based index of the page of partitions to redeem. |
| _pageLength | uint256 | Number of partitions per page. |
updateMaturityDate
function updateMaturityDate(uint256 _newMaturityDate) external nonpayable returns (bool success_)
Updates the token maturity date to a new timestamp.
Caller must hold ROLE_MATURITY_MANAGER. Contract must be unpaused. _newMaturityDate must satisfy the validity constraint enforced by onlyValidMaturityDate — the new date must be strictly greater than the current maturity date. Persists the new date via MaturityDateStorageWrapper.setMaturityDate.Emits {MaturityDateUpdated} with the contract address, the new maturity date, and the previous maturity date.
Parameters
| Name | Type | Description |
|---|---|---|
| _newMaturityDate | uint256 | New maturity timestamp to set (Unix epoch, in seconds). |
Returns
| Name | Type | Description |
|---|---|---|
| success_ | bool | Always true on successful execution. |
Events
FullyRedeemedAtMaturity
event FullyRedeemedAtMaturity(address indexed tokenHolder)
Emitted once after fullRedeemAtMaturity has redeemed every partition held by tokenHolder.
Parameters
| Name | Type | Description |
|---|---|---|
tokenHolder indexed | address | Token holder whose full partition list was redeemed. |
MaturityDateUpdated
event MaturityDateUpdated(address indexed tokenId, uint256 indexed maturityDate, uint256 indexed previousMaturityDate)
Emitted whenever the maturity date is updated via updateMaturityDate.
Parameters
| Name | Type | Description |
|---|---|---|
tokenId indexed | address | Address of the token proxy whose date was updated. |
maturityDate indexed | uint256 | New maturity timestamp (Unix epoch, seconds). |
previousMaturityDate indexed | uint256 | Previous maturity timestamp that was replaced. |
MaturityInitialized
event MaturityInitialized(uint256 indexed maturityDate)
Emitted once when the maturity date is set for the first time via initializeMaturity.
Parameters
| Name | Type | Description |
|---|---|---|
maturityDate indexed | uint256 | Initial maturity timestamp (Unix epoch, seconds). |
RedeemedAtMaturityByPartitionRange
event RedeemedAtMaturityByPartitionRange(address indexed tokenHolder, uint256 pageIndex, uint256 pageLength)
Emitted once after redeemAtMaturityByPartitionRange has redeemed the requested page of partitions held by tokenHolder.
Parameters
| Name | Type | Description |
|---|---|---|
tokenHolder indexed | address | Token holder whose partitions were redeemed. |
| pageIndex | uint256 | Zero-based index of the page that was redeemed. |
| pageLength | uint256 | Number of partitions per page, as requested by the caller. |
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. |
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. |
ClearingIsActivated
error ClearingIsActivated()
Thrown when an administration action requires clearing to be inactive but it is currently enabled.
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).
MaturityDateInvalid
error MaturityDateInvalid()
Thrown when a maturity date fails validation.
Reverts when a proposed maturity date is not strictly in the future at the time it is set, or when a maturity-gated action is attempted before the stored maturity date has been reached.
UnexpectedError
error UnexpectedError(bytes4 _errorId)
Reverts when an unreachable validation state is detected.
Replaces assertions for defensive handling of logically impossible states.
Parameters
| Name | Type | Description |
|---|---|---|
| _errorId | bytes4 | Identifier of the unexpected validation condition. |
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.
ZeroAddressNotAllowed
error ZeroAddressNotAllowed()
Reverts when the zero address is supplied where it is not permitted.
Prevents invalid account, contract, or recipient references.