Transaction Hash:
Block:
5888483 at Jul-01-2018 08:35:17 PM +UTC
Transaction Fee:
0.0013737 ETH
$3.18
Gas Used:
45,790 Gas / 30 Gwei
Emitted Events:
| 145 |
Fluz.Approval( _owner=[Sender] 0x42f88e6bafc6c8cff8110a7834cc2e32de8d2dfd, _spender=0x2a0c0DBE...44050c208, _value=130918628106634033036207 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x42f88e6b...2de8d2dfd |
0.198823722 Eth
Nonce: 5
|
0.197450022 Eth
Nonce: 6
| 0.0013737 | ||
| 0x954b5De0...A45D30175 | |||||
|
0xEA674fdD...16B898ec8
Miner
| (Ethermine) | 1,527.5014902140059477 Eth | 1,527.5028639140059477 Eth | 0.0013737 |
Execution Trace
Fluz.approve( _spender=0x2a0c0DBEcC7E4D658f48E01e3fA353F44050c208, _value=130918628106634033036207 ) => ( success=True )
approve[Fluz (ln:120)]
Approval[Fluz (ln:122)]
pragma solidity ^0.4.19;
/**
* ERC 20 token
* https://github.com/ethereum/EIPs/issues/20
*/
interface Token {
/// @return total amount of tokens
/// function totalSupply() public constant returns (uint256 supply);
/// do not declare totalSupply() here, see https://github.com/OpenZeppelin/zeppelin-solidity/issues/434
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public constant returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/** @title FluzFluz (FLUZ contract) **/
contract Fluz is Token {
string public constant name = "FluzFluz";
string public constant symbol = "FLUZ";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 204780000 * 10**18;
uint public launched = 0; // Time of locking distribution and retiring founder; 0 means not launched
address public founder = 0x81D5ce5Bf1F4F0a576De11Fd9631e789D72c9BdE; // Founder's address
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
bool public transfersAreLocked = true;
function Fluz() public {
balances[founder] = totalSupply;
}
/**
* Modifier to check whether transfers are unlocked or the owner is sending
*/
modifier canTransfer() {
require(msg.sender == founder || !transfersAreLocked);
_;
}
/**
* Modifier to allow only founder to transfer
*/
modifier onlyFounder() {
require(msg.sender == founder);
_;
}
/**
* Transfer with checking if it's allowed
*/
function transfer(address _to, uint256 _value) public canTransfer returns (bool success) {
if (balances[msg.sender] < _value) {
return false;
}
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
/**
* Transfer with checking if it's allowed
*/
function transferFrom(address _from, address _to, uint256 _value) public canTransfer returns (bool success) {
if (balances[_from] < _value || allowed[_from][msg.sender] < _value) {
return false;
}
allowed[_from][msg.sender] -= _value;
balances[_from] -= _value;
balances[_to] += _value;
Transfer(_from, _to, _value);
return true;
}
/**
* Default balanceOf function
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
/**
* Default approval function
*/
function approve(address _spender, uint256 _value) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
/**
* Get user allowance
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
/**
* Launch and retire the founder
*/
function launch() public onlyFounder {
launched = block.timestamp;
founder = 0x0;
}
/**
* Change transfer locking state
*/
function changeTransferLock(bool locked) public onlyFounder {
transfersAreLocked = locked;
}
function() public { // no direct purchases
revert();
}
}