ETH Price: $2,429.59 (+0.77%)

Transaction Decoder

Block:
8038945 at Jun-27-2019 08:34:53 AM +UTC
Transaction Fee:
0.01300737 ETH $31.60
Gas Used:
1,300,737 Gas / 10 Gwei

Account State Difference:

  Address   Before After State Difference Code
(xnpool)
1,611.664234554376164055 Eth1,611.677241924376164055 Eth0.01300737
0x48A60049...814380B80
0.075130736352 Eth
Nonce: 178
0.062123366352 Eth
Nonce: 179
0.01300737
0xCbe19133...21C48DA50
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 3906837242801842807642358232442209722379498226925141922517370704998633653098162492614143983446082098666111265628499725102261864264564663340336867732637304788441620345152309436254383449668848097549750903431833987831616023551672964557521035461222244993286256442960949035310677044367916266883672489711242265068882712557847560574520566294258433923998143571439425647697459307498874356451216016564624898922801282625073401879762820337060557769275164435059085557100997668883392932288006129005532351916936014295302016010173513602380083648591801788152677219438158390722245954034529829209781660221497545342646383590297786149391699512436178253456587398104101044031840564225418343476467292047964198339990199160686053503803782545466616801951941972307457261162456417268814182640346460552557929772565004399730672377403773441622235303109410399423580186254626688673853059519878146025362578874561380299201423801277763005009719635513311296134360411674701882568934916446179718896076671271622761748317281328486641618509994837432968622135783134194337307440476667705449787983838693972851117299502975582117491742982005353833633005089272858270374560910994215115916525348398034447704158293409333424393731752121801330955911767279028659563545522875631753305363493553416130522777063604501683143188436205913080294930418982606698469507057687802841497232720183685129900695449133046334644298581273969791383450477606040383670738820870483722910402139018663573525770858900520299870231995720687303089129157617226318858623024239431242787564603584355012140569898530689163811366572766923593882545770452931883809896273441545437819819984725192423146099802717233548335674125167954247004135427010168700425137748387131929559943201832930545026929225993502403352488609273282374861139837199244762714111187228302575202029935361442123569650733704599971588380020601188497425923265930595851210937570123070630617352082439422826057963006562755741859492274379889711443586376176266747905754237871711562611103707705296132838548218074585536500105434442784527150262497793924630498106931374193730998311508866079746556268006037175262051186125709437604072600662368301123788317522605475383899532491457542796966163312035143606056850104606766006378983796258394596277543819709749727903546398816070657554167407846635974407521874288117362148410012763786854132227139495564797448987898301046911593498676589426071404729644655005744897033712991710220704108584323018797920374615941650370241440297647008786089915428610843658337260004205480573852465266106574401734310340599807344044647545646978159253592864757844400629529740601965692360574003708024780773790428493021026951378075253161883463314333085925314870720279865464007283138495170517961565098253694846440448156918428034220596119223781188594657998416486978085080039157815083464123082473844890410589635154734902963607577187944727747340519526566504929268642507215802274761800647879681450959729979211483109331641394840178591318274201367802826625937659717544993451280159992227995126307100922166578956267794086457843310890065875612274390206109488624463762724454358751138455630804468847981736593628933843854098315680734732432154010221271909347713017359241175075101394308116849209552195179893726887071556694122803757352751961615223153714020680690957715225928962668157635356674594879351385383078573364958987787612620803998225132252065626224064099393066745946626739695146887872017060024452914702213901949418177360470385974091763627418216303377682872914575065350655424267404997759922428756141479411395774775392858215719612122222533793470582833779290255166694447199702008695306655043579549065189986897478121829549011281877531550649076145520105123490153445740191270378794293234436827989441177240270266773636986855370595694851164898012848489641000236097448620078684627285853425290200568881558448250944589264510879915034795216117783010396411485713541152180783339263557166783492418719176670383348070239855221709420951169860967260188798850890131713903746311026831226018178383583059449192891191858957819509089947503090681307684501493826970271765393123365160662508670896380173757280340840806099872249234732737726479895298376743081264336613284211962016148653258706106380484441174346891796232854961785574249389159638359857269023853765312312457420836833188025307139211761966026086519621325915615774418522863316340575466035377804156115333217564962074752256174559773654510787622984236246995789700886867133754909976932879322187648727594854221185726449839656137905420150482037242232820124040384105738776592438230983843522404666218286638820496640091755763485117433671881217406728690406323861624345929175212690453822126664457457440873475742746686920413198268345235241437870754902084686524181840802526823746422161977542272633200220535894963843244695139845459106116679900396519264044530367446977705144291735618981800842777758317576494287472737047399266514356389037310489716087750146053793767573774537484527828095898851425263650815865711176608136146703363018009972314325458103731405035993564577760140730457478394938489962571328196449194048608022510163924482555720065899395451149327124613083573494442479484150239256268787503107168170242061631005767737036723094436568095476051273724088384386222221816275283767515847538208482045369386120252326591997471622471235825314244447092689023276520224625667274229321577552168898411874936820701014507423095168116530160282010356579574566411127119267832953092041821902010372361297768670871597991811504708641255059182283265173703881733365866956433045141739474618526686127277817065066129360915916407073307878452367371194557310195984082744431394852191145363785392936180168856412239891189868497923662557480076096084701857507455706277555245295628182440062133267631305553846829001696689990863032184300998965777998100845641181891123005765735253138570697869629956090992081204994845088770492351913068625232243595466923641811596363954695543751445448583161649950487002201791344750213840358391566305655536718811523864598824435946073354388604836753112892630499792068706328729991043428880626357614325228754537618226765363065400312382930417650571782559871105577501995075497578014152995071020603982551597106361824260030566640913080683025521009254318969564719754524983361559763932288209666540592812441094217686474084424835971817239014140983760878876386574774307767229454592859468483733749092793570865475161724356365612915289411891044937647975754713836404203074016446161732271498975557160882677083074490606533221082007385342655199186155383015462947176241657597038025332346241765944128276198569244229844530557086852964961094791494647634708780817764662035612681817289993748522391273938966824865394380216645450050304505604633527116335847348022975256648842294050211487002555623561304792580307077469174838148098342490851634396590906439405027166622332027948956654178103752718160298020932235013116819952708350143196274099541943441383979391670861790879081084728544617103788811365863175686315777963250025276800584621867571539487459472672783684244731211557067127712657066201585883176720263209319912651539602382283640015151121630573287723131013762250827524514048208230070724838385256816298318911570385393227312714676193160804989101222060930121700253176156055833302438234017944188749737190615619408506642587064709966628476446646751917189079750226926497165739181259508614214888413378555677855623393144515737639710178151442440970191462545688819619669456248633480790951262862352866258504174516729108610242927115183118412909449454126687155861952004794525378780372766644892755250347884520307346949372826755645967797225750121488605557537829691590076117600006503000441333380375399237787118961314470576216166277183283642081600941826177029639740896358230160976671119873318110369329220335040596911448407109106402248729372300348714892234706188177376275630599670711047378704776651965872780704829346084476850080381734867620466734084333426599399756522453855219271291943524474213580437726693180837453101022465590633616829997448278616258777041520889530273947938133762742219489435240365280873893259183576436888686094937664734660462406304656139820138181080123706310286994534436726380502575702100365162377217979008911442679286578141618063132052605837223377434516287879506068469977729084683923358600590305456633991330175045212486039043915852455087055998864414210624259126998392205170019093994162511712719084878184010283221919831861528288935180321551752939345251191355902944334040360010804303167645916584480362919542239399804077358655739787608788092117996913946320440367336417874246028917119994800821757310186776782043158453546667436926611651245719945525920415678784603942170951083510924555790047428698889822323165308255285382804115612867302896719565631959297456959248753483218251671368792521173231456899209428738160951341706827452307423347174649080018182127321013334007773797984293053033716825034890318379706792530936479881238041127218572922201932599163288917487128326177087821799860266322727043048498648099589598915802122530684709663391403396927394319849816073307469727015403702719399470250160559679648261112443112719301358218802542728762569383711636267966546122377747966708318056488722848102518444019009349592236997486148886439328762476691562959989615698809173565254481432652256461512972739523059180426725910327005872982905036379847685358309790444385327576577311187711709971385717859182011516531764730282187104663794677657545448130103863331012482543664069963885771425881967117039110591135157158569754628584767005297893447041471439121075974710497178032643989679468369982833605168205577921924988193525059468479297757271014820555066925361459178464213041271625622665219232368453946090129249984511529267994480566146962699570658854226878729523400741141410767361532978624821490989389125318564402451172699250457009813895115964464483860752493026516959143776164243833235361688424891027928257246750486154421238999275549949474998161705287197125618894984350114912234362038665948687956720649861905507717269172831353729307706008514750205116128063545928082815630821789512343192410790399602127390015770287254446850508625485246241011951312662402562994908712311227078964147634198818508277263148505457619584277575155984530578709812010734682632464827687855743445961951638042974489684929861531486804246569

