Contract 0x78c5C1A056D46d6Dc95e458a9721A92038e7694c 1

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x7741943223f56c30baa7680cef2a9bf5daef9e8e0f9704ec5ccbfbf0179508f1Invest94222482018-11-19 7:50:561410 days 6 hrs ago0x65c1490bfcddb3054fd6667f833738b2cf6fc1bd IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.11 Ether0.000085971
0x0b44b511c14154c4e9c950f93ec6c812f52095bee504d4fa4988d4210e6adcacTransfer92185022018-10-29 12:11:161431 days 2 hrs ago0x7afb71941a6931f443bcb551ee2777e8c8a07835 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.00001 Ether0.000021041
0xee17c9cfb872a7e36d270c020ec7b31e2de7475381b29c1d5051fdd371e3de1fTransfer92184732018-10-29 12:07:401431 days 2 hrs ago0x7afb71941a6931f443bcb551ee2777e8c8a07835 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.000001 Ether0.000021041
0x1d4ac24714f50604d3d15a799d2de144d67ac61bbe8ff49db20c7aa3df0670c8Invest92184472018-10-29 12:04:281431 days 2 hrs ago0x7afb71941a6931f443bcb551ee2777e8c8a07835 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.000001 Ether0.000070971
0x4f505594a91369861c5f4b1fdcc2abf21b40bc9e9b7ecaa66d862a531f78849eInvest92184442018-10-29 12:04:081431 days 2 hrs ago0x7afb71941a6931f443bcb551ee2777e8c8a07835 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.000001 Ether0.000070971
0x361a1dcac09df0434f677a0a3ad082c799335f09d97d787aebc670ceb18007b3Invest92038492018-10-28 1:26:001432 days 13 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.01 Ether0.0013480848
0xd8bcc3ca36078a6d1bc3b114f36f2a0a549cf2b8d93b314edbbb1d65cc77363fInvest91939252018-10-26 20:22:441433 days 18 hrs ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.18 Ether0.000071221
0x1f7b428e90a4c795e3692e9cd62cd0d5f5b5562a093acd11d6d391d1b8040fb0Invest91915582018-10-26 14:25:441434 days 9 mins ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.004 Ether0.000071221
0x8496be7f2c2c438036453819866275d93abe0fdd9f479b6735ee1a2aab1b507bInvest91821102018-10-25 14:45:001434 days 23 hrs ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.17 Ether0.000071221
0xb53204648add569288bce817ee0b163d1fdba2858fa0838dd8f6c2b5fe07e646Invest91820592018-10-25 14:37:241434 days 23 hrs ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.15 Ether0.000070971
0x3dbac66694e21b243a3a6df444dd0456ecae42e1c60f23dddcd88747a0d76e33Invest91818892018-10-25 14:11:561435 days 23 mins ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.3 Ether0.00007091
0x7a1539a23f3df219bc350d9ecba184a57813bcacf12a21bf9ec37c4866db7313Invest91817742018-10-25 13:54:361435 days 40 mins ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.2 Ether0.00007091
0xa4ebb3831ba509988740ba778b8f1d781918f1fbd0efe700a4f362a42bb64041Invest91628352018-10-23 14:28:281437 days 6 mins ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.1 Ether0.000354865
0x923e8e81310649a78e80df69ca05317d3e81c183b0baaa2bb29ae1fd6337f343Invest91039752018-10-17 10:54:321443 days 3 hrs ago0x40754f0d4e986e5b9a0f5a3cb1c455cd8d9d4ef1 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.1 Ether0.000070971
0x13b24922299dd7cdadf040efd93a47c38fcaf2c53d68f2727819770856ddfa47Invest90329942018-10-11 0:09:481449 days 14 hrs ago0xe0dd206cbf331b13544ed6cc2cdd0869941d0ddd IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0 Ether0.000191883
0xc5ee433aa9966a03b0f8287d838b8e763f2a4a74be78de66c6f535262e135b99Invest90329652018-10-11 0:06:121449 days 14 hrs ago0xe0dd206cbf331b13544ed6cc2cdd0869941d0ddd IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0 Ether0.000063831
0x683131ff09d2a941d125ae524bc565420e37f3f15bc6c0a9aebd51f4eecdf453Invest90329432018-10-11 0:03:161449 days 14 hrs ago0xe0dd206cbf331b13544ed6cc2cdd0869941d0ddd IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.00002 Ether0.000085971
0xeb3d8f3f220db8d04625362a89ae1ea1367ebd17ded07c6beb39888a3016661dInvest90328602018-10-10 23:52:441449 days 14 hrs ago0xe0dd206cbf331b13544ed6cc2cdd0869941d0ddd IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.0001 Ether0.0014194620
0x386e4644358ac4d195981cfa16b02728d04baf584975f05e24e389d535015118Invest89669382018-10-05 6:13:281455 days 8 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.003 Ether0.00007091
0xe34d74897f76e0799293c8efbeac58f6d3b86da2068f8d7b91bdf836fc4e1f80Invest89456112018-10-03 10:45:001457 days 3 hrs ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.5 Ether0.000070971
0x4d3417ec59563c174dd512fd3cd16eba5c46e6e35097864130f13f8552a7c20eInvest89455152018-10-03 10:33:161457 days 4 hrs ago0xe69d7406f2de9032c0512c1b75938a5db92123f7 IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.5 Ether0.000343894
0x721607503cc9cfae64e931485b6a5b0f601ea49bd46bf7a629df142102a65088Invest89452842018-10-03 10:05:201457 days 4 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0 Ether0.000063831
0x2e7ed6248b17793944e125c4629aca7d00511276904de69a118a380554db7c81Invest89451282018-10-03 9:46:281457 days 4 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.003 Ether0.000070971
0x0d540e8d0a148129502e780b784a32d9a2d25767158c167b71eeea107a428decInvest89361392018-10-02 15:29:561457 days 23 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.004 Ether0.000070971
0x64cffadab1da91de6ce18addc2beec9a7565bde6425fdedc33c4ef67abcb141cInvest89360732018-10-02 15:21:481457 days 23 hrs ago0xb5f9fae324575bb48a98c6572698e844fe25eade IN  0x78c5c1a056d46d6dc95e458a9721a92038e7694c0.003 Ether0.000283894
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x7741943223f56c30baa7680cef2a9bf5daef9e8e0f9704ec5ccbfbf0179508f194222482018-11-19 7:50:561410 days 6 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x7741943223f56c30baa7680cef2a9bf5daef9e8e0f9704ec5ccbfbf0179508f194222482018-11-19 7:50:561410 days 6 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.11 Ether
0x1d4ac24714f50604d3d15a799d2de144d67ac61bbe8ff49db20c7aa3df0670c892184472018-10-29 12:04:281431 days 2 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x1d4ac24714f50604d3d15a799d2de144d67ac61bbe8ff49db20c7aa3df0670c892184472018-10-29 12:04:281431 days 2 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.000001 Ether
0x4f505594a91369861c5f4b1fdcc2abf21b40bc9e9b7ecaa66d862a531f78849e92184442018-10-29 12:04:081431 days 2 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x4f505594a91369861c5f4b1fdcc2abf21b40bc9e9b7ecaa66d862a531f78849e92184442018-10-29 12:04:081431 days 2 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.000001 Ether
0xd8bcc3ca36078a6d1bc3b114f36f2a0a549cf2b8d93b314edbbb1d65cc77363f91939252018-10-26 20:22:441433 days 18 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0xd8bcc3ca36078a6d1bc3b114f36f2a0a549cf2b8d93b314edbbb1d65cc77363f91939252018-10-26 20:22:441433 days 18 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.18 Ether
0x1f7b428e90a4c795e3692e9cd62cd0d5f5b5562a093acd11d6d391d1b8040fb091915582018-10-26 14:25:441434 days 9 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x1f7b428e90a4c795e3692e9cd62cd0d5f5b5562a093acd11d6d391d1b8040fb091915582018-10-26 14:25:441434 days 9 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.004 Ether
0x8496be7f2c2c438036453819866275d93abe0fdd9f479b6735ee1a2aab1b507b91821102018-10-25 14:45:001434 days 23 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x8496be7f2c2c438036453819866275d93abe0fdd9f479b6735ee1a2aab1b507b91821102018-10-25 14:45:001434 days 23 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.17 Ether
0xb53204648add569288bce817ee0b163d1fdba2858fa0838dd8f6c2b5fe07e64691820592018-10-25 14:37:241434 days 23 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0xb53204648add569288bce817ee0b163d1fdba2858fa0838dd8f6c2b5fe07e64691820592018-10-25 14:37:241434 days 23 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.15 Ether
0x3dbac66694e21b243a3a6df444dd0456ecae42e1c60f23dddcd88747a0d76e3391818892018-10-25 14:11:561435 days 23 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x3dbac66694e21b243a3a6df444dd0456ecae42e1c60f23dddcd88747a0d76e3391818892018-10-25 14:11:561435 days 23 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.3 Ether
0x7a1539a23f3df219bc350d9ecba184a57813bcacf12a21bf9ec37c4866db731391817742018-10-25 13:54:361435 days 40 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x7a1539a23f3df219bc350d9ecba184a57813bcacf12a21bf9ec37c4866db731391817742018-10-25 13:54:361435 days 40 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.2 Ether
0xa4ebb3831ba509988740ba778b8f1d781918f1fbd0efe700a4f362a42bb6404191628352018-10-23 14:28:281437 days 6 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0xa4ebb3831ba509988740ba778b8f1d781918f1fbd0efe700a4f362a42bb6404191628352018-10-23 14:28:281437 days 6 mins ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.1 Ether
0x923e8e81310649a78e80df69ca05317d3e81c183b0baaa2bb29ae1fd6337f34391039752018-10-17 10:54:321443 days 3 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x923e8e81310649a78e80df69ca05317d3e81c183b0baaa2bb29ae1fd6337f34391039752018-10-17 10:54:321443 days 3 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c0xbc42f234b6173a288d91fa0342ff0270ba3767920.1 Ether
0x13b24922299dd7cdadf040efd93a47c38fcaf2c53d68f2727819770856ddfa4790329942018-10-11 0:09:481449 days 14 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0xc5ee433aa9966a03b0f8287d838b8e763f2a4a74be78de66c6f535262e135b9990329652018-10-11 0:06:121449 days 14 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
0x683131ff09d2a941d125ae524bc565420e37f3f15bc6c0a9aebd51f4eecdf45390329432018-10-11 0:03:161449 days 14 hrs ago 0x78c5c1a056d46d6dc95e458a9721a92038e7694c 0x7c3329b48464d075bb74d59dd08263c2e6c6be320 Ether
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xbc72300866aaf06fc5fa8580f8a4a71687cba4b9

