InitiaERC20
contract is an implementation of the ERC20 token standard with additional functionalities such as access control, registry integration, and support for Cosmos blockchain interactions. This contract inherits from multiple contracts including IERC20
, Ownable
, ERC20Registry
, ERC165
, and ERC20ACL
.
IERC20
: Interface for ERC20 standard functions.Ownable
: Provides ownership control.ERC20Registry
: Handles ERC20 registry functionalities.ERC165
: Supports interface identification.ERC20ACL
: Provides access control mechanisms.Transfer
: Emitted when tokens are transferred from one address to another.
address indexed from
: The address sending the tokens.
address indexed to
: The address receiving the tokens.
uint256 value
: The amount of tokens transferred.
Approval
: Emitted when an address approves another address to spend tokens on its behalf.
address indexed owner
: The address granting the approval.
address indexed spender
: The address receiving the approval.
uint256 value
: The amount of tokens approved.
mapping(address => uint256) public balanceOf
: Tracks the balance of each address.mapping(address => mapping(address => uint256)) public allowance
: Tracks the allowance each address has given to another address.string public name
: The name of the token.string public symbol
: The symbol of the token.uint8 public decimals
: The number of decimals the token uses.uint256 public totalSupply
: The total supply of the token.Name | Type | Description |
---|---|---|
_name | string memory | The name of the token |
_symbol | string memory | The symbol of the token |
_decimals | uint8 | The number of decimals the token uses |
supportsInterface
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | The interface identifier |
Type | Description |
---|---|
bool | true if the interface is supported, false otherwise |
_transfer
Name | Type | Description |
---|---|---|
sender | address | The address sending the tokens |
recipient | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to transfer |
_mint
Name | Type | Description |
---|---|---|
to | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to mint |
_burn
Name | Type | Description |
---|---|---|
from | address | The address whose tokens are burned |
amount | uint256 | The amount of tokens to burn |
transfer
Name | Type | Description |
---|---|---|
recipient | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to transfer |
Type | Description |
---|---|
bool | true if the transfer was successful |
approve
Name | Type | Description |
---|---|---|
spender | address | The address allowed to spend the tokens |
amount | uint256 | The amount of tokens to approve |
Type | Description |
---|---|
bool | true if the approval was successful |
transferFrom
Name | Type | Description |
---|---|---|
sender | address | The address sending the tokens |
recipient | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to transfer |
Type | Description |
---|---|
bool | true if the transfer was successful |
mint
Name | Type | Description |
---|---|---|
to | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to mint |
burn
Name | Type | Description |
---|---|---|
from | address | The address whose tokens are burned |
amount | uint256 | The amount of tokens to burn |
sudoTransfer
Name | Type | Description |
---|---|---|
sender | address | The address sending the tokens |
recipient | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to transfer |
sudoMint
Name | Type | Description |
---|---|---|
to | address | The address receiving the tokens |
amount | uint256 | The amount of tokens to mint |
sudoBurn
Name | Type | Description |
---|---|---|
from | address | The address whose tokens are burned |
amount | uint256 | The amount of tokens to burn |