Execution Trace

TokenERC20.60606040( )
pragma solidity ^0.4.16;

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }

contract TokenERC20 {
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    // 18 decimals is the strongly suggested default, avoid changing it
    uint256 public totalSupply;

    // This creates an array with all balances
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    // This generates a public event on the blockchain that will notify clients
    event Transfer(address indexed from, address indexed to, uint256 value);

    // This notifies clients about the amount burnt
    event Burn(address indexed from, uint256 value);

    /**
     * Constructor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    function TokenERC20(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balanceOf[msg.sender] = totalSupply;                // Give the creator all initial tokens
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
    }

    /**
     * Internal transfer, only can be called by this contract
     */
    function _transfer(address _from, address _to, uint _value) internal {
        // Prevent transfer to 0x0 address. Use burn() instead
        require(_to != 0x0);
        // Check if the sender has enough
        require(balanceOf[_from] >= _value);
        // Check for overflows
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        // Save this for an assertion in the future
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        // Subtract from the sender
        balanceOf[_from] -= _value;
        // Add the same to the recipient
        balanceOf[_to] += _value;
        emit Transfer(_from, _to, _value);
        // Asserts are used to use static analysis to find bugs in your code. They should never fail
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }

    /**
     * Transfer tokens
     *
     * Send `_value` tokens to `_to` from your account
     *
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transfer(address _to, uint256 _value) public {
        _transfer(msg.sender, _to, _value);
    }

    /**
     * Transfer tokens from other address
     *
     * Send `_value` tokens to `_to` on behalf of `_from`
     *
     * @param _from The address of the sender
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require(_value <= allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /**
     * Set allowance for other address
     *
     * Allows `_spender` to spend no more than `_value` tokens on your behalf
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     */
    function approve(address _spender, uint256 _value) public
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /**
     * Set allowance for other address and notify
     *
     * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     * @param _extraData some extra information to send to the approved contract
     */
    function approveAndCall(address _spender, uint256 _value, bytes _extraData)
        public
        returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }

    /**
     * Destroy tokens
     *
     * Remove `_value` tokens from the system irreversibly
     *
     * @param _value the amount of money to burn
     */
    function burn(uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);   // Check if the sender has enough
        balanceOf[msg.sender] -= _value;            // Subtract from the sender
        totalSupply -= _value;                      // Updates totalSupply
        emit Burn(msg.sender, _value);
        return true;
    }

    /**
     * Destroy tokens from other account
     *
     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.
     *
     * @param _from the address of the sender
     * @param _value the amount of money to burn
     */
    function burnFrom(address _from, uint256 _value) public returns (bool success) {
        require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowance[_from][msg.sender]);    // Check allowance
        balanceOf[_from] -= _value;                         // Subtract from the targeted balance
        allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
        totalSupply -= _value;                              // Update totalSupply
        emit Burn(_from, _value);
        return true;
    }
}