ETH Price: $2,516.58 (-0.38%)

Transaction Decoder

Block:
7330612 at Mar-08-2019 08:03:48 PM +UTC
Transaction Fee:
0.00196667 ETH $4.95
Gas Used:
983,335 Gas / 2 Gwei

Emitted Events:

Account State Difference:

  Address   Before After State Difference Code
0x39214B8f...C07d7AA42
0.011 Eth
Nonce: 0
0.00903333 Eth
Nonce: 1
0.00196667
(Spark Pool)
8,315.939774427106321942 Eth8,315.941741097106321942 Eth0.00196667
0xFab46E00...6E6730136
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 18144640459820085742193078045889949321623925746784621769911821601941914744729751859878557167070622407014398215359236126298504626669064016334495570747336194617922407380453992074244860121878555622169274694341407620578571014902847845734521135983044781505128796322263179660770927641547460430356458876352197920029022841128590919166675754599889233645193907482950951199274282695726325973366700196269092895212176224615957018857203903337125925637340787022091082066196011848233643429567720365035724363802409807462726504706577144149448149440168294941603273913891181885884030959575762003765390266894491315565422836562792462296742289639150504613379038135709848875886105497789962077411043787694850864851496812771167750723707992702651276832101105636563645763885423618999153566777248105722424230467045648914667299067050006451150940398949585935552626314867360172740352392655848808614110420036105078734057545603567942661797012354373244776163335169091966350491349612398422768894317883551175508413756539361812334310976317110694052631548850119921442626117924738906767152109757540154513308830375971915874205099696883229145127881427430511195783768969439020281903543580767055807675044064705438336252815819801621276066453614307117908380407235089033314648778843004931845849418816032067765430636332150331411727428309768765294273488595949811602248535680083546828480749220392355888392373677287772909186786340385214950135607334873523448844474844118649702538478599624573551309919201535737686143562050153752318856930230156618435396508158339769956806916610630127316912695773714122408227425997732203631889673440784399214160036663505729748044403950562453257054621299997273728728832837090341887488457158052304931040256034810364660353133537166924007456626947719868256475388466255105283188730948239033136600660389014073134303984656019587648537192692828115864980727714990132473343559714191158671826269714542759084671362617481840093622216008786435870698678220374156537284867105892274230066299071381718789739246831452892204580889295694539850113541064920639773048686681893888790767027908718957605142109079671103835862698154634257430049490697887504852356320933895882376795500981920994237514287050798071039035820280536039270358375092169906911625819888624290676503865272789116964220643309192372806187579609574006829081513730041133653174115636583366528153717273209961744600309879077683192041959370931173694387846533247073149657468165989529832814613354110351235482970854637402809314524548061017320055706931943968569582993865943105656454649395709439300632360321242808321668435399073931561170448282853096407653793681294550509292375434356587769501502989917969565974134365844417843447295021809888090690167987904516963154248678759452561491359795924069199894104876914054364278944756967169296319361555780818733002146413580641001775120647024283432293056195903269744173543459987924844637982162844134665838842332732254127708300496025549678574000799464761194585032609229488408947425639592734862906659760220918977301067265054921648012481154525372611615145756069762200922698080904959888093520262187074202029822609937520440015448932168008649872582497865742826953463631220992123150588803551080040094404778205674377213188038673541933499196827860950940624318053789615735067078689225180653864189548040623130044496573939191320351913803631611749741065028257706708590027752467524503724904313271762774443292554846103676910015288077971253554888716812723487276356129569917620040232660185416474827186333129421514262188761129931586443400450143843042122753256782959514204540938733289279098997075134911770478259614397540025072395430394059450978310120781284981693662820619775753607457014552057354515248764427697801500409878632392101406432360173842251722177978526462400982889403144153332927332846470528681632639321887105851912470800761096642248110162440568431339729361889202850254205619841824606771486797766176994192852979419333782679385017418993582337106519699208864097462326054689108305192137012228606633015904450513717561749148036179414422416232093090485444577902572197752994732326553545022008087375823942466990630502749395075164632795679354557779634794076485306134945988384449867821629630741343378051819135236926385055276113363617512546409055575123110660760214283333770718536534930067716753618579023643612513423899525268910793343568801383236992292546933330028268718422050831039564027088701601775327078339699302404639944684044120873612938637621831745598265177533742443726504780622354598115824008456591034247609376699908988704513306090221841594356071126979718064741507678719911104056401846043261054656290665796795910807792792715263732860577340964447396884641070628972901745357844013150400935173780523455714282984594711320924582702656243809594462559068565369574974517143395438854096098635832356169939029740983513042293603442052608468420582083924732998096072892082843029722194763331908639028375226570157884516190518723380006728203991075495135747161779295069606596809299284220707814180767405146947456958989228107480059378811423512971945474912785789224935772200572035476321403257629796345956770758899409503639936643824847997249871583462997770776106976727004326833711185211306763690750789235999163554712907520290077034618172375884345427747956642841772173524348170787340803685987030906716312168896955443463363495033335210602733867953310750324181620930802929333635021709686095204444651833296995864328639918486844629368284516702850521213186813170983923000972652412574502229205803048029103939745938721803397511461410405369780356474812246890849663006140608021164045759465005979313685560793383484111783457256406609507878016429707533473860990695469986718913289352308214018058660938416794279613241461741595355172731374582652300933368812647285876806843358052159596662642368839427598275071635439256509729156271014162628159038585660772782090814477750084228432483430946203288101559782269991867766795629482124111166969187583304215616901511996754678171869437976366694489443445211233999911794433538018864354030849549995122113607906506074519195502563224536444665213323748770189949183190524076978742064678629309500004438129030550413768418922210237990373994860955412929769553461286163811490529303160380166902181219747953204998189142637273956644939254756082118170015312043594512950741250688570163098325612428263228111238806250212145731482080572618295995767030619614244495100454680584047795826246710909422690234768591736105969168471498352125444326279919490772428131416062963368870922817628262693292255083060452665207142580778988696773986469464544783220995735374984743189448371685513327474187834695368609841636284956486088183021663375053670577392366200202382677151159601955946594870661854811467876187084071509283872398092632612484439069186937628185837971341827168512122269138017916838472952252681812774964510266079156740383678834777026707203397300585177010274074376180084310957189081910902020119523538495059679174886425646407702019262585560816140991498721949777069639857180462589715732987925736729470614092622435760988755990838051609611493072455765803041442113759367575632660134800430535189748942651333707537094284919248204929215548965524574581938368256255687862616683697780058826477688696987359027215934800420923701834220462398478499312877889265934050533737077921986192991451740403267393472534664538951292175378852868006137797055349741694096898235685817805582203890447934339387003891611447258079730889717286514149696833665557594153

