Functions
constructor
Constructor for the Example ERC20 token. Initializes the token with a name and symbol.| Name | Type | Description |
|---|---|---|
_name | string | The name of the token. |
_symbol | string | The symbol of the token. |
setCallingContractAdmin
Override the default setCallingContractAdmin and add onlyOwner modifier to prevent unauthorized accesssetRulesEngineAddress
Override the default setRulesEngineAddress and add onlyOwner modifier to prevent unauthorized accessmint
Mints new tokens to a specified address. This function interacts with the Rules Engine to ensure compliance with minting policies.| Name | Type | Description |
|---|---|---|
to | address | The recipient address. |
amount | uint256 | The number of tokens to mint. |
transfer
Transfers tokens to a specified address. This function overrides the IERC20-transfer function and interacts with the Rules Engine to ensure compliance with transfer policies. It includes a reentrancy guard to prevent reentrancy attacks.| Name | Type | Description |
|---|---|---|
to | address | The recipient address. |
amount | uint256 | The number of tokens to transfer. |
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if the transfer is successful, false otherwise. |
transferFrom
Transfers tokens on behalf of another address. This function overrides the IERC20-transferFrom function and interacts with the Rules Engine to ensure compliance with transfer policies. It includes a reentrancy guard to prevent reentrancy attacks.| Name | Type | Description |
|---|---|---|
from | address | The address to transfer tokens from. |
to | address | The recipient address. |
amount | uint256 | The number of tokens to transfer. |
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if the transfer is successful, false otherwise. |