Tokens Interface

The Token Smart Contract interface defines a comprehensive set of functions and events essential for managing and regulating the lifecycle of the token. Below is a detailed breakdown of the interface functions, explaining their purpose, source, and functionality.

UpdatedTokenInformation

Event

Description: Emitted when the token information is updated. This includes updates to the token's name, symbol, decimals, version, and onchainID.

event UpdatedTokenInformation(
    string indexed _newName, 
    string indexed _newSymbol, 
    uint8 _newDecimals, 
    string _newVersion, 
    address indexed _newOnchainID
);

IdentityRegistryAdded

Event

Description: Emitted when the Identity Registry has been set for the token.

event IdentityRegistryAdded(address indexed _identityRegistry);

ComplianceAdded

Event

Description: Emitted when the Compliance contract has been set for the token.


RecoverySuccess

Event

Description: Emitted when an investor successfully recovers their tokens from a lost wallet to a new wallet.


AddressFrozen

Event

Description: Emitted when the wallet of an investor is frozen or unfrozen.


TokensFrozen

Event

Description: Emitted when a certain amount of tokens is frozen on a wallet.


TokensUnfrozen

Event

Description: Emitted when a certain amount of tokens is unfrozen on a wallet.


Paused

Event

Description: Emitted when the token contract is paused.


Unpaused

Event

Description: Emitted when the token contract is unpaused.


setName

Source: IToken

Description: Sets the token name. Only the owner of the token contract can call this function.


setSymbol

Source: IToken

Description: Sets the token symbol. Only the owner of the token contract can call this function.


setOnchainID

Source: IToken

Description: Sets the onchain ID of the token. Only the owner of the token contract can call this function.


pause

Source: IToken

Description: Pauses the token contract, preventing token transfers. Only an agent of the token can call this function.


unpause

Source: IToken

Description: Unpauses the token contract, allowing token transfers. Only an agent of the token can call this function.


setAddressFrozen

Source: IToken

Description: Sets the frozen status of a specific address. Only an agent of the token can call this function.


freezePartialTokens

Source: IToken

Description: Freezes a specific amount of tokens on a given address. Only an agent of the token can call this function.


unfreezePartialTokens

Source: IToken

Description: Unfreezes a specific amount of tokens on a given address. Only an agent of the token can call this function.


setIdentityRegistry

Source: IToken

Description: Sets the Identity Registry for the token. Only the owner of the token contract can call this function.


setCompliance

Source: IToken

Description: Sets the Compliance contract for the token. Only the owner of the token contract can call this function.


forcedTransfer

Source: IToken

Description: Forces a transfer of tokens between two whitelisted addresses. Only an agent of the token can call this function.


mint

Source: IToken

Description: Mints new tokens to a verified address. Only an agent of the token can call this function.


burn

Source: IToken

Description: Burns tokens from a specified address. Only an agent of the token can call this function.


recoveryAddress

Source: IToken

Description: Recovers tokens from a lost wallet to a new wallet for an investor. Only an agent of the token can call this function.


batchTransfer

Source: IToken

Description: Transfers tokens in batch to multiple addresses.


batchForcedTransfer

Source: IToken

Description: Forces transfers of tokens in batch between multiple pairs of addresses. Only an agent of the token can call this function.


batchMint

Source: IToken

Description: Mints tokens in batch to multiple addresses. Only an agent of the token can call this function.


batchBurn

Source: IToken

Description: Burns tokens in batch from multiple addresses. Only an agent of the token can call this function.


batchSetAddressFrozen

Source: IToken

Description: Sets the frozen status of multiple addresses in batch. Only an agent of the token can call this function.


batchFreezePartialTokens

Source: IToken

Description: Freezes tokens partially in batch for multiple addresses. Only an agent of the token can call this function.


batchUnfreezePartialTokens

Source: IToken

Description: Unfreezes tokens partially in batch for multiple addresses. Only an agent of the token can call this function.


ERC20 Functions

Transfer

Event

Description: Emitted when value tokens are moved from one account (from) to another (to).


Approval

Event

Description: Emitted when the allowance of a spender for an owner is set by a call to approve. value is the new allowance.


totalSupply

Source: IERC20

Description: Returns the total supply of tokens in existence.


balanceOf

Source: IERC20

Description:

Returns the amount of tokens owned by a specific account.


transfer

Source: IERC20

Description: Moves amount tokens from the caller's account to a specified address.


allowance

Source: IERC20

Description: Returns the remaining number of tokens that spender is allowed to spend on behalf of owner through transferFrom.


approve

Source: IERC20

Description: Sets amount as the allowance of spender over the caller's tokens.


transferFrom

Source: IERC20

Description: Moves amount tokens from from to to using the allowance mechanism. amount is then deducted from the caller's allowance.

Last updated