Allows the owner to mint, burn and transfer tokens without requiring explicit user approval
No description
function constructor(
) public ERC20
Modifier |
---|
ERC20 |
No description
Returns the number of decimals used to get its user representation. For example, if
decimals
equals2
, a balance of505
tokens should be displayed to a user as5,05
(505 / 10 ** 2
).
Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden;
NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
function decimals(
) public returns (uint8)
No modifiers
Allow the owner of the contract to mint an amount of tokens to the specified user
Only callable by owner Emits a Transfer from the 0 address
function mint(
address user,
uint256 amount
) public onlyOwner
Modifier |
---|
onlyOwner |
Arg | Type | Description |
---|---|---|
user |
address | The address of the user to mint tokens for |
amount |
uint256 | The amount of tokens to mint |
Allow the owner of the contract to burn an amount of tokens from the specified user address
Only callable by owner The user's balance must be at least equal to the amount specified Emits a Transfer to the 0 address
function burn(
address user,
uint256 amount
) public onlyOwner
Modifier |
---|
onlyOwner |
Arg | Type | Description |
---|---|---|
user |
address | The address of the user from which to burn tokens |
amount |
uint256 | The amount of tokens to burn |
Allow the owner of the contract to transfer an amount of tokens from sender to recipient
Only callable by owner Acts just like transferFrom but without the allowance check
function transferAsOwner(
address sender,
address recipient,
uint256 amount
) public onlyOwner returns (bool)
Modifier |
---|
onlyOwner |
Arg | Type | Description |
---|---|---|
sender |
address | The address of the account from which to transfer tokens |
recipient |
address | The address of the account to which to transfer tokens |
amount |
uint256 | The amount of tokens to transfer |
Type | Description |
---|---|
bool |
(always true) |