Skip to main content

ICouponListing

Asset Tokenization Studio Team

ICouponListing

Interface for read-only coupon and scheduled-coupon listing queries.

Consolidates ordered-list methods previously in ICoupon and scheduled listing methods from the former IScheduledCouponListing.

Methods​

getCouponFromOrderedListAt​

function getCouponFromOrderedListAt(uint256 _pos, bool _includeDisabled) external view returns (uint256 couponID_)

Retrieves a coupon ID from the ordered list at a specific position.

Parameters​

NameTypeDescription
_posuint256The position in the ordered coupon list.
_includeDisabledboolWhen true, cancelled coupons are counted in the list; when false, only active coupons are visible.

Returns​

NameTypeDescription
couponID_uint256The coupon ID at the specified position.

getCouponsOrderedList​

function getCouponsOrderedList(uint256 _pageIndex, uint256 _pageLength, bool _includeDisabled) external view returns (uint256[] couponIDs_)

Retrieves a paginated list of coupon IDs in order.

Parameters​

NameTypeDescription
_pageIndexuint256The page index for pagination.
_pageLengthuint256The number of coupons per page.
_includeDisabledboolWhen true, cancelled coupons are included in the page; when false, only active coupons are returned.

Returns​

NameTypeDescription
couponIDs_uint256[]Array of coupon IDs for the specified page.

getCouponsOrderedListTotal​

function getCouponsOrderedListTotal(bool _includeDisabled) external view returns (uint256 total_)

Retrieves the total number of coupons in the ordered list adjusted to the current timestamp.

Parameters​

NameTypeDescription
_includeDisabledboolWhen true, cancelled coupons are counted; when false, only active coupons are counted.

Returns​

NameTypeDescription
total_uint256The total count of coupons.

getScheduledCouponListing​

function getScheduledCouponListing(uint256 _pageIndex, uint256 _pageLength, bool _includeDisabled) external view returns (struct ScheduledTask[] scheduledCouponListing_)

Retrieves a paginated list of scheduled coupon listing tasks.

Parameters​

NameTypeDescription
_pageIndexuint256The page index for pagination.
_pageLengthuint256The number of tasks per page.
_includeDisabledboolWhen true, tasks belonging to cancelled corporate actions are included; when false, only active tasks are returned.

Returns​

NameTypeDescription
scheduledCouponListing_ScheduledTask[]Array of scheduled coupon listing tasks.

initializeCouponListing​

function initializeCouponListing() external nonpayable

Initialises the coupon listing capability on the token.

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

scheduledCouponListingCount​

function scheduledCouponListingCount(bool _includeDisabled) external view returns (uint256)

Returns the number of scheduled coupon listing tasks.

Parameters​

NameTypeDescription
_includeDisabledboolWhen true, tasks belonging to cancelled corporate actions are counted; when false, only active tasks are counted.

Returns​

NameTypeDescription
_0uint256The count of scheduled coupon listing tasks.

Events​

CouponListingInitialized​

event CouponListingInitialized()

Emitted once when the coupon listing capability is initialised on a token.

Fires exclusively from initializeCouponListing.