Skip to content

Latest commit

 

History

History
137 lines (96 loc) · 2.53 KB

testtokens.md

File metadata and controls

137 lines (96 loc) · 2.53 KB
layout title
default
TestTokens

TestTokens.sol

View Source: contracts/TestTokens.sol

Contract Members

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);

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

function totalSupply() external view
returns(uint256)

Arguments

Name Type Description

balanceOf

function balanceOf(address tokenOwner) external view
returns(uint256)

Arguments

Name Type Description
tokenOwner address

transfer

function transfer(address receiver, uint256 numTokens) external nonpayable
returns(bool)

Arguments

Name Type Description
receiver address
numTokens uint256

approve

function approve(address delegate, uint256 numTokens) external nonpayable
returns(bool)

Arguments

Name Type Description
delegate address
numTokens uint256

allowance

function allowance(address owner, address delegate) external view
returns(uint256)

Arguments

Name Type Description
owner address
delegate address

transferFrom

function transferFrom(address owner, address buyer, uint256 numTokens) external nonpayable
returns(bool)

Arguments

Name Type Description
owner address
buyer address
numTokens uint256

allocateTo

function allocateTo(address _owner, uint256 value) public nonpayable

Arguments

Name Type Description
_owner address
value uint256