Sponsored Link:  Presearch [ ICO ]The Decentralized Search Engine.
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 1 txn
  Latest 1 txn

TxHash Block Age From To Value [TxFee]
0x4bb5864cf187ab4614dcc1a1afa62ea9d4179a14a10b6286bb5672e0aae9d8cf376054263 days 44 mins ago0x0087689c187e05714fa86044d8683b52f889a1f5  IN   0x4cb539ca29bc14c9d0a6d6872fd0d4efb56b6b071,100 Ether0.00102551
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x4bb5864cf187ab4614dcc1a1afa62ea9d4179a14a10b6286bb5672e0aae9d8cf376054263 days 44 mins ago0x4cb539ca29bc14c9d0a6d6872fd0d4efb56b6b070x97282a7a15f9beadc854e8793aae43b089f14b4e1,100 Ether
0x4d85cf94bf20fad4a319eecdccaedca35d594673548af21f717109eef78d9a1d375944263 days 5 hrs ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a2  Contract Creation0 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) Solidity compiler bugs.

Contract Source Code Verified
Note: Displaying matching verified source code at contract 0xf2b7f622bbd7edffca61a74fe9b6efda54f40a76
Contract Name: Presale
Compiler Version: v0.4.9+commit.364da425
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.4;

/**
 * @title Contract for object that have an owner
 */
contract Owned {
    /**
     * Contract owner address
     */
    address public owner;

    /**
     * @dev Delegate contract to another person
     * @param _owner New owner address 
     */
    function setOwner(address _owner) onlyOwner
    { owner = _owner; }

    /**
     * @dev Owner check modifier
     */
    modifier onlyOwner { if (msg.sender != owner) throw; _; }
}

/**
 * @title Common pattern for destroyable contracts 
 */
contract Destroyable {
    address public hammer;

    /**
     * @dev Hammer setter
     * @param _hammer New hammer address
     */
    function setHammer(address _hammer) onlyHammer
    { hammer = _hammer; }

    /**
     * @dev Destroy contract and scrub a data
     * @notice Only hammer can call it 
     */
    function destroy() onlyHammer
    { suicide(msg.sender); }

    /**
     * @dev Hammer check modifier
     */
    modifier onlyHammer { if (msg.sender != hammer) throw; _; }
}

/**
 * @title Generic owned destroyable contract
 */
contract Object is Owned, Destroyable {
    function Object() {
        owner  = msg.sender;
        hammer = msg.sender;
    }
}

// Standard token interface (ERC 20)
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 
{
// Functions:
    /// @return total amount of tokens
    uint256 public totalSupply;

    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
    function balanceOf(address _owner) constant returns (uint256);

    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _value) returns (bool);

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint256 _value) returns (bool);

    /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _value The amount of wei to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(address _spender, uint256 _value) returns (bool);

    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) constant returns (uint256);

// Events:
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

contract Presale is Object {
    ERC20   public token;
    uint256 public bounty;
    uint256 public donation;

    /**
     * @dev Presale contract constructor
     * @param _token Bounty token address
     * @param _bounty Bount value by donation
     * @param _donation Donation value
     */
    function Presale(address _token, uint256 _bounty, uint256 _donation) {
        token    = ERC20(_token);
        bounty   = _bounty;
        donation = _donation;
    }

    /**
     * @dev Cancel presale contract by owner, bounty refunded to owner
     */
    function cancel() onlyOwner {
        if (!token.transfer(owner, bounty)) throw;
    }

    /**
    * @dev Accept presale contract,
    *      bounty transfered to sender - donation to owner
    */
    function () payable {
        if (msg.value != donation) throw;
        if (!token.transfer(msg.sender, bounty)) throw;
        if (!owner.send(msg.value)) throw;
    }
}

  Contract ABI  
[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"hammer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"donation","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"bounty","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hammer","type":"address"}],"name":"setHammer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"cancel","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_bounty","type":"uint256"},{"name":"_donation","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b6040516060806104c68339810160409081528151602083015191909201515b5b60008054600160a060020a033316600160a060020a031991821681179092556001805490911690911790555b60028054600160a060020a031916600160a060020a038516179055600382905560048190555b5050505b610435806100916000396000f3006060604052361561007d5763ffffffff60e060020a60003504166313af4035811461014b578063457f4d411461016957806383197ef0146101955780638da5cb5b146101a75780638edeb15d146101d3578063943dfef1146101f5578063d31fdffd14610217578063ea8a1af014610235578063fc0c546a14610247575b6101495b600454341461008f57610000565b6002546003546040805160006020918201819052825160e060020a63a9059cbb028152600160a060020a03338116600483015260248201959095529251939094169363a9059cbb936044808501949192918390030190829087803b15156100f257fe5b60325a03f115156100ff57fe5b5050604051511515905061011257610000565b60008054604051600160a060020a03909116913480156108fc02929091818181858888f19350505050151561014657610000565b5b565b005b341561015357fe5b610149600160a060020a0360043516610273565b005b341561017157fe5b6101796102bb565b60408051600160a060020a039092168252519081900360200190f35b341561019d57fe5b6101496102ca565b005b34156101af57fe5b6101796102f4565b60408051600160a060020a039092168252519081900360200190f35b34156101db57fe5b6101e3610303565b60408051918252519081900360200190f35b34156101fd57fe5b6101e3610309565b60408051918252519081900360200190f35b341561021f57fe5b610149600160a060020a036004351661030f565b005b341561023d57fe5b610149610357565b005b341561024f57fe5b6101796103fa565b60408051600160a060020a039092168252519081900360200190f35b60005433600160a060020a0390811691161461028e57610000565b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600154600160a060020a031681565b60015433600160a060020a039081169116146102e557610000565b33600160a060020a0316ff5b5b565b600054600160a060020a031681565b60045481565b60035481565b60015433600160a060020a0390811691161461032a57610000565b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60005433600160a060020a0390811691161461037257610000565b60025460008054600354604080516020908101859052815160e060020a63a9059cbb028152600160a060020a03948516600482015260248101939093529051929094169363a9059cbb9360448084019492938390030190829087803b15156103d657fe5b60325a03f115156103e357fe5b5050604051511515905061014657610000565b5b5b565b600254600160a060020a0316815600a165627a7a723058208b27b7aad427e1124da1641e0197ddc2036d61c7c8356b2f6a9c8c0d35fdaed4002900000000000000000000000051631ca4de390fa01818aaa331fc5b55e82fd59400000000000000000000000000000000000000000000000000000000000284880000000000000000000000000000000000000000000000001e87f85809dc0000

   Swarm Source:
bzzr://8b27b7aad427e1124da1641e0197ddc2036d61c7c8356b2f6a9c8c0d35fdaed4
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.