Core
Asset Tokenization Studio Team
Core
Implementation of the Core domain. Delegates into the existing storage wrappers so semantics match ERC20 / ERC3643Management / ERC3643Read exactly during the transition period.
Methods
decimals
function decimals() external view returns (uint8)
Returns the decimals simulating non-triggered decimal adjustments up until current timestamp.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint8 | The number of decimals used for token amounts. |
getERC20Metadata
function getERC20Metadata() external view returns (struct ICore.ERC20Metadata)
Returns the full metadata struct of the security token.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | ICore.ERC20Metadata | The persisted ERC20Metadata. |
initializeCore
function initializeCore(ICore.ERC20Metadata metadata) external nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| metadata | ICore.ERC20Metadata | undefined |
name
function name() external view returns (string)
Returns the name of the security token.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | The token name string. |
setName
function setName(string _name) external nonpayable
Updates the token name. Restricted to the TREX owner role.
Parameters
| Name | Type | Description |
|---|---|---|
| _name | string | New name to assign to the token. |
setSymbol
function setSymbol(string _symbol) external nonpayable
Updates the token symbol. Restricted to the TREX owner role.
Parameters
| Name | Type | Description |
|---|---|---|
| _symbol | string | New symbol to assign to the token. |
symbol
function symbol() external view returns (string)
Returns the symbol of the security token.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | The token symbol string. |
version
function version() external view returns (string)
Returns the ERC3643 version string of the token.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | The version string (e.g. "4.0.0"). |
Events
CoreInitialized
event CoreInitialized(ICore.ERC20Metadata metadata)
Emitted once when the core ERC-20 metadata is initialised on a token.
Fires exclusively from initializeCore after the storage write succeeds.
Parameters
| Name | Type | Description |
|---|---|---|
| metadata | ICore.ERC20Metadata | The ERC-20 metadata persisted at initialisation. |
UpdatedTokenInformation
event UpdatedTokenInformation(string indexed newName, string indexed newSymbol, uint8 newDecimals, string newVersion, address indexed newOnchainID)
Emitted when core token metadata is updated.
Parameters
| Name | Type | Description |
|---|---|---|
newName indexed | string | New token name. |
newSymbol indexed | string | New token symbol. |
| newDecimals | uint8 | New decimal precision. |
| newVersion | string | New token version string. |
newOnchainID indexed | address | New onchainID address associated with the token. |
Errors
AccountHasNoRole
error AccountHasNoRole(address account, bytes32 role)
Thrown when an account does not hold a required role.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The account that lacks the role. |
| role | bytes32 | The 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
| Name | Type | Description |
|---|---|---|
| configId | bytes32 | Resolver-proxy configuration whose operational status was checked. |
| versionId | uint256 | Configuration 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
| Name | Type | Description |
|---|---|---|
| facetId | bytes32 | Identifier of the offending facet. |
| lastVersion | uint256 | Last version recorded for that facet at the time of the check. |
IsPaused
error IsPaused()
Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).
UnrecognizedResolverProxyVersion
error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)
Thrown when the provided proxy version does not match any BLR compatible standard.
Parameters
| Name | Type | Description |
|---|---|---|
| _resolverProxyVersion | bytes8 | proxy version that is not compatible with the BLR. |
WalletRecovered
error WalletRecovered()
Thrown when attempting to recover a wallet that has already been recovered.