ETH Price: $2,046.41 (+0.96%)

Contract

0x341027ECcd7449cE0058CA5EF7Ae17Cb15a29ae7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Finalize Sale45397242017-11-12 16:31:573041 days ago1510504317IN
0x341027EC...b15a29ae7
0 ETH0.0008521821
Ownable45137422017-11-08 12:45:543045 days ago1510145154IN
0x341027EC...b15a29ae7
0 ETH0.000133525.9
0xb1c0ef5a45137232017-11-08 12:40:543045 days ago1510144854IN
0x341027EC...b15a29ae7
0 ETH0.00015585.9
Transfer Ownersh...45123842017-11-08 7:33:383045 days ago1510126418IN
0x341027EC...b15a29ae7
0 ETH0.0004971121
Transfer44680842017-11-01 4:08:513052 days ago1509509331IN
0x341027EC...b15a29ae7
0.1 ETH0.000021811
Transfer44680752017-11-01 4:07:583052 days ago1509509278IN
0x341027EC...b15a29ae7
0.1 ETH0.0000211
Transfer44660182017-10-31 20:19:333053 days ago1509481173IN
0x341027EC...b15a29ae7
0.1 ETH0.00044121
Transfer44653502017-10-31 17:39:553053 days ago1509471595IN
0x341027EC...b15a29ae7
0.1 ETH0.00086141
Submit Transacti...44646412017-10-31 15:01:373053 days ago1509462097IN
0x341027EC...b15a29ae7
0 ETH0.000099234
Transfer44617862017-10-31 4:04:423053 days ago1509422682IN
0x341027EC...b15a29ae7
3 ETH0.0004581121
Transfer44612652017-10-31 2:00:483054 days ago1509415248IN
0x341027EC...b15a29ae7
1 ETH0.0004581121
Transfer44611462017-10-31 1:33:183054 days ago1509413598IN
0x341027EC...b15a29ae7
1 ETH0.0004581121
Transfer44611382017-10-31 1:30:353054 days ago1509413435IN
0x341027EC...b15a29ae7
1 ETH0.0004581121
Transfer44609482017-10-31 0:49:583054 days ago1509410998IN
0x341027EC...b15a29ae7
0.12 ETH0.0008965941.1
Transfer44599342017-10-30 20:41:233054 days ago1509396083IN
0x341027EC...b15a29ae7
0.1 ETH0.0006806231.2
Transfer44599312017-10-30 20:40:503054 days ago1509396050IN
0x341027EC...b15a29ae7
0.1 ETH0.0006806231.2
Transfer44599132017-10-30 20:37:443054 days ago1509395864IN
0x341027EC...b15a29ae7
0.4 ETH0.0005017423
Transfer44597122017-10-30 19:51:173054 days ago1509393077IN
0x341027EC...b15a29ae7
0.4 ETH0.0004581121
Transfer44596952017-10-30 19:46:463054 days ago1509392806IN
0x341027EC...b15a29ae7
0.4 ETH0.0006042727.7
Transfer44596752017-10-30 19:42:593054 days ago1509392579IN
0x341027EC...b15a29ae7
0.4 ETH0.0006042727.7
Transfer44596692017-10-30 19:41:143054 days ago1509392474IN
0x341027EC...b15a29ae7
0.2 ETH0.0004581121
Transfer44596572017-10-30 19:36:523054 days ago1509392212IN
0x341027EC...b15a29ae7
0.4 ETH0.0004581121
Transfer44596372017-10-30 19:32:223054 days ago1509391942IN
0x341027EC...b15a29ae7
0.4 ETH0.0004581121
Transfer44596242017-10-30 19:30:313054 days ago1509391831IN
0x341027EC...b15a29ae7
0.4 ETH0.000436320
Transfer44595962017-10-30 19:23:343054 days ago1509391414IN
0x341027EC...b15a29ae7
0.4 ETH0.000436320
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer45397242017-11-12 16:31:573041 days ago1510504317
0x341027EC...b15a29ae7
83.27268934 ETH
Transfer44254932017-10-25 7:12:373059 days ago1508915557
0x341027EC...b15a29ae7
0.1 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BouleICO

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.11;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal 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;
  }

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

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

pragma solidity ^0.4.11;


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

}

