Skip to main content

ICompliance

Asset Tokenization Studio Team

ICompliance

Minimal adapter interface for querying and notifying an external compliance contract.

Implemented by third-party compliance modules whose address is registered on the token. The token calls these functions on every transfer, issuance, and redemption so the compliance module can enforce rules and maintain its own internal state.

Methods​

canTransfer​

function canTransfer(address _from, address _to, uint256 _amount) external view returns (bool)

Checks whether a transfer between two addresses is permitted.

Parameters​

NameTypeDescription
_fromaddressAddress sending the tokens.
_toaddressAddress receiving the tokens.
_amountuint256Token quantity to transfer.

Returns​

NameTypeDescription
_0boolTrue if the transfer is allowed; false otherwise.

created​

function created(address _to, uint256 _amount) external nonpayable

Notifies the compliance module that tokens have been issued.

The compliance module should update any issuance-tracking state accordingly.

Parameters​

NameTypeDescription
_toaddressAddress that received the newly issued tokens.
_amountuint256Token quantity issued.

destroyed​

function destroyed(address _from, uint256 _amount) external nonpayable

Notifies the compliance module that tokens have been redeemed.

The compliance module should update any redemption-tracking state accordingly.

Parameters​

NameTypeDescription
_fromaddressAddress whose tokens were redeemed.
_amountuint256Token quantity redeemed.

transferred​

function transferred(address _from, address _to, uint256 _amount) external nonpayable

Notifies the compliance module that a transfer has been executed.

The compliance module should update any transfer-tracking state accordingly.

Parameters​

NameTypeDescription
_fromaddressAddress that sent the tokens.
_toaddressAddress that received the tokens.
_amountuint256Token quantity transferred.