-
What are the benefits of setting a token standard like ERC20?
Token standardization provides interoperability between applications interacting with tokens. -
What functions are in the ERC20 Token Standard Interface and what do they do?
-
function totalSupply() public view returns (uint256)
Returns the total token supply. -
function balanceOf(address _owner) public view returns (uint256 balance)
Returns the account balance of another account with address_owner
. -
function transfer(address _to, uint256 _value) public returns (bool success)
Transfers_value
amount of tokens to address_to
, and MUST fire theTransfer
event. The function SHOULDthrow
if the message callerâs account balance does not have enough tokens to spend. -
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
Transfers_value
amount of tokens from address_from
to address_to
, and MUST fire theTransfer
event. -
function approve(address _spender, uint256 _value) public returns (bool success)
Allows_spender
to withdraw from your account multiple times, up to the_value
amount. If this function is called again it overwrites the current allowance with_value
. -
function allowance(address _owner, address _spender) public view returns (uint256 remaining)
Returns the amount which_spender
is still allowed to withdraw from_owner
.