TestTokens.sol
View Source: contracts/TestTokens.sol

Contract Members

Constants & Variables
1
string public name;
2
string public symbol;
3
uint8 public decimals;
4
uint256 public supply;
5
mapping(address => uint256) public balances;
6
mapping(address => mapping(address => uint256)) public allowed;
Copied!
Events
1
event Transfer(address sender, address receiver, uint256 tokens);
2
event Approval(address sender, address delegate, uint256 tokens);
Copied!

Functions

  • totalSupply()
  • balanceOf(address tokenOwner)
  • transfer(address receiver, uint256 numTokens)
  • approve(address delegate, uint256 numTokens)
  • allowance(address owner, address delegate)
  • transferFrom(address owner, address buyer, uint256 numTokens)
  • allocateTo(address _owner, uint256 value)

totalSupply

1
function totalSupply() external view
2
returns(uint256)
Copied!
Arguments
Name
Type
Description

balanceOf

1
function balanceOf(address tokenOwner) external view
2
returns(uint256)
Copied!
Arguments
Name
Type
Description
tokenOwner
address

transfer

1
function transfer(address receiver, uint256 numTokens) external nonpayable
2
returns(bool)
Copied!
Arguments
Name
Type
Description
receiver
address
numTokens
uint256

approve

1
function approve(address delegate, uint256 numTokens) external nonpayable
2
returns(bool)
Copied!
Arguments
Name
Type
Description
delegate
address
numTokens
uint256

allowance

1
function allowance(address owner, address delegate) external view
2
returns(uint256)
Copied!
Arguments
Name
Type
Description
owner
address
delegate
address

transferFrom

1
function transferFrom(address owner, address buyer, uint256 numTokens) external nonpayable
2
returns(bool)
Copied!
Arguments
Name
Type
Description
owner
address
buyer
address
numTokens
uint256

allocateTo

1
function allocateTo(address _owner, uint256 value) public nonpayable
Copied!
Arguments
Name
Type
Description
_owner
address
value
uint256
Copy link