View Source: contracts/mocks/PolyTokenFaucet.sol
PolyTokenFaucet
Constants & Variables
//internal membersuint256 internal totalSupply_;mapping(address => uint256) internal balances;mapping(address => mapping(address => uint256)) internal allowed;//public membersstring public name;uint8 public decimals;string public symbol;
Events
event Transfer(address indexed from, address indexed to, uint256 value);event Approval(address indexed owner, address indexed spender, uint256 value);
()
function () public nonpayable
Arguments
Name | Type | Description |
function getTokens(uint256 _amount, address _recipient) public nonpayablereturns(bool)
Arguments
Name | Type | Description |
_amount | uint256 | |
_recipient | address | |
Sends _value
tokens to _to
from msg.sender
function transfer(address _to, uint256 _value) public nonpayablereturns(bool)
Returns
Whether the transfer was successful or not
Arguments
Name | Type | Description |
_to | address | The address of the recipient |
_value | uint256 | The amount of token to be transferred |
sends _value
tokens to _to
from _from
with the condition it is approved by _from
function transferFrom(address _from, address _to, uint256 _value) public nonpayablereturns(bool)
Returns
Whether the transfer was successful or not
Arguments
Name | Type | Description |
_from | address | The address of the sender |
_to | address | The address of the recipient |
_value | uint256 | The amount of token to be transferred |
Returns the balance of a token holder
function balanceOf(address _owner) public viewreturns(balance uint256)
Returns
The balance
Arguments
Name | Type | Description |
_owner | address | The address from which the balance will be retrieved |
Used by msg.sender
to approve _spender
to spend _value
tokens
function approve(address _spender, uint256 _value) public nonpayablereturns(bool)
Returns
Whether the approval was successful or not
Arguments
Name | Type | Description |
_spender | address | The address of the account able to transfer the tokens |
_value | uint256 | The amount of tokens to be approved for transfer |
function allowance(address _owner, address _spender) public viewreturns(remaining uint256)
Returns
Amount of remaining tokens allowed to be spent
Arguments
Name | Type | Description |
_owner | address | The address of the account owning tokens |
_spender | address | The address of the account able to transfer the tokens |
function totalSupply() public viewreturns(uint256)
Arguments
Name | Type | Description |
Increases the amount of tokens that an owner allowed to a spender. approve should be called when allowed[_spender] == 0. To increment allowed value, it is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol
function increaseApproval(address _spender, uint256 _addedValue) public nonpayablereturns(bool)
Arguments
Name | Type | Description |
_spender | address | The address which will spend the funds. |
_addedValue | uint256 | The amount of tokens to increase the allowance by. |
Decrease the amount of tokens that an owner allowed to a spender.
approve should be called when allowed[_spender] == 0. To decrement
allowed value, it is better to use this function to avoid 2 calls (and wait until
the first transaction is mined)
From MonolithDAO Token.sol
function decreaseApproval(address _spender, uint256 _subtractedValue) public nonpayablereturns(bool)
Arguments
Name | Type | Description |
_spender | address | The address which will spend the funds. |
_subtractedValue | uint256 | The amount of tokens to decrease the allowance by. |