Skip to main content

NominalValue

Asset Tokenization Studio Team

NominalValue

Writer abstract for the nominal value capability; sole emit site for the events declared on INominalValue.

Delegates all storage reads and writes to NominalValueStorageWrapper, which owns the dedicated storage slot. Access guards are enforced via Modifiers.

Methods​

getIsUnitNominalValue​

function getIsUnitNominalValue() external view returns (bool)

Returns whether the nominal value is a per-unit or aggregate value.

Set once at initializeNominalValue time; unchanged by publish/republish.

Returns​

NameTypeDescription
_0boolTrue when the nominal value is expressed per unit; false when aggregate.

getNominalValue​

function getNominalValue() external view returns (uint256)

Returns the nominal value amount.

Returns​

NameTypeDescription
_0uint256The current nominal value amount.

getNominalValueCurrency​

function getNominalValueCurrency() external view returns (bytes3)

Returns the ISO 4217 currency code attached to the nominal value.

Returns​

NameTypeDescription
_0bytes3The current ISO 4217 currency code as bytes3; 0x000000 means "unset".

getNominalValueDecimals​

function getNominalValueDecimals() external view returns (uint256)

Returns the decimals applied to the nominal value.

Returns​

NameTypeDescription
_0uint256The current decimals applied to getNominalValue.

initializeNominalValue​

function initializeNominalValue(uint256 _nominalValue, uint256 _nominalValueDecimals, bytes3 _nominalValueCurrency, uint256 _effectiveDatetime, bool _isUnitNominalValue) external nonpayable

Initialises the nominal value capability with amount, decimals, currency, effective datetime, and the unit/total flag.

Callable once per token; subsequent calls revert with AlreadyInitialized via the onlyFacetNotRegistered modifier on the implementation. _effectiveDatetime may be zero during initialisation; any non-zero value must be strictly less than block.timestamp or the call reverts with ICommonErrors.WrongTimestamp.

Parameters​

NameTypeDescription
_nominalValueuint256Initial nominal value amount.
_nominalValueDecimalsuint256Number of decimals applied to _nominalValue. Fixed for the lifetime of the token.
_nominalValueCurrencybytes3ISO 4217 currency code as bytes3; pass 0x000000 to leave unset.
_effectiveDatetimeuint256Zero or a timestamp strictly less than block.timestamp.
_isUnitNominalValueboolWhether _nominalValue is a per-unit (true) or aggregate (false) value.

publishNominalValue​

function publishNominalValue(uint256 _nominalValue, uint256 _effectiveDatetime) external nonpayable

Publishes a new nominal value for a new valuation period.

Restricted to holders of ROLE_NOMINAL_VALUE. The onlyValidTimestamp modifier rejects zero, onlyValidPublishDatetime requires _effectiveDatetime to be strictly greater than the currently stored effectiveDatetime, and onlyPastTimestamp requires it to be strictly less than block.timestamp. Triggers pending scheduled cross-ordered tasks and emits NominalValuePublished.

Parameters​

NameTypeDescription
_nominalValueuint256New nominal value amount.
_effectiveDatetimeuint256New effective datetime; must satisfy storedEffectiveDatetime < _effectiveDatetime < block.timestamp.

republishNominalValue​

function republishNominalValue(uint256 _nominalValue, uint256 _effectiveDatetime) external nonpayable

Corrects the nominal value already published for the current valuation period.

Restricted to holders of ROLE_NOMINAL_VALUE. The onlyValidTimestamp modifier rejects zero, and onlyValidRepublishDatetime reverts with NominalValueEffectiveDatetimeMismatch unless _effectiveDatetime exactly equals the currently stored effectiveDatetime. Triggers pending scheduled cross-ordered tasks and emits NominalValueRepublished.

Parameters​

NameTypeDescription
_nominalValueuint256Corrected nominal value amount.
_effectiveDatetimeuint256Non-zero effective datetime; must equal the currently stored one.

Events​

NominalValueInitialized​

event NominalValueInitialized(uint256 nominalValue, uint256 nominalValueDecimals, bytes3 nominalValueCurrency)

