Skip to main content

ScheduledTasksDispatchOps

Asset Tokenization Studio Team

ScheduledTasksDispatchOps - External library for isolated scheduled task dispatch

Deployed once as a separate contract. Called via DELEGATECALL. Handles only leaf-task business logic (snapshot, coupon, balance). A revert propagates to the caller, blocking the queue until an authorised caller force-cancels the task. Cross-ordered sub-task routing and all queue storage access live in ScheduledTasksStorageWrapper to avoid circular imports.

Events​

AdjustmentBalanceSet​

event AdjustmentBalanceSet(address indexed operator, uint256 factor, uint8 decimals)

Emitted when an immediate balance adjustment is applied.

Parameters​

NameTypeDescription
operator indexedaddressAddress that triggered the adjustment.
factoruint256Numerator of the adjustment ratio.
decimalsuint8Denominator exponent; effective ratio = factor / 10^decimals.

SnapshotTriggered​

event SnapshotTriggered(uint256 snapshotId, bytes metadata)

Emitted when a scheduled snapshot is executed.

Parameters​

NameTypeDescription
snapshotIduint256Identifier assigned to the triggered snapshot.
metadatabytesArbitrary metadata associated with the scheduled execution.

Errors​

CouponNotFound​

error CouponNotFound(uint256 couponID)

Reverts when a coupon identifier does not resolve to an existing corporate action.

Parameters​

NameTypeDescription
couponIDuint256The coupon identifier that was not found.

DecimalsTooLarge​

error DecimalsTooLarge(uint8 currentDecimals, uint8 newDecimals)

Reverts when the difference between current decimals and new decimals exceeds the maximum value.

Protects decimals amount difference between current and new not te be greater than maximum.

Parameters​

NameTypeDescription
currentDecimalsuint8the current decimals amount.
newDecimalsuint8the new decimals amount.

GreaterThanMaxUint256​

error GreaterThanMaxUint256(uint256 amount, uint8 decimals)

Reverts when multiplying amount by 10 ** decimals would exceed uint256 max.

Thrown by DecimalsLib.calculateDecimalsAdjustment when amount > MAX_UINT256 / 10 ** decimals.

Parameters​

NameTypeDescription
amountuint256The token amount that cannot be scaled up.
decimalsuint8The exponent that causes the overflow.

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.