ETH Price: $2,541.94 (+2.45%)

Transaction Decoder

Block:
3978297 at Jul-05-2017 02:18:58 PM +UTC
Transaction Fee:
0.004791904 ETH $12.18
Gas Used:
1,197,976 Gas / 4 Gwei

Account State Difference:

  Address   Before After State Difference Code
0x140427a7...3b0c5B589
(OMG Network: Deployer)
1 Eth
Nonce: 0
0.995208096 Eth
Nonce: 1
0.004791904
(ethfans.org)
4,086.884053631836546878 Eth4,086.888845535836546878 Eth0.004791904
0xd26114cd...edB8A0C07
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 17516010836370132085008514933542216187786152761556953856521937045281982079069120980397306107937758427315651563024130983301944964361821080762290817168091509037358571567539368348225283633670533897189477431856966017458181715463152101361334416831805225050629041604747625922265209838794865655526852189489174177850299166253572450111130290415690027199519538281636779347833207821323454654359600972688609638062447938370257479736004640891827701114362403081337907646822753667234534454773650761251278882566686845001759495010753304902762344163447803245694834575694046838711361658240545985900709843113037711179859367425880883474765296369334376527097974623636166805517826699836052140183685918373091153030625512913707025751540517906735638301710475960780199448822857940796520575178675733116463586992502678206063821471985589452201010617726368489118372223007687408451210088590847575299444533941549399993369259964445961243600627901554379762447029994440836326122069127452808103279911614001116176632009320721518698663977968541188611910092817264698934538644871505343870979096208422701520103810595577280885198554484884179377949944144649927595058861658855252413980593393113808242967424576995791301614658000571180412617510162950277384145856349677123788161161456725122208773473937632024941622474890686754015667152943596152347116822718719637942025165590736655685043609597461029130175808325593319529787058056728915288876733476739803545332958967832026388624776887777817021611919667325201229766582309843477380577890424148828427001325409968979777820684060244779663583690189489766036158837962198093778753062330276351367977284783632311944130174050078538298575672515352694901719611816320168567914535831718429635014332510348485623292165548388170797237500097609796515138774061012672996684762857085811038217837700042606438863776803511930204880106659940722635890871207736424137205670714633448057458897218037213595635414018042641639164863767031922502176019533082211230580684137140991580116773862374787284833511427093973077794708253510159422183508575765854691729498211955158089187469653174957240750847419745810623328069585939713849942928701081627510692470804355951818829714231376019594581677717758714104336628188568296230201855233745751709222014807338662118036925760015307632896907965810471539689187670563450281797542200906311851681336654960755834224396093524292767627184536676596169190035772952201749751104466202433577863393383048033901728950295014510283928198262066048725688105619701553116076375532804737979270197455071091593099208064622526151332561754215574512546207143864478338245172745134588066238980814212867737912776539056484754517294223993890433077615406275654300113403668396335405531617898218984576361781920154901605221830803428853790070625257255658457360454528834337227786468257988417776115908615240167362657349086227886508568716840411267413492195194054132986453803702513937442639736543611915545384652637655002969205104164779172296696238147550302102867107756576449953109693048559592165366377875129100808977370547590169046309797179812936166075734442328099602858655100512009323724007444195226978913399879611498176474737282188754541417462059757499289634758907216532557348775212978843762238336322957909940357416830519326870134404190848976342079660200425167076899923431375497842506595107253723688271148112333533832063843920466226137121702352645511493450559969388886640024086905039165416147864464665188870875741405229734365815235405017283641056093192959617441981971455695722665536545449784665625675393894236211330389060498478861474900495203558309256268913424709488357170417764665891079323042171872348962438244922165554868375838087057811364637334170876643892770330693575203213171608066398887286324908939904750789258625726420472171874881789916395891015812396794296626908524837431145160978875831021320359083059011421925754543235765697077849882733036194780307869145102141104737809883995427609114422647712700980287634503735867196248050457904683843219188642447801714886616115634623287849210940299911617005619287511696206529908301236585073095914003794568841434310008300435345359407971958093235321096572293128550510323845233921552474522133692212330929433175082747962815574657923570826040586969671874316334365266702215404178630925491964532183733613986587349236263982518687149915474419468650056862250860006538963495521284147729944937467365943344357716877967249786931618640145223172377012524706437085112031261636510180150400223483355105043360028438547112721444006901136692235457156221773668097351321693599851285581097949811130237160647831266940622188588430430782556521129152107938869184714319529980442836790214832466535633303940057299971523105727712458543952535521167228397072788943970597625615017537515360217402100495854270115500939651216096362218680578177655333342035353491745635174928931570687834938021278291254690308237694114394230085971799920804173811943790915258058707331352203111778776587059718579547682319482658591119647662691799813953108666427050049087573671642937310946312459979993318558399874416922551195448957841751674265009310066477372297062230184686043088652815859153537596066596771240023944459436951910296605258625542717539736237561737897252935632382825556077602033054855055344794524171461661521213968552279221554651101614537777455273913511819484944209383145894805219161878848392070850979014854899613609479371431711930917453229505448972483442805420339682497735476683189814001898467081549392917967899484336104104805552841467417181893814040095853133434737483062684844256414546890078923485531732100614546168607032905306515429738652025934899948102217188974053953117358199348602794316361978913647965373726571636882332605046053842878387315751280900430499690966078516550887225492518717689750226984769098235223213245077083145368997346633199173652553602262466699140167510341855490410852435986982640422318025422009134640589724711288760186850556359678746519170724252459264285451177992996797016319986901767272530829107249398196392096539719002129269327391841591549082643733207680251362206218996348910177263143169429838630628191956131442121422305824296222556038738787644608418738602712914440598800028325385526152598313589883259797698875912840595456226576591108756799301665288974107972978788834777867541691197871116468640293509265004571927157555957340574574716517122160882599213453468183131416392291493802780332472981727936262131748499864053829666407377669063992259968022530631014036393923693260961235141861928857292470896839220286747115713926198430312801056922566008793110332976983847441569375690885238246369329730414139314715296268361230607706735499457483735826841209832843454656134955576967036522389383241826890929168013688865632855532891362683814350405659485084113230054135082589377693715842325486977555263687668328647988903720209400036504010046789433132237322152381766330231258526282086617338920009535104742318535050994965124291996294893340242279126080258410629451827604855859155931262624939669345243627810045077224669858715071454863093641243885608832447972198157377226721397798343891904771816458098497687462056027791105050295002005379474800891768749640370026805273589896466948351824579490789562145490093612391645225498644313088800229352628063634782479362091456843013254831063216439913745380839278204082383549226817264498004193607940288610418799924047055825640401354513937310021414648086384427421056263089603695385978975795516809555812187764581524764157579482394779823801200516876205833402372761165872162265658884761645487915990293412737314393098679868249462968204519817159803508129266856688047651538924880411362466875788137007246048314865419064745773040759838792336188527020853500649976078776469741609140639063061257205347410639051994865996502027963730638505117773819496079976258560610004528724210726136454574561982473048733155052559701783691237847685051956465960174790434013096565120587688078973495398521048217483886019335029765646564451750304311273496486521087235075680648875757615032031812105683615502527153934248425775325694899694121101025230844518924494725251251483010233552121951238268592185338826699947031132821301968671330254002625956366040098225094411644612649955798870815929155808808611466003359014392706789033304821007879696726800381419996546902665016843214390605289103285590265711682847606488376421209206174463850686025556977986399712118807996187206314893246493290039309490631027711026465769576463234029755006877579056064405210022663512920920038038794609544230667932445692131094473953941520471401838311879631102319474171049455502276360457592181715055333154993724818675761341749956940125200482839780419892125696053352703830107189194965754525076319730605442177048561205145748048168505950965020815173961035519514757226361824454213199092056827648417880087397034727437868633269720408111556567835624904059020300198655499946152489515639904613168723121088242393521974782773612034105696035644984959343435022784059901107042837832585839097731908441382935967006786902863837004841591528598692365481624460118904549319683758384166432927851305338124081935402474720599119274176950242581236777982132432922383696860924589997735920389743008216079078089651465722477874887499412352588628412647050149720880555883881955732188720971692693887324566993530970265132376665776278569652616349363989642785082219141505091520205791224476004497004363840989738713652183272721182683747776291338508281786057598785819963228335489134026438651237835919076185230603404791501598243606430161461257419450562707155776082165870712449787138783144225554240101203070839926214796853523858134247663077733436882985

