Sponsored Link:   Alt.Estate - ERC20 for Real Estate. Live Prototype in Japan, USA, EU.Buy ALT tokens. Endorsed by partners of PWC, Knight Frank.
Contract Overview
Balance: 552.376591382336299035 Ether
Ether Value: $325,377.43 (@ $589.05/ETH)
Transactions: 6 txns
 Latest 6 txns


TxHash Age From To Value [TxFee]
0x1e13d71783609be272130905bdc7b2e34f3c946aa360457a071c0bccaea36fcc61 days 19 hrs ago0xc0b9e95ffe488de2d091458edfc799eed2f968d9  IN   0xfcc5b18f1f51956e0abb411e7b86c76586ab4ef91 Ether0.000042708
0x02e139612f5bba491839f7966565d966d07b15119fe867e164a288d0f1537db9137 days 7 hrs ago0x0039f22efb07a647557c7c5d17854cfd6d489ef3  IN   0xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90 Ether0.001987605
0x7727e70d67d5276c0ed29817cffd933f5f0fda707a1ff360d654a94fe8836a69137 days 7 hrs ago0x0039f22efb07a647557c7c5d17854cfd6d489ef3  IN   0xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90 Ether0.002001465
0xd3790f27b82ec4466334cb89b19cd3a3011e3c162e8fb8905e2ca2618e782daa137 days 7 hrs ago0x0039f22efb07a647557c7c5d17854cfd6d489ef3  IN   0xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90 Ether0.001987155
0xe3eae7e92fbbfec361ba6919fe6b3cf986126dcc7c127a92a3234340724c54b8137 days 7 hrs ago0x0039f22efb07a647557c7c5d17854cfd6d489ef3  IN   0xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90 Ether0.0103422
0x810a6bbe9532ddc4d1731a1ca24ace4d4fc262710a61d21eaf6b32d7025c0078137 days 8 hrs ago0x0039f22efb07a647557c7c5d17854cfd6d489ef3  IN    Contract Creation0 Ether0.03007135
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0xca9889a311ae93404c62b8ad7c27d03dcb34f38ae47f1992ed07a721c324229b535929754 days 19 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.01 Ether
0xbb9dd9b74afc09bd8ad24744f51508762dc422eed7f5f9122dbb93762b9d73bc535683755 days 5 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.04 Ether
0x97685175b50071a444eef6b4123686e573a337f391be36425be9d016ed906282535682655 days 5 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.01 Ether
0x49ba7ba8f73049a4c3acac28aa98d7149343763aee197d60734ff820ef9cd3ae535631255 days 7 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef91.01 Ether
0x1a234de3d995dcad162f4da03afd8b76646f36c257b45e5e4c2c6a4100009166535590655 days 9 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef91.4 Ether
0x4e99ecdeee8349746edc3e2b18697c7a6a492368a803aa9cc0ea514a4e02e23a535589355 days 9 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.1 Ether
0x5862484a312caca092a708b9b36393a3f57fb6b5b0fc9d621cce5a86dbe70ee0535400455 days 16 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.2 Ether
0x29526a543059203bccf40701e18450df11f539f2ab09985d12cd41f9d627a269535398855 days 16 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.15 Ether
0x727e5ebe44e060db582081d0b82434b81700e653f91f12ee2e5a1907b451943f535131756 days 3 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.11811988 Ether
0xbc2d73b548334377f2a87a95df77b652d4c50b4fed20d855cba5686829b6d234535032956 days 7 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.1 Ether
0x98baf859ce5b53052f6f63d7092691bde89af6295023be2deb0ba919628605a7534999956 days 9 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef92 Ether
0x47994ef457d7e1a57aa5b7b73a8749f8c3eee3849518deaffe451d293ff3ce88534999656 days 9 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.18 Ether
0x9a64e2d45c881177ef87af3ed529d49bde9ead85020c3fecc78cddb5dc5814a2534984056 days 9 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.398 Ether
0x69b771dcc9c8ab52191bdd6302dd644f092b71cb1a4355d2d492b6927f5a0f56534869656 days 14 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.048 Ether
0xf4d5d93ac46231a38b5f2da4a8cb81c7cea7c9c1776a2cebb4c349b804176661534815156 days 16 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef91.5 Ether
0x93f8976ea58fa92bdd0ff09ca34bd22d8506f4a113c919afe6d36355548494f1534224757 days 16 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.27 Ether
0xd35bdbd6c1af84b7fe1ea8638498158c5227a9dbe070fb5ee3611a311dc6d410533669658 days 14 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef93 Ether
0x16a4f0e654af2904e51f59e455a4e3ab22206b7cae4aadb86ead11a46841a26d532659560 days 7 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.519139 Ether
0xa732f2de6cbfa3dca19fa8eba7f2b1f01573c3f188226adb98f831270890fec3531766461 days 19 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef91 Ether
0xb140481bf68097ab3efdb34a9971db5c37792a9c5ecbbfc3d37c018629c0f265531540562 days 4 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.029 Ether
0x80d05e2d4a348569920efae5057255b37cc13cc737b58a1ae98c7c2bf593121e529383665 days 18 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.12 Ether
0x26987172511efa3e609baa8d266ea53a7778f7f81fa619194aeb3f63e4eb5736529189966 days 2 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef90.0775 Ether
0x9b3ec5b22e19ab51d3f2f5d83d8e1904433216f3f22f92e0268a9634e2e01ff5528734466 days 21 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef9133.7 Ether
0xd24d069421bfde450326625fcda2be8981d7930597e7498a67bdf8ad5ff455a1528734266 days 21 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef910 Ether
0x1435c73828045e8da15a57abd175848e232abcf9adba8b38fad767b07308a03b527955968 days 4 hrs ago0x0d2424353d6650cd06b8b845f2f08e0436578d200xfcc5b18f1f51956e0abb411e7b86c76586ab4ef9200 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: Treasury
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant 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 constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

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

contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


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


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


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

}

contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) public constant returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

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) public returns (bool) {
    require(_to != address(0));

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

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

}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public constant 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 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 amount of tokens to be transferred
   */
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));

    uint256 _allowance = allowed[_from][msg.sender];

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

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

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   *
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param _owner address The address which owns the funds.
   * @param _spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

  /**
   * approve should be called when allowed[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   */
  function increaseApproval (address _spender, uint _addedValue)
    returns (bool success) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  function decreaseApproval (address _spender, uint _subtractedValue)
    returns (bool success) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

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

  bool public mintingFinished = false;


  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  /**
   * @dev Function to mint tokens
   * @param _to The address that will receive 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 public returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);
    Mint(_to, _amount);
    Transfer(0x0, _to, _amount);
    return true;
  }

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

contract Ballot {
    using SafeMath for uint256;
    EthearnalRepToken public tokenContract;

    // Date when vote has started
    uint256 public ballotStarted;

    // Registry of votes
    mapping(address => bool) public votesByAddress;

    // Sum of weights of YES votes
    uint256 public yesVoteSum = 0;

    // Sum of weights of NO votes
    uint256 public noVoteSum = 0;

    // Length of `voters`
    uint256 public votersLength = 0;

    uint256 public initialQuorumPercent = 51;

    VotingProxy public proxyVotingContract;

    // Tells if voting process is active
    bool public isVotingActive = false;

    event FinishBallot(uint256 _time);
    event Vote(address indexed sender, bytes vote);
    
    modifier onlyWhenBallotStarted {
        require(ballotStarted != 0);
        _;
    }

    function Ballot(address _tokenContract) {
        tokenContract = EthearnalRepToken(_tokenContract);
        proxyVotingContract = VotingProxy(msg.sender);
        ballotStarted = getTime();
        isVotingActive = true;
    }
    
    function getQuorumPercent() public constant returns (uint256) {
        require(isVotingActive);
        // find number of full weeks alapsed since voting started
        uint256 weeksNumber = getTime().sub(ballotStarted).div(1 weeks);
        if(weeksNumber == 0) {
            return initialQuorumPercent;
        }
        if (initialQuorumPercent < weeksNumber * 10) {
            return 0;
        } else {
            return initialQuorumPercent.sub(weeksNumber * 10);
        }
    }

    function vote(bytes _vote) public onlyWhenBallotStarted {
        require(_vote.length > 0);
        if (isDataYes(_vote)) {
            processVote(true);
        } else if (isDataNo(_vote)) {
            processVote(false);
        }
        Vote(msg.sender, _vote);
    }

    function isDataYes(bytes data) public constant returns (bool) {
        // compare data with "YES" string
        return (
            data.length == 3 &&
            (data[0] == 0x59 || data[0] == 0x79) &&
            (data[1] == 0x45 || data[1] == 0x65) &&
            (data[2] == 0x53 || data[2] == 0x73)
        );
    }

    // TESTED
    function isDataNo(bytes data) public constant returns (bool) {
        // compare data with "NO" string
        return (
            data.length == 2 &&
            (data[0] == 0x4e || data[0] == 0x6e) &&
            (data[1] == 0x4f || data[1] == 0x6f)
        );
    }
    
    function processVote(bool isYes) internal {
        require(isVotingActive);
        require(!votesByAddress[msg.sender]);
        votersLength = votersLength.add(1);
        uint256 voteWeight = tokenContract.balanceOf(msg.sender);
        if (isYes) {
            yesVoteSum = yesVoteSum.add(voteWeight);
        } else {
            noVoteSum = noVoteSum.add(voteWeight);
        }
        require(getTime().sub(tokenContract.lastMovement(msg.sender)) > 7 days);
        uint256 quorumPercent = getQuorumPercent();
        if (quorumPercent == 0) {
            isVotingActive = false;
        } else {
            decide();
        }
        votesByAddress[msg.sender] = true;
    }

    function decide() internal {
        uint256 quorumPercent = getQuorumPercent();
        uint256 quorum = quorumPercent.mul(tokenContract.totalSupply()).div(100);
        uint256 soFarVoted = yesVoteSum.add(noVoteSum);
        if (soFarVoted >= quorum) {
            uint256 percentYes = (100 * yesVoteSum).div(soFarVoted);
            if (percentYes >= initialQuorumPercent) {
                // does not matter if it would be greater than weiRaised
                proxyVotingContract.proxyIncreaseWithdrawalChunk();
                FinishBallot(now);
                isVotingActive = false;
            } else {
                // do nothing, just deactivate voting
                isVotingActive = false;
                FinishBallot(now);
            }
        }
        
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }
    
}

contract LockableToken is StandardToken, Ownable {
    bool public isLocked = true;
    mapping (address => uint256) public lastMovement;
    event Burn(address _owner, uint256 _amount);


    function unlock() public onlyOwner {
        isLocked = false;
    }

    function transfer(address _to, uint256 _amount) public returns (bool) {
        require(!isLocked);
        lastMovement[msg.sender] = getTime();
        lastMovement[_to] = getTime();
        return super.transfer(_to, _amount);
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(!isLocked);
        lastMovement[_from] = getTime();
        lastMovement[_to] = getTime();
        super.transferFrom(_from, _to, _value);
    }

    function approve(address _spender, uint256 _value) public returns (bool) {
        require(!isLocked);
        super.approve(_spender, _value);
    }

    function burnFrom(address _from, uint256 _value) public  returns (bool) {
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);
        balances[_from] = balances[_from].sub(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);

        totalSupply = totalSupply.sub(_value);
        Burn(_from, _value);
        return true;
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }

    function claimTokens(address _token) public onlyOwner {
        if (_token == 0x0) {
            owner.transfer(this.balance);
            return;
        }
    
        ERC20Basic token = ERC20Basic(_token);
        uint256 balance = token.balanceOf(this);
        token.transfer(owner, balance);
    }

}

contract EthearnalRepToken is MintableToken, LockableToken {
    string public constant name = 'Ethearnal Rep Token';
    string public constant symbol = 'ERT';
    uint8 public constant decimals = 18;
}

contract MultiOwnable {
    mapping (address => bool) public ownerRegistry;
    address[] owners;
    address public multiOwnableCreator = 0x0;

    function MultiOwnable() public {
        multiOwnableCreator = msg.sender;
    }

    function setupOwners(address[] _owners) public {
        // Owners are allowed to be set up only one time
        require(multiOwnableCreator == msg.sender);
        require(owners.length == 0);
        for(uint256 idx=0; idx < _owners.length; idx++) {
            require(
                !ownerRegistry[_owners[idx]] &&
                _owners[idx] != 0x0 &&
                _owners[idx] != address(this)
            );
            ownerRegistry[_owners[idx]] = true;
        }
        owners = _owners;
    }

    modifier onlyOwner() {
        require(ownerRegistry[msg.sender] == true);
        _;
    }

    function getOwners() public constant returns (address[]) {
        return owners;
    }
}

contract EthearnalRepTokenCrowdsale is MultiOwnable {
    using SafeMath for uint256;

    /* *********************
     * Variables & Constants
     */

    // Token Contract
    EthearnalRepToken public token;

    // Ethereum rate, how much USD does 1 ether cost
    // The actual value is set by setEtherRateUsd
    uint256 etherRateUsd = 1000;

    // Token price in Usd, 1 token is 1.0 USD, 3 decimals. So, 1000 = $1.000
    uint256 public tokenRateUsd = 1000;

    // Mainsale Start Date February 28, 2018 3:00:00 PM
    uint256 public constant saleStartDate = 1519830000;

    // Mainsale End Date March 31, 2018 11:59:59 PM GMT
    uint256 public constant saleEndDate = 1522540799;

    // How many tokens generate for the team, ratio with 3 decimals digits
    uint256 public constant teamTokenRatio = uint256(1 * 1000) / 3;

    // Crowdsale State
    enum State {
        BeforeMainSale, // pre-sale finisehd, before main sale
        MainSale, // main sale is active
        MainSaleDone, // main sale done, ICO is not finalized
        Finalized // the final state till the end of the world
    }

    // Hard cap for total sale
    uint256 public saleCapUsd = 30 * (10**6);

    // Money raised totally
    uint256 public weiRaised = 0;

    // This event means everything is finished and tokens
    // are allowed to be used by their owners
    bool public isFinalized = false;

    // Wallet to send team tokens
    address public teamTokenWallet = 0x0;

    // money received from each customer
    mapping(address => uint256) public raisedByAddress;

    // whitelisted investors
    mapping(address => bool) public whitelist;
    // how many whitelisted investors
    uint256 public whitelistedInvestorCounter;


    // Extra money each address can spend each hour
    uint256 hourLimitByAddressUsd = 1000;

    // Wallet to store all raised money
    Treasury public treasuryContract = Treasury(0x0);

    /* *******
     * Events
     */
    
    event ChangeReturn(address indexed recipient, uint256 amount);
    event TokenPurchase(address indexed buyer, uint256 weiAmount, uint256 tokenAmount);
    /* **************
     * Public methods
     */

    function EthearnalRepTokenCrowdsale(
        address[] _owners,
        address _treasuryContract,
        address _teamTokenWallet
    ) {
        require(_owners.length > 1);
        require(_treasuryContract != address(0));
        require(_teamTokenWallet != address(0));
        require(Treasury(_treasuryContract).votingProxyContract() != address(0));
        require(Treasury(_treasuryContract).tokenContract() != address(0));
        treasuryContract = Treasury(_treasuryContract);
        teamTokenWallet = _teamTokenWallet;
        setupOwners(_owners);
    }

    function() public payable {
        if (whitelist[msg.sender]) {
            buyForWhitelisted();
        } else {
            buyTokens();
        }
    }

    function setTokenContract(address _token) public onlyOwner {
        require(_token != address(0) && token == address(0));
        require(EthearnalRepToken(_token).owner() == address(this));
        require(EthearnalRepToken(_token).totalSupply() == 0);
        require(EthearnalRepToken(_token).isLocked());
        require(!EthearnalRepToken(_token).mintingFinished());
        token = EthearnalRepToken(_token);
    }

    function buyForWhitelisted() public payable {
        require(token != address(0));
        address whitelistedInvestor = msg.sender;
        require(whitelist[whitelistedInvestor]);
        uint256 weiToBuy = msg.value;
        require(weiToBuy > 0);
        uint256 tokenAmount = getTokenAmountForEther(weiToBuy);
        require(tokenAmount > 0);
        weiRaised = weiRaised.add(weiToBuy);
        raisedByAddress[whitelistedInvestor] = raisedByAddress[whitelistedInvestor].add(weiToBuy);
        forwardFunds(weiToBuy);
        assert(token.mint(whitelistedInvestor, tokenAmount));
        TokenPurchase(whitelistedInvestor, weiToBuy, tokenAmount);
    }

    function buyTokens() public payable {
        require(token != address(0));
        address recipient = msg.sender;
        State state = getCurrentState();
        uint256 weiToBuy = msg.value;
        require(
            (state == State.MainSale) &&
            (weiToBuy > 0)
        );
        weiToBuy = min(weiToBuy, getWeiAllowedFromAddress(recipient));
        require(weiToBuy > 0);
        weiToBuy = min(weiToBuy, convertUsdToEther(saleCapUsd).sub(weiRaised));
        require(weiToBuy > 0);
        uint256 tokenAmount = getTokenAmountForEther(weiToBuy);
        require(tokenAmount > 0);
        uint256 weiToReturn = msg.value.sub(weiToBuy);
        weiRaised = weiRaised.add(weiToBuy);
        raisedByAddress[recipient] = raisedByAddress[recipient].add(weiToBuy);
        if (weiToReturn > 0) {
            recipient.transfer(weiToReturn);
            ChangeReturn(recipient, weiToReturn);
        }
        forwardFunds(weiToBuy);
        require(token.mint(recipient, tokenAmount));
        TokenPurchase(recipient, weiToBuy, tokenAmount);
    }

    // TEST
    function finalizeByAdmin() public onlyOwner {
        finalize();
    }

    /* ****************
     * Internal methods
     */

    function forwardFunds(uint256 _weiToBuy) internal {
        treasuryContract.transfer(_weiToBuy);
    }

    // TESTED
    function convertUsdToEther(uint256 usdAmount) constant internal returns (uint256) {
        return usdAmount.mul(1 ether).div(etherRateUsd);
    }

    // TESTED
    function getTokenRateEther() public constant returns (uint256) {
        // div(1000) because 3 decimals in tokenRateUsd
        return convertUsdToEther(tokenRateUsd).div(1000);
    }

    // TESTED
    function getTokenAmountForEther(uint256 weiAmount) constant internal returns (uint256) {
        return weiAmount
            .div(getTokenRateEther())
            .mul(10 ** uint256(token.decimals()));
    }

    // TESTED
    function isReadyToFinalize() internal returns (bool) {
        return(
            (weiRaised >= convertUsdToEther(saleCapUsd)) ||
            (getCurrentState() == State.MainSaleDone)
        );
    }

    // TESTED
    function min(uint256 a, uint256 b) internal returns (uint256) {
        return (a < b) ? a: b;
    }

    // TESTED
    function max(uint256 a, uint256 b) internal returns (uint256) {
        return (a > b) ? a: b;
    }

    // TESTED
    function ceil(uint a, uint b) internal returns (uint) {
        return ((a.add(b).sub(1)).div(b)).mul(b);
    }

    // TESTED
    function getWeiAllowedFromAddress(address _sender) internal returns (uint256) {
        uint256 secondsElapsed = getTime().sub(saleStartDate);
        uint256 fullHours = ceil(secondsElapsed, 3600).div(3600);
        fullHours = max(1, fullHours);
        uint256 weiLimit = fullHours.mul(convertUsdToEther(hourLimitByAddressUsd));
        return weiLimit.sub(raisedByAddress[_sender]);
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }

    // TESTED
    function getCurrentState() internal returns (State) {
        return getStateForTime(getTime());
    }

    // TESTED
    function getStateForTime(uint256 unixTime) internal returns (State) {
        if (isFinalized) {
            // This could be before end date of ICO
            // if hard cap is reached
            return State.Finalized;
        }
        if (unixTime < saleStartDate) {
            return State.BeforeMainSale;
        }
        if (unixTime < saleEndDate) {
            return State.MainSale;
        }
        return State.MainSaleDone;
    }

    // TESTED
    function finalize() private {
        if (!isFinalized) {
            require(isReadyToFinalize());
            isFinalized = true;
            mintTeamTokens();
            token.unlock();
            treasuryContract.setCrowdsaleFinished();
        }
    }

    // TESTED
    function mintTeamTokens() private {
        // div by 1000 because of 3 decimals digits in teamTokenRatio
        uint256 tokenAmount = token.totalSupply().mul(teamTokenRatio).div(1000);
        token.mint(teamTokenWallet, tokenAmount);
    }


    function whitelistInvestor(address _newInvestor) public onlyOwner {
        if(!whitelist[_newInvestor]) {
            whitelist[_newInvestor] = true;
            whitelistedInvestorCounter++;
        }
    }
    function whitelistInvestors(address[] _investors) external onlyOwner {
        require(_investors.length <= 250);
        for(uint8 i=0; i<_investors.length;i++) {
            address newInvestor = _investors[i];
            if(!whitelist[newInvestor]) {
                whitelist[newInvestor] = true;
                whitelistedInvestorCounter++;
            }
        }
    }
    function blacklistInvestor(address _investor) public onlyOwner {
        if(whitelist[_investor]) {
            delete whitelist[_investor];
            if(whitelistedInvestorCounter != 0) {
                whitelistedInvestorCounter--;
            }
        }
    }

    function claimTokens(address _token, address _to) public onlyOwner {
        if (_token == 0x0) {
            _to.transfer(this.balance);
            return;
        }
    
        ERC20Basic token = ERC20Basic(_token);
        uint256 balance = token.balanceOf(this);
        token.transfer(_to, balance);
    }

}

