function totalSupply() public view returns (uint256);
*The totalSupply() function is used to find the no of tokens running through the networks. It also returns the predefined supply from the contract
function balanceOf(address tokenOwner) public view returns (uint);
*The balanceOf() function is used to find the available balance token carried by each individual owner
function allowance(address tokenOwner, address spender)public view returns(uint);
*The allowance() function is used to check the allowed token balance approved from another user
function transfer(address to, uint tokens) public returns (bool);
*The transfer function is used to transfer token between two users
function approve(address spender, uint tokens) public returns (bool);
*The approve function is used to assign a spender account for token instead of the original owner
function transferFrom(address from, address to, uint tokens)public returns (bool);
*The transferFrom() is used to spend the allowed token by the spender account
The above-predefined functions are used in the solidity enabled smart contract which can be used to generate and transfer erc20 tokens. The contract given below is a combination of three contracts and one safe math library.
The above safe math library is used for basic arithmetic operations. It consists of mainly four functions which are used for addition, subtraction, multiplication, and division. It is primarily used for token transfer use cases. Each of those functions is called from the main GMT contract in order to do the math more precisely.
The ERC20 Interface contract is used for following the protocol for ethereum token, this contract is inherited by the GMT main contract in order to implement the ERC20 token standard.
The owned contract can only be invoked by the owned address, it is used to transfer the ownership, freeze the ICO as well as to set the rate of token.
The GMT contract is the main contract that inherits the other two contracts(owned, ERC20 interface), it uses the function defined in the other two contracts.