Execution Trace

FaucetToken.60806040( )
/**                                                                         
* ________                                                ____                                                           
* `MMMMMMMb.                                             6MMMMb\                                                         
*  MM    `Mb                                            6M'    `                                                         
*  MM     MM   ____  __ ____  __ ____     ____  ___  __ MM         ____     ____         ____     _____  ___  __    __   
*  MM     MM  6MMMMb `M6MMMMb `M6MMMMb   6MMMMb `MM 6MM YM.       6MMMMb   6MMMMb.      6MMMMb.  6MMMMMb `MM 6MMb  6MMb  
*  MM    .M9 6M'  `Mb MM'  `Mb MM'  `Mb 6M'  `Mb MM69 "  YMMMMb  6M'  `Mb 6M'   Mb     6M'   Mb 6M'   `Mb MM69 `MM69 `Mb 
*  MMMMMMM9' MM    MM MM    MM MM    MM MM    MM MM'         `Mb MM    MM MM    `'     MM    `' MM     MM MM'   MM'   MM 
*  MM        MMMMMMMM MM    MM MM    MM MMMMMMMM MM           MM MMMMMMMM MM           MM       MM     MM MM    MM    MM 
*  MM        MM       MM    MM MM    MM MM       MM           MM MM       MM           MM       MM     MM MM    MM    MM 
*  MM        YM    d9 MM.  ,M9 MM.  ,M9 YM    d9 MM     L    ,M9 YM    d9 YM.   d9 68b YM.   d9 YM.   ,M9 MM    MM    MM 
* _MM_        YMMMM9  MMYMMM9  MMYMMM9   YMMMM9 _MM_    MYMMMM9   YMMMM9   YMMMM9  Y89  YMMMM9   YMMMMM9 _MM_  _MM_  _MM_
*                     MM       MM                                                                                        
*                     MM       MM                                                                                        
*                    _MM_     _MM_                                                                                       
*/


// Get a free estimate for your Solidity audit @ [email protected] 
// https://peppersec.com

/**
*   _______    _                ______                   _   
*  |__   __|  | |              |  ____|                 | |  
*     | | ___ | | _____ _ __   | |__ __ _ _   _  ___ ___| |_ 
*     | |/ _ \| |/ / _ \ '_ \  |  __/ _` | | | |/ __/ _ \ __|
*     | | (_) |   <  __/ | | | | | | (_| | |_| | (_|  __/ |_ 
*     |_|\___/|_|\_\___|_| |_| |_|  \__,_|\__,_|\___\___|\__|
*/
pragma solidity ^0.5.5;

