Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fa07c70
test(contracts): add TUP upgrade operation tests (#741)
MiguelLZPF Dec 18, 2025
b802e88
feat(contracts): add updateResolverProxyConfig operation script (#740)
MiguelLZPF Dec 19, 2025
c7ff16f
feat(contracts): Add upgrade workflows for ATS configurations and TUP…
MiguelLZPF Dec 24, 2025
1f51771
feat(contracts): centralize deployment file management utilities (#769)
MiguelLZPF Jan 5, 2026
41ee3a6
fix: Mass payout contracts audit issues fixes and swagger documentati…
mamoralesiob Jan 8, 2026
1ecd8ee
refactor(scripts): standardize timestamp format to ISO with filesyste…
MiguelLZPF Jan 9, 2026
7f92cd7
feat(contracts): enable parallel test execution with tsx loader and f…
MiguelLZPF Jan 9, 2026
650874b
chore: disable sdk coverage in jest config (#781)
jaime-iobermudez Jan 13, 2026
d10dfe3
fix: changes in sdk and backend because of smar contract audit issues…
mamoralesiob Jan 13, 2026
3ba32c9
fix: Audit issues (#768)
themariofrancia Jan 14, 2026
6950d41
feat: patch uploaded (#771)
AlbertoMolinaIoBuilders Jan 14, 2026
c10a8ee
chore: update @hashgraph/sdk dependency to @hiero-ledger/sdk (#783)
themariofrancia Jan 19, 2026
902fea1
chore: enhance project documentation (#788)
themariofrancia Jan 20, 2026
2d5495e
feat: increase smartcontract coverage (#786)
Axel-IoBuilders Jan 20, 2026
892644f
chore: merge main into develop to sync v3.1.0 release
MiguelLZPF Jan 21, 2026
dff883d
fix(ci): publish Contracts instead of duplicate SDK (#791)
MiguelLZPF Jan 21, 2026
cbcc1db
feat: protected transfer and lock removed (#790)
AlbertoMolinaIoBuilders Jan 21, 2026
8794625
chore: update ci doc (#792)
themariofrancia Jan 21, 2026
05fb97d
chore: fix package name in changeset file
themariofrancia Jan 21, 2026
8f7487a
fix: nonces centralized, eip712 name and version fixed (#787)
AlbertoMolinaIoBuilders Jan 21, 2026
f06d60d
chore: release ATS packages v4.0.0
themariofrancia Jan 22, 2026
d206817
chore: update doc
themariofrancia Jan 22, 2026
ad8c2e8
chore: update deployed contract addresses and configuration in docume…
themariofrancia Jan 22, 2026
4bb903a
refactor(scripts): standardize CLI, logging, and validation utilities…
MiguelLZPF Jan 22, 2026
38ab60e
fix: linting issues for ATS contracts (#796)
jaime-iobermudez Jan 22, 2026
ff7945e
chore: lint project, update headers, and add husky check (#797)
jaime-iobermudez Jan 23, 2026
8fa8ec4
feat: kpilatest now available in kpilinked (#793)
AlbertoMolinaIoBuilders Jan 26, 2026
ca5e9fa
refactor: adjusted replace by adjustedat
AlbertoMolinaIoBuilders Jan 26, 2026
1af8019
fix: unused interface removed
AlbertoMolinaIoBuilders Jan 26, 2026
5f5c449
feature: total balance facet
AlbertoMolinaIoBuilders Jan 26, 2026
c4c8810
fix: only removed
AlbertoMolinaIoBuilders Jan 26, 2026
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
5 changes: 5 additions & 0 deletions .changeset/all-banks-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-contracts": minor
---

kpi linked interest rate coupons now use the kpi latest facet instead of the kpi oracle
29 changes: 29 additions & 0 deletions .changeset/scripts-refactoring-cli-standardization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@hashgraph/asset-tokenization-contracts": patch
---

refactor(scripts): standardize CLI entry points and improve infrastructure

**CLI Standardization:**

- Unified CLI entry points to match workflow names (deploySystemWithNewBlr, deploySystemWithExistingBlr, upgradeConfigurations, upgradeTupProxies)
- Created shared validation utilities in `cli/shared/` module eliminating ~100+ lines of duplicated code
- Standardized environment variable parsing and address validation across all CLI files

**Infrastructure Improvements:**

- Resolved circular import issues in logging module
- Exposed tools layer API through main scripts entry point
- Consolidated validation utilities for better code reuse

**Performance Fix:**

- Fixed parallel test performance regression (8+ min β†’ 2 min)
- Restored dynamic imports in blrConfigurations.ts to prevent eager typechain loading
- Added troubleshooting documentation for future reference

**Documentation:**

- Enhanced JSDoc documentation across infrastructure operations
- Added troubleshooting section for parallel test performance issues
- Updated README with CLI shared utilities documentation
6 changes: 0 additions & 6 deletions apps/ats/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# @hashgraph/asset-tokenization-dapp

## 4.0.1

### Patch Changes

- @hashgraph/asset-tokenization-sdk@4.0.1

## 4.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/ats/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/asset-tokenization-dapp",
"version": "4.0.1",
"version": "4.0.0",
"license": "Apache-2.0",
"scripts": {
"build": "tsc && vite build",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions packages/ats/contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
# @hashgraph/asset-tokenization-contracts

## 4.0.1

### Patch Changes

- 171b22b: Fix all lint issues in contracts package.
- d1552c7: refactor(scripts): standardize CLI entry points and improve infrastructure

**CLI Standardization:**
- Unified CLI entry points to match workflow names (deploySystemWithNewBlr, deploySystemWithExistingBlr, upgradeConfigurations, upgradeTupProxies)
- Created shared validation utilities in `cli/shared/` module eliminating ~100+ lines of duplicated code
- Standardized environment variable parsing and address validation across all CLI files

**Infrastructure Improvements:**
- Resolved circular import issues in logging module
- Exposed tools layer API through main scripts entry point
- Consolidated validation utilities for better code reuse

**Performance Fix:**
- Fixed parallel test performance regression (8+ min β†’ 2 min)
- Restored dynamic imports in blrConfigurations.ts to prevent eager typechain loading
- Added troubleshooting documentation for future reference

**Documentation:**
- Enhanced JSDoc documentation across infrastructure operations
- Added troubleshooting section for parallel test performance issues
- Updated README with CLI shared utilities documentation

## 4.0.0

### Major Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TRexIFixedRate as IFixedRate } from "./IFixedRate.sol";
import { TRexIKpiLinkedRate as IKpiLinkedRate } from "./IKpiLinkedRate.sol";
// prettier-ignore
// solhint-disable-next-line max-line-length
import {TRexISustainabilityPerformanceTargetRate as ISustainabilityPerformanceTargetRate} from "./ISustainabilityPerformanceTargetRate.sol";
import {TRexISustainabilityPerformanceTargetRate as ISustainabilityPerformanceTargetRate} from './ISustainabilityPerformanceTargetRate.sol';

interface TRexIFactory {
enum SecurityType {
Expand Down Expand Up @@ -61,7 +61,6 @@ interface TRexIFactory {
FactoryRegulationData factoryRegulationData;
IKpiLinkedRate.InterestRate interestRate;
IKpiLinkedRate.ImpactData impactData;
address kpiOracle;
}

struct BondSustainabilityPerformanceTargetRateData {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,16 @@ interface TRexIKpiLinkedRate {

event InterestRateUpdated(address indexed operator, InterestRate newInterestRate);
event ImpactDataUpdated(address indexed operator, ImpactData newImpactData);
event KpiOracleUpdated(address indexed operator, address kpiOracle);

error WrongInterestRateValues(InterestRate interestRate);
error WrongImpactDataValues(ImpactData impactData);
error KpiOracleCalledFailed();

// solhint-disable-next-line func-name-mixedcase
function initialize_KpiLinkedRate(
InterestRate calldata _interestRate,
ImpactData calldata _impactData,
address kpiOracle
) external;
function initialize_KpiLinkedRate(InterestRate calldata _interestRate, ImpactData calldata _impactData) external;

function setInterestRate(InterestRate calldata _newInterestRate) external;
function setImpactData(ImpactData calldata _newImpactData) external;
function setKpiOracle(address _kpiOracle) external;

function getInterestRate() external view returns (InterestRate memory interestRate_);

function getImpactData() external view returns (ImpactData memory impactData_);
function getKpiOracle() external view returns (address kpiOracle_);
}
3 changes: 1 addition & 2 deletions packages/ats/contracts/contracts/factory/Factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ contract Factory is IFactory, Common {

IKpiLinkedRate(bondAddress_).initialize_KpiLinkedRate(
_bondKpiLinkedRateData.interestRate,
_bondKpiLinkedRateData.impactData,
_bondKpiLinkedRateData.kpiOracle
_bondKpiLinkedRateData.impactData
);

emit BondKpiLinkedRateDeployed(_msgSender(), bondAddress_, _bondKpiLinkedRateData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ interface IFactory {
FactoryRegulationData factoryRegulationData;
IKpiLinkedRate.InterestRate interestRate;
IKpiLinkedRate.ImpactData impactData;
address kpiOracle;
}

struct BondSustainabilityPerformanceTargetRateData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ abstract contract ERC1410StandardStorageWrapper is ERC1410OperatorStorageWrapper
// burn | redeem
_updateAccountSnapshot(from, partition);
_updateTotalSupplySnapshot(partition);
if (amount > 0 && _balanceOfAdjusted(from) == amount) removeFrom = true;
if (amount > 0 && _balanceOfAdjustedAt(from, _blockTimestamp()) == amount) removeFrom = true;
}
// transfer
else {
_updateAccountSnapshot(from, partition);
_updateAccountSnapshot(to, partition);
// _balanceOf instead of _balanceOfAdjusted because we are comparing it to 0
if (amount > 0 && _balanceOf(to) == 0) addTo = true;
if (amount > 0 && _balanceOfAdjusted(from) == amount) removeFrom = true;
if (amount > 0 && _balanceOfAdjustedAt(from, _blockTimestamp()) == amount) removeFrom = true;
}

if (addTo && removeFrom) {
Expand Down Expand Up @@ -154,36 +154,24 @@ abstract contract ERC1410StandardStorageWrapper is ERC1410OperatorStorageWrapper
erc1410Storage.totalSupplyByPartition[_partition] += _value;
}

function _totalSupplyAdjusted() internal view override returns (uint256) {
return _totalSupplyAdjustedAt(_blockTimestamp());
}

function _totalSupplyAdjustedAt(uint256 _timestamp) internal view override returns (uint256) {
(uint256 pendingABAF, ) = _getPendingScheduledBalanceAdjustmentsAt(_timestamp);
return _totalSupply() * pendingABAF;
}

function _totalSupplyByPartitionAdjusted(bytes32 _partition) internal view override returns (uint256) {
uint256 factor = _calculateFactor(_getAbafAdjusted(), _getLabafByPartition(_partition));
function _totalSupplyByPartitionAdjustedAt(
bytes32 _partition,
uint256 _timestamp
) internal view override returns (uint256) {
uint256 factor = _calculateFactor(_getAbafAdjustedAt(_timestamp), _getLabafByPartition(_partition));
return _totalSupplyByPartition(_partition) * factor;
}

function _balanceOfAdjusted(address _tokenHolder) internal view override returns (uint256) {
return _balanceOfAdjustedAt(_tokenHolder, _blockTimestamp());
}

function _balanceOfAdjustedAt(address _tokenHolder, uint256 _timestamp) internal view override returns (uint256) {
uint256 factor = _calculateFactor(_getAbafAdjustedAt(_timestamp), _getLabafByUser(_tokenHolder));
return _balanceOf(_tokenHolder) * factor;
}

function _balanceOfByPartitionAdjusted(
bytes32 _partition,
address _tokenHolder
) internal view override returns (uint256) {
return _balanceOfByPartitionAdjustedAt(_partition, _tokenHolder, _blockTimestamp());
}

function _balanceOfByPartitionAdjustedAt(
bytes32 _partition,
address _tokenHolder,
Expand All @@ -196,10 +184,6 @@ abstract contract ERC1410StandardStorageWrapper is ERC1410OperatorStorageWrapper
return _balanceOfByPartition(_partition, _tokenHolder) * factor;
}

function _getTotalBalance(address _tokenHolder) internal view virtual override returns (uint256) {
return super._getTotalBalance(_tokenHolder) + _balanceOfAdjustedAt(_tokenHolder, _blockTimestamp());
}

function _getTotalBalanceForAdjustedAt(
address _tokenHolder,
uint256 _timestamp
Expand All @@ -209,13 +193,14 @@ abstract contract ERC1410StandardStorageWrapper is ERC1410OperatorStorageWrapper
_balanceOfAdjustedAt(_tokenHolder, _timestamp);
}

function _getTotalBalanceForByPartitionAdjusted(
function _getTotalBalanceForByPartitionAdjustedAt(
bytes32 _partition,
address _tokenHolder
address _tokenHolder,
uint256 _timestamp
) internal view virtual override returns (uint256) {
return
super._getTotalBalanceForByPartitionAdjusted(_partition, _tokenHolder) +
_balanceOfByPartitionAdjustedAt(_partition, _tokenHolder, _blockTimestamp());
super._getTotalBalanceForByPartitionAdjustedAt(_partition, _tokenHolder, _timestamp) +
_balanceOfByPartitionAdjustedAt(_partition, _tokenHolder, _timestamp);
}

function _validateParams(bytes32 _partition, uint256 _value) internal pure override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ abstract contract ERC1594StorageWrapper is IERC1594StorageWrapper, CapStorageWra
bytes32 _partition
) private view returns (bool isAbleToTransfer, bytes1 statusCode, bytes32 reasonCode, bytes memory details) {
if (_checkAllowance) {
uint256 currentAllowance = _allowanceAdjusted(_from, _msgSender());
uint256 currentAllowance = _allowanceAdjustedAt(_from, _msgSender(), _blockTimestamp());
if (currentAllowance < _value) {
return (
false,
Expand All @@ -387,7 +387,7 @@ abstract contract ERC1594StorageWrapper is IERC1594StorageWrapper, CapStorageWra
}

// Balance check - check partition-specific balance
uint256 currentPartitionBalance = _balanceOfByPartitionAdjusted(_partition, _from);
uint256 currentPartitionBalance = _balanceOfByPartitionAdjustedAt(_partition, _from, _blockTimestamp());
if (currentPartitionBalance < _value) {
return (
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ abstract contract ERC20StorageWrapper1 is ERC1410BasicStorageWrapperRead {
_erc20Storage().decimals += decimals;
}

function _decimalsAdjusted() internal view override returns (uint8) {
return _decimalsAdjustedAt(_blockTimestamp());
}

function _allowanceAdjusted(address _owner, address _spender) internal view override returns (uint256) {
return _allowanceAdjustedAt(_owner, _spender, _blockTimestamp());
}

function _allowance(address _owner, address _spender) internal view override returns (uint256) {
return _erc20Storage().allowed[_owner][_spender];
}
Expand All @@ -57,10 +49,6 @@ abstract contract ERC20StorageWrapper1 is ERC1410BasicStorageWrapperRead {
return _allowance(_owner, _spender) * factor;
}

function _getERC20MetadataAdjusted() internal view override returns (IERC20.ERC20Metadata memory erc20Metadata_) {
erc20Metadata_ = _getERC20MetadataAdjustedAt(_blockTimestamp());
}

function _getERC20MetadataAdjustedAt(
uint256 _timestamp
) internal view override returns (IERC20.ERC20Metadata memory erc20Metadata_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ abstract contract ERC20VotesStorageWrapper is ERC1594StorageWrapper {

_takeAbafCheckpoint();

uint256 delegatorBalance = _balanceOfAdjustedAt(delegator, _blockTimestamp()) +
_getLockedAmountForAdjustedAt(delegator, _blockTimestamp()) +
_getHeldAmountForAdjusted(delegator) +
_getClearedAmountForAdjusted(delegator);
uint256 delegatorBalance = _getTotalBalanceForAdjustedAt(delegator, _blockTimestamp());

_erc20VotesStorage().delegates[delegator] = delegatee;

Expand Down Expand Up @@ -179,20 +176,20 @@ abstract contract ERC20VotesStorageWrapper is ERC1594StorageWrapper {
}

function _getVotes(address account) internal view virtual override returns (uint256) {
return _getVotesAdjusted(_clock(), _erc20VotesStorage().checkpoints[account]);
return _getVotesAdjustedAt(_clock(), _erc20VotesStorage().checkpoints[account]);
}

function _getPastVotes(address account, uint256 timepoint) internal view virtual override returns (uint256) {
require(timepoint < _clock(), "ERC20Votes: future lookup");
return _getVotesAdjusted(timepoint, _erc20VotesStorage().checkpoints[account]);
return _getVotesAdjustedAt(timepoint, _erc20VotesStorage().checkpoints[account]);
}

function _getPastTotalSupply(uint256 timepoint) internal view virtual override returns (uint256) {
require(timepoint < _clock(), "ERC20Votes: future lookup");
return _getVotesAdjusted(timepoint, _erc20VotesStorage().totalSupplyCheckpoints);
return _getVotesAdjustedAt(timepoint, _erc20VotesStorage().totalSupplyCheckpoints);
}

function _getVotesAdjusted(
function _getVotesAdjustedAt(
uint256 timepoint,
CheckpointsLib.Checkpoint[] storage ckpts
) internal view override returns (uint256) {
Expand Down
Loading
Loading