Sponsored Link:   WELL – WORKING HEALTHCARE U.S. PLATFORM - RAISED $3M IN PRE-ICO – JOIN NOW WITH 40% BONUS
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 4 txns
  Latest 4 txns

TxHash Age From To Value [TxFee]
0x2d1184df6d49b5639650d46958d414393e96f801d2dbd29ba14a1dbf3a4a8bff3 days 10 hrs ago0x55dcf56a139ddea14cd7c8eefe15dc1bf5666110  IN   0x26436e73fdd02adde8ae7ab61fa660d6f7926e6f0.000000000001 Ether0.000000126
0xa3ff2f8c82e04afcf1d6a637bad33a1ff088c60eb4cc08068494891e43f159ff4 days 18 hrs ago0x9bb8d1243527738c04fb2e006d28fb8c78ca00cf  IN   0x26436e73fdd02adde8ae7ab61fa660d6f7926e6f0.1 Ether0.000300744
0x2311e256637233615538f82824839d4393abbf520df6df3cf57331c30945a61313 days 19 hrs ago0x2ba406b4d48524509e6cf86e3492ff8caa20cfc2  IN   0x26436e73fdd02adde8ae7ab61fa660d6f7926e6f0.0045 Ether0.000090186
0x997977e6ab971cd27509035f05e867e71c3b75857afeaf26f553bf3e16b2935c14 days 3 mins ago0xa15dfad840cc344e38f733e6e055561c1b50d7e5  IN    Contract Creation0 Ether0.001316851
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0xa3ff2f8c82e04afcf1d6a637bad33a1ff088c60eb4cc08068494891e43f159ff51028174 days 18 hrs ago0x26436e73fdd02adde8ae7ab61fa660d6f7926e6f0xa15dfad840cc344e38f733e6e055561c1b50d7e50.1 Ether
0x2311e256637233615538f82824839d4393abbf520df6df3cf57331c30945a613504881213 days 19 hrs ago0x26436e73fdd02adde8ae7ab61fa660d6f7926e6f0xa15dfad840cc344e38f733e6e055561c1b50d7e50.0045 Ether
[ Download CSV Export  ] 
Contract Source Code Verified
Contract Name: Crowdsale
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.18;

pragma solidity ^0.4.11;

 
contract Token {
	function SetupToken(string tokenName, string tokenSymbol, uint256 tokenSupply) public;
    function balanceOf(address _owner) public constant returns (uint256 balance);
    function transfer(address _to, uint256 _amount) public returns (bool success);
    function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success);
    function approve(address _spender, uint256 _amount) public returns (bool success);
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
}
pragma solidity ^0.4.18;


/**
 * @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) {
    if (a == 0) {
      return 0;
    }
    uint256 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 c;
  }

  /**
  * @dev Substracts 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) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}


/**
 * @title Crowdsale *Modded*
 * @dev Crowdsale is a base contract for managing a token crowdsale.
 * Author: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/crowdsale
 * Crowdsales have a start and end timestamps, where investors can make
 * token purchases and the crowdsale will assign them tokens based
 * on a token per ETH rate. Funds collected are forwarded to a wallet
 * as they arrive. 
 * Modded to use preminted token contract, and graft in capped crowdsale code from the openZepplin github
 */
 
 
