- ability for holders to burn (destroy) their tokens
- a minter role that allows for token minting (creation)
- a pauser role that allows to stop all token transfers
- an admin role that allows to administrate the contract.
Sets amount
as the allowance of spender
over the caller's tokens.
Moves amount
tokens from the caller's account to recipient
.
Transfers amount
from sender
to recipient
Requirements:
sender
and recipient
cannot be the zero address.
sender
must have a balance of at leastamount
.- the caller must have allowance for
sender
's tokens of at leastamount
Atomically increases the allowance granted to spender
by the caller.
Emits an {Approval}
event indicating the updated allowance.
Requirements:
spender
cannot be the zero address
Atomically decreases the allowance granted to spender
by the caller.
Emits an {Approval}
event indicating the updated allowance.
Requirements:
spender
cannot be the zero address.spender
must have allowance for the caller of at leastsubtractedValue
.
Creates amount
new tokens for to
.
Requirements:
- the caller must have the
MINTER_ROLE
.
Destroys amount
tokens from the caller.
Destroys amount
tokens from account
, deducting from the caller's allowance.
Requirements:
- the caller must have allowance for
accounts
's tokens of at leastamount
.
Grants role
to account
.
Requirements:
- the caller must have
role
's admin role.
Revokes role
from the calling account.
Requirements:
- the caller must be
account
.
Revokes role
from account
.
Requirements:
- the caller must have
role
's admin role.
Pauses all token transfers. Requirements:
- the caller must have the
PAUSER_ROLE
.
Unpauses all token transfers. Requirements:
- the caller must have the
PAUSER_ROLE
.
Returns the admin role that controls role
. See {grantRole} and {revokeRole}.
Returns one of the accounts that have role
. index
must be a value between 0 and {getRoleMemberCount}, non-inclusive.
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Returns true
if account
has been granted role
.
Returns the default admin role.
Returns the minter role.
Returns the pauser role
Returns true if the contract is paused, and false otherwise.
Returns the remaining number of tokens that spender
will be
allowed to spend on behalf of owner
through {transferFrom
}. This is zero by default.
Returns the amount of tokens owned by account
.
Returns the number of decimals used to get its user representation.
For example, if decimals
equals 2
, a balance of 505
tokens should
be displayed to a user as 5,05
(505 / 10 ** 2
).
Returns the name of the token.
Returns the symbol of the token, usually a shorter version of the
Returns the amount of burnt tokens.
Returns the amount of minted tokens.
Returns the amount of tokens in existence.