Contract Name:
MultistageCrowdsale

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-10-29
*/

pragma solidity ^0.4.24;

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);
}

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
  );
}

contract MultistageCrowdsale {
  using SafeMath for uint256;

  /**
   * Event for token purchase logging
   * @param purchaser who paid for the tokens
   * @param affiliate address, if any
   * @param value weis paid for purchase
   * @param amount amount of tokens purchased
   * @param orderID to be used with fiat payments
   */
  event TokenPurchase(address indexed purchaser, address indexed affiliate, uint256 value, uint256 amount, bytes4 indexed orderID);

  struct Stage {
    uint32 time;
    uint64 rate;
  }

  Stage[] stages;

  address wallet;
  address token;
  address signer;
  uint32 saleEndTime;

  /**
   * @dev The constructor that takes all parameters
   * @param _timesAndRates An array that defines the stages of the contract. the first entry being the start time of the sale, followed by pairs of rates ond close times of consequitive stages.
   *       Example 1: [10000, 99, 12000]
   *         A single stage sale that starts at unix time 10000 and ends 2000 seconds later.
   *         This sale gives 99 tokens for each Gwei invested.
   *       Example 2: [10000, 99, 12000, 88, 14000]
   *         A 2 stage sale that starts at unix time 10000 and ends 4000 seconds later.
   *         The sale reduces the rate at mid time
   *         This sale gives 99 tokens for each Gwei invested in first stage.
   *         The sale gives 88 tokens for each Gwei invested in second stage.
   * @param _wallet The address of the wallet where invested Ether will be send to
   * @param _token The tokens that the investor will receive
   * @param _signer The address of the key that whitelists investor (operator key)
   */
  constructor(
    uint256[] _timesAndRates,
    address _wallet,
    address _token,
    address _signer
  )
    public
  {
    require(_wallet != address(0));
    require(_token != address(0));

    storeStages(_timesAndRates);

    saleEndTime = uint32(_timesAndRates[_timesAndRates.length - 1]);
    // check sale ends after last stage opening time
    require(saleEndTime > stages[stages.length - 1].time);

    wallet = _wallet;
    token = _token;
    signer = _signer;
  }

  /**
   * @dev called by investors to purchase tokens
   * @param _r part of receipt signature
   * @param _s part of receipt signature
   * @param _a first payload of signed receipt.
   * @param _b second payload of signed receipt.
   *   The receipt commits to the follwing inputs:
   *     56 bits - sale contract address, to prevent replay of receipt
   *     32 bits - orderID for fiat payments
   *     160 bits - beneficiary address - address whitelisted to receive tokens
   *     32 bits - time - when receipt was signed
   *     64 bits - oobpa - out of band payment amount, for fiat investments
   *     160 bits - affiliate address
   */

  function invest(bytes32 _r, bytes32 _s, bytes32 _a, bytes32 _b) public payable {
    // parse inputs
    uint32 time = uint32(_b >> 224);
    address beneficiary = address(_a);
    uint256 oobpa = uint64(_b >> 160);
    address affiliate = address(_b);
    // verify inputs
    require(uint56(_a >> 192) == uint56(this));
    if (oobpa == 0) {
      oobpa = msg.value;
    }
    bytes4 orderID = bytes4(uint32(_a >> 160));
    /* solium-disable-next-line arg-overflow */
    require(ecrecover(keccak256(abi.encodePacked(uint8(0), uint248(_a), _b)), uint8(_a >> 248), _r, _s) == signer);
    require(beneficiary != address(0));

    // calculate token amount to be created
    uint256 rate = getRateAt(now); // solium-disable-line security/no-block-members
    // at the time of signing the receipt the rate should have been the same as now
    require(rate == getRateAt(time));
    // multiply rate with Gwei of investment
    uint256 tokens = rate.mul(oobpa).div(1000000000);
    // check that msg.value > 0
    require(tokens > 0);

    // pocket Ether
    if (msg.value > 0) {
      wallet.transfer(oobpa);
    }

    // do token transfer
    ERC20(token).transferFrom(wallet, beneficiary, tokens);
    emit TokenPurchase(beneficiary, affiliate, oobpa, tokens, orderID);
  }

  function getParams() view public returns (uint256[] _times, uint256[] _rates, address _wallet, address _token, address _signer) {
    _times = new uint256[](stages.length + 1);
    _rates = new uint256[](stages.length);
    for (uint256 i = 0; i < stages.length; i++) {
      _times[i] = stages[i].time;
      _rates[i] = stages[i].rate;
    }
    _times[stages.length] = saleEndTime;
    _wallet = wallet;
    _token = token;
    _signer = signer;
  }

  function storeStages(uint256[] _timesAndRates) internal {
    // check odd amount of array elements, tuples of rate and time + saleEndTime
    require(_timesAndRates.length % 2 == 1);
    // check that at least 1 stage provided
    require(_timesAndRates.length >= 3);

    for (uint256 i = 0; i < _timesAndRates.length / 2; i++) {
      stages.push(Stage(uint32(_timesAndRates[i * 2]), uint64(_timesAndRates[(i * 2) + 1])));
      if (i > 0) {
        // check that each time higher than previous time
        require(stages[i-1].time < stages[i].time);
        // check that each rate is lower than previous rate
        require(stages[i-1].rate > stages[i].rate);
      }
    }

    // check that opening time in the future
    require(stages[0].time > now); // solium-disable-line security/no-block-members

    // check final rate > 0
    require(stages[stages.length - 1].rate > 0);
  }

  function getRateAt(uint256 _now) view internal returns (uint256 rate) {
    // if before first stage, return 0
    if (_now < stages[0].time) {
      return 0;
    }

    for (uint i = 1; i < stages.length; i++) {
      if (_now < stages[i].time)
        return stages[i - 1].rate;
    }

    // handle last stage
    if (_now < saleEndTime)
      return stages[stages.length - 1].rate;

    // sale already closed
    return 0;
  }

}

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    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;
  }
}

