address service
bytes32 tokenId
bool tokenManagerRequiresApproval_
string name
string symbol
uint8 decimals
constructor(string name_, string symbol_, uint8 decimals_, address service_, bytes32 tokenId_) public
function interchainTokenService() public view returns (address)
Getter for the interchain token service.
Needs to be overwritten.
Name | Type | Description |
---|---|---|
[0] | address |
function interchainTokenId() public view returns (bytes32)
Getter for the tokenId used for this token.
Needs to be overwritten.
Name | Type | Description |
---|---|---|
[0] | bytes32 |
function _beforeInterchainTransfer(address sender, string, bytes, uint256 amount, bytes) internal
function _spendAllowance(address sender, address spender, uint256 amount) internal
A method to be overwritten that will decrease the allowance of the spender
from sender
by amount
.
Needs to be overwritten. This provides flexibility for the choice of ERC20 implementation used. Must revert if allowance is not sufficient.
function setTokenManagerRequiresApproval(bool requiresApproval) public
function mint(address account, uint256 amount) external
function burn(address account, uint256 amount) external
function setTokenId(bytes32 tokenId_) external
function _transfer(address sender, address recipient, uint256 amount) internal virtual
_Moves tokens amount
from sender
to recipient
.
This is internal function is equivalent to {transfer}, and can be used to e.g. implement automatic token fees, slashing mechanisms, etc.
Emits a {Transfer} event.
Requirements:
sender
cannot be the zero address.recipient
cannot be the zero address.sender
must have a balance of at least amount
._