/**
 * @title ERC20 interface
 * @dev see https://eips.ethereum.org/EIPS/eip-20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.2;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.5.2;



/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://eips.ethereum.org/EIPS/eip-20
 * Originally based on code by FirstBlood:
 * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 *
 * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
 * all accounts just by listening to said events. Note that this isn't required by the specification, and other
 * compliant implementations may not do it.
 */
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 returns (uint256) {
        return _totalSupply;
    }

    /**
     * @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.
     */
    function balanceOf(address owner) public view returns (uint256) {
        return _balances[owner];
    }

    /**
     * @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.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowed[owner][spender];
    }

    /**
     * @dev Transfer token to a specified address
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function transfer(address to, uint256 value) public returns (bool) {
        _transfer(msg.sender, to, 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
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     */
    function approve(address spender, uint256 value) public returns (bool) {
        _approve(msg.sender, spender, 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
     * @param to address The address which you want to transfer to
     * @param value uint256 the amount of tokens to be transferred
     */
    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        _transfer(from, to, value);
        _approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
        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 Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param addedValue The amount of tokens to increase the allowance by.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
        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 Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
        return true;
    }

    /**
     * @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.
     */
    function _transfer(address from, address to, uint256 value) internal {
        require(to != address(0));

        _balances[from] = _balances[from].sub(value);
        _balances[to] = _balances[to].add(value);
        emit Transfer(from, to, 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 created.
     */
    function _mint(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.add(value);
        _balances[account] = _balances[account].add(value);
        emit Transfer(address(0), account, 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.
     */
    function _burn(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.sub(value);
        _balances[account] = _balances[account].sub(value);
        emit Transfer(account, address(0), 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.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        require(spender != address(0));
        require(owner != address(0));

        _allowed[owner][spender] = value;
        emit Approval(owner, spender, 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 burnt.
     * @param value The amount that will be burnt.
     */
    function _burnFrom(address account, uint256 value) internal {
        _burn(account, value);
        _approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol

pragma solidity ^0.5.2;


/**
 * @title ERC20Detailed token
 * @dev The decimals are only for visualization purposes.
 * All the operations are done using the smallest and indivisible token unit,
 * just as on Ethereum all the operations are done in wei.
 */
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;
    }

    /**
     * @return the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @return the symbol of the token.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @return the number of decimals of the token.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

// File: openzeppelin-solidity/contracts/access/Roles.sol

pragma solidity ^0.5.2;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev give an account access to this role
     */
    function add(Role storage role, address account) internal {
        require(account != address(0));
        require(!has(role, account));

        role.bearer[account] = true;
    }

    /**
     * @dev remove an account's access to this role
     */
    function remove(Role storage role, address account) internal {
        require(account != address(0));
        require(has(role, account));

        role.bearer[account] = false;
    }

    /**
     * @dev check if an account has this role
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0));
        return role.bearer[account];
    }
}

// File: openzeppelin-solidity/contracts/access/roles/MinterRole.sol

pragma solidity ^0.5.2;


contract MinterRole {
    using Roles for Roles.Role;

    event MinterAdded(address indexed account);
    event MinterRemoved(address indexed account);

    Roles.Role private _minters;

    constructor () internal {
        _addMinter(msg.sender);
    }

    modifier onlyMinter() {
        require(isMinter(msg.sender));
        _;
    }

    function isMinter(address account) public view returns (bool) {
        return _minters.has(account);
    }

    function addMinter(address account) public onlyMinter {
        _addMinter(account);
    }

    function renounceMinter() public {
        _removeMinter(msg.sender);
    }

    function _addMinter(address account) internal {
        _minters.add(account);
        emit MinterAdded(account);
    }

    function _removeMinter(address account) internal {
        _minters.remove(account);
        emit MinterRemoved(account);
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Mintable.sol

pragma solidity ^0.5.2;



/**
 * @title ERC20Mintable
 * @dev ERC20 minting logic
 */
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 to, uint256 value) public onlyMinter returns (bool) {
        _mint(to, value);
        return true;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol

pragma solidity ^0.5.2;


/**
 * @title Burnable Token
 * @dev Token that can be irreversibly burned (destroyed).
 */
contract ERC20Burnable is ERC20 {
    /**
     * @dev Burns a specific amount of tokens.
     * @param value The amount of token to be burned.
     */
    function burn(uint256 value) public {
        _burn(msg.sender, value);
    }

    /**
     * @dev Burns a specific amount of tokens from the target address and decrements allowance
     * @param from address The account whose tokens will be burned.
     * @param value uint256 The amount of token to be burned.
     */
    function burnFrom(address from, uint256 value) public {
        _burnFrom(from, value);
    }
}

// File: contracts/FaucetToken.sol

pragma solidity 0.5.5;





contract FaucetToken is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable {
    uint8 public constant DECIMALS = 18;
    uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(DECIMALS));

    /**
     * @dev Constructor that gives msg.sender all of existing tokens.
     */
    constructor () public ERC20Detailed("FaucetToken", "FAU", DECIMALS) {
    }

    function() external {
        mint(msg.sender, 1 ether);
    }

    function mint(address to, uint256 value) public returns (bool) {
        require(value <= 10000000 ether, "dont be greedy");
        _mint(to, value);
        return true;
    }

}