contract RefundInvestorsBallot {

    using SafeMath for uint256;
    EthearnalRepToken public tokenContract;

    // Date when vote has started
    uint256 public ballotStarted;

    // Registry of votes
    mapping(address => bool) public votesByAddress;

    // Sum of weights of YES votes
    uint256 public yesVoteSum = 0;

    // Sum of weights of NO votes
    uint256 public noVoteSum = 0;

    // Length of `voters`
    uint256 public votersLength = 0;

    uint256 public initialQuorumPercent = 51;

    VotingProxy public proxyVotingContract;

    // Tells if voting process is active
    bool public isVotingActive = false;
    uint256 public requiredMajorityPercent = 65;

    event FinishBallot(uint256 _time);
    event Vote(address indexed sender, bytes vote);
    
    modifier onlyWhenBallotStarted {
        require(ballotStarted != 0);
        _;
    }

    function vote(bytes _vote) public onlyWhenBallotStarted {
        require(_vote.length > 0);
        if (isDataYes(_vote)) {
            processVote(true);
        } else if (isDataNo(_vote)) {
            processVote(false);
        }
        Vote(msg.sender, _vote);
    }

    function isDataYes(bytes data) public constant returns (bool) {
        // compare data with "YES" string
        return (
            data.length == 3 &&
            (data[0] == 0x59 || data[0] == 0x79) &&
            (data[1] == 0x45 || data[1] == 0x65) &&
            (data[2] == 0x53 || data[2] == 0x73)
        );
    }

    // TESTED
    function isDataNo(bytes data) public constant returns (bool) {
        // compare data with "NO" string
        return (
            data.length == 2 &&
            (data[0] == 0x4e || data[0] == 0x6e) &&
            (data[1] == 0x4f || data[1] == 0x6f)
        );
    }
    
    function processVote(bool isYes) internal {
        require(isVotingActive);
        require(!votesByAddress[msg.sender]);
        votersLength = votersLength.add(1);
        uint256 voteWeight = tokenContract.balanceOf(msg.sender);
        if (isYes) {
            yesVoteSum = yesVoteSum.add(voteWeight);
        } else {
            noVoteSum = noVoteSum.add(voteWeight);
        }
        require(getTime().sub(tokenContract.lastMovement(msg.sender)) > 7 days);
        uint256 quorumPercent = getQuorumPercent();
        if (quorumPercent == 0) {
            isVotingActive = false;
        } else {
            decide();
        }
        votesByAddress[msg.sender] = true;
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }

    function RefundInvestorsBallot(address _tokenContract) {
        tokenContract = EthearnalRepToken(_tokenContract);
        proxyVotingContract = VotingProxy(msg.sender);
        ballotStarted = getTime();
        isVotingActive = true;
    }

    function decide() internal {
        uint256 quorumPercent = getQuorumPercent();
        uint256 quorum = quorumPercent.mul(tokenContract.totalSupply()).div(100);
        uint256 soFarVoted = yesVoteSum.add(noVoteSum);
        if (soFarVoted >= quorum) {
            uint256 percentYes = (100 * yesVoteSum).div(soFarVoted);
            if (percentYes >= requiredMajorityPercent) {
                // does not matter if it would be greater than weiRaised
                proxyVotingContract.proxyEnableRefunds();
                FinishBallot(now);
                isVotingActive = false;
            } else {
                // do nothing, just deactivate voting
                isVotingActive = false;
            }
        }
    }
    
    function getQuorumPercent() public constant returns (uint256) {
        uint256 isMonthPassed = getTime().sub(ballotStarted).div(5 weeks);
        if(isMonthPassed == 1){
            return 0;
        }
        return initialQuorumPercent;
    }
    
}

