layout | title |
---|---|
default |
TestTokens |
View Source: contracts/TestTokens.sol
Constants & Variables
string public name;
string public symbol;
uint8 public decimals;
uint256 public supply;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
Events
event Transfer(address sender, address receiver, uint256 tokens);
event Approval(address sender, address delegate, uint256 tokens);
- 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)
function totalSupply() external view
returns(uint256)
Arguments
Name | Type | Description |
---|
function balanceOf(address tokenOwner) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tokenOwner | address |
function transfer(address receiver, uint256 numTokens) external nonpayable
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
receiver | address | |
numTokens | uint256 |
function approve(address delegate, uint256 numTokens) external nonpayable
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
delegate | address | |
numTokens | uint256 |
function allowance(address owner, address delegate) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
owner | address | |
delegate | address |
function transferFrom(address owner, address buyer, uint256 numTokens) external nonpayable
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
owner | address | |
buyer | address | |
numTokens | uint256 |
function allocateTo(address _owner, uint256 value) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
_owner | address | |
value | uint256 |