Contract ABI

[{"constant":false,"inputs":[{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_a","type":"bytes32"},{"name":"_b","type":"bytes32"}],"name":"invest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getParams","outputs":[{"name":"_times","type":"uint256[]"},{"name":"_rates","type":"uint256[]"},{"name":"_wallet","type":"address"},{"name":"_token","type":"address"},{"name":"_signer","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_timesAndRates","type":"uint256[]"},{"name":"_wallet","type":"address"},{"name":"_token","type":"address"},{"name":"_signer","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"affiliate","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":true,"name":"orderID","type":"bytes4"}],"name":"TokenPurchase","type":"event"}]

608060405234801561001057600080fd5b50604051610b23380380610b2383398101604090815281516020830151918301516060840151919093019290600160a060020a038316151561005157600080fd5b600160a060020a038216151561006657600080fd5b6100788464010000000061015e810204565b83518490600019810190811061008a57fe5b602090810290910101516003805463ffffffff909216740100000000000000000000000000000000000000000260a060020a63ffffffff02199092169190911790556000805460001981019081106100de57fe5b60009182526020909120015460035463ffffffff918216740100000000000000000000000000000000000000009091049091161161011b57600080fd5b60018054600160a060020a03948516600160a060020a0319918216179091556002805493851693821693909317909255600380549190931691161790555061036d565b805160009060019081161461017257600080fd5b81516003111561018157600080fd5b5060005b815160029004811015610302576000604080519081016040528084846002028151811015156101b057fe5b9060200190602002015163ffffffff16815260200184846002026001018151811015156101d957fe5b6020908102919091018101516001604060020a0390811690925283546001810185556000948552818520845191018054949092015163ffffffff1990941663ffffffff909116176bffffffffffffffff00000000191664010000000093909216929092021790558111156102fa57600080548290811061025557fe5b6000918252602082200154815463ffffffff9091169190600019840190811061027a57fe5b60009182526020909120015463ffffffff161061029657600080fd5b60008054829081106102a457fe5b600091825260208220015481546401000000009091046001604060020a0316919060001984019081106102d357fe5b60009182526020909120015464010000000090046001604060020a0316116102fa57600080fd5b600101610185565b4260008081548110151561031257fe5b60009182526020909120015463ffffffff161161032e57600080fd5b600080548190600019810190811061034257fe5b60009182526020909120015464010000000090046001604060020a03161161036957600080fd5b5050565b6107a78061037c6000396000f3006080604052600436106100325763ffffffff60e060020a600035041663590aa47981146100375780635e615a6b1461004d575b600080fd5b61004b60043560243560443560643561011d565b005b34801561005957600080fd5b506100626104e1565b60408051600160a060020a03808616928201929092528382166060820152908216608082015260a08082528651908201528551819060208083019160c08401918a8101910280838360005b838110156100c55781810151838201526020016100ad565b50505050905001838103825287818151815260200191508051906020019060200280838360005b838110156101045781810151838201526020016100ec565b5050505090500197505050505050505060405180910390f35b60e060020a81048267ffffffffffffffff7401000000000000000000000000000000000000000084041683600080807801000000000000000000000000000000000000000000000000860466ffffffffffffff90811630919091161461018257600080fd5b84151561018d573494505b6003546040805160006020808301919091527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d166101000260218301528183018c9052825180830384018152606090920192839052815160e060020a740100000000000000000000000000000000000000008f04029750600160a060020a0390941693600193918291908401908083835b6020831061023d5780518252601f19909201916020918201910161021e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060f88c600019169060020a9004600190048e8e604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156102ee573d6000803e3d6000fd5b50505060206040510351600160a060020a031614151561030d57600080fd5b600160a060020a038616151561032257600080fd5b61032b4261064a565b915061033c8763ffffffff1661064a565b821461034757600080fd5b61036b633b9aca0061035f848863ffffffff61073716565b9063ffffffff61076616565b90506000811161037a57600080fd5b60003411156103bf57600154604051600160a060020a039091169086156108fc029087906000818181858888f193505050501580156103bd573d6000803e3d6000fd5b505b600254600154604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152898316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b505050506040513d602081101561046357600080fd5b5050604080518681526020810183905281517fffffffff00000000000000000000000000000000000000000000000000000000861692600160a060020a0380891693908b16927f8e842cf619ba608f11e82c43779f4fc7edd53285fbc62ce2aa5313910d0cb462929181900390910190a45050505050505050505050565b60608060008060008060008054905060010160405190808252806020026020018201604052801561051c578160200160208202803883390190505b50600054604080518281526020808402820101909152919750801561054b578160200160208202803883390190505b509450600090505b6000548110156105e657600080548290811061056b57fe5b600091825260209091200154865163ffffffff9091169087908390811061058e57fe5b6020908102909101015260008054829081106105a657fe5b600091825260209091200154855164010000000090910467ffffffffffffffff16908690839081106105d457fe5b60209081029091010152600101610553565b60035460005487517401000000000000000000000000000000000000000090920463ffffffff1691889190811061061957fe5b60209081029091010152505060015460025460035495969495600160a060020a039283169591831694509091169150565b60008060008081548110151561065c57fe5b60009182526020909120015463ffffffff1683101561067e5760009150610731565b5060015b6000548110156106f257600080548290811061069a57fe5b60009182526020909120015463ffffffff168310156106ea576000805460001983019081106106c557fe5b600091825260209091200154640100000000900467ffffffffffffffff169150610731565b600101610682565b60035474010000000000000000000000000000000000000000900463ffffffff1683101561072c576000805460001981019081106106c557fe5b600091505b50919050565b600082151561074857506000610760565b5081810281838281151561075857fe5b041461076057fe5b92915050565b6000818381151561077357fe5b0493925050505600a165627a7a72305820564fa51de5a011bf54139cf909b4bbfbb2c9494ac22f42d9a07a5c7bec1eca0500290000000000000000000000000000000000000000000000000000000000000080000000000000000000000000bc42f234b6173a288d91fa0342ff0270ba376792000000000000000000000000d29bb5c3d7f2463f1b1a6a6cec0260942c2d925200000000000000000000000082e8c6cf42c8d1ff9594b17a3f50e94a12cc860f0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000005bd77728000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000005db8aaa8

Swarm Source

bzzr://564fa51de5a011bf54139cf909b4bbfbb2c9494ac22f42d9a07a5c7bec1eca05
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.