Contract Overview
Balance: 0.009954853273137698 Ether
Ether Value: $2.08 (@ $208.94/ETH)
Transactions: 638 txns
 Latest 25 txns From a total of 638 Transactions
(+1 PendingTxn)

TxHash Age From To Value [TxFee]
0xb183f7ea650b95ce1bbc709d8be0b8a10b7b317fcd05c257cfb4ad59d18140ae(pending)0x27a6f41018d366ae37967ca4836ea646f14d5f4e  IN  0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether(Pending)
0xc652f5255cdb3e7e3f9f9a993f07cf5d6bda870fb24f0851846a1bd72134fb134 days 3 hrs ago0xec7ab6d28a3431bf69206b6a616b5fef598c2506  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
0x0f6b862c367891a6869cd5ba88c234c81d2c251b515ea35130aa25682e84750740 days 2 hrs ago0x4276099b4d0f759f43e4e71f18dce1e39ee91a37  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
0xeeee5ef42fb4e1e09a4d0e2c4aa9d82ffce214f1e18a436f472afd6ad6ef618363 days 13 hrs ago0x4d45731c39543355fe489b528cfc6c5d7834ded6  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.0004774
0x5bd922095ca76ffc4e3cccc3d39924159a42f2b456789250dcb494691edc508f63 days 13 hrs ago0x4d45731c39543355fe489b528cfc6c5d7834ded6  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.0004774
0x9bd9d47b29fcfa7209a98bdc86448cf14ce30665f572783c39f8fb51d097245868 days 12 hrs ago0x4d45731c39543355fe489b528cfc6c5d7834ded6  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00048124
0xaf5edc2b04ec9548be8c1a474b3948401f627b1d46d1b3b751a8aa1d4c4f113e80 days 18 hrs ago0xf1d6d2adb814058d7c9c4e773785f6bc75a72547  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000071418
0x6c70d7c9e06a49df0225b525eac87902159790dcc33e1e4f20f161d2bd96036f80 days 19 hrs ago0xf1d6d2adb814058d7c9c4e773785f6bc75a72547  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000059515
0xa61c6cac7bf10c6e9482343058d6daa14c7f58a308bc6fa64c1a4679b475a62a89 days 6 hrs ago0x5945d401dd63bfbb3c67824d72b8fca1e3f8f6e4  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000499926
0xa7c2c47ccbb6e250153b7387479b48e7cf08e0e69f9d223eed5a6750a7d6150189 days 6 hrs ago0x5945d401dd63bfbb3c67824d72b8fca1e3f8f6e4  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00050127
0x1f92979def8d9f35679263f3f9edaaaebe9f6d09bd51d47968a05d9d753dcf0289 days 6 hrs ago0x5945d401dd63bfbb3c67824d72b8fca1e3f8f6e4  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000499926
0x2fd691e2bf111cc75e52d34a52392c7641811a685162c656598e747fa3d5008789 days 6 hrs ago0x5945d401dd63bfbb3c67824d72b8fca1e3f8f6e4  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00050127
0x7a025e79705c5d1b47da37a5926b911654a09a0045c8dd9d2fb27e04728f86ed106 days 7 hrs ago0xb4a8ab5a83136929bb0df96ae9e4ccc50598d98c  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
0x6f5537e2942d19561895a9600c24c635e8bd4704d6d2484eadb3dabb12133bc3108 days 2 hrs ago0x33854072b9294f465cfd395c76f29e4266c3902a  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00097867
0xc2f56bf0e850c4fdb0281f69fd8ca674deacc086a824ac963678930253bd2532127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.0004774
0xf3cb1d0feceafa5fedd3b72136ad2df6b7b04525571e2c436afdaeec09948764127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.0004774
0x7eb81f3e3e0ca35da872e1f7a5f465a96e6789f4eb79c7cc4409fab7ff08aa61127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00046128
0x8da23ef391270e622d267eca4e401727c57b3cdf3f39f6e19b04403dfb77f2e3127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00046
0xfdccda306364a961ea0a6b5380902cb055585b22e73543eef6465b632954ed32127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00046128
0x22be6449b89f8d46cd524393f32c2343bdc2bb5217da1241d16685c056b0747e127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00046128
0xa18359d7b7e663ea2bfe4163c97143aec3c2b665361915fda0120920bb7f1c4f127 days 9 hrs ago0x078d2308574f5cde2ba88a3a384596e89cb0b483  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00046128
0xe4fdb1b3940e9a33a9012842df187985e7bba70e18a7ebc2a0ecf445e5d80783134 days 8 hrs ago0xf7c3a16ea530b27d03a461dacd02de5ccb8858db  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
0x166b225e28606d86724b1c8aef0cb1bba531800548d79b83fedd9ddfd5b5b606134 days 8 hrs ago0xf7c3a16ea530b27d03a461dacd02de5ccb8858db  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.00097867
0x017caf945cd02402d532c1b862dc0e69920040d2c9ba823ddedc7f31a7188648134 days 8 hrs ago0xf7c3a16ea530b27d03a461dacd02de5ccb8858db  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
0x0389f0159607b9a7b83bb4da6e41db90bf1168822f864e74cc2eb6dd14e3befe134 days 10 hrs ago0xf7c3a16ea530b27d03a461dacd02de5ccb8858db  IN   0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240 Ether0.000976046
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0xb67ceea330b9937b339dc23350cc5464f474839081e37af4bc449893943c5b065650424147 days 23 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xf4a8800e85fc472be512291f5aad6785bf90eeae0.000022573363431151 Ether
0x6480c70297e7e7e2dafd5f656d30612fee425af8a1f2fa21ff530035a8de7f6a5650400147 days 23 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xf4a8800e85fc472be512291f5aad6785bf90eeae0.000022573363431151 Ether
0x7b1a16adca9f141c6f8a2a7e1982dc9a891c139224f674d0f60a009591746b575650377147 days 23 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xf4a8800e85fc472be512291f5aad6785bf90eeae4.41 Ether
0xdf4273e7bd7a06afdbbba5387eca83ef11483b4ec4306963830f341b51dfade35649415148 days 3 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xc798d5ed657adef1ca7bc6090c590319dffe89790.01 Ether
0x90819c0228533f165d19bd6fd3352b1a53aa34df999d63c4c21ac1a2a9758a025648946148 days 5 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xc798d5ed657adef1ca7bc6090c590319dffe89790.01 Ether
0xe348ad5c3e409cb57513c803445bca0775b85bf1c9fe3c4f360d7d292e140bbf5648934148 days 5 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x905645594e7c50eb658fa9ba30b69af3f15e4aaf0.01 Ether
0xa9ff775ae0159be998d462fe39527ac4ae448c6feea515ae391be3be60a87de25648919148 days 5 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x905645594e7c50eb658fa9ba30b69af3f15e4aaf0.01 Ether
0xef61ba6eeeb5998f30881d348b2e6ff558ca1ff3b0b44aa1e5c33c76fc19a1a05646898148 days 13 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xc798d5ed657adef1ca7bc6090c590319dffe89790.01 Ether
0x8657c30e2262fedda26d55e0b8df55737d7fc75ce25ee1da0b28f1e8afb0e5b25642345149 days 9 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xfe6b7a4494b308f8c0025dcc635ac22630ec73300.01 Ether
0x6c3d6734ed27f2ee7009b8cb84f4cb42bfa3acd035c3712c7fca607e5f6c2d975642340149 days 9 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xfe6b7a4494b308f8c0025dcc635ac22630ec73300.01 Ether
0xaa8312018f20cd2f8328f0c9e686a0f92e55b110d3b6e306bf56a0414ed2d8045642329149 days 9 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xfe6b7a4494b308f8c0025dcc635ac22630ec73300.01 Ether
0xd9c7268b81dcb6f5ff46895d9c5bcf848c46c6af7569ed033fd097985ffa39285638854150 days 19 mins ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xc798d5ed657adef1ca7bc6090c590319dffe89790.01 Ether
0x04ddc65740228dfd925cbc3e05d92ba28365f20cf7ccb0d7fc6845a1d6ad3a3a5624845152 days 11 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x2e2a3e3b84150960878b381065d0331fcd724acc0.01 Ether
0x30b73a8f71daac311bf00cb2838a4e17b21381519cbb084d89297018e0067bbe5619426153 days 10 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x215a0a9948af67b867dcaef173dc1dfee64d18ea0.01 Ether
0x5e08bbdaa5916d0a3cda484c1fec02d8fe5dbe01dd9240a96d86263b75816ebb5619418153 days 10 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x215a0a9948af67b867dcaef173dc1dfee64d18ea0.01 Ether
0x1eaa240b9a665ba6875ce24498199e283d072e04b652212cb54718c0d8f9a6115619410153 days 10 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x215a0a9948af67b867dcaef173dc1dfee64d18ea0.01 Ether
0xf1c30d118ee5fa9243274bed4fdb1c51fe0e5f590bb00c168c21c2a70fd58c875619396153 days 10 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x215a0a9948af67b867dcaef173dc1dfee64d18ea0.01 Ether
0x0fd5e161d739d64bf886fd460da9a90613f491b684dde112db9c620d66ef29925619388153 days 10 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x215a0a9948af67b867dcaef173dc1dfee64d18ea0.01 Ether
0xac7f417ae633675383dc96232b575ac07a8072fa5a850f3fc75fe1c522f366225614926154 days 5 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x9efcf59f340180759bf0c882f6616ff98f75e28a0.01 Ether
0x0aec8d5a26d195f966616dcec7fda8c7ddf708bdaecb4d22f78cd413d0e1759d5614557154 days 7 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x50a1c895c7d4045768987247d60e255afb1aa60e0.01 Ether
0x8b46a7d5cfa1a30c1b0508ef87fff8f678c067e987afc9ff2f3364505e13d9b95614413154 days 7 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x50a1c895c7d4045768987247d60e255afb1aa60e0.01 Ether
0x9e43932a8c8f416d78c562f435d06dedfd97cf75a9c31534e302c3400d2e0a065613372154 days 12 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x6654500f0e8d45cc9e21827c6ff80a17dbe5b7940.01 Ether
0x5bab841023532ddc21f3c24c674aab13477f43581b44ce3374c5a00d29f726dd5613369154 days 12 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240x6654500f0e8d45cc9e21827c6ff80a17dbe5b7940.01 Ether
0x4a65e1d12d6c923d2399fdb58c844d20ee10dc31a321fd5a10c75a9eaaba3dad5612629154 days 15 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xe562d05067eded7a722ed73b9ebfaaedc60970a10.01 Ether
0x32b132ed94215f513a12a7fdb729ba0bdb6108ec80dc0433a7cb9d91d161c0c85612627154 days 15 hrs ago0xdc1d53dc4f8e44c2fabe22e76236bcdffab771240xe562d05067eded7a722ed73b9ebfaaedc60970a10.01 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: ChipTreasury
Compiler Text: v0.4.23+commit.124ca40d
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.23;

