Skip to main content

IAdjustBalances

Asset Tokenization Studio Team

IAdjustBalances

Interface for immediate balance adjustment corporate actions on tokenised assets.

Balance adjustments multiply every token holder's balance by factor / 10^decimals. Immediate adjustments execute synchronously. Scheduled adjustments are handled by the IScheduledBalanceAdjustment interface and facet.

Methods​

adjustBalances​

function adjustBalances(uint256 _factor, uint8 _decimals) external nonpayable returns (bool success_)

Applies a balance adjustment to all token holders immediately.

Caller must hold ROLE_ADJUSTMENT_BALANCE. The token must not be paused and factor must be non-zero. Pending scheduled tasks at index 0 are triggered before the adjustment is applied, ensuring consistent ordering.

Parameters​

NameTypeDescription
_factoruint256Numerator of the multiplier; effective ratio = factor / 10^decimals.
_decimalsuint8Denominator exponent.

Returns​

NameTypeDescription
success_boolTrue if the adjustment was applied without reverting.

initializeBalanceAdjustments​

function initializeBalanceAdjustments() external nonpayable

Initialises the balance adjustment capability on the token.

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

triggerAndSyncAll​

function triggerAndSyncAll(bytes32 _partition, address _from, address _to) external nonpayable

Triggers pending scheduled tasks and synchronises the balance snapshot for a transfer pair.

Delegates to TokenCoreOps.triggerAndSyncAll. Must be called before any token transfer that should reflect the latest adjustment state. The token must not be paused.

Parameters​

NameTypeDescription
_partitionbytes32Partition identifier of the transfer.
_fromaddressSender address whose snapshot is synchronised.
_toaddressRecipient address whose snapshot is synchronised.

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.

BalanceAdjustmentsInitialized​

event BalanceAdjustmentsInitialized()

Emitted once when the balance adjustment capability is initialised on a token.

Fires exclusively from initializeBalanceAdjustments after the storage write succeeds.

Errors​

DecimalsOverflow​

error DecimalsOverflow()

Reverts when the cumulative decimals shift would overflow uint8.

FactorIsZero​

error FactorIsZero()

Reverts when factor is zero, which would zero-out all holder balances.

FactorOverflow​

error FactorOverflow()

Reverts when the proposed factor would overflow the cumulative ABAF.

TotalSupplyOverflow​

error TotalSupplyOverflow()

Reverts when the proposed factor would overflow the projected total supply.