contract Crowdsale {
  using SafeMath for uint256;

  Token token;
  address public owner;
  
  // public cap in wei : when initialized, its per ether
  uint256 public cap;
  
  // start and end timestamps where investments are allowed (both inclusive)
  uint256 public startTime;
  uint256 public endTime;

  // address where funds are collected
  address public wallet;

  // how many token units a buyer gets per wei : when initialized, its per ether
  uint256 public rate;

  // amount of raised money in wei
  uint256 public weiRaised;
  
  
  // amount of raised money in current tier in wei
  uint256 public tierTotal;
  
  //tier count
  uint256 public tierNum = 0;
  
  /*  Funding Tiers
  *   Tier  Rave/ETH Rave Limit Eth Limit
  *   One	6000	2.000.000	333,3333
  *   Two	5500	5.000.000	909,0909
  *   Three	5000	9.000.000	1800,0000
  *   Four	4500	14.000.000	3111,1111
  *   Five	4000	20.000.000	5000,0000
  */
  
   uint256[5] fundingRate = [6000, 5500, 5000, 4500, 4000]; //Rave per Eth
   uint256[5] fundingLimit = [2000000, 5000000, 9000000, 14000000, 20000000]; //Max Rave Available per tier

  /**
   * event for token purchase logging
   * @param purchaser who paid for the tokens
   * @param beneficiary who got the tokens
   * @param value weis paid for purchase
   * @param amount amount of tokens purchased
   */
  event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
  event FailedTransfer(address indexed to, uint256 value);
  event initialCrowdsale(uint256 _startTime, uint256 _endTime, uint256 _cap, uint256 cap, uint256 _rate, uint256 rate, address _wallet);

  function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _cap, address _wallet) public {
    require(_startTime >= now);
    require(_endTime >= _startTime);
    require(_cap > 0);
    require(_wallet != address(0));
    
    owner = msg.sender;
    address _tokenAddr = 0x6A09e1b7cC5cb52FfdfC585a8dF51CED7063915C; //Token Contract Address
    token = Token(_tokenAddr);
      
    startTime = _startTime;
    endTime = _endTime;
    rate =  fundingRate[tierNum];  
    cap = _cap.mul(1 ether);  
    wallet = _wallet;
    
    initialCrowdsale(_startTime, _endTime, _cap, cap, fundingRate[tierNum], rate, _wallet);

  }

  // fallback function can be used to buy tokens
  function () external payable {
    buyTokens(msg.sender);
  }

  // low level token purchase function
  function buyTokens(address beneficiary) public payable {
    require(beneficiary != address(0));
    require(validPurchase());

    uint256 weiAmount = msg.value;

    // calculate token amount to be sent in wei
    uint256 tokens = getTokenAmount(weiAmount);

    // update state
    weiRaised = weiRaised.add(weiAmount);
    tierTotal = tierTotal.add(weiAmount);

    // Check balance of contract
    token.transfer(beneficiary, tokens);
    TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
    
    forwardFunds();
    
    //upgrade rate tier check
    rateUpgrade(tierTotal);
  }

  // @return true if crowdsale event has ended & limit has not been reached
  function hasEnded() public view returns (bool) {
    bool capReached = weiRaised >= cap;
    bool timeLimit = now > endTime;
    return capReached || timeLimit;
  }


  // If weiAmountRaised is over tier thresholds, then upgrade rave per eth
  function rateUpgrade(uint256 tierAmount) internal {
    uint256 tierEthLimit  = fundingLimit[tierNum].div(fundingRate[tierNum]);
    uint256 tierWeiLimit  = tierEthLimit.mul(1 ether);
    if(tierAmount >= tierWeiLimit) {
        tierNum = tierNum.add(1); //increment tier number
        rate = fundingRate[tierNum]; // set new rate in wei
        tierTotal = 0; //reset to 0 wei
    }
 }
  // Override this method to have a way to add business logic to your crowdsale when buying
  function getTokenAmount(uint256 weiAmount) internal view returns(uint256) {
        return weiAmount.mul(rate);
  }

  // send ether to the fund collection wallet
  // override to create custom fund forwarding mechanisms
  function forwardFunds() internal {
    wallet.transfer(msg.value);
  }
  
  // @return true if the transaction can buy tokens & within cap & nonzero
  function validPurchase() internal view returns (bool) {
    bool withinCap = weiRaised.add(msg.value) <= cap;
    bool withinPeriod = now >= startTime && now <= endTime;
    bool nonZeroPurchase = msg.value != 0;
    return withinPeriod && withinCap && nonZeroPurchase;
  }
  
  function tokensAvailable() public onlyOwner constant returns (uint256) {
    return token.balanceOf(this);
  }
  
  
  function getRate() public onlyOwner constant returns(uint256) {
    return rate;
  }

  function getWallet() public onlyOwner constant returns(address) {
    return wallet;
  }
  
  function destroy() public onlyOwner payable {
    uint256 balance = tokensAvailable();
    if(balance > 0) {
    token.transfer(owner, balance);
    }
    selfdestruct(owner);
  }
  
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"getWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokensAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tierTotal","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"hasEnded","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tierNum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_cap","type":"uint256"},{"name":"_wallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"FailedTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_startTime","type":"uint256"},{"indexed":false,"name":"_endTime","type":"uint256"},{"indexed":false,"name":"_cap","type":"uint256"},{"indexed":false,"name":"cap","type":"uint256"},{"indexed":false,"name":"_rate","type":"uint256"},{"indexed":false,"name":"rate","type":"uint256"},{"indexed":false,"name":"_wallet","type":"address"}],"name":"initialCrowdsale","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052600060095560a06040519081016040528061177061ffff16815260200161157c61ffff16815260200161138861ffff16815260200161119461ffff168152602001610fa061ffff16815250600a90600562000061929190620003a4565b5060a060405190810160405280621e848063ffffffff168152602001624c4b4063ffffffff1681526020016289544063ffffffff16815260200162d59f8063ffffffff1681526020016301312d0063ffffffff16815250600f906005620000ca929190620003ef565b503415620000d757600080fd5b604051608080620010d48339810160405280805190602001909190805190602001909190805190602001909190805190602001909190505060004285101515156200012157600080fd5b8484101515156200013157600080fd5b6000831115156200014157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156200017e57600080fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550736a09e1b7cc5cb52ffdfc585a8df51ced7063915c9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460038190555083600481905550600a6009546005811015156200023657fe5b015460068190555062000269670de0b6b3a764000084620003656401000000000262000bde179091906401000000009004565b60028190555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fab97af6ca4c19da671afd9ff738cea3555c0747f48534515322d2f14c5222d67858585600254600a600954600581101515620002e957fe5b015460065488604051808881526020018781526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200197505050505050505060405180910390a1505050505062000464565b60008060008414156200037c57600091506200039d565b82840290508284828115156200038e57fe5b041415156200039957fe5b8091505b5092915050565b8260058101928215620003dc579160200282015b82811115620003db578251829061ffff16905591602001919060010190620003b8565b5b509050620003eb91906200043c565b5090565b826005810192821562000429579160200282015b8281111562000428578251829063ffffffff1690559160200191906001019062000403565b5b5090506200043891906200043c565b5090565b6200046191905b808211156200045d57600081600090555060010162000443565b5090565b90565b610c6080620004746000396000f3006060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806313299604146100e65780632c4e722e1461013b5780633197cbb614610164578063355274ea1461018d5780634042b66f146101b6578063521eb273146101df57806360659a9214610234578063679aefce1461025d57806378e979251461028657806379420fb1146102af57806383197ef0146102d85780638da5cb5b146102e2578063ec8ac4d814610337578063ecb70fb714610365578063f3bbc84c14610392575b6100e4336103bb565b005b34156100f157600080fd5b6100f96105be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561014657600080fd5b61014e610644565b6040518082815260200191505060405180910390f35b341561016f57600080fd5b61017761064a565b6040518082815260200191505060405180910390f35b341561019857600080fd5b6101a0610650565b6040518082815260200191505060405180910390f35b34156101c157600080fd5b6101c9610656565b6040518082815260200191505060405180910390f35b34156101ea57600080fd5b6101f261065c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561023f57600080fd5b610247610682565b6040518082815260200191505060405180910390f35b341561026857600080fd5b6102706107c4565b6040518082815260200191505060405180910390f35b341561029157600080fd5b61029961082a565b6040518082815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610830565b6040518082815260200191505060405180910390f35b6102e0610836565b005b34156102ed57600080fd5b6102f56109ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610363600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506103bb565b005b341561037057600080fd5b610378610a13565b604051808215151515815260200191505060405180910390f35b341561039d57600080fd5b6103a5610a39565b6040518082815260200191505060405180910390f35b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156103fa57600080fd5b610402610a3f565b151561040d57600080fd5b34915061041982610a99565b905061043082600754610ab790919063ffffffff16565b60078190555061044b82600854610ab790919063ffffffff16565b6008819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561051d57600080fd5b6102c65a03f1151561052e57600080fd5b50505060405180519050508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188484604051808381526020018281526020019250505060405180910390a36105ae610ad5565b6105b9600854610b39565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561061c57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065481565b60045481565b60025481565b60075481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106e057600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156107a457600080fd5b6102c65a03f115156107b557600080fd5b50505060405180519050905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561082257600080fd5b600654905090565b60035481565b60085481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561089457600080fd5b61089c610682565b905060008111156109b2576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561099557600080fd5b6102c65a03f115156109a657600080fd5b50505060405180519050505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060025460075410159150600454421190508180610a325750805b9250505090565b60095481565b600080600080600254610a5d34600754610ab790919063ffffffff16565b111592506003544210158015610a7557506004544211155b915060003414159050818015610a885750825b8015610a915750805b935050505090565b6000610ab060065483610bde90919063ffffffff16565b9050919050565b6000808284019050838110151515610acb57fe5b8091505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610b3757600080fd5b565b600080610b73600a600954600581101515610b5057fe5b0154600f600954600581101515610b6357fe5b0154610c1990919063ffffffff16565b9150610b90670de0b6b3a764000083610bde90919063ffffffff16565b90508083101515610bd957610bb16001600954610ab790919063ffffffff16565b600981905550600a600954600581101515610bc857fe5b015460068190555060006008819055505b505050565b6000806000841415610bf35760009150610c12565b8284029050828482811515610c0457fe5b04141515610c0e57fe5b8091505b5092915050565b6000808284811515610c2757fe5b04905080915050929150505600a165627a7a7230582034f70d7792cf05229e9b6cdd2c6935fb306ac324eb6a6b3bda6043809db0e7c30029000000000000000000000000000000000000000000000000000000005a7b4cb0000000000000000000000000000000000000000000000000000000005aa036b00000000000000000000000000000000000000000000000000000000000002b92000000000000000000000000a15dfad840cc344e38f733e6e055561c1b50d7e5

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000005a7b4cb0000000000000000000000000000000000000000000000000000000005aa036b00000000000000000000000000000000000000000000000000000000000002b92000000000000000000000000a15dfad840cc344e38f733e6e055561c1b50d7e5

-----Decoded View---------------
Found 4 constructor arguments :
Arg [0] : 000000000000000000000000000000000000000000000000000000005a7b4cb0
Arg [1] : 000000000000000000000000000000000000000000000000000000005aa036b0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002b92
Arg [3] : 000000000000000000000000a15dfad840cc344e38f733e6e055561c1b50d7e5


   Swarm Source:
bzzr://34f70d7792cf05229e9b6cdd2c6935fb306ac324eb6a6b3bda6043809db0e7c3

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.