interchain-token-service

Solidity API

TestFeeOnTransferToken

service

address service

tokenId

bytes32 tokenId

tokenManagerRequiresApproval_

bool tokenManagerRequiresApproval_

name

string name

symbol

string symbol

decimals

uint8 decimals

constructor

constructor(string name_, string symbol_, uint8 decimals_, address service_, bytes32 tokenId_) public

interchainTokenService

function interchainTokenService() public view returns (address)

Getter for the interchain token service.

Needs to be overwritten.

Return Values

Name Type Description
[0] address  

interchainTokenId

function interchainTokenId() public view returns (bytes32)

Getter for the tokenId used for this token.

Needs to be overwritten.

Return Values

Name Type Description
[0] bytes32  

_beforeInterchainTransfer

function _beforeInterchainTransfer(address sender, string, bytes, uint256 amount, bytes) internal

_spendAllowance

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.

setTokenManagerRequiresApproval

function setTokenManagerRequiresApproval(bool requiresApproval) public

mint

function mint(address account, uint256 amount) external

burn

function burn(address account, uint256 amount) external

setTokenId

function setTokenId(bytes32 tokenId_) external

_transfer

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: