Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
47eb020
coupon listing 2
AlbertoMolinaIoBuilders Sep 22, 2025
ee8cd36
Merge remote-tracking branch 'origin/develop' into feat/CouponListing
AlbertoMolinaIoBuilders Sep 23, 2025
97c331a
refactor: init coupon
AlbertoMolinaIoBuilders Sep 23, 2025
97a404d
feature: bond details with enum and coupon with dates SC
AlbertoMolinaIoBuilders Sep 25, 2025
9020d96
refactor: success removed from corporateActions and bondDetailsData u…
AlbertoMolinaIoBuilders Sep 25, 2025
dba89e0
refactor: sdk updated to bond and coupon changes
AlbertoMolinaIoBuilders Sep 25, 2025
9e63dbe
refactor: sdk tests fixed
AlbertoMolinaIoBuilders Sep 25, 2025
23ca72d
test: smart contract bond tests added
AlbertoMolinaIoBuilders Sep 25, 2025
69584db
refactor: sdk updated
AlbertoMolinaIoBuilders Sep 25, 2025
6cd5733
refactor: sdk tests fixed
AlbertoMolinaIoBuilders Sep 25, 2025
ba417c1
refactor: web updated to match new bonds and coupons
AlbertoMolinaIoBuilders Sep 25, 2025
f209184
Merge remote-tracking branch 'origin/develop' into feat/CouponListing
AlbertoMolinaIoBuilders Oct 1, 2025
58cb6c8
Merge remote-tracking branch 'origin/feat/CouponListing' into feat/Co…
AlbertoMolinaIoBuilders Oct 1, 2025
05a2451
feature: interest rates added for sc
AlbertoMolinaIoBuilders Oct 1, 2025
abe027a
fix: tests sc fixed
AlbertoMolinaIoBuilders Oct 1, 2025
676e31a
fix: bug fixes
AlbertoMolinaIoBuilders Oct 2, 2025
4f6f05b
Merge remote-tracking branch 'origin/develop' into feat/CounponIntere…
AlbertoMolinaIoBuilders Oct 14, 2025
abd1922
changes ongoing
AlbertoMolinaIoBuilders Nov 11, 2025
bf567ac
feat: corporate actions updated and kpi errors fixed
AlbertoMolinaIoBuilders Nov 12, 2025
6978b16
code refactor corporate actions
AlbertoMolinaIoBuilders Nov 12, 2025
de17b14
code refactor
AlbertoMolinaIoBuilders Nov 12, 2025
c78504a
Merge remote-tracking branch 'origin/develop' into feat/CounponIntere…
AlbertoMolinaIoBuilders Nov 17, 2025
5231145
feat: all merge and compiling
AlbertoMolinaIoBuilders Nov 17, 2025
6c538b3
Merge remote-tracking branch 'origin/develop' into feat/CounponIntere…
AlbertoMolinaIoBuilders Nov 19, 2025
2cbe0c0
fix: resolver keys for bond types updated and format
AlbertoMolinaIoBuilders Nov 19, 2025
719ee96
fix: bug and tests fixed
AlbertoMolinaIoBuilders Nov 19, 2025
b1a8e97
fix: bugs fixed
AlbertoMolinaIoBuilders Nov 19, 2025
0a05639
fix: bugs fixed
AlbertoMolinaIoBuilders Nov 19, 2025
9201787
feat: fixed rate config created
AlbertoMolinaIoBuilders Nov 19, 2025
0675165
fix: fixed rate facet added
AlbertoMolinaIoBuilders Nov 19, 2025
99ccda8
feat(contracts): add coupon interest rate interfaces to ERC3643 clone…
MiguelLZPF Nov 19, 2025
9288924
feat: added to factory
AlbertoMolinaIoBuilders Nov 19, 2025
b653fc1
feat(contracts): add coupon interest rate interfaces to ERC3643 clone…
MiguelLZPF Nov 19, 2025
7c623fd
docs(contracts): update scripts DEVELOPER_GUIDE with current architec…
MiguelLZPF Nov 19, 2025
524524a
fix: storage layout breaking change fixed (#705)
AlbertoMolinaIoBuilders Nov 20, 2025
1126124
feat: bond fixed rate asset added to scripts
AlbertoMolinaIoBuilders Nov 21, 2025
d1db99f
fix: bug fixed and index updated
AlbertoMolinaIoBuilders Nov 21, 2025
090703f
Fixed Rate added to deployment
AlbertoMolinaIoBuilders Nov 21, 2025
0ac2254
feat: utils updated with bond fixed rate
AlbertoMolinaIoBuilders Nov 21, 2025
dd5c0be
test: bond fixed rate
AlbertoMolinaIoBuilders Nov 21, 2025
0e440fb
fix: use correct BOND_FIXED_RATE_CONFIG_ID in BondFixedRate deployment
MiguelLZPF Nov 21, 2025
8041341
test: fixedRate test added
AlbertoMolinaIoBuilders Nov 21, 2025
7d1844b
fix: bug fixes and bond fixed rate tests updated
AlbertoMolinaIoBuilders Nov 21, 2025
f27d596
fix: tests and scripts updated
AlbertoMolinaIoBuilders Nov 21, 2025
af69936
test: fix 7 test failures after bond fixed rate configuration addition
MiguelLZPF Nov 24, 2025
57f2baa
chore: merge develop into feat/CounponInterestRates
MiguelLZPF Nov 24, 2025
b9bbf7c
Merge remote-tracking branch 'origin/develop' into feat/CouponInteres…
AlbertoMolinaIoBuilders Nov 26, 2025
966a9b4
feat: kpi linked added to sc
AlbertoMolinaIoBuilders Nov 26, 2025
324cbf7
test: tests fixed
AlbertoMolinaIoBuilders Nov 26, 2025
1bd8ea9
fix: bug fixes kpi linked
AlbertoMolinaIoBuilders Nov 26, 2025
dbc4fb9
test: only removed
AlbertoMolinaIoBuilders Nov 27, 2025
0aa11a9
fix: kpi linked bugs fixed
AlbertoMolinaIoBuilders Nov 28, 2025
f9bf2fe
test: new kpi test
AlbertoMolinaIoBuilders Nov 28, 2025
8cb9ac1
Merge remote-tracking branch 'origin/develop' into feat/CouponInteres…
AlbertoMolinaIoBuilders Nov 28, 2025
955a165
fix: adjsutment precision added to kpi linked
AlbertoMolinaIoBuilders Nov 28, 2025
1f473a4
Merge remote-tracking branch 'origin/develop' into feat/CouponInteres…
AlbertoMolinaIoBuilders Dec 2, 2025
9e8b808
Merge remote-tracking branch 'origin/develop' into feat/CouponInteres…
AlbertoMolinaIoBuilders Dec 9, 2025
bd3a3f7
feat: sustainability performance target rate added
AlbertoMolinaIoBuilders Dec 9, 2025
81fada8
Merge remote-tracking branch 'origin/develop' into feat/CouponInteres…
AlbertoMolinaIoBuilders Dec 9, 2025
50931e4
fix: merge error fixed
AlbertoMolinaIoBuilders Dec 9, 2025
1135ffa
feat: code refactoring
AlbertoMolinaIoBuilders Dec 10, 2025
d0d0e1a
refactor: common moved to layer 0
AlbertoMolinaIoBuilders Dec 10, 2025
8c8dd83
refactor: layer 0 extensions layer created
AlbertoMolinaIoBuilders Dec 10, 2025
c768dbe
fix: test fixed
AlbertoMolinaIoBuilders Dec 10, 2025
d118763
feat: MakeMeExplode function added
AlbertoMolinaIoBuilders Dec 10, 2025
41b205a
docs: facets list updated
AlbertoMolinaIoBuilders Dec 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions apps/ats/web/src/i18n/en/security/coupons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ export default {
placeholder: "0,123%",
tooltip: "Interest rate for the coupon.",
},
period: {
label: "Coupon period",
placeholder: "Select coupon period",
tooltip: "The period between coupon payments. This field is required for all coupon operations.",
options: {
day: "1 Day",
week: "1 Week",
month: "1 Month",
quarter: "3 Months",
year: "1 Year",
},
startDate: {
label: "Start date",
placeholder: "Select start date",
tooltip: "Coupon’s start date, must occur before the end date.",
},
endDate: {
label: "End date",
placeholder: "Select end date",
tooltip: "Coupon’s end date, Accrual period correspond to the period between start and end date.",
},
fixingDate: {
label: "Fixing date",
placeholder: "Select fixing date",
tooltip: "Coupon’s fixing date, floating rate coupons only.",
},
},
},
Expand All @@ -69,6 +72,9 @@ export default {
details: {
title: "Detail",
paymentDay: "Payment day",
startDay: "start day",
endDay: "end day",
fixingDay: "fixing day",
balance: "Balance",
amount: "Amount",
recordDateReached: "Record Date Reached",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import { createColumnHelper } from '@tanstack/table-core';
import { Table, Text } from 'io-bricks-ui';
import { useTranslation } from 'react-i18next';
import { DATE_TIME_FORMAT } from '../../../../utils/constants';
import {
formatDate,
formatCouponPeriod,
formatNumberLocale,
} from '../../../../utils/format';
import { formatDate, formatNumberLocale } from '../../../../utils/format';

export const CouponsList = () => {
const { id } = useParams();
Expand Down Expand Up @@ -54,9 +50,19 @@ export const CouponsList = () => {
`${formatNumberLocale(row.getValue(), row.row.original.rateDecimals ?? 0)}%`,
enableSorting: false,
}),
columnHelper.accessor('period', {
header: t('columns.period'),
cell: (row) => formatCouponPeriod(row.getValue()),
columnHelper.accessor('startDate', {
header: t('columns.startDate'),
cell: (row) => formatDate(row.getValue(), DATE_TIME_FORMAT),
enableSorting: false,
}),
columnHelper.accessor('endDate', {
header: t('columns.endDate'),
cell: (row) => formatDate(row.getValue(), DATE_TIME_FORMAT),
enableSorting: false,
}),
columnHelper.accessor('fixingDate', {
header: t('columns.fixingDate'),
cell: (row) => formatDate(row.getValue(), DATE_TIME_FORMAT),
enableSorting: false,
}),
columnHelper.accessor('snapshotId', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ import {
CalendarInputController,
InputNumberController,
PhosphorIcon,
SelectController,
Text,
Tooltip,
} from 'io-bricks-ui';
Expand All @@ -223,18 +222,17 @@ import {
import { useParams } from 'react-router-dom';
import { useCoupons } from '../../../../hooks/queries/useCoupons';
import { useGetBondDetails } from '../../../../hooks/queries/useGetSecurityDetails';
import {
dateToUnixTimestamp,
validateCouponPeriod,
} from '../../../../utils/format';
import { DATE_TIME_FORMAT, TIME_PERIODS_S } from '../../../../utils/constants';
import { dateToUnixTimestamp } from '../../../../utils/format';
import { DATE_TIME_FORMAT } from '../../../../utils/constants';
import { isBeforeDate } from '../../../../utils/helpers';

interface ProgramCouponFormValues {
rate: number;
recordTimestamp: string;
executionTimestamp: string;
period: string;
startTimestamp: string;
endTimestamp: string;
fixingTimestamp: string;
}

export const ProgramCoupon = () => {
Expand All @@ -249,6 +247,8 @@ export const ProgramCoupon = () => {
const { t: tGlobal } = useTranslation('globals');
const { id = '' } = useParams();
const recordTimestamp = watch('recordTimestamp');
const startTimestamp = watch('startTimestamp');
const fixingTimestamp = watch('fixingTimestamp');

const { data: bondDetails } = useGetBondDetails(
new GetBondDetailsRequest({
Expand All @@ -262,7 +262,10 @@ export const ProgramCoupon = () => {
rate: params.rate.toString(),
recordTimestamp: dateToUnixTimestamp(params.recordTimestamp),
executionTimestamp: dateToUnixTimestamp(params.executionTimestamp),
period: params.period,
startTimestamp: dateToUnixTimestamp(params.startTimestamp),
endTimestamp: dateToUnixTimestamp(params.endTimestamp),
fixingTimestamp: dateToUnixTimestamp(params.fixingTimestamp),
rateStatus: 1
});

createCoupon(request, {
Expand Down Expand Up @@ -321,7 +324,9 @@ export const ProgramCoupon = () => {
id="executionTimestamp"
rules={{
required,
validate: isAfterDate(new Date(recordTimestamp)),
validate:
isAfterDate(new Date(recordTimestamp)) &&
isAfterDate(new Date(fixingTimestamp)),
}}
fromDate={new Date()}
toDate={new Date(bondDetails.maturityDate)}
Expand All @@ -331,6 +336,77 @@ export const ProgramCoupon = () => {
/>
)}
</Stack>
<Stack w="full">
<HStack justifySelf="flex-start">
<Text textStyle="BodyTextRegularSM">
{tForm('startDate.label')}*
</Text>
<Tooltip label={tForm('startDate.tooltip')} placement="right">
<PhosphorIcon as={Info} />
</Tooltip>
</HStack>
{bondDetails && (
<CalendarInputController
control={control}
id="startTimestamp"
rules={{ required }}
fromDate={new Date()}
toDate={new Date(bondDetails.maturityDate)}
placeholder={tForm('startDate.placeholder')}
withTimeInput
format={DATE_TIME_FORMAT}
/>
)}
</Stack>
<Stack w="full">
<HStack justifySelf="flex-start">
<Text textStyle="BodyTextRegularSM">
{tForm('endDate.label')}*
</Text>
<Tooltip label={tForm('endDate.tooltip')} placement="right">
<PhosphorIcon as={Info} />
</Tooltip>
</HStack>
{bondDetails && (
<CalendarInputController
control={control}
id="endTimestamp"
rules={{
required,
validate: isAfterDate(new Date(startTimestamp)),
}}
fromDate={new Date()}
toDate={new Date(bondDetails.maturityDate)}
placeholder={tForm('endDate.placeholder')}
withTimeInput
format={DATE_TIME_FORMAT}
/>
)}
</Stack>
<Stack w="full">
<HStack justifySelf="flex-start">
<Text textStyle="BodyTextRegularSM">
{tForm('fixingDate.label')}*
</Text>
<Tooltip label={tForm('fixingDate.tooltip')} placement="right">
<PhosphorIcon as={Info} />
</Tooltip>
</HStack>
{bondDetails && (
<CalendarInputController
control={control}
id="fixingTimestamp"
rules={{
required,
}}
fromDate={new Date()}
toDate={new Date(bondDetails.maturityDate)}
placeholder={tForm('fixingDate.placeholder')}
withTimeInput
format={DATE_TIME_FORMAT}
/>
)}
</Stack>
<Stack w="full">
<HStack justifySelf="flex-start">
<Text textStyle="BodyTextRegularSM">{tForm('rate.label')}*</Text>
Expand All @@ -351,50 +427,6 @@ export const ProgramCoupon = () => {
decimalSeparator="."
/>
</Stack>
<Stack w="full">
<HStack justifySelf="flex-start">
<Text textStyle="BodyTextRegularSM">
{tForm('period.label')}*
</Text>
<Tooltip label={tForm('period.tooltip')} placement="right">
<PhosphorIcon as={Info} />
</Tooltip>
</HStack>
<SelectController
control={control}
id="period"
rules={{
required,
validate: (value: string) => {
const validation = validateCouponPeriod(parseInt(value));
return validation === true || validation;
},
}}
placeholder={tForm('period.placeholder')}
options={[
{
label: tForm('period.options.day'),
value: TIME_PERIODS_S.DAY.toString(),
},
{
label: tForm('period.options.week'),
value: TIME_PERIODS_S.WEEK.toString(),
},
{
label: tForm('period.options.month'),
value: TIME_PERIODS_S.MONTH.toString(),
},
{
label: tForm('period.options.quarter'),
value: TIME_PERIODS_S.QUARTER.toString(),
},
{
label: tForm('period.options.year'),
value: TIME_PERIODS_S.YEAR.toString(),
},
]}
/>
</Stack>
<Button
data-testid="create-coupon-button"
alignSelf="flex-end"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,24 @@ export const SeeCoupon = () => {
canCopy: true,
valueToCopy: coupons.executionDate.toDateString(),
},
{
title: tDetail("startDay"),
description: formatDate(coupons.startDate, DATE_TIME_FORMAT),
canCopy: true,
valueToCopy: coupons.startDate.toDateString(),
},
{
title: tDetail("endDay"),
description: formatDate(coupons.endDate, DATE_TIME_FORMAT),
canCopy: true,
valueToCopy: coupons.endDate.toDateString(),
},
{
title: tDetail("fixingDay"),
description: formatDate(coupons.fixingDate, DATE_TIME_FORMAT),
canCopy: true,
valueToCopy: coupons.fixingDate.toDateString(),
},
{
title: tDetail("balance"),
description: formatNumberLocale(couponsFor.tokenBalance, parseFloat(couponsFor.decimals)),
Expand Down
3 changes: 2 additions & 1 deletion packages/ats/contracts/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ export const CONTRACT_NAMES = [
"BondUSARead", //TODO
"ScheduledSnapshotsFacet",
"ScheduledBalanceAdjustmentsFacet",
"scheduledCrossOrderedTasksFacet",
"ScheduledCrossOrderedTasksFacet",
"ScheduledCouponListingFacet",
"SnapshotsFacet",
"CorporateActionsFacet",
"TransferAndLockFacet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
pragma solidity ^0.8.17;

interface TRexIBondRead {
enum RateCalculationStatus {
PENDING,
SET
}

struct BondDetailsData {
bytes3 currency;
uint256 nominalValue;
Expand All @@ -13,9 +18,12 @@ interface TRexIBondRead {
struct Coupon {
uint256 recordDate;
uint256 executionDate;
uint256 startDate;
uint256 endDate;
uint256 fixingDate;
uint256 rate;
uint8 rateDecimals;
uint256 period;
RateCalculationStatus rateStatus;
}

struct RegisteredCoupon {
Expand All @@ -25,13 +33,9 @@ interface TRexIBondRead {

struct CouponFor {
uint256 tokenBalance;
uint256 rate;
uint8 rateDecimals;
uint256 recordDate;
uint256 executionDate;
uint256 period;
uint8 decimals;
bool recordDateReached;
Coupon coupon;
}

struct CouponAmountFor {
Expand Down Expand Up @@ -93,4 +97,13 @@ interface TRexIBondRead {
* @dev It is the list of token holders at the snapshot taken at the record date
*/
function getTotalCouponHolders(uint256 _couponID) external view returns (uint256);

function getCouponFromOrderedListAt(uint256 _pos) external view returns (uint256 couponID_);

function getCouponsOrderedList(
uint256 _pageIndex,
uint256 _pageLength
) external view returns (uint256[] memory couponIDs_);

function getCouponsOrderedListTotal() external view returns (uint256 total_);
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ interface TRexIEquity {
* @notice Sets a new dividend
* @dev Can only be called by an account with the corporate actions role
*/
function setDividends(Dividend calldata _newDividend) external returns (bool success_, uint256 dividendID_);
function setDividends(Dividend calldata _newDividend) external returns (uint256 dividendID_);

/**
* @notice Sets a new voting
* @dev Can only be called by an account with the corporate actions role
*/
function setVoting(Voting calldata _newVoting) external returns (bool success_, uint256 voteID_);
function setVoting(Voting calldata _newVoting) external returns (uint256 voteID_);

/**
* @notice Sets a new scheduled balance adjustment
* @dev The task is added to the queue and executed when the execution date is reached
*/
function setScheduledBalanceAdjustment(
ScheduledBalanceAdjustment calldata _newBalanceAdjustment
) external returns (bool success_, uint256 balanceAdjustmentID_);
) external returns (uint256 balanceAdjustmentID_);

function getEquityDetails() external view returns (EquityDetailsData memory equityDetailsData_);

Expand Down
Loading
Loading