source_idx
stringlengths
1
5
contract_name
stringlengths
1
48
func_name
stringlengths
0
52
masked_contract
stringlengths
105
184k
func_body
stringlengths
0
324k
func_requirement
stringlengths
1
28.3k
85429
BurnableToken
burn
contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public {<FILL_FUNCTION_BODY>} function _burn(address _who, uint256 _val...
_burn(msg.sender, _value);
* * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned.
85429
HashcardToken
transferFrom
contract HashcardToken is StandardToken, BurnableToken, Owned { string public constant name = "Hash Card"; string public constant symbol = "HSHC"; uint8 public constant decimals = 18; /// Maximum tokens to be allocated (150 million) uint256 public constant HARD_CAP = 150000000 * 10**uint256(d...
if(!saleClosed) return false; return super.transferFrom(_from, _to, _value);
/ @dev Trading limited - requires the token sale to have closed
85429
HashcardToken
transfer
contract HashcardToken is StandardToken, BurnableToken, Owned { string public constant name = "Hash Card"; string public constant symbol = "HSHC"; uint8 public constant decimals = 18; /// Maximum tokens to be allocated (150 million) uint256 public constant HARD_CAP = 150000000 * 10**uint256(d...
if(!saleClosed && msg.sender != saleTokensAddress && msg.sender != bountyTokensAddress) return false; return super.transfer(_to, _value);
/ @dev Trading limited - requires the token sale to have closed
85430
V00_UserRegistry
registerUser
contract V00_UserRegistry { /* * Events */ event NewUser(address _address, address _identity); /* * Storage */ // Mapping from ethereum wallet to ERC725 identity mapping(address => address) public users; /* * Public functions */ /// @dev registe...
users[tx.origin] = msg.sender; emit NewUser(tx.origin, msg.sender);
* Public functions / @dev registerUser(): Add a user to the registry
85430
V00_UserRegistry
clearUser
contract V00_UserRegistry { /* * Events */ event NewUser(address _address, address _identity); /* * Storage */ // Mapping from ethereum wallet to ERC725 identity mapping(address => address) public users; /* * Public functions */ /// @dev registe...
users[msg.sender] = 0;
/ @dev clearUser(): Remove user from the registry
85431
Ownable
null
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () {<FILL_FUNCTION_BODY>} /** * @dev...
address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender);
* * @dev Initializes the contract setting the deployer as the initial owner.
85431
Ownable
owner
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); ...
return _owner;
* * @dev Throws if called by any account other than the owner.
85432
ERC20
totalSupply
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
return _totalSupply;
* * @dev Total number of tokens in existence
85432
ERC20
balanceOf
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
return _balances[owner];
* * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address.
85432
ERC20
allowance
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
return _allowed[owner][spender];
* * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender.
85432
ERC20
transfer
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
require(value <= _balances[msg.sender]); require(to != address(0)); _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(msg.sender, to, value); return true;
* * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred.
85432
ERC20
approve
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true;
* * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this ...
85432
ERC20
transferFrom
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); emit Transfer(from...
* * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred
85432
ERC20
_mint
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
require(account != 0); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount);
* * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param amount The amount that will be created.
85432
EVOYToken
null
contract EVOYToken is ERC20 { string public constant name = "EVOY"; string public constant symbol = "EVOY"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 10000000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens....
_mint(msg.sender, INITIAL_SUPPLY);
* * @dev Constructor that gives msg.sender all of existing tokens.
85438
Ownable
null
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal {<FILL_FUNCTION_BODY>} /** ...
address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender);
* * @dev Initializes the contract setting the deployer as the initial owner.
85438
Ownable
owner
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
return _owner;
* * @dev Returns the address of the current owner.
85438
Ownable
renounceOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
emit OwnershipTransferred(_owner, address(0)); _owner = address(0);
* * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the ...
85438
Ownable
transferOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner;
* * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner.
85438
ElonTheDog
_transfer
contract ElonTheDog is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address =...
require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (BOTaddressToLock[sender] || BOTaddressToLock[recipient]) ...
* Transfer function with features: * -searching for known BOTs to lock them. * -burns 2% tokens for each buy/sell transaciton, and airdrop it (spreads) to other holders, * -temporary limits for eailer transactions on the beggining to prevent high dumps later. * -owner is excluded from all limit...
85439
BNum
bpowi
contract BNum { uint256 internal constant BONE = 1e18; uint256 internal constant MIN_BPOW_BASE = 1 wei; uint256 internal constant MAX_BPOW_BASE = (2 * BONE) - 1 wei; uint256 internal constant BPOW_PRECISION = BONE / 10**10; uint256 internal constant MIN_WEIGHT = BONE / 4; function btoi(uint256 a) internal ...
uint256 z = n % 2 != 0 ? a : BONE; for (n /= 2; n != 0; n /= 2) { a = bmul(a, a); if (n % 2 != 0) { z = bmul(z, a); } } return z;
DSMath.wpow
85439
BNum
bpow
contract BNum { uint256 internal constant BONE = 1e18; uint256 internal constant MIN_BPOW_BASE = 1 wei; uint256 internal constant MAX_BPOW_BASE = (2 * BONE) - 1 wei; uint256 internal constant BPOW_PRECISION = BONE / 10**10; uint256 internal constant MIN_WEIGHT = BONE / 4; function btoi(uint256 a) internal ...
require(base >= MIN_BPOW_BASE, "ERR_BPOW_BASE_TOO_LOW"); require(base <= MAX_BPOW_BASE, "ERR_BPOW_BASE_TOO_HIGH"); uint256 whole = bfloor(exp); uint256 remain = bsub(exp, whole); uint256 wholePow = bpowi(base, btoi(whole)); if (remain == 0) { return wholePow; } uint256 partial...
Compute b^(e.w) by splitting it into (b^e)*(b^0.w). Use `bpowi` for `b^e` and `bpowK` for k iterations of approximation of b^0.w
85445
WHENMOON
setFeeRate
contract WHENMOON is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; ...
require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate);
fallback in case contract is not releasing tokens fast enough
85446
ERC20
totalSupply
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
return _totalSupply;
* * @dev Total number of tokens in existence
85446
ERC20
balanceOf
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
return _balances[owner];
* * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return A uint256 representing the amount owned by the passed address.
85446
ERC20
allowance
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
return _allowed[owner][spender];
* * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender.
85446
ERC20
transfer
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_transfer(msg.sender, to, value); return true;
* * @dev Transfer token to a specified address * @param to The address to transfer to. * @param value The amount to be transferred.
85446
ERC20
approve
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_approve(msg.sender, spender, value); return true;
* * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate thi...
85446
ERC20
transferFrom
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_transfer(from, to, value); _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); return true;
* * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from *...
85446
ERC20
increaseAllowance
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue)); return true;
* * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO T...
85446
ERC20
decreaseAllowance
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue)); return true;
* * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO T...
85446
ERC20
_transfer
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value);
* * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred.
85446
ERC20
_mint
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value);
* * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be c...
85446
ERC20
_burn
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value);
* * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt.
85446
ERC20
_approve
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
require(spender != address(0)); require(owner != address(0)); _allowed[owner][spender] = value; emit Approval(owner, spender, value);
* * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent.
85446
ERC20
_burnFrom
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSuppl...
_burn(account, value); _approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
* * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burn...
85446
ERC20Detailed
name
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _name;
* * @return the name of the token.
85446
ERC20Detailed
symbol
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _symbol;
* * @return the symbol of the token.
85446
ERC20Detailed
decimals
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
return _decimals;
* * @return the number of decimals of the token.
85446
ERC20Mintable
mint
contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address ...
_mint(to, value); return true;
* * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful.
85446
ERC20Capped
cap
contract ERC20Capped is ERC20Mintable { uint256 private _cap; constructor (uint256 cap) public { require(cap > 0); _cap = cap; } /** * @return the cap for the token minting. */ function cap() public view returns (uint256) {<FILL_FUNCTION_BODY>} function ...
return _cap;
* * @return the cap for the token minting.
85446
ERC20Snapshot
snapshot
contract ERC20Snapshot is ERC20 { using SafeMath for uint256; using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of funct...
_currentSnapshotId.increment(); uint256 currentId = _currentSnapshotId.current(); emit Snapshot(currentId); return currentId;
Creates a new snapshot id. Balances are only stored in snapshots on demand: unless a snapshot was taken, a balance change will not be recorded. This means the extra added cost of storing snapshotted balances is only paid when required, but is also flexible enough that it allows for e.g. daily snapshots.
85446
ERC20Snapshot
_transfer
contract ERC20Snapshot is ERC20 { using SafeMath for uint256; using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of funct...
_updateAccountSnapshot(from); _updateAccountSnapshot(to); super._transfer(from, to, value);
_transfer, _mint and _burn are the only functions where the balances are modified, so it is there that the snapshots are updated. Note that the update happens _before_ the balance change, with the pre-modified value. The same is true for the total supply and _mint and _burn.
85446
ERC20Snapshot
_valueAt
contract ERC20Snapshot is ERC20 { using SafeMath for uint256; using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of funct...
require(snapshotId > 0); require(snapshotId <= _currentSnapshotId.current()); uint256 index = snapshots.ids.findUpperBound(snapshotId); if (index == snapshots.ids.length) { return (false, 0); } else { return (true, snapshots.values[index]); ...
In summary, we need to find an element in an array, returning the index of the smallest value that is larger if it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does exactly this.
85446
Ownable
null
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal {<FILL_FUNCTION_BODY>...
_owner = msg.sender; emit OwnershipTransferred(address(0), _owner);
* * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account.
85446
Ownable
owner
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
return _owner;
* * @return the address of the owner.
85446
Ownable
isOwner
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
return msg.sender == _owner;
* * @return true if `msg.sender` is the owner of the contract.
85446
Ownable
renounceOwnership
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
emit OwnershipTransferred(_owner, address(0)); _owner = address(0);
* * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only avail...
85446
Ownable
transferOwnership
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
_transferOwnership(newOwner);
* * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to.
85446
Ownable
_transferOwnership
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner;
* * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to.
85446
PictosisToken
approveAndCall
contract PictosisToken is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, ERC20Snapshot, Ownable { uint transfersEnabledDate; modifier onlyTransfersEnabled() { require(block.timestamp >= transfersEnabledDate, "Transfers disabled"); _; } constructor(uint _enableTransfersDate, ...
require(approve(_spender, _amount), "Couldn't approve spender"); ApproveAndCallFallBack(_spender).receiveApproval(msg.sender, _amount, address(this), _extraData); return true;
/ @notice `msg.sender` approves `_spender` to send `_amount` tokens on / its behalf, and then a function is triggered in the contract that is / being approved, `_spender`. This allows users to use their tokens to / interact with contracts in one function call instead of two / @param _spender The address of the contr...
85449
GGstaking
transferAnyERC20Tokens
contract GGstaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // GGfinance.io token contract address address public constant tokenAddress = 0xa33529a0F240e5754BBFAD4786439365BD096dE3;...
if (_tokenAddr == tokenAddress) { if (_amount > getStakingAndDaoAmount()) { revert(); } totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount);
function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
85464
Context
null
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal {<FILL_FUNCTION_BODY>} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal v...
Empty internal constructor, to prevent people from mistakenly deploying an instance of this contract, which should be used via inheritance.
85464
Context
_msgSender
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (addres...
return msg.sender;
solhint-disable-previous-line no-empty-blocks
85464
ERC20
totalSupply
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
return _totalSupply;
* * @dev See {IERC20-totalSupply}.
85464
ERC20
balanceOf
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
return _balances[account];
* * @dev See {IERC20-balanceOf}.
85464
ERC20
transfer
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_transfer(_msgSender(), recipient, amount); return true;
* * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`.
85464
ERC20
allowance
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
return _allowances[owner][spender];
* * @dev See {IERC20-allowance}.
85464
ERC20
approve
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_approve(_msgSender(), spender, amount); return true;
* * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address.
85464
ERC20
transferFrom
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true;
* * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must ha...
85464
ERC20
increaseAllowance
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true;
* * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requi...
85464
ERC20
decreaseAllowance
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true;
* * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requi...
85464
ERC20
_transfer
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient]...
* * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `s...
85464
ERC20
_mint
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount);
* @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address.
85464
ERC20
_burn
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount);
* * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens.
85464
ERC20
_approve
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount);
* * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: ...
85464
ERC20
_burnFrom
contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSup...
_burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
* * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}.
85464
ERC20Detailed
null
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
_name = name; _symbol = symbol; _decimals = decimals;
* * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction.
85464
ERC20Detailed
name
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
return _name;
* * @dev Returns the name of the token.
85464
ERC20Detailed
symbol
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
return _symbol;
* * @dev Returns the symbol of the token, usually a shorter version of the * name.
85464
ERC20Detailed
decimals
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
return _decimals;
* * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * ...
85464
ERC20Burnable
burn
contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public {<FILL_FUNCTION_BODY>} /** * @dev See {ERC20-_burnFrom}. */ function burnFrom(address account, uint256 ...
_burn(_msgSender(), amount);
* * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}.
85464
ERC20Burnable
burnFrom
contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public { _burn(_msgSender(), amount); } /** * @dev See {ERC20-_burnFrom}. */ function burnFrom(a...
_burnFrom(account, amount);
* * @dev See {ERC20-_burnFrom}.
85464
Pausable
null
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
_paused = false;
* * @dev Initializes the contract in unpaused state. Assigns the Pauser role * to the deployer.
85464
Pausable
paused
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
return _paused;
* * @dev Returns true if the contract is paused, and false otherwise.
85464
Pausable
pause
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
_paused = true; emit Paused(_msgSender());
* * @dev Called by a pauser to pause, triggers stopped state.
85464
Pausable
unpause
contract Pausable is Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private ...
_paused = false; emit Unpaused(_msgSender());
* * @dev Called by a pauser to unpause, returns to normal state.
85464
QWEToken
null
contract QWEToken is Context, ERC20, ERC20Detailed , ERC20Burnable , ERC20Pausable { /** * @dev Constructor that gives _msgSender() all of existing tokens. */ constructor () public ERC20Detailed("QaWaEa Coin", "QWE", 8) {<FILL_FUNCTION_BODY>} }
_mint(_msgSender(), 5555555 * (10 ** uint256(decimals())));
* * @dev Constructor that gives _msgSender() all of existing tokens.
85465
BasicToken
transfer
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true;
* * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred.
85465
BasicToken
balanceOf
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
return balances[_owner];
* * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address.
85465
StandardToken
transferFrom
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balan...
* * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred
85465
StandardToken
approve
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true;
* * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate thi...
85465
StandardToken
allowance
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
return allowed[_owner][_spender];
* * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender.
85465
StandardToken
increaseApproval
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true;
* * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol
85465
Ownable
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() {<FILL_FUNCTION_BODY>} /** ...
owner = msg.sender;
* * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account.
85465
Ownable
transferOwnership
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } ...
require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner;
* * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to.
85465
FRNCoinCrowdsale
contract FRNCoinCrowdsale is Ownable { using SafeMath for uint256; // The token being sold StandardToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public endTime; // address where funds are collected address public wallet; address publ...
buyTokens(msg.sender);
fallback function can be used to buy tokens
85465
FRNCoinCrowdsale
buyTokens
contract FRNCoinCrowdsale is Ownable { using SafeMath for uint256; // The token being sold StandardToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public endTime; // address where funds are collected address public wallet; address publ...
require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = weiAmount.mul(rate); // update state weiRaised = weiRaised.add(weiAmount); token.transferFrom(tokenPoolAddress, beneficiary, tok...
low level token purchase function
85465
FRNCoinCrowdsale
forwardFunds
contract FRNCoinCrowdsale is Ownable { using SafeMath for uint256; // The token being sold StandardToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public endTime; // address where funds are collected address public wallet; address publ...
wallet.transfer(msg.value);
send ether to the fund collection wallet override to create custom fund forwarding mechanisms
85465
FRNCoinCrowdsale
validPurchase
contract FRNCoinCrowdsale is Ownable { using SafeMath for uint256; // The token being sold StandardToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public endTime; // address where funds are collected address public wallet; address publ...
bool nonZeroPurchase = msg.value != 0; return !hasEnded() && nonZeroPurchase;
@return true if the transaction can buy tokens
85465
FRNCoinCrowdsale
hasEnded
contract FRNCoinCrowdsale is Ownable { using SafeMath for uint256; // The token being sold StandardToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public endTime; // address where funds are collected address public wallet; address publ...
return now > endTime;
@return true if crowdsale event has ended
85466
EEYcoin
name
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
return name_;
Function to access name of token .
85466
EEYcoin
symbol
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
return symbol_;
Function to access symbol of token .
85466
EEYcoin
decimals
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
return decimals_;
Function to access decimals of token .
85466
EEYcoin
totalSupply
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
return totalSupply_;
Function to access total supply of tokens .
85466
EEYcoin
transfer
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
if(isContract(_to)) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); Tr...
Function that is called when a user or another contract wants to transfer funds .
85466
EEYcoin
transfer
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
if(isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); }
Function that is called when a user or another contract wants to transfer funds .
85466
EEYcoin
transfer
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
//standard function transfer similar to ERC20 transfer with no _data //added due to backwards compatibility reasons bytes memory empty; if(isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); ...
Standard function transfer similar to ERC20 transfer with no _data . Added due to backwards compatibility reasons .
85466
EEYcoin
isContract
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0);
assemble the given address bytecode. If bytecode exists then the _addr is a contract.
85466
EEYcoin
transferToAddress
contract EEYcoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address public owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address ...
if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true;
function that is called when transaction target is an address