Execution Trace

OMGToken.60038054( )
pragma solidity ^0.4.11;


/**
 * Math operations with safety checks
 */
library SafeMath {
  function mul(uint a, uint b) internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint a, uint b) internal returns (uint) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint a, uint b) internal returns (uint) {
    assert(b <= a);
    return a - b;
  }

  function add(uint a, uint b) internal returns (uint) {
    uint c = a + b;
    assert(c >= a);
    return c;
  }

  function max64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a >= b ? a : b;
  }

  function min64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a < b ? a : b;
  }

  function max256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a >= b ? a : b;
  }

  function min256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a < b ? a : b;
  }

  function assert(bool assertion) internal {
    if (!assertion) {
      throw;
    }
  }
}


/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20Basic {
  uint public totalSupply;
  function balanceOf(address who) constant returns (uint);
  function transfer(address to, uint value);
  event Transfer(address indexed from, address indexed to, uint value);
}


/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint;

  mapping(address => uint) balances;

  /**
   * @dev Fix for the ERC20 short address attack.
   */
  modifier onlyPayloadSize(uint size) {
     if(msg.data.length < size + 4) {
       throw;
     }
     _;
  }

  /**
  * @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, uint _value) onlyPayloadSize(2 * 32) {
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the the balance of.
  * @return An uint representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
  }

}


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint);
  function transferFrom(address from, address to, uint value);
  function approve(address spender, uint value);
  event Approval(address indexed owner, address indexed spender, uint value);
}


/**
 * @title Standard ERC20 token
 *
 * @dev Implemantation of the basic standart token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is BasicToken, ERC20 {

  mapping (address => mapping (address => uint)) 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
   * @param _value uint the amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // if (_value > _allowance) throw;

    balances[_to] = balances[_to].add(_value);
    balances[_from] = balances[_from].sub(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
  }

  /**
   * @dev Aprove the passed address to spend the specified amount of tokens on beahlf of msg.sender.
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint _value) {

    // To change the approve amount you first have to reduce the addresses`
    //  allowance to zero by calling `approve(_spender, 0)` if it is not
    //  already 0 to mitigate the race condition described here:
    //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw;

    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
  }

  /**
   * @dev Function to check the amount of tokens than 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 uint specifing the amount of tokens still avaible for the spender.
   */
  function allowance(address _owner, address _spender) constant returns (uint remaining) {
    return allowed[_owner][_spender];
  }

}


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    if (msg.sender != owner) {
      throw;
    }
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}


