Skip to main content

IController

Asset Tokenization Studio Team

IController

Interface for the ControllerFacet, grouping all controller and agent management operations.

Combines ERC-1644 forced-transfer / controllability lifecycle with ERC-3643 agent role management. Inherits AgentAdded and AgentRemoved events from IERC3643Types.

Methods​

addAgent​

function addAgent(address _agent) external nonpayable

Gives an account the agent role.Granting an agent role allows the account to perform multiple ERC-1400 actions.

Can only be called by the role admin.

Parameters​

NameTypeDescription
_agentaddressAddress to be granted the agent role.

controllerRedeem​

function controllerRedeem(address _tokenHolder, uint256 _value, bytes _data, bytes _operatorData) external nonpayable

This function allows an authorised address to redeem tokens for any token holder.

This function can only be executed by the controller or agent address.

Parameters​

NameTypeDescription
_tokenHolderaddressThe account whose tokens will be redeemed.
_valueuint256uint256 the amount of tokens need to be redeemed.
_databytesdata to validate the transfer
_operatorDatabytesdata attached to the transfer by controller to emit in event

controllerTransfer​

function controllerTransfer(address _from, address _to, uint256 _value, bytes _data, bytes _operatorData) external nonpayable

This function allows an authorised address to transfer tokens between any two token holders.

This function can only be executed by the controller or agent address.

Parameters​

NameTypeDescription
_fromaddressAddress The address which you want to send tokens from
_toaddressAddress The address which you want to transfer to
_valueuint256uint256 the amount of tokens to be transferred
_databytesdata to validate the transfer
_operatorDatabytesdata attached to the transfer by controller to emit in event

finalizeControllable​

function finalizeControllable() external nonpayable

It is used to end the controller feature from the token

It only be called by the owner/issuer of the token

forcedTransfer​

function forcedTransfer(address _from, address _to, uint256 _amount) external nonpayable returns (bool)

Performs a forced transfer of _amount tokens from _from to _to.

This function should only be callable by an authorized entity. Returns true if the transfer was successful. Emits a ControllerTransfer event.

Parameters​

NameTypeDescription
_fromaddressAddress the tokens are transferred from.
_toaddressAddress the tokens are transferred to.
_amountuint256Amount of tokens to transfer.

Returns​

NameTypeDescription
_0boolTrue if the transfer was successful.

initializeController​

function initializeController(bool _isControllable) external nonpayable

One-time initialiser that sets whether the token is controllable.

Initial configuration. Can only be called once.

Parameters​

NameTypeDescription
_isControllablebooltrue is controllable, false is not controllable

isAgent​

function isAgent(address _agent) external view returns (bool)

Checks whether an account holds the agent role.

Checks if an account has the agent role.

Parameters​

NameTypeDescription
_agentaddressAddress to query.

Returns​

NameTypeDescription
_0boolTrue if _agent holds the agent role, false otherwise.

isControllable​

function isControllable() external view returns (bool)

In order to provide transparency over whether controllerTransfer / controllerRedeem are useable or not isControllable function will be used.

Returns​

NameTypeDescription
_0boolbool true when controller address is non-zero otherwise return false.

removeAgent​

function removeAgent(address _agent) external nonpayable

Revokes the agent role from an account.

Can only be called by the role admin.

Parameters​

NameTypeDescription
_agentaddressAddress whose agent role is revoked.

Events​

AgentAdded​

event AgentAdded(address indexed agent)

Emitted when an agent is granted transfer-management permissions.

Parameters​

NameTypeDescription
agent indexedaddressAddress of the newly added agent.

AgentRemoved​

event AgentRemoved(address indexed agent)

Emitted when an agent's transfer-management permissions are revoked.

Parameters​

NameTypeDescription
agent indexedaddressAddress of the removed agent.

ComplianceAdded​

event ComplianceAdded(address indexed compliance)

Emitted when the compliance contract address is updated.

Parameters​

NameTypeDescription
compliance indexedaddressAddress of the newly wired compliance contract.

ControllerInitialized​

event ControllerInitialized(bool controllable)

Emitted when the controller feature is initialised for a token.

Fired inside initializeController once the facet is marked ready.