contract Treasury is MultiOwnable {
    using SafeMath for uint256;

    // Total amount of ether withdrawed
    uint256 public weiWithdrawed = 0;

    // Total amount of ther unlocked
    uint256 public weiUnlocked = 0;

    // Wallet withdraw is locked till end of crowdsale
    bool public isCrowdsaleFinished = false;

    // Withdrawed team funds go to this wallet
    address teamWallet = 0x0;

    // Crowdsale contract address
    EthearnalRepTokenCrowdsale public crowdsaleContract;
    EthearnalRepToken public tokenContract;
    bool public isRefundsEnabled = false;

    // Amount of ether that could be withdrawed each withdraw iteration
    uint256 public withdrawChunk = 0;
    VotingProxy public votingProxyContract;
    uint256 public refundsIssued = 0;
    uint256 public percentLeft = 0;


    event Deposit(uint256 amount);
    event Withdraw(uint256 amount);
    event UnlockWei(uint256 amount);
    event RefundedInvestor(address indexed investor, uint256 amountRefunded, uint256 tokensBurn);

    function Treasury(address _teamWallet) public {
        require(_teamWallet != 0x0);
        // TODO: check address integrity
        teamWallet = _teamWallet;
    }

    // TESTED
    function() public payable {
        require(msg.sender == address(crowdsaleContract));
        Deposit(msg.value);
    }

    function setVotingProxy(address _votingProxyContract) public onlyOwner {
        require(votingProxyContract == address(0x0));
        votingProxyContract = VotingProxy(_votingProxyContract);
    }

    // TESTED
    function setCrowdsaleContract(address _address) public onlyOwner {
        // Could be set only once
        require(crowdsaleContract == address(0x0));
        require(_address != 0x0);
        crowdsaleContract = EthearnalRepTokenCrowdsale(_address); 
    }

    function setTokenContract(address _address) public onlyOwner {
        // Could be set only once
        require(tokenContract == address(0x0));
        require(_address != 0x0);
        tokenContract = EthearnalRepToken(_address);
    }

    // TESTED
    function setCrowdsaleFinished() public {
        require(crowdsaleContract != address(0x0));
        require(msg.sender == address(crowdsaleContract));
        withdrawChunk = getWeiRaised().div(10);
        weiUnlocked = withdrawChunk;
        isCrowdsaleFinished = true;
    }

    // TESTED
    function withdrawTeamFunds() public onlyOwner {
        require(isCrowdsaleFinished);
        require(weiUnlocked > weiWithdrawed);
        uint256 toWithdraw = weiUnlocked.sub(weiWithdrawed);
        weiWithdrawed = weiUnlocked;
        teamWallet.transfer(toWithdraw);
        Withdraw(toWithdraw);
    }

    function getWeiRaised() public constant returns(uint256) {
       return crowdsaleContract.weiRaised();
    }

    function increaseWithdrawalChunk() {
        require(isCrowdsaleFinished);
        require(msg.sender == address(votingProxyContract));
        weiUnlocked = weiUnlocked.add(withdrawChunk);
        UnlockWei(weiUnlocked);
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }

    function enableRefunds() public {
        require(msg.sender == address(votingProxyContract));
        isRefundsEnabled = true;
    }
    
    function refundInvestor(uint256 _tokensToBurn) public {
        require(isRefundsEnabled);
        require(address(tokenContract) != address(0x0));
        if (refundsIssued == 0) {
            percentLeft = percentLeftFromTotalRaised().mul(100*1000).div(1 ether);
        }
        uint256 tokenRate = crowdsaleContract.getTokenRateEther();
        uint256 toRefund = tokenRate.mul(_tokensToBurn).div(1 ether);
        
        toRefund = toRefund.mul(percentLeft).div(100*1000);
        require(toRefund > 0);
        tokenContract.burnFrom(msg.sender, _tokensToBurn);
        msg.sender.transfer(toRefund);
        refundsIssued = refundsIssued.add(1);
        RefundedInvestor(msg.sender, toRefund, _tokensToBurn);
    }

    function percentLeftFromTotalRaised() public constant returns(uint256) {
        return percent(this.balance, getWeiRaised(), 18);
    }

    function percent(uint numerator, uint denominator, uint precision) internal constant returns(uint quotient) {
        // caution, check safe-to-multiply here
        uint _numerator  = numerator * 10 ** (precision+1);
        // with rounding of last digit
        uint _quotient =  ((_numerator / denominator) + 5) / 10;
        return ( _quotient);
    }

    function claimTokens(address _token, address _to) public onlyOwner {    
        ERC20Basic token = ERC20Basic(_token);
        uint256 balance = token.balanceOf(this);
        token.transfer(_to, balance);
    }
}