/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */

contract MintableToken is StandardToken, Ownable {
  event Mint(address indexed to, uint value);
  event MintFinished();

  bool public mintingFinished = false;
  uint public totalSupply = 0;


  modifier canMint() {
    if(mintingFinished) throw;
    _;
  }

  /**
   * @dev Function to mint tokens
   * @param _to The address that will recieve the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */
  function mint(address _to, uint _amount) onlyOwner canMint returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);
    Mint(_to, _amount);
    return true;
  }

  /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishMinting() onlyOwner returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }
}


/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev modifier to allow actions only when the contract IS paused
   */
  modifier whenNotPaused() {
    if (paused) throw;
    _;
  }

  /**
   * @dev modifier to allow actions only when the contract IS NOT paused
   */
  modifier whenPaused {
    if (!paused) throw;
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused returns (bool) {
    paused = true;
    Pause();
    return true;
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused returns (bool) {
    paused = false;
    Unpause();
    return true;
  }
}


/**
 * Pausable token
 *
 * Simple ERC20 Token example, with pausable token creation
 **/

contract PausableToken is StandardToken, Pausable {

  function transfer(address _to, uint _value) whenNotPaused {
    super.transfer(_to, _value);
  }

  function transferFrom(address _from, address _to, uint _value) whenNotPaused {
    super.transferFrom(_from, _to, _value);
  }
}


/**
 * @title TokenTimelock
 * @dev TokenTimelock is a token holder contract that will allow a
 * beneficiary to extract the tokens after a time has passed
 */
contract TokenTimelock {

  // ERC20 basic token contract being held
  ERC20Basic token;

  // beneficiary of tokens after they are released
  address beneficiary;

  // timestamp where token release is enabled
  uint releaseTime;

  function TokenTimelock(ERC20Basic _token, address _beneficiary, uint _releaseTime) {
    require(_releaseTime > now);
    token = _token;
    beneficiary = _beneficiary;
    releaseTime = _releaseTime;
  }

  /**
   * @dev beneficiary claims tokens held by time lock
   */
  function claim() {
    require(msg.sender == beneficiary);
    require(now >= releaseTime);

    uint amount = token.balanceOf(this);
    require(amount > 0);

    token.transfer(beneficiary, amount);
  }
}


/**
 * @title OMGToken
 * @dev Omise Go Token contract
 */
contract OMGToken is PausableToken, MintableToken {
  using SafeMath for uint256;

  string public name = "OMGToken";
  string public symbol = "OMG";
  uint public decimals = 18;

  /**
   * @dev mint timelocked tokens
   */
  function mintTimelocked(address _to, uint256 _amount, uint256 _releaseTime)
    onlyOwner canMint returns (TokenTimelock) {

    TokenTimelock timelock = new TokenTimelock(this, _to, _releaseTime);
    mint(timelock, _amount);

    return timelock;
  }

}