ERC20

Developer note: Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.

Functions

constructor

constructor(string,string) public

NameTypeDescription

name_

string

symbol_

string

name

name() view public

Returns:

NameTypeDescription

[0]

string

symbol

symbol() view public

Returns:

NameTypeDescription

[0]

string

decimals

decimals() view public

Returns:

NameTypeDescription

[0]

uint8

totalSupply

totalSupply() view public

Returns:

NameTypeDescription

[0]

uint256

balanceOf

balanceOf(address) view public

NameTypeDescription

account

address

Returns:

NameTypeDescription

[0]

uint256

transfer

transfer(address,uint256) public

NameTypeDescription

recipient

address

amount

uint256

Returns:

NameTypeDescription

[0]

bool

allowance

allowance(address,address) view public

NameTypeDescription

owner

address

spender

address

Returns:

NameTypeDescription

[0]

uint256

approve

approve(address,uint256) public

NameTypeDescription

spender

address

amount

uint256

Returns:

NameTypeDescription

[0]

bool

transferFrom

transferFrom(address,address,uint256) public

NameTypeDescription

sender

address

recipient

address

amount

uint256

Returns:

NameTypeDescription

[0]

bool

increaseAllowance

increaseAllowance(address,uint256) public

NameTypeDescription

spender

address

addedValue

uint256

Returns:

NameTypeDescription

[0]

bool

decreaseAllowance

decreaseAllowance(address,uint256) public

NameTypeDescription

spender

address

subtractedValue

uint256

Returns:

NameTypeDescription

[0]

bool