Skip to main content

ScheduledCrossOrderedTasks

Asset Tokenization Studio Team

Scheduled Cross-Ordered Tasks Facet

Manages initialisation, execution, and inspection of cross-ordered scheduled tasks.

Stores readiness through the initializer storage wrapper and delegates task execution and pagination to scheduled task storage. Execution requires an operational, activated, and unpaused asset.

Methods​

getScheduledCrossOrderedTasks​

function getScheduledCrossOrderedTasks(uint256 _pageIndex, uint256 _pageLength) external view returns (struct ScheduledTask[] scheduledCrossOrderedTask_)

Returns a paginated list of queued cross-ordered scheduled tasks.

Pagination bounds and ordering are defined by the implementation's scheduled task store.

Parameters​

NameTypeDescription
_pageIndexuint256Zero-based page index to query.
_pageLengthuint256Maximum number of scheduled tasks to return.

Returns​

NameTypeDescription
scheduledCrossOrderedTask_ScheduledTask[]Cross-ordered scheduled tasks contained in the requested page.

initializeScheduledCrossOrderedTasks​

function initializeScheduledCrossOrderedTasks() external nonpayable

Initialises the scheduled-cross-ordered-tasks capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

scheduledCrossOrderedTaskCount​

function scheduledCrossOrderedTaskCount() external view returns (uint256)

Returns the number of queued cross-ordered scheduled tasks.

Reads only the cross-ordered task queue and does not filter by due timestamp.

Returns​

NameTypeDescription
_0uint256Number of scheduled cross-ordered tasks currently queued.

triggerPendingScheduledCrossOrderedTasks​

function triggerPendingScheduledCrossOrderedTasks() external nonpayable returns (uint256)

Triggers all currently due cross-ordered scheduled tasks.

Mutates scheduled task queues and may trigger one due downstream task per cross-ordered task. A failing task reverts the entire call.

Returns​

NameTypeDescription
_0uint256Number of cross-ordered tasks processed from the queue.

triggerScheduledCrossOrderedTasks​

function triggerScheduledCrossOrderedTasks(uint256 _max) external nonpayable returns (uint256)

Triggers due cross-ordered scheduled tasks up to a requested maximum.

Mutates scheduled task queues and may trigger one due downstream task per cross-ordered task. Passing zero may be treated by implementations as no explicit limit.

Parameters​

NameTypeDescription
_maxuint256Maximum number of due cross-ordered tasks to process.

Returns​

NameTypeDescription
_0uint256Number of cross-ordered tasks processed from the queue.

Events​

ScheduledCrossOrderedTasksInitialized​

event ScheduledCrossOrderedTasksInitialized()

Emitted once when the scheduled-cross-ordered-tasks capability is initialised on a token.

Fires exclusively from initializeScheduledCrossOrderedTasks.

TaskExecutionFailed​

event TaskExecutionFailed(bytes32 indexed actionId, bytes32 indexed taskType, uint256 scheduledTimestamp)

Emitted when execution of a scheduled task fails.

Parameters​

NameTypeDescription
actionId indexedbytes32Corporate action identifier or task type associated with the failed task.
taskType indexedbytes32Scheduled task category or dispatch type that failed.
scheduledTimestampuint256Timestamp at which the failed task was scheduled to become due.

Errors​

AccountHasNoRole​

error AccountHasNoRole(address account, bytes32 role)

Thrown when an account does not hold a required role.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the role.
rolebytes32The 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​

NameTypeDescription
configIdbytes32Resolver-proxy configuration whose operational status was checked.
versionIduint256Configuration 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​

NameTypeDescription
facetIdbytes32Identifier of the offending facet.
lastVersionuint256Last 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).

UnexpectedError​

error UnexpectedError(bytes4 _errorId)

Reverts when an unreachable validation state is detected.

Replaces assertions for defensive handling of logically impossible states.

Parameters​

NameTypeDescription
_errorIdbytes4Identifier of the unexpected validation condition.

UnrecognizedResolverProxyVersion​

error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)

Thrown when the provided proxy version does not match any BLR compatible standard.

Parameters​

NameTypeDescription
_resolverProxyVersionbytes8proxy version that is not compatible with the BLR.

WalletRecovered​

error WalletRecovered()

Thrown when attempting to recover a wallet that has already been recovered.