// File: zeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @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;


  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() public {
    owner = msg.sender;
  }

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

  /**
   * @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) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: zeppelin-solidity/contracts/lifecycle/Pausable.sol

/**
 * @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 make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

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

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

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

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

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

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}

// File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol

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

// File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol

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

  mapping(address => uint256) balances;

  uint256 totalSupply_;

  /**
  * @dev total number of tokens in existence
  */
  function totalSupply() public view returns (uint256) {
    return totalSupply_;
  }

  /**
  * @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) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

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

}

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

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

// File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard 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 ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal 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 uint256 the amount of tokens to be transferred
   */
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);

    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, _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) {
    allowed[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @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 Increase the amount of tokens that an owner allowed to a spender.
   *
   * 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
   * @param _spender The address which will spend the funds.
   * @param _addedValue The amount of tokens to increase the allowance by.
   */
  function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   *
   * approve should be called when allowed[_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
   * @param _spender The address which will spend the funds.
   * @param _subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

// File: contracts/ChipTreasury.sol

contract ChipTreasury is Pausable {
  using SafeMath for uint256;

  mapping(uint => Chip) public chips;
  uint                  public numChipsMinted;
  uint                  public numChipsClaimed;

  struct Chip {
    bytes32 hash;
    bool claimed;
  }

  event Deposit(address indexed sender, uint value);
  event Withdrawal(address indexed to, uint value);
  event TokenWithdrawal(address indexed to, address indexed token, uint value);

  event ChipMinted(uint indexed chipId);
  event ChipHashReplaced(uint indexed chipId, bytes32 newHash, bytes32 oldhash);
  event ChipClaimAttempt(address indexed sender, uint indexed chipId);
  event ChipClaimSuccess(address indexed sender, uint indexed chipId);

  constructor () public {
    paused = true;
  }

  function () public payable {
    if (msg.value > 0) emit Deposit(msg.sender, msg.value);
  }

  function claimChip (uint chipId, string password) public whenNotPaused {
    emit ChipClaimAttempt(msg.sender, chipId);
    // 1. Conditions
    require(isClaimed(chipId) == false);       // chip is unclaimed
    require(isChipPassword(chipId, password)); // sender has chip password

    // 2. Effects
    uint chipValue = getChipValue();           // get chip value
    numChipsClaimed = numChipsClaimed.add(1);  // increase claimed count
    chips[chipId].claimed = true;              // mark chip as claimed

    // 3. Interaction
    msg.sender.transfer(chipValue);            // send ether to the sender
    emit ChipClaimSuccess(msg.sender, chipId);
  }

  // NOTE: You must prefix hashes with '0x'
  function mintChip (bytes32 hash) public onlyOwner {
    chips[numChipsMinted] = Chip(hash, false);
    emit ChipMinted(numChipsMinted);
    numChipsMinted = numChipsMinted.add(1);
  }

  // Mint function that allows for transactions to come in out-of-order
  // However it is unsafe because a mistakenly high chipId could throw off numChipsMinted permanently
  // NOTE: You must prefix hashes with '0x'
  function mintChipUnsafely (uint chipId, bytes32 hash) public onlyOwner whenPaused {
    require(chips[chipId].hash == ""); // chip hash must initially be unset
    chips[chipId].hash = hash;
    emit ChipMinted(chipId);
    numChipsMinted = numChipsMinted.add(1);
  }

  // In case you mess something up during minting (╯°□°)╯︵ ┻━┻
  // NOTE: You must prefix hashes with '0x'
  function replaceChiphash (uint chipId, bytes32 newHash) public onlyOwner whenPaused {
    require(chips[chipId].hash != ""); // chip hash must not be unset
    bytes32 oldHash = chips[chipId].hash;
    chips[chipId].hash = newHash;
    emit ChipHashReplaced(chipId, newHash, oldHash);
  }

  function withdrawFunds (uint value) public onlyOwner {
    owner.transfer(value);
    emit Withdrawal(owner, value);
  }

  function withdrawTokens (address token, uint value) public onlyOwner {
    StandardToken(token).transfer(owner, value);
    emit TokenWithdrawal(owner, token, value);
  }

  function isClaimed (uint chipId) public view returns(bool) {
    return chips[chipId].claimed;
  }

  function getNumChips () public view returns(uint) {
    return numChipsMinted.sub(numChipsClaimed);
  }

  function getChipIds (bool isChipClaimed) public view returns(uint[]) {
    uint[] memory chipIdsTemp = new uint[](numChipsMinted);
    uint count = 0;
    uint i;

    // filter chips by isChipClaimed status
    for (i = 0; i < numChipsMinted; i++) {
      if (isChipClaimed == chips[i].claimed) {
        chipIdsTemp[count] = i;
        count += 1;
      }
    }

    // return array of filtered chip ids
    uint[] memory _chipIds = new uint[](count);
    for (i = 0; i < count; i++) _chipIds[i] = chipIdsTemp[i];
    return _chipIds;
  }

  function getChipValue () public view returns(uint) {
    uint numChips = getNumChips();
    if (numChips > 0) return address(this).balance.div(numChips);
    return 0;
  }

  function isChipPassword (uint chipId, string password) internal view returns(bool) {
    return chips[chipId].hash == keccak256(password);
  }

}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"value","type":"uint256"}],"name":"withdrawTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"withdrawFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"chipId","type":"uint256"},{"name":"newHash","type":"bytes32"}],"name":"replaceChiphash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"chipId","type":"uint256"},{"name":"hash","type":"bytes32"}],"name":"mintChipUnsafely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"isChipClaimed","type":"bool"}],"name":"getChipIds","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"chipId","type":"uint256"},{"name":"password","type":"string"}],"name":"claimChip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getNumChips","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"chips","outputs":[{"name":"hash","type":"bytes32"},{"name":"claimed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"hash","type":"bytes32"}],"name":"mintChip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"numChipsClaimed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getChipValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"chipId","type":"uint256"}],"name":"isClaimed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"numChipsMinted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"TokenWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"chipId","type":"uint256"}],"name":"ChipMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"chipId","type":"uint256"},{"indexed":false,"name":"newHash","type":"bytes32"},{"indexed":false,"name":"oldhash","type":"bytes32"}],"name":"ChipHashReplaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":true,"name":"chipId","type":"uint256"}],"name":"ChipClaimAttempt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":true,"name":"chipId","type":"uint256"}],"name":"ChipClaimSuccess","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405260008060146101000a81548160ff02191690831515021790555034801561002a57600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600060146101000a81548160ff0219169083151502179055506113a2806100956000396000f3006080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306b091f914610156578063155dd5ee146101a357806315cb75e3146101d05780631e04eee91461020b578063290c398f146102465780632bdcd90d146102ca57806330a3ce811461033d5780633f4ba83a1461036857806340d960501461037f5780635a70686a146103d35780635c975abb1461040457806378160d6b146104335780638456cb591461045e5780638da5cb5b146104755780639c8e1d50146104cc5780639e34070f146104f7578063f2fde38b1461053c578063fb9cb15d1461057f575b6000341115610154573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b005b34801561016257600080fd5b506101a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105aa565b005b3480156101af57600080fd5b506101ce6004803603810190808035906020019092919050505061078f565b005b3480156101dc57600080fd5b506102096004803603810190808035906020019092919080356000191690602001909291905050506108c4565b005b34801561021757600080fd5b506102446004803603810190808035906020019092919080356000191690602001909291905050506109f3565b005b34801561025257600080fd5b50610273600480360381019080803515159060200190929190505050610afe565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156102b657808201518184015260208101905061029b565b505050509050019250505060405180910390f35b3480156102d657600080fd5b5061033b60048036038101908080359060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610c39565b005b34801561034957600080fd5b50610352610dae565b6040518082815260200191505060405180910390f35b34801561037457600080fd5b5061037d610dcc565b005b34801561038b57600080fd5b506103aa60048036038101908080359060200190929190505050610e8a565b604051808360001916600019168152602001821515151581526020019250505060405180910390f35b3480156103df57600080fd5b506104026004803603810190808035600019169060200190929190505050610ebb565b005b34801561041057600080fd5b50610419610fc8565b604051808215151515815260200191505060405180910390f35b34801561043f57600080fd5b50610448610fdb565b6040518082815260200191505060405180910390f35b34801561046a57600080fd5b50610473610fe1565b005b34801561048157600080fd5b5061048a6110a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104d857600080fd5b506104e16110c6565b6040518082815260200191505060405180910390f35b34801561050357600080fd5b5061052260048036038101908080359060200190929190505050611116565b604051808215151515815260200191505060405180910390f35b34801561054857600080fd5b5061057d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611143565b005b34801561058b57600080fd5b50610594611298565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561060557600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156106c957600080fd5b505af11580156106dd573d6000803e3d6000fd5b505050506040513d60208110156106f357600080fd5b8101908080519060200190929190505050508173ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f42856d0378dde02337bb59ae41747abc77ded8ebdbbc5cbdd1e53693b7554938836040518082815260200191505060405180910390a35050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107ea57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610851573d6000803e3d6000fd5b506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561092157600080fd5b600060149054906101000a900460ff16151561093c57600080fd5b60006001600085815260200190815260200160002060000154600019161415151561096657600080fd5b6001600084815260200190815260200160002060000154905081600160008581526020019081526020016000206000018160001916905550827f3368f123bc2ad97a0c76726a1e249fd44041cae01e1056afc462977d0093f43c838360405180836000191660001916815260200182600019166000191681526020019250505060405180910390a2505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a4e57600080fd5b600060149054906101000a900460ff161515610a6957600080fd5b6000600160008481526020019081526020016000206000015460001916141515610a9257600080fd5b80600160008481526020019081526020016000206000018160001916905550817fb7aeae2f01fb40038c35eeac3606c0707403ac76e46aa35d1ade5cebd53aeb6560405160405180910390a2610af4600160025461129e90919063ffffffff16565b6002819055505050565b6060806000806060600254604051908082528060200260200182016040528015610b375781602001602082028038833980820191505090505b50935060009250600091505b600254821015610bad576001600083815260200190815260200160002060010160009054906101000a900460ff1615158615151415610ba057818484815181101515610b8b57fe5b90602001906020020181815250506001830192505b8180600101925050610b43565b82604051908082528060200260200182016040528015610bdc5781602001602082028038833980820191505090505b509050600091505b82821015610c2d578382815181101515610bfa57fe5b906020019060200201518183815181101515610c1257fe5b90602001906020020181815250508180600101925050610be4565b80945050505050919050565b60008060149054906101000a900460ff16151515610c5657600080fd5b823373ffffffffffffffffffffffffffffffffffffffff167f22309f59fa3f7ccfac0b04bf4e51ff43c9ea2cab5fc46caa3ef8a85698b4c92260405160405180910390a360001515610ca784611116565b1515141515610cb557600080fd5b610cbf83836112ba565b1515610cca57600080fd5b610cd26110c6565b9050610cea600160035461129e90919063ffffffff16565b600381905550600180600085815260200190815260200160002060010160006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d64573d6000803e3d6000fd5b50823373ffffffffffffffffffffffffffffffffffffffff167f044838236845b7a22c1f05ca45187b45a2d76d63beb0f1634a59ea6e888810f960405160405180910390a3505050565b6000610dc760035460025461134790919063ffffffff16565b905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e2757600080fd5b600060149054906101000a900460ff161515610e4257600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1657600080fd5b604080519081016040528082600019168152602001600015158152506001600060025481526020019081526020016000206000820151816000019060001916905560208201518160010160006101000a81548160ff0219169083151502179055509050506002547fb7aeae2f01fb40038c35eeac3606c0707403ac76e46aa35d1ade5cebd53aeb6560405160405180910390a2610fbf600160025461129e90919063ffffffff16565b60028190555050565b600060149054906101000a900460ff1681565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561103c57600080fd5b600060149054906101000a900460ff1615151561105857600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806110d1610dae565b9050600081111561110d57611106813073ffffffffffffffffffffffffffffffffffffffff163161136090919063ffffffff16565b9150611112565b600091505b5090565b60006001600083815260200190815260200160002060010160009054906101000a900460ff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561119e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156111da57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60025481565b600081830190508281101515156112b157fe5b80905092915050565b6000816040518082805190602001908083835b6020831015156112f257805182526020820191506020810190506020830392506112cd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660016000858152602001908152602001600020600001546000191614905092915050565b600082821115151561135557fe5b818303905092915050565b6000818381151561136d57fe5b049050929150505600a165627a7a723058200960049d5346e22ffb6bcf44e775ec27b2e661e45ee235ce26982e25396b0bc80029

   Swarm Source:
bzzr://0960049d5346e22ffb6bcf44e775ec27b2e661e45ee235ce26982e25396b0bc8

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.