Parameters​

NameTypeDescription
controllableboolWhether the token was configured as controllable.

ControllerRedemption​

event ControllerRedemption(address controller, address indexed tokenHolder, uint256 value, bytes data, bytes operatorData)

Emitted when an authorised controller redeems (burns) tokens on behalf of a holder.

Parameters​

NameTypeDescription
controlleraddressThe address of the controller that initiated the redemption.
tokenHolder indexedaddressThe account whose tokens are redeemed.
valueuint256The amount of tokens redeemed.
databytesOptional data attached to the redemption for validation.
operatorDatabytesOptional data attached by the controller for event attribution.

ControllerTransfer​

event ControllerTransfer(address controller, address indexed from, address indexed to, uint256 value, bytes data, bytes operatorData)

Emitted when an authorised controller transfers tokens between two holders.

Parameters​

NameTypeDescription
controlleraddressThe address of the controller that initiated the transfer.
from indexedaddressThe address tokens are transferred from.
to indexedaddressThe address tokens are transferred to.
valueuint256The amount of tokens transferred.
databytesOptional data attached to the transfer for validation.
operatorDatabytesOptional data attached by the controller for event attribution.

FinalizedControllerFeature​

event FinalizedControllerFeature(address operator)

Emitted when the controller feature is permanently disabled for a token.

Parameters​

NameTypeDescription
operatoraddressAddress of the caller who finalised controllability.

IdentityRegistryAdded​

event IdentityRegistryAdded(address indexed identityRegistry)

Emitted when the identity registry contract address is updated.

Parameters​

NameTypeDescription
identityRegistry indexedaddressAddress of the newly wired identity registry.

RecoverySuccess​

event RecoverySuccess(address lostWallet, address newWallet, address investorOnchainID)

Emitted when a lost wallet is successfully recovered to a new address.

Parameters​

NameTypeDescription
lostWalletaddressAddress of the wallet that was lost.
newWalletaddressAddress of the replacement wallet.
investorOnchainIDaddressOnchainID of the investor performing the recovery.

UpdatedTokenInformation​

event UpdatedTokenInformation(string indexed newName, string indexed newSymbol, uint8 newDecimals, string newVersion, address indexed newOnchainID)

Emitted when core token metadata is updated.

Parameters​

NameTypeDescription
newName indexedstringNew token name.
newSymbol indexedstringNew token symbol.
newDecimalsuint8New decimal precision.
newVersionstringNew token version string.
newOnchainID indexedaddressNew onchainID address associated with the token.

Errors​

AddressNotVerified​

error AddressNotVerified()

Thrown when a transfer target address has not passed identity verification.

CannotRecoverWallet​

error CannotRecoverWallet()

Thrown when wallet recovery preconditions are not met (e.g. identity mismatch).

ComplianceCallFailed​

error ComplianceCallFailed()

Thrown when an external call to the compliance contract reverts or returns false.

ComplianceNotAllowed​

error ComplianceNotAllowed()

Thrown when a transfer is blocked by the compliance module.

IdentityRegistryCallFailed​

error IdentityRegistryCallFailed()

Thrown when an external call to the identity registry reverts or returns false.

InputAmountsArrayLengthMismatch​

error InputAmountsArrayLengthMismatch()

Thrown when the lengths of two input amount arrays do not match.

InputBoolArrayLengthMismatch​

error InputBoolArrayLengthMismatch()

Thrown when the lengths of two input boolean arrays do not match.

InsufficientFrozenBalance​

error InsufficientFrozenBalance(address user, uint256 requestedUnfreeze, uint256 availableFrozen, bytes32 partition)

Thrown when an unfreeze request exceeds the address's available frozen balance.

Parameters​

NameTypeDescription
useraddressAddress whose frozen balance was checked.
requestedUnfreezeuint256Amount the caller attempted to unfreeze.
availableFrozenuint256Actual frozen balance available for unfreezing.
partitionbytes32Partition on which the frozen balance was checked.

TokenIsNotControllable​

error TokenIsNotControllable()

Thrown when an operation requires the token to be controllable but it is not.

WalletRecovered​

error WalletRecovered()

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