pragma solidity ^0.4.11;


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

pragma solidity ^0.4.11;




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

pragma solidity ^0.4.11;




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

  mapping(address => uint256) balances;

  /**
  * @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) {
    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 uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) constant returns (uint256 balance) {
    return balances[_owner];
  }

}

pragma solidity ^0.4.11;




/**
 * @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)) 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 amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint256 _value) {
    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 behalf 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, uint256 _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 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 specifing the amount of tokens still avaible for the spender.
   */
  function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

}

pragma solidity ^0.4.11;





/**
 * @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, uint256 amount);
  event MintFinished();

  bool public mintingFinished = false;


  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, uint256 _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;
  }
}

pragma solidity ^0.4.11;


/*
    Copyright 2017, Giovanni Zorzato (Boulé Foundation)
*/

contract BouleToken is MintableToken {
    // BouleToken is an OpenZeppelin Mintable Token
    string public name = "Boule Token";
    string public symbol = "BOU";
    uint public decimals = 18;

    // do no allow to send ether to this token
    function () public payable {
        throw;
    }

}



pragma solidity ^0.4.4;


/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
/// @author Stefan George - <[email protected]>
contract MultiSigWallet {

    uint constant public MAX_OWNER_COUNT = 50;

    event Confirmation(address indexed sender, uint indexed transactionId);
    event Revocation(address indexed sender, uint indexed transactionId);
    event Submission(uint indexed transactionId);
    event Execution(uint indexed transactionId);
    event ExecutionFailure(uint indexed transactionId);
    event Deposit(address indexed sender, uint value);
    event OwnerAddition(address indexed owner);
    event OwnerRemoval(address indexed owner);
    event RequirementChange(uint required);

    mapping (uint => Transaction) public transactions;
    mapping (uint => mapping (address => bool)) public confirmations;
    mapping (address => bool) public isOwner;
    address[] public owners;
    uint public required;
    uint public transactionCount;

    struct Transaction {
        address destination;
        uint value;
        bytes data;
        bool executed;
    }

    modifier onlyWallet() {
        if (msg.sender != address(this))
            throw;
        _;
    }

    modifier ownerDoesNotExist(address owner) {
        if (isOwner[owner])
            throw;
        _;
    }

    modifier ownerExists(address owner) {
        if (!isOwner[owner])
            throw;
        _;
    }

    modifier transactionExists(uint transactionId) {
        if (transactions[transactionId].destination == 0)
            throw;
        _;
    }

    modifier confirmed(uint transactionId, address owner) {
        if (!confirmations[transactionId][owner])
            throw;
        _;
    }

    modifier notConfirmed(uint transactionId, address owner) {
        if (confirmations[transactionId][owner])
            throw;
        _;
    }

    modifier notExecuted(uint transactionId) {
        if (transactions[transactionId].executed)
            throw;
        _;
    }

    modifier notNull(address _address) {
        if (_address == 0)
            throw;
        _;
    }

    modifier validRequirement(uint ownerCount, uint _required) {
        if (   ownerCount > MAX_OWNER_COUNT
            || _required > ownerCount
            || _required == 0
            || ownerCount == 0)
            throw;
        _;
    }

    /// @dev Fallback function allows to deposit ether.
    function()
        payable
    {
        if (msg.value > 0)
            Deposit(msg.sender, msg.value);
    }

    /*
     * Public functions
     */
    /// @dev Contract constructor sets initial owners and required number of confirmations.
    /// @param _owners List of initial owners.
    /// @param _required Number of required confirmations.
    function MultiSigWallet(address[] _owners, uint _required)
        public
        validRequirement(_owners.length, _required)
    {
        for (uint i=0; i<_owners.length; i++) {
            if (isOwner[_owners[i]] || _owners[i] == 0)
                throw;
            isOwner[_owners[i]] = true;
        }
        owners = _owners;
        required = _required;
    }

    /// @dev Allows to add a new owner. Transaction has to be sent by wallet.
    /// @param owner Address of new owner.
    function addOwner(address owner)
        public
        onlyWallet
        ownerDoesNotExist(owner)
        notNull(owner)
        validRequirement(owners.length + 1, required)
    {
        isOwner[owner] = true;
        owners.push(owner);
        OwnerAddition(owner);
    }

    /// @dev Allows to remove an owner. Transaction has to be sent by wallet.
    /// @param owner Address of owner.
    function removeOwner(address owner)
        public
        onlyWallet
        ownerExists(owner)
    {
        isOwner[owner] = false;
        for (uint i=0; i<owners.length - 1; i++)
            if (owners[i] == owner) {
                owners[i] = owners[owners.length - 1];
                break;
            }
        owners.length -= 1;
        if (required > owners.length)
            changeRequirement(owners.length);
        OwnerRemoval(owner);
    }

    /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.
    /// @param owner Address of owner to be replaced.
    /// @param owner Address of new owner.
    function replaceOwner(address owner, address newOwner)
        public
        onlyWallet
        ownerExists(owner)
        ownerDoesNotExist(newOwner)
    {
        for (uint i=0; i<owners.length; i++)
            if (owners[i] == owner) {
                owners[i] = newOwner;
                break;
            }
        isOwner[owner] = false;
        isOwner[newOwner] = true;
        OwnerRemoval(owner);
        OwnerAddition(newOwner);
    }

    /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.
    /// @param _required Number of required confirmations.
    function changeRequirement(uint _required)
        public
        onlyWallet
        validRequirement(owners.length, _required)
    {
        required = _required;
        RequirementChange(_required);
    }

    /// @dev Allows an owner to submit and confirm a transaction.
    /// @param destination Transaction target address.
    /// @param value Transaction ether value.
    /// @param data Transaction data payload.
    /// @return Returns transaction ID.
    function submitTransaction(address destination, uint value, bytes data)
        public
        returns (uint transactionId)
    {
        transactionId = addTransaction(destination, value, data);
        confirmTransaction(transactionId);
    }

    /// @dev Allows an owner to confirm a transaction.
    /// @param transactionId Transaction ID.
    function confirmTransaction(uint transactionId)
        public
        ownerExists(msg.sender)
        transactionExists(transactionId)
        notConfirmed(transactionId, msg.sender)
    {
        confirmations[transactionId][msg.sender] = true;
        Confirmation(msg.sender, transactionId);
        executeTransaction(transactionId);
    }

    /// @dev Allows an owner to revoke a confirmation for a transaction.
    /// @param transactionId Transaction ID.
    function revokeConfirmation(uint transactionId)
        public
        ownerExists(msg.sender)
        confirmed(transactionId, msg.sender)
        notExecuted(transactionId)
    {
        confirmations[transactionId][msg.sender] = false;
        Revocation(msg.sender, transactionId);
    }

    /// @dev Allows anyone to execute a confirmed transaction.
    /// @param transactionId Transaction ID.
    function executeTransaction(uint transactionId)
        public
        notExecuted(transactionId)
    {
        if (isConfirmed(transactionId)) {
            Transaction tx = transactions[transactionId];
            tx.executed = true;
            if (tx.destination.call.value(tx.value)(tx.data))
                Execution(transactionId);
            else {
                ExecutionFailure(transactionId);
                tx.executed = false;
            }
        }
    }

    /// @dev Returns the confirmation status of a transaction.
    /// @param transactionId Transaction ID.
    /// @return Confirmation status.
    function isConfirmed(uint transactionId)
        public
        constant
        returns (bool)
    {
        uint count = 0;
        for (uint i=0; i<owners.length; i++) {
            if (confirmations[transactionId][owners[i]])
                count += 1;
            if (count == required)
                return true;
        }
    }

    /*
     * Internal functions
     */
    /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.
    /// @param destination Transaction target address.
    /// @param value Transaction ether value.
    /// @param data Transaction data payload.
    /// @return Returns transaction ID.
    function addTransaction(address destination, uint value, bytes data)
        internal
        notNull(destination)
        returns (uint transactionId)
    {
        transactionId = transactionCount;
        transactions[transactionId] = Transaction({
            destination: destination,
            value: value,
            data: data,
            executed: false
        });
        transactionCount += 1;
        Submission(transactionId);
    }

    /*
     * Web3 call functions
     */
    /// @dev Returns number of confirmations of a transaction.
    /// @param transactionId Transaction ID.
    /// @return Number of confirmations.
    function getConfirmationCount(uint transactionId)
        public
        constant
        returns (uint count)
    {
        for (uint i=0; i<owners.length; i++)
            if (confirmations[transactionId][owners[i]])
                count += 1;
    }

    /// @dev Returns total number of transactions after filers are applied.
    /// @param pending Include pending transactions.
    /// @param executed Include executed transactions.
    /// @return Total number of transactions after filters are applied.
    function getTransactionCount(bool pending, bool executed)
        public
        constant
        returns (uint count)
    {
        for (uint i=0; i<transactionCount; i++)
            if (   pending && !transactions[i].executed
                || executed && transactions[i].executed)
                count += 1;
    }

    /// @dev Returns list of owners.
    /// @return List of owner addresses.
    function getOwners()
        public
        constant
        returns (address[])
    {
        return owners;
    }

    /// @dev Returns array with owner addresses, which confirmed transaction.
    /// @param transactionId Transaction ID.
    /// @return Returns array of owner addresses.
    function getConfirmations(uint transactionId)
        public
        constant
        returns (address[] _confirmations)
    {
        address[] memory confirmationsTemp = new address[](owners.length);
        uint count = 0;
        uint i;
        for (i=0; i<owners.length; i++)
            if (confirmations[transactionId][owners[i]]) {
                confirmationsTemp[count] = owners[i];
                count += 1;
            }
        _confirmations = new address[](count);
        for (i=0; i<count; i++)
            _confirmations[i] = confirmationsTemp[i];
    }

    /// @dev Returns list of transaction IDs in defined range.
    /// @param from Index start position of transaction array.
    /// @param to Index end position of transaction array.
    /// @param pending Include pending transactions.
    /// @param executed Include executed transactions.
    /// @return Returns array of transaction IDs.
    function getTransactionIds(uint from, uint to, bool pending, bool executed)
        public
        constant
        returns (uint[] _transactionIds)
    {
        uint[] memory transactionIdsTemp = new uint[](transactionCount);
        uint count = 0;
        uint i;
        for (i=0; i<transactionCount; i++)
            if (   pending && !transactions[i].executed
                || executed && transactions[i].executed)
            {
                transactionIdsTemp[count] = i;
                count += 1;
            }
        _transactionIds = new uint[](to - from);
        for (i=from; i<to; i++)
            _transactionIds[i - from] = transactionIdsTemp[i];
    }
}

