Appearance
Solidity API
AgentManager
token
solidity
contract IToken token
The token managed by this AgentManager contract.
This variable stores the reference to the token contract that is managed by the AgentManager.
InvalidTransferManager
solidity
error InvalidTransferManager(address sender, address onchainID)
Custom error to signal that the caller is not a valid Transfer Manager.
This error is thrown when the caller does not have the required role as a Transfer Manager.
InvalidFreezer
solidity
error InvalidFreezer(address sender, address onchainID)
Custom error to signal that the caller is not a valid Freezer.
This error is thrown when the caller does not have the required role as a Freezer.
InvalidSupplyModifier
solidity
error InvalidSupplyModifier(address sender, address onchainID)
Custom error to signal that the caller is not a valid Supply Modifier.
This error is thrown when the caller does not have the required role as a Supply Modifier.
InvalidRecoveryAgent
solidity
error InvalidRecoveryAgent(address sender, address onchainID)
Custom error to signal that the caller is not a valid Recovery Agent.
This error is thrown when the caller does not have the required role as a Recovery Agent.
InvalidWhiteListManager
solidity
error InvalidWhiteListManager(address sender, address onchainID)
Custom error to signal that the caller is not a valid WhiteListManager.
This error is thrown when the caller does not have the required role as a WhiteListManager.
constructor
solidity
constructor(address _token) public
Constructor to initialize the contract with a specific token address.
This constructor sets the provided _token
address to the token
variable, which is used to interact with the Token contract. The address must be a valid Token contract address that implements the IToken
interface.
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the Token contract to interact with. |
callForcedTransfer
solidity
function callForcedTransfer(address _from, address _to, uint256 _amount, contract IIdentity _onchainID) external
Executes a forced transfer of tokens via the Token contract.
_This function calls the forcedTransfer
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as TransferManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_from | address | The address from which the tokens are transferred. |
_to | address | The address to which the tokens are transferred. |
_amount | uint256 | The amount of tokens to transfer. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidTransferManager : Reverted if _onchainID is not a valid Transfer Manager or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchForcedTransfer
solidity
function callBatchForcedTransfer(address[] _fromList, address[] _toList, uint256[] _amounts, contract IIdentity _onchainID) external
Executes batch forced transfers of tokens via the Token contract.
_This function calls the batchForcedTransfer
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as TransferManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_fromList | address[] | An array of addresses from which the tokens are transferred. |
_toList | address[] | An array of addresses to which the tokens are transferred. |
_amounts | uint256[] | An array of amounts corresponding to each transfer. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidTransferManager : Reverted if _onchainID is not a valid Transfer Manager or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callPause
solidity
function callPause(contract IIdentity _onchainID) external
Pauses the token contract via the pause
function on the Token contract.
_This function calls the pause
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callUnpause
solidity
function callUnpause(contract IIdentity _onchainID) external
Unpauses the token contract via the unpause
function on the Token contract.
_This function calls the unpause
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callMint
solidity
function callMint(address _to, uint256 _amount, contract IIdentity _onchainID) external
Mints tokens to a specified address via the mint
function on the Token contract.
_This function calls the mint
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as SupplyModifier on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_to | address | The address to which the tokens will be minted. |
_amount | uint256 | The number of tokens to mint. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidSupplyModifier : Reverted if _onchainID is not a valid SupplyModifier or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchMint
solidity
function callBatchMint(address[] _toList, uint256[] _amounts, contract IIdentity _onchainID) external
Mints tokens in batch to specified addresses.
_This function calls the batchMint
method on the Token contract to mint tokens in batch.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as SupplyModifier on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_toList | address[] | The list of addresses to which the tokens will be minted. |
_amounts | uint256[] | The list of amounts to mint for each corresponding address. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidSupplyModifier : Reverted if _onchainID is not a valid SupplyModifier or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBurn
solidity
function callBurn(address _userAddress, uint256 _amount, contract IIdentity _onchainID) external
Burns tokens from a specified address.
_This function calls the burn
method on the Token contract to burn tokens.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as SupplyModifier on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address from which the tokens will be burned. |
_amount | uint256 | The amount of tokens to burn. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidSupplyModifier : Reverted if _onchainID is not a valid SupplyModifier or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchBurn
solidity
function callBatchBurn(address[] _userAddresses, uint256[] _amounts, contract IIdentity _onchainID) external
Burns tokens from multiple specified addresses.
_This function calls the batchBurn
method on the Token contract to burn tokens from multiple addresses
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as SupplyModifier on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddresses | address[] | The list of addresses from which the tokens will be burned. |
_amounts | uint256[] | The list of amounts of tokens to burn corresponding to each address in _userAddresses . |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidSupplyModifier : Reverted if _onchainID is not a valid SupplyModifier or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callSetAddressFrozen
solidity
function callSetAddressFrozen(address _userAddress, bool _freeze, contract IIdentity _onchainID) external
Freezes or unfreezes a user address via the setAddressFrozen
function on the Token contract.
_This function calls the setAddressFrozen
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user to freeze or unfreeze. |
_freeze | bool | A boolean indicating whether to freeze (true ) or unfreeze (false ) the user address. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchSetAddressFrozen
solidity
function callBatchSetAddressFrozen(address[] _userAddresses, bool[] _freeze, contract IIdentity _onchainID) external
Freezes or unfreezes multiple user addresses via the batchSetAddressFrozen
function on the Token contract.
_This function calls the batchSetAddressFrozen
method on the Token contract.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddresses | address[] | An array of user addresses to freeze or unfreeze. |
_freeze | bool[] | An array of booleans indicating whether to freeze (true ) or unfreeze (false ) the corresponding user address. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callFreezePartialTokens
solidity
function callFreezePartialTokens(address _userAddress, uint256 _amount, contract IIdentity _onchainID) external
Freezes a specific amount of tokens for a user.
_This function calls the freezePartialTokens
method on the Token contract to freeze a specific amount of tokens for a user
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose tokens are to be partially frozen. |
_amount | uint256 | The amount of tokens to freeze. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchFreezePartialTokens
solidity
function callBatchFreezePartialTokens(address[] _userAddresses, uint256[] _amounts, contract IIdentity _onchainID) external
Freezes specific amounts of tokens for a list of users.
_This function calls the batchFreezePartialTokens
method on the Token contract to freeze a specific amount of tokens for a list of users.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddresses | address[] | The list of user addresses whose tokens are to be partially frozen. |
_amounts | uint256[] | The list of amounts of tokens to freeze for each user. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callUnfreezePartialTokens
solidity
function callUnfreezePartialTokens(address _userAddress, uint256 _amount, contract IIdentity _onchainID) external
Unfreezes a specific amount of tokens for a user.
_This function calls the unfreezePartialTokens
method on the Token contract unfreezes a specific amount of tokens for a user.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose tokens are to be unfrozen. |
_amount | uint256 | The amount of tokens to unfreeze for the user. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callBatchUnfreezePartialTokens
solidity
function callBatchUnfreezePartialTokens(address[] _userAddresses, uint256[] _amounts, contract IIdentity _onchainID) external
Unfreezes specific amounts of tokens for a list of users.
_This function calls the batchUnfreezePartialTokens
method on the Token contract unfreezes specific amounts of tokens for a list of users.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_onchainID
must be registered as Freezer on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddresses | address[] | The list of user addresses whose tokens are to be unfrozen. |
_amounts | uint256[] | The list of amounts to unfreeze for each corresponding user. |
_onchainID | contract IIdentity | The on-chain identity contract of the caller (e.g., "I call this function, and I am Bob"). Error: - InvalidFreezer : Reverted if _onchainID is not a valid Freezer or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callRecoveryAddress
solidity
function callRecoveryAddress(address _lostWallet, address _newWallet, address _onchainID, contract IIdentity _managerOnchainID) external
Initiates the recovery process for a lost wallet.
_This function calls the recoveryAddress
method on the Token contract to transfer assets from a lost wallet to a new wallet.
Requirements
- The AgentManager must be set as an agent on the Token contract.
_managerOnchainID
must be registered as RecoveryAgent on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_managerOnchainID
._
Parameters
Name | Type | Description |
---|---|---|
_lostWallet | address | The address of the lost wallet to recover from. |
_newWallet | address | The address of the new wallet to recover to. |
_onchainID | address | The on-chain identity contract related to the caller (e.g., "I call this function, and I am Bob"). |
_managerOnchainID | contract IIdentity | The on-chain identity contract of the recovery agent, e.g., "I am the RecoveryAgent". Error: - InvalidRecoveryAgent : Reverted if _managerOnchainID is not a valid RecoveryAgent or if msg.sender is not a MANAGEMENT KEY on _managerOnchainID . |
callRegisterIdentity
solidity
function callRegisterIdentity(address _userAddress, contract IIdentity _onchainID, uint16 _country, contract IIdentity _managerOnchainID) external
Registers an identity in the Identity Registry.
_This function calls the registerIdentity
method on the Identity Registry contract to associate a user address with an on-chain identity.
Requirements
- The AgentManager must be set as an agent on the Identity Registry contract.
_managerOnchainID
must be registered as WhiteListManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_managerOnchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose identity is being registered. |
_onchainID | contract IIdentity | The on-chain identity contract associated with the user. |
_country | uint16 | The country code associated with the user's identity. |
_managerOnchainID | contract IIdentity | The on-chain identity contract of the WhiteListManager, e.g., "I am the WhiteListManager". Error: - InvalidWhiteListManager : Reverted if _managerOnchainID is not a valid WhiteListManager or if msg.sender is not a MANAGEMENT KEY on _managerOnchainID . |
callUpdateIdentity
solidity
function callUpdateIdentity(address _userAddress, contract IIdentity _identity, contract IIdentity _onchainID) external
Updates a user's identity in the Identity Registry.
_This function calls the updateIdentity
method on the Identity Registry contract to update a user's on-chain identity.
Requirements
- The AgentManager must be set as an agent on the Identity Registry contract.
_onchainID
must be registered as WhiteListManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose identity is being updated. |
_identity | contract IIdentity | The new on-chain identity associated with the user. |
_onchainID | contract IIdentity | The on-chain identity contract of the WhiteListManager, e.g., "I am the WhiteListManager". Error: - InvalidWhiteListManager : Reverted if _onchainID is not a valid WhiteListManager or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callUpdateCountry
solidity
function callUpdateCountry(address _userAddress, uint16 _country, contract IIdentity _onchainID) external
Updates a user's country code in the Identity Registry.
_This function calls the updateCountry
method on the Identity Registry contract to update a user's country code.
Requirements
- The AgentManager must be set as an agent on the Identity Registry contract.
_onchainID
must be registered as WhiteListManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose country is being updated. |
_country | uint16 | The new country code to be set for the user. |
_onchainID | contract IIdentity | The on-chain identity contract of the WhiteListManager, e.g., "I am the WhiteListManager". Error: - InvalidWhiteListManager : Reverted if _onchainID is not a valid WhiteListManager or if msg.sender is not a MANAGEMENT KEY on _onchainID . |
callDeleteIdentity
solidity
function callDeleteIdentity(address _userAddress, contract IIdentity _onchainID) external
Deletes a user's identity from the Identity Registry.
_This function calls the deleteIdentity
method on the Identity Registry contract to remove a user's identity.
Requirements
- The AgentManager must be set as an agent on the Identity Registry contract.
_onchainID
must be registered as WhiteListManager on the AgentManager contract.msg.sender
must be a MANAGEMENT KEY on_onchainID
._
Parameters
Name | Type | Description |
---|---|---|
_userAddress | address | The address of the user whose identity is being deleted. |
_onchainID | contract IIdentity | The on-chain identity contract of the WhiteListManager, e.g., "I am the WhiteListManager". Error: - InvalidWhiteListManager : Reverted if _onchainID is not a valid WhiteListManager or if msg.sender is not a MANAGEMENT KEY on _onchainID . |