contract VotingProxy is Ownable {
    using SafeMath for uint256;    
    Treasury public treasuryContract;
    EthearnalRepToken public tokenContract;
    Ballot public currentIncreaseWithdrawalTeamBallot;
    RefundInvestorsBallot public currentRefundInvestorsBallot;

    function  VotingProxy(address _treasuryContract, address _tokenContract) {
        treasuryContract = Treasury(_treasuryContract);
        tokenContract = EthearnalRepToken(_tokenContract);
    }

    function startincreaseWithdrawalTeam() onlyOwner {
        require(treasuryContract.isCrowdsaleFinished());
        require(address(currentRefundInvestorsBallot) == 0x0 || currentRefundInvestorsBallot.isVotingActive() == false);
        if(address(currentIncreaseWithdrawalTeamBallot) == 0x0) {
            currentIncreaseWithdrawalTeamBallot =  new Ballot(tokenContract);
        } else {
            require(getDaysPassedSinceLastTeamFundsBallot() > 2);
            currentIncreaseWithdrawalTeamBallot =  new Ballot(tokenContract);
        }
    }

    function startRefundInvestorsBallot() public {
        require(treasuryContract.isCrowdsaleFinished());
        require(address(currentIncreaseWithdrawalTeamBallot) == 0x0 || currentIncreaseWithdrawalTeamBallot.isVotingActive() == false);
        if(address(currentRefundInvestorsBallot) == 0x0) {
            currentRefundInvestorsBallot =  new RefundInvestorsBallot(tokenContract);
        } else {
            require(getDaysPassedSinceLastRefundBallot() > 2);
            currentRefundInvestorsBallot =  new RefundInvestorsBallot(tokenContract);
        }
    }

    function getDaysPassedSinceLastRefundBallot() public constant returns(uint256) {
        return getTime().sub(currentRefundInvestorsBallot.ballotStarted()).div(1 days);
    }

    function getDaysPassedSinceLastTeamFundsBallot() public constant returns(uint256) {
        return getTime().sub(currentIncreaseWithdrawalTeamBallot.ballotStarted()).div(1 days);
    }

    function proxyIncreaseWithdrawalChunk() public {
        require(msg.sender == address(currentIncreaseWithdrawalTeamBallot));
        treasuryContract.increaseWithdrawalChunk();
    }

    function proxyEnableRefunds() public {
        require(msg.sender == address(currentRefundInvestorsBallot));
        treasuryContract.enableRefunds();
    }

    function() {
        revert();
    }

    function getTime() internal returns (uint256) {
        // Just returns `now` value
        // This function is redefined in EthearnalRepTokenCrowdsaleMock contract
        // to allow testing contract behaviour at different time moments
        return now;
    }

    function claimTokens(address _token) public onlyOwner {
        if (_token == 0x0) {
            owner.transfer(this.balance);
            return;
        }
    
        ERC20Basic token = ERC20Basic(_token);
        uint256 balance = token.balanceOf(this);
        token.transfer(owner, balance);
    }

}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ownerRegistry","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owners","type":"address[]"}],"name":"setupOwners","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWeiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiWithdrawed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setCrowdsaleContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setCrowdsaleFinished","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"}],"name":"claimTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"multiOwnableCreator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_votingProxyContract","type":"address"}],"name":"setVotingProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"refundsIssued","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"percentLeftFromTotalRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"enableRefunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokensToBurn","type":"uint256"}],"name":"refundInvestor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawTeamFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"withdrawChunk","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOwners","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"votingProxyContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isCrowdsaleFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setTokenContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"increaseWithdrawalChunk","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"percentLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiUnlocked","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isRefundsEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_teamWallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"UnlockWei","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"investor","type":"address"},{"indexed":false,"name":"amountRefunded","type":"uint256"},{"indexed":false,"name":"tokensBurn","type":"uint256"}],"name":"RefundedInvestor","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260028054600160a060020a031916905560006003819055600481905560058054600160a860020a03191690556007805460a060020a60ff02191690556008819055600a819055600b55341561005857600080fd5b6040516020806110578339810160405280805160028054600160a060020a03191633600160a060020a039081169190911790915590925082161515905061009e57600080fd5b60058054600160a060020a039092166101000261010060a860020a0319909216919091179055610f84806100d36000396000f30060606040526004361061012f5763ffffffff60e060020a60003504166313e0e70d811461017f5780632433c978146101b2578063316163951461020357806340582f13146102325780634a3d239c1461025757806355a373d61461026a5780636596cff31461027d57806366cd06631461029c57806369ffa08a146102af5780636b263efa146102d45780636c4d4f21146102e757806376b333671461030657806383c10844146103195780638c52dc411461032c5780638df104691461033f5780639ee04661146103555780639faec92714610368578063a0e67e2b1461037b578063a9f8792e146103e1578063aa56c8e7146103f4578063bbcd5bbe14610407578063d36bf8a114610426578063d53b932a14610439578063defbc0731461044c578063fdcd0a181461045f575b60065433600160a060020a0390811691161461014a57600080fd5b7f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e384263460405190815260200160405180910390a1005b341561018a57600080fd5b61019e600160a060020a0360043516610472565b604051901515815260200160405180910390f35b34156101bd57600080fd5b610201600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061048795505050505050565b005b341561020e57600080fd5b6102166105c0565b604051600160a060020a03909116815260200160405180910390f35b341561023d57600080fd5b6102456105cf565b60405190815260200160405180910390f35b341561026257600080fd5b610245610639565b341561027557600080fd5b61021661063f565b341561028857600080fd5b610201600160a060020a036004351661064e565b34156102a757600080fd5b6102016106d2565b34156102ba57600080fd5b610201600160a060020a0360043581169060243516610734565b34156102df57600080fd5b610216610854565b34156102f257600080fd5b610201600160a060020a0360043516610863565b341561031157600080fd5b6102456108d2565b341561032457600080fd5b6102456108d8565b341561033757600080fd5b6102016108fc565b341561034a57600080fd5b61020160043561094e565b341561036057600080fd5b610201610b80565b341561037357600080fd5b610245610c57565b341561038657600080fd5b61038e610c5d565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156103cd5780820151838201526020016103b5565b505050509050019250505060405180910390f35b34156103ec57600080fd5b610216610cc5565b34156103ff57600080fd5b61019e610cd4565b341561041257600080fd5b610201600160a060020a0360043516610cdd565b341561043157600080fd5b610201610d61565b341561044457600080fd5b610245610ddc565b341561045757600080fd5b610245610de2565b341561046a57600080fd5b61019e610de8565b60006020819052908152604090205460ff1681565b60025460009033600160a060020a039081169116146104a557600080fd5b600154156104b257600080fd5b5060005b81518110156105a8576000808383815181106104ce57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff1615801561051f575081818151811061050957fe5b90602001906020020151600160a060020a031615155b8015610552575030600160a060020a031682828151811061053c57fe5b90602001906020020151600160a060020a031614155b151561055d57600080fd5b600160008084848151811061056e57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff19169115159190911790556001016104b6565b60018280516105bb929160200190610ea1565b505050565b600654600160a060020a031681565b600654600090600160a060020a0316634042b66f82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561061957600080fd5b6102c65a03f1151561062a57600080fd5b50505060405180519150505b90565b60035481565b600754600160a060020a031681565b600160a060020a03331660009081526020819052604090205460ff16151560011461067857600080fd5b600654600160a060020a03161561068e57600080fd5b600160a060020a03811615156106a357600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600654600160a060020a031615156106e957600080fd5b60065433600160a060020a0390811691161461070457600080fd5b61071d600a6107116105cf565b9063ffffffff610e0916565b60088190556004556005805460ff19166001179055565b600160a060020a033316600090815260208190526040812054819060ff16151560011461076057600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156107ba57600080fd5b6102c65a03f115156107cb57600080fd5b5050506040518051915050600160a060020a03821663a9059cbb848360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561083357600080fd5b6102c65a03f1151561084457600080fd5b5050506040518051505050505050565b600254600160a060020a031681565b600160a060020a03331660009081526020819052604090205460ff16151560011461088d57600080fd5b600954600160a060020a0316156108a357600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a5481565b60006108f730600160a060020a0316316108f06105cf565b6012610e20565b905090565b60095433600160a060020a0390811691161461091757600080fd5b6007805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600754600090819074010000000000000000000000000000000000000000900460ff16151561097c57600080fd5b600754600160a060020a0316151561099357600080fd5b600a5415156109c7576109c3670de0b6b3a7640000610711620186a06109b76108d8565b9063ffffffff610e5516565b600b555b600654600160a060020a031663d4d426586000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a0f57600080fd5b6102c65a03f11515610a2057600080fd5b50505060405180519250610a489050670de0b6b3a7640000610711848663ffffffff610e5516565b9050610a66620186a0610711600b5484610e5590919063ffffffff16565b905060008111610a7557600080fd5b600754600160a060020a03166379cc6790338560006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ad457600080fd5b6102c65a03f11515610ae557600080fd5b50505060405180515050600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610b2057600080fd5b600a54610b3490600163ffffffff610e8016565b600a55600160a060020a0333167f8eaa8d4fa63880d574aa605519b0d1ce9ab317ccede2ae2d2a5aec3a4086636e828560405191825260208201526040908101905180910390a2505050565b600160a060020a03331660009081526020819052604081205460ff161515600114610baa57600080fd5b60055460ff161515610bbb57600080fd5b60035460045411610bcb57600080fd5b600354600454610be09163ffffffff610e8f16565b6004546003556005549091506101009004600160a060020a03166108fc82150282604051600060405180830381858888f193505050501515610c2157600080fd5b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d8160405190815260200160405180910390a150565b60085481565b610c65610f15565b6001805480602002602001604051908101604052809291908181526020018280548015610cbb57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610c9d575b5050505050905090565b600954600160a060020a031681565b60055460ff1681565b600160a060020a03331660009081526020819052604090205460ff161515600114610d0757600080fd5b600754600160a060020a031615610d1d57600080fd5b600160a060020a0381161515610d3257600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055460ff161515610d7257600080fd5b60095433600160a060020a03908116911614610d8d57600080fd5b600854600454610da29163ffffffff610e8016565b60048190557fa20e2525ca58e64ddb896095520731e51d0eb6cfb28a971154cdd553631aed0e9060405190815260200160405180910390a1565b600b5481565b60045481565b60075474010000000000000000000000000000000000000000900460ff1681565b6000808284811515610e1757fe5b04949350505050565b600080600083600101600a0a86029150600a8583811515610e3d57fe5b04600501811515610e4a57fe5b049695505050505050565b6000828202831580610e715750828482811515610e6e57fe5b04145b1515610e7957fe5b9392505050565b600082820183811015610e7957fe5b600082821115610e9b57fe5b50900390565b828054828255906000526020600020908101928215610f05579160200282015b82811115610f05578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039190911617825560209290920191600190910190610ec1565b50610f11929150610f27565b5090565b60206040519081016040526000815290565b61063691905b80821115610f1157805473ffffffffffffffffffffffffffffffffffffffff19168155600101610f2d5600a165627a7a7230582089c14201c2c0d79cac904a25b9510483521d3a150bea06bab9a2be71d5209ab100290000000000000000000000000016c35b388436eb00d78a3c05137bd161275743

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

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 0000000000000000000000000016c35b388436eb00d78a3c05137bd161275743


   Swarm Source:
bzzr://89c14201c2c0d79cac904a25b9510483521d3a150bea06bab9a2be71d5209ab1

 

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.