pragma solidity ^0.4.11;


/*
    Copyright 2017, Giovanni Zorzato (Boulé Foundation)
 */


contract BouleICO is Ownable{

    uint public startTime;             // unix ts in which the sale starts.
    uint public secondPriceTime;       // unix ts in which the second price triggers.
    uint public thirdPriceTime;        // unix ts in which the third price starts.
    uint public fourthPriceTime;       // unix ts in which the fourth price starts.
    uint public endTime;               // unix ts in which the sale end.

    address public bouleDevMultisig;   // The address to hold the funds donated

    uint public totalCollected = 0;    // In wei
    bool public saleStopped = false;   // Has Boulé stopped the sale?
    bool public saleFinalized = false; // Has Boulé finalized the sale?

    BouleToken public token;           // The token

    MultiSigWallet wallet;             // Multisig

    uint constant public minInvestment = 0.1 ether;    // Minimum investment  0.1 ETH

    /** Addresses that are allowed to invest even before ICO opens. For testing, for ICO partners, etc. */
    mapping (address => bool) public whitelist;

    event NewBuyer(address indexed holder, uint256 bouAmount, uint256 amount);
    event Whitelisted(address addr, bool status);

    function BouleICO (
    address _token,
    address _bouleDevMultisig,
    uint _startTime,
    uint _secondPriceTime,
    uint _thirdPriceTime,
    uint _fourthPriceTime,
    uint _endTime
    )
    {
        if (_startTime >= _endTime) throw;

        // Save constructor arguments as global variables
        token = BouleToken(_token);
        bouleDevMultisig = _bouleDevMultisig;
        // create wallet object
        wallet = MultiSigWallet(bouleDevMultisig);

        startTime = _startTime;
        secondPriceTime = _secondPriceTime;
        thirdPriceTime = _thirdPriceTime;
        fourthPriceTime = _fourthPriceTime;
        endTime = _endTime;
    }

    // change whitelist status for a specific address
    function setWhitelistStatus(address addr, bool status)
    onlyOwner {
        whitelist[addr] = status;
        Whitelisted(addr, status);
    }

    // @notice Get the price for a BOU token at current time (how many tokens for 1 ETH)
    // @return price of BOU
    function getPrice() constant public returns (uint256) {
        var time = getNow();
        if(time < startTime){
            // whitelist
            return 1400;
        }
        if(time < secondPriceTime){
            return 1200; //20%
        }
        if(time < thirdPriceTime){
            return 1150; //15%
        }
        if(time < fourthPriceTime){
            return 1100; //10%
        }
        return 1050; //5%
    }


    /**
        * Get the amount of unsold tokens allocated to this contract;
    */
    function getTokensLeft() public constant returns (uint) {
        return token.balanceOf(this);
    }


    /// The fallback function is called when ether is sent to the contract, it
    /// simply calls `doPayment()` with the address that sent the ether as the
    /// `_owner`. Payable is a required solidity modifier for functions to receive
    /// ether, without this modifier functions will throw if ether is sent to them

    function () public payable {
        doPayment(msg.sender);
    }



    /// @dev `doPayment()` is an internal function that sends the ether that this
    ///  contract receives to the bouleDevMultisig and creates tokens in the address of the
    /// @param _owner The address that will hold the newly created tokens

    function doPayment(address _owner)
    only_during_sale_period_or_whitelisted(_owner)
    only_sale_not_stopped
    non_zero_address(_owner)
    minimum_value(minInvestment)
    internal {
        // Calculate how many tokens at current price
        uint256 tokenAmount = SafeMath.mul(msg.value, getPrice());
        // do not allow selling more than what we have
        if(tokenAmount > getTokensLeft()) {
            throw;
        }
        // transfer token (it will throw error if transaction is not valid)
        token.transfer(_owner, tokenAmount);

        // record total selling
        totalCollected = SafeMath.add(totalCollected, msg.value);

        NewBuyer(_owner, tokenAmount, msg.value);
    }

    // @notice Function to stop sale for an emergency.
    // @dev Only Boulé Dev can do it after it has been activated.
    function emergencyStopSale()
    only_sale_not_stopped
    onlyOwner
    public {
        saleStopped = true;
    }

    // @notice Function to restart stopped sale.
    // @dev Only Boulé can do it after it has been disabled and sale is ongoing.
    function restartSale()
    only_during_sale_period
    only_sale_stopped
    onlyOwner
    public {
        saleStopped = false;
    }


    // @notice Moves funds in sale contract to Boulé MultiSigWallet.
    // @dev  Moves funds in sale contract to Boulé MultiSigWallet.
    function moveFunds()
    onlyOwner
    public {
        // move funds
        if (!wallet.send(this.balance)) throw;
    }


    function finalizeSale()
    only_after_sale
    onlyOwner
    public {
        doFinalizeSale();
    }

    function doFinalizeSale()
    internal {
        // move all remaining eth in the sale contract into multisig wallet
        if (!wallet.send(this.balance)) throw;
        // transfer remaining tokens
        token.transfer(bouleDevMultisig, getTokensLeft());

        saleFinalized = true;
        saleStopped = true;
    }

    function getNow() internal constant returns (uint) {
        return now;
    }

    modifier only(address x) {
        if (msg.sender != x) throw;
        _;
    }

    modifier only_during_sale_period {
        if (getNow() < startTime) throw;
        if (getNow() >= endTime) throw;
        _;
    }

    // valid only during sale or before sale if the sender is whitelisted
    modifier only_during_sale_period_or_whitelisted(address x) {
        if (getNow() < startTime && !whitelist[x]) throw;
        if (getNow() >= endTime) throw;
        _;
    }

    modifier only_after_sale {
        if (getNow() < endTime) throw;
        _;
    }

    modifier only_sale_stopped {
        if (!saleStopped) throw;
        _;
    }

    modifier only_sale_not_stopped {
        if (saleStopped) throw;
        _;
    }

    modifier non_zero_address(address x) {
        if (x == 0) throw;
        _;
    }

    modifier minimum_value(uint256 x) {
        if (msg.value < x) throw;
        _;
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"status","type":"bool"}],"name":"setWhitelistStatus","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"emergencyStopSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bouleDevMultisig","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"secondPriceTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"saleStopped","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fourthPriceTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalizeSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"restartSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minInvestment","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"saleFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"moveFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"thirdPriceTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokensLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalCollected","outputs":[{"name":"","type":"uint256"}],"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":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_bouleDevMultisig","type":"address"},{"name":"_startTime","type":"uint256"},{"name":"_secondPriceTime","type":"uint256"},{"name":"_thirdPriceTime","type":"uint256"},{"name":"_fourthPriceTime","type":"uint256"},{"name":"_endTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"bouAmount","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"NewBuyer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"status","type":"bool"}],"name":"Whitelisted","type":"event"}]

606060405260006007556008805461ffff19169055341561001f57600080fd5b60405160e080610a3b8339810160405280805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160008054600160a060020a03191633600160a060020a031617905591505080851061008657600080fd5b60088054600160a060020a0398891662010000026201000060b060020a031990911617905560068054968816600160a060020a0319978816179081905560098054909716971696909617909455600192909255600255600355600455600555610947806100f46000396000f3006060604052600436106101035763ffffffff60e060020a6000350416630c424284811461010e5780632863f9f3146101325780633197cbb6146101455780633528351d1461016a5780633a1d9a7d14610199578063456c8cac146101ac5780635302a136146101d357806358a687ec146101e657806374711285146101f957806378e979251461020c5780638ac2c6801461021f5780638da5cb5b1461023257806398d5fdca146102455780639b19251a14610258578063a5f0dea214610277578063d0b6ba2a1461028a578063dc4b31151461029d578063de5f9866146102b0578063e29eb836146102c3578063f2fde38b146102d6578063fc0c546a146102f5575b61010c33610308565b005b341561011957600080fd5b61010c600160a060020a03600435166024351515610488565b341561013d57600080fd5b61010c610514565b341561015057600080fd5b61015861054e565b60405190815260200160405180910390f35b341561017557600080fd5b61017d610554565b604051600160a060020a03909116815260200160405180910390f35b34156101a457600080fd5b610158610563565b34156101b757600080fd5b6101bf610569565b604051901515815260200160405180910390f35b34156101de57600080fd5b610158610572565b34156101f157600080fd5b61010c610578565b341561020457600080fd5b61010c6105b3565b341561021757600080fd5b610158610616565b341561022a57600080fd5b61015861061c565b341561023d57600080fd5b61017d610628565b341561025057600080fd5b610158610637565b341561026357600080fd5b6101bf600160a060020a036004351661069e565b341561028257600080fd5b6101bf6106b3565b341561029557600080fd5b61010c6106c1565b34156102a857600080fd5b610158610715565b34156102bb57600080fd5b61015861071b565b34156102ce57600080fd5b61015861079b565b34156102e157600080fd5b61010c600160a060020a03600435166107a1565b341561030057600080fd5b61017d6107f7565b60008160015461031661080c565b10801561033c5750600160a060020a0381166000908152600a602052604090205460ff16155b1561034657600080fd5b60055461035161080c565b1061035b57600080fd5b60085460ff161561036b57600080fd5b82600160a060020a038116151561038157600080fd5b67016345785d8a00008034101561039757600080fd5b6103a8346103a3610637565b610810565b93506103b261071b565b8411156103be57600080fd5b600854620100009004600160a060020a031663a9059cbb868660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561041a57600080fd5b6102c65a03f1151561042b57600080fd5b50505061043a6007543461083b565b600755600160a060020a0385167f7d92561d9486854d24999c3a9e1999d946c2b7405d61e070567286a98e174c3a853460405191825260208201526040908101905180910390a25050505050565b60005433600160a060020a039081169116146104a357600080fd5b600160a060020a0382166000908152600a602052604090819020805460ff19168315151790557fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60085460ff161561052457600080fd5b60005433600160a060020a0390811691161461053f57600080fd5b6008805460ff19166001179055565b60055481565b600654600160a060020a031681565b60025481565b60085460ff1681565b60045481565b60055461058361080c565b101561058e57600080fd5b60005433600160a060020a039081169116146105a957600080fd5b6105b161084a565b565b6001546105be61080c565b10156105c957600080fd5b6005546105d461080c565b106105de57600080fd5b60085460ff1615156105ef57600080fd5b60005433600160a060020a0390811691161461060a57600080fd5b6008805460ff19169055565b60015481565b67016345785d8a000081565b600054600160a060020a031681565b60008061064261080c565b905060015481101561065857610578915061069a565b60025481101561066c576104b0915061069a565b6003548110156106805761047e915061069a565b6004548110156106945761044c915061069a565b61041a91505b5090565b600a6020526000908152604090205460ff1681565b600854610100900460ff1681565b60005433600160a060020a039081169116146106dc57600080fd5b600954600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156105b157600080fd5b60035481565b600854600090620100009004600160a060020a03166370a0823130836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561077c57600080fd5b6102c65a03f1151561078d57600080fd5b505050604051805191505090565b60075481565b60005433600160a060020a039081169116146107bc57600080fd5b600160a060020a038116156107f4576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600854620100009004600160a060020a031681565b4290565b600082820283158061082c575082848281151561082957fe5b04145b151561083457fe5b9392505050565b60008282018381101561083457fe5b600954600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561088357600080fd5b600854600654600160a060020a036201000090920482169163a9059cbb91166108aa61071b565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156108ed57600080fd5b6102c65a03f115156108fe57600080fd5b50506008805460ff1961ff001990911661010017166001179055505600a165627a7a723058207d47742ad95550a54833b436bd553c466f185c4018e922bf63def8c011979a410029000000000000000000000000c2c63f23ec5e97efbd7565df9ec764fdc7d4e91d000000000000000000000000f8ad829711ee14eb0d85566f7fb4e380105d11ef0000000000000000000000000000000000000000000000000000000059f044800000000000000000000000000000000000000000000000000000000059f196000000000000000000000000000000000000000000000000000000000059f6dc000000000000000000000000000000000000000000000000000000000059fec500000000000000000000000000000000000000000000000000000000005a087000

Deployed Bytecode

0x6060604052600436106101035763ffffffff60e060020a6000350416630c424284811461010e5780632863f9f3146101325780633197cbb6146101455780633528351d1461016a5780633a1d9a7d14610199578063456c8cac146101ac5780635302a136146101d357806358a687ec146101e657806374711285146101f957806378e979251461020c5780638ac2c6801461021f5780638da5cb5b1461023257806398d5fdca146102455780639b19251a14610258578063a5f0dea214610277578063d0b6ba2a1461028a578063dc4b31151461029d578063de5f9866146102b0578063e29eb836146102c3578063f2fde38b146102d6578063fc0c546a146102f5575b61010c33610308565b005b341561011957600080fd5b61010c600160a060020a03600435166024351515610488565b341561013d57600080fd5b61010c610514565b341561015057600080fd5b61015861054e565b60405190815260200160405180910390f35b341561017557600080fd5b61017d610554565b604051600160a060020a03909116815260200160405180910390f35b34156101a457600080fd5b610158610563565b34156101b757600080fd5b6101bf610569565b604051901515815260200160405180910390f35b34156101de57600080fd5b610158610572565b34156101f157600080fd5b61010c610578565b341561020457600080fd5b61010c6105b3565b341561021757600080fd5b610158610616565b341561022a57600080fd5b61015861061c565b341561023d57600080fd5b61017d610628565b341561025057600080fd5b610158610637565b341561026357600080fd5b6101bf600160a060020a036004351661069e565b341561028257600080fd5b6101bf6106b3565b341561029557600080fd5b61010c6106c1565b34156102a857600080fd5b610158610715565b34156102bb57600080fd5b61015861071b565b34156102ce57600080fd5b61015861079b565b34156102e157600080fd5b61010c600160a060020a03600435166107a1565b341561030057600080fd5b61017d6107f7565b60008160015461031661080c565b10801561033c5750600160a060020a0381166000908152600a602052604090205460ff16155b1561034657600080fd5b60055461035161080c565b1061035b57600080fd5b60085460ff161561036b57600080fd5b82600160a060020a038116151561038157600080fd5b67016345785d8a00008034101561039757600080fd5b6103a8346103a3610637565b610810565b93506103b261071b565b8411156103be57600080fd5b600854620100009004600160a060020a031663a9059cbb868660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561041a57600080fd5b6102c65a03f1151561042b57600080fd5b50505061043a6007543461083b565b600755600160a060020a0385167f7d92561d9486854d24999c3a9e1999d946c2b7405d61e070567286a98e174c3a853460405191825260208201526040908101905180910390a25050505050565b60005433600160a060020a039081169116146104a357600080fd5b600160a060020a0382166000908152600a602052604090819020805460ff19168315151790557fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60085460ff161561052457600080fd5b60005433600160a060020a0390811691161461053f57600080fd5b6008805460ff19166001179055565b60055481565b600654600160a060020a031681565b60025481565b60085460ff1681565b60045481565b60055461058361080c565b101561058e57600080fd5b60005433600160a060020a039081169116146105a957600080fd5b6105b161084a565b565b6001546105be61080c565b10156105c957600080fd5b6005546105d461080c565b106105de57600080fd5b60085460ff1615156105ef57600080fd5b60005433600160a060020a0390811691161461060a57600080fd5b6008805460ff19169055565b60015481565b67016345785d8a000081565b600054600160a060020a031681565b60008061064261080c565b905060015481101561065857610578915061069a565b60025481101561066c576104b0915061069a565b6003548110156106805761047e915061069a565b6004548110156106945761044c915061069a565b61041a91505b5090565b600a6020526000908152604090205460ff1681565b600854610100900460ff1681565b60005433600160a060020a039081169116146106dc57600080fd5b600954600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156105b157600080fd5b60035481565b600854600090620100009004600160a060020a03166370a0823130836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561077c57600080fd5b6102c65a03f1151561078d57600080fd5b505050604051805191505090565b60075481565b60005433600160a060020a039081169116146107bc57600080fd5b600160a060020a038116156107f4576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600854620100009004600160a060020a031681565b4290565b600082820283158061082c575082848281151561082957fe5b04145b151561083457fe5b9392505050565b60008282018381101561083457fe5b600954600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561088357600080fd5b600854600654600160a060020a036201000090920482169163a9059cbb91166108aa61071b565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156108ed57600080fd5b6102c65a03f115156108fe57600080fd5b50506008805460ff1961ff001990911661010017166001179055505600a165627a7a723058207d47742ad95550a54833b436bd553c466f185c4018e922bf63def8c011979a410029

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

000000000000000000000000c2c63f23ec5e97efbd7565df9ec764fdc7d4e91d000000000000000000000000f8ad829711ee14eb0d85566f7fb4e380105d11ef0000000000000000000000000000000000000000000000000000000059f044800000000000000000000000000000000000000000000000000000000059f196000000000000000000000000000000000000000000000000000000000059f6dc000000000000000000000000000000000000000000000000000000000059fec500000000000000000000000000000000000000000000000000000000005a087000

-----Decoded View---------------
Arg [0] : _token (address): 0xC2C63F23ec5E97efbD7565dF9Ec764FDc7d4e91d
Arg [1] : _bouleDevMultisig (address): 0xf8ad829711EE14EB0d85566f7fB4e380105d11eF
Arg [2] : _startTime (uint256): 1508918400
Arg [3] : _secondPriceTime (uint256): 1509004800
Arg [4] : _thirdPriceTime (uint256): 1509350400
Arg [5] : _fourthPriceTime (uint256): 1509868800
Arg [6] : _endTime (uint256): 1510502400

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000c2c63f23ec5e97efbd7565df9ec764fdc7d4e91d
Arg [1] : 000000000000000000000000f8ad829711ee14eb0d85566f7fb4e380105d11ef
Arg [2] : 0000000000000000000000000000000000000000000000000000000059f04480
Arg [3] : 0000000000000000000000000000000000000000000000000000000059f19600
Arg [4] : 0000000000000000000000000000000000000000000000000000000059f6dc00
Arg [5] : 0000000000000000000000000000000000000000000000000000000059fec500
Arg [6] : 000000000000000000000000000000000000000000000000000000005a087000


Swarm Source

bzzr://7d47742ad95550a54833b436bd553c466f185c4018e922bf63def8c011979a41

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.