ERC20Basic

Title: ERC20Basic
Description: Zeppelin Solidity Smart Contract that provides a basic interface required to implement an ERC20 compliant token.
Author: Smart Contract Solutions, Inc.
Solidity Version: ^0.4.18
Relative Path: ./contracts/supporting/ERC20Basic.sol
License: MIT License
Current Version: 1.4.0
Original Source: ERC20Basic Source

1. Imports & Dependencies

There are no imports or dependencies for the ERC20Basic Smart Contract.

2. Variables

The following variables exist for the ERC20Basic Smart Contract:

Variable Type Vis Details
totalSupply uint256 public Variable to provide total count of all token in circulation for this token

3. Enums

There are no enums for the ERC20Basic Smart Contract.

4. Events

The following events exist for the ERC20Basic Smart Contract:

Name Description
Transfer Event to track when a transfer of tokens occurs between addresses

Transfer

Event Name: Transfer
Description: Event to track when a transfer of tokens occurs between addresses

Usage

The Transfer event has the following usage syntax and arguments:

  Argument Type Indexed? Details
1 from address Yes Address where tokens are being transferred from
2 to address Yes Address where tokens are being transferred to
3 value uint256 No Amount of tokens to transfer
Transfer Usage Example
Transfer(0x123456789abcdefghijklmnopqrstuvwxyz98765,
         0x123456789abcdefghijklmnopqrstuvwxyz12345,
         100);

5. Mappings

The are no mappings for the ERC20Basic Smart Contract.

6. Modifiers

There are no modifiers for the ERC20Basic Smart Contract.

7. Functions

The following functions exist for the ERC20Basic Smart Contract:

Name Description
balanceOf Function to get the token balance of a supplied address
transfer Function to allow transferring tokens from one address to another

balanceOf

Function Name: balanceOf
Description: Function to get the token balance of a supplied address
Function Type: View
Function Visibility: Public
Function Modifiers: N/A
Return Type: uint256
Return Details: returns the token balance of the supplied address

Code

The code for the balanceOf function is an interface and it is defined as follows:

balanceOf 1.4.0 Code
function balanceOf(address who) public view returns (uint256);

Usage

The balanceOf function has the following usage syntax and arguments:

  Argument Type Details
1 who address Address to retrieve the token balance of
allowance Usage Example
balanceOf(0x123456789abcdefghijklmnopqrstuvwxyz98765);

transfer

Function Name: transfer
Description: Function to allow transferring tokens from one address to another
Function Type: N/A
Function Visibility: N/A
Function Modifiers: N/A
Return Type: bool
Return Details: returns a bool to denote success or failure to transfer tokens

Code

The code for the transfer function is an interface and it is defined as follows:

transfer 1.4.0 Code
function transfer(address to, uint256 value) public returns (bool);

Usage

The transfer function has the following usage syntax and arguments:

  Argument Type Details
1 to address Address to transfer tokens to
2 value uint256 Amount of tokens to transfer
transfer Usage Example
 transfer(0x123456789abcdefghijklmnopqrstuvwxyz98765, 100);