Emitted once when the nominal value capability is initialised on a token.

Fires exclusively from initializeNominalValue after the storage write succeeds.

Parameters​

NameTypeDescription
nominalValueuint256The initial nominal value amount.
nominalValueDecimalsuint256The number of decimals applied to nominalValue.
nominalValueCurrencybytes3ISO 4217 currency code as bytes3; 0x000000 means "unset".

NominalValuePublished​

event NominalValuePublished(address indexed operator, uint256 nominalValue, uint256 effectiveDatetime)

Emitted when a new nominal value is published for a new valuation period.

Fires exclusively from publishNominalValue.

Parameters​

NameTypeDescription
operator indexedaddressThe caller authorised by ROLE_NOMINAL_VALUE.
nominalValueuint256The new nominal value amount.
effectiveDatetimeuint256The new effective datetime.

NominalValueRepublished​

event NominalValueRepublished(address indexed operator, uint256 nominalValue, uint256 effectiveDatetime)

Emitted when the nominal value for the current valuation period is corrected.

Fires exclusively from republishNominalValue.

Parameters​

NameTypeDescription
operator indexedaddressThe caller authorised by ROLE_NOMINAL_VALUE.
nominalValueuint256The corrected nominal value amount.
effectiveDatetimeuint256The (unchanged) effective datetime being corrected.

Errors​

AccountHasNoRole​

error AccountHasNoRole(address account, bytes32 role)

Thrown when an account does not hold a required role.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the role.
rolebytes32The role that is not held.

AssetNotOperational​

error AssetNotOperational(bytes32 configId, uint256 versionId)

Raised by InitializerStorageWrapper.checkOperational (and the related isConfigVersionOperational helper) when an operation is attempted on a configuration version that has not yet been marked operational.

Parameters​

NameTypeDescription
configIdbytes32Resolver-proxy configuration whose operational status was checked.
versionIduint256Configuration version whose operational status was checked.

Deactivated​

error Deactivated()

Thrown when an operation guarded by onlyActivated is attempted on a token whose deactivation flag has already been set.

FacetAlreadyRegistered​

error FacetAlreadyRegistered(bytes32 facetId, uint256 lastVersion)

Raised when an initialiser tries to register a facet that already has a non-zero last registered version (i.e. the facet is being re-initialised on a fresh install).

Parameters​

NameTypeDescription
facetIdbytes32Identifier of the offending facet.
lastVersionuint256Last version recorded for that facet at the time of the check.

InvalidTimestamp​

error InvalidTimestamp()

Reverts when a timestamp value is invalid.

Used for shared timestamp validation that is not tied to expiration.

NominalValueEffectiveDatetimeMismatch​

error NominalValueEffectiveDatetimeMismatch(uint256 provided, uint256 current)

Raised when republishNominalValue is called with an _effectiveDatetime that does not exactly match the currently stored one.

Parameters​

NameTypeDescription
provideduint256The _effectiveDatetime supplied by the caller.
currentuint256The currently stored effectiveDatetime.

NominalValueEffectiveDatetimeNotAfterCurrent​

error NominalValueEffectiveDatetimeNotAfterCurrent(uint256 provided, uint256 current)

Raised when publishNominalValue is called with an _effectiveDatetime that is not strictly after the currently stored one.

Parameters​

NameTypeDescription
provideduint256The _effectiveDatetime supplied by the caller.
currentuint256The currently stored effectiveDatetime.

UnrecognizedResolverProxyVersion​

error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)

Thrown when the provided proxy version does not match any BLR compatible standard.

Parameters​

NameTypeDescription
_resolverProxyVersionbytes8proxy version that is not compatible with the BLR.

WalletRecovered​

error WalletRecovered()

Thrown when attempting to recover a wallet that has already been recovered.

WrongTimestamp​

error WrongTimestamp(uint256 timeStamp)

Reverts when a scheduled timestamp is not strictly in the future.

Used for shared scheduling validation where the current block time is read through TimeTravelStorageWrapper.

Parameters​

NameTypeDescription
timeStampuint256Timestamp rejected for scheduling.