Sponsored Link: Join FundYourselfNow ICO – Crypto crowdfunding platform to find talent, raise funding while protecting project fraud
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 4 txns
  Latest 4 txns

TxHash Block Age From To Value [TxFee]
0x11841547e457cc63e6fd2e0457dd3f06c0c80faebf4e9e60db10179416db696f378744027 days 22 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20 Ether0.00057342
0x6981ed5431f99a7386cd51b078cd184c771e5991d14e9e06b88eb127bd2170e7372080940 days 3 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20 Ether0.0008477
0x990738c14f266f7f2bb27460a6da2fa97d35188a603c575587fa2f482c36cefd372080940 days 3 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20 Ether0.00087342
0x7cbafb2f1ad2256aa60362560d6a1dbd3311ec4bb225cbd3b2332769ac6c4baf372077640 days 3 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN    Contract Creation0 Ether0.01537272

[Download: CSV Export ]    
 Internal Transactions as a result of Contract Execution
  Latest 9 Internal Transactions

ParentTxHash Block Age From To Value
0x4d85cf94bf20fad4a319eecdccaedca35d594673548af21f717109eef78d9a1d375944233 days 1 hr ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a2  Contract Creation0 Ether
0x4d85cf94bf20fad4a319eecdccaedca35d594673548af21f717109eef78d9a1d375944233 days 1 hr ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20x4af013afbadb22d8a88c92d68fc96b033b9ebb8a0.1 Ether
0x4d85cf94bf20fad4a319eecdccaedca35d594673548af21f717109eef78d9a1d375944233 days 1 hr ago0x97282a7a15f9beadc854e8793aae43b089f14b4e0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20.1 Ether
0x134cd7cc97e28c8b68bde4d756d73bdbfe445ee72cc2334012d08cf382433217372669039 days 1 hr ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a2  Contract Creation0 Ether
0x134cd7cc97e28c8b68bde4d756d73bdbfe445ee72cc2334012d08cf382433217372669039 days 1 hr ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20x4af013afbadb22d8a88c92d68fc96b033b9ebb8a0.1 Ether
0x134cd7cc97e28c8b68bde4d756d73bdbfe445ee72cc2334012d08cf382433217372669039 days 1 hr ago0x97282a7a15f9beadc854e8793aae43b089f14b4e0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20.1 Ether
0x4602bd2e64d9fc0dba6c1947fa30b4484c085fc59821b1ebc78f28e08c6f76dc372265139 days 19 hrs ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a2  Contract Creation0 Ether
0x4602bd2e64d9fc0dba6c1947fa30b4484c085fc59821b1ebc78f28e08c6f76dc372265139 days 19 hrs ago0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20x4af013afbadb22d8a88c92d68fc96b033b9ebb8a0.1 Ether
0x4602bd2e64d9fc0dba6c1947fa30b4484c085fc59821b1ebc78f28e08c6f76dc372265139 days 19 hrs ago0x97282a7a15f9beadc854e8793aae43b089f14b4e0x4c3c6f5f2ef44f5e2ffcf6c20b906a91d246c9a20.1 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
Contract Name: BuilderPresale
Compiler Version: v0.4.9+commit.364da425
Optimization Enabled: Yes
Online Solidity Editor:  -NA-



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

library CreatorPresale {
    function create(address _token, uint256 _bounty, uint256 _donation) returns (Presale)
    { return new Presale(_token, _bounty, _donation); }

    function version() constant returns (string)
    { return "v0.6.3"; }

    function abi() constant returns (string)
    { return '[{"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"}]'; }
}

/**
 * @title Builder based contract
 */
contract Builder is Object {
    /**
     * @dev this event emitted for every builded contract
     */
    event Builded(address indexed client, address indexed instance);
 
    /* Addresses builded contracts at sender */
    mapping(address => address[]) public getContractsOf;
 
    /**
     * @dev Get last address
     * @return last address contract
     */
    function getLastContract() constant returns (address) {
        var sender_contracts = getContractsOf[msg.sender];
        return sender_contracts[sender_contracts.length - 1];
    }

    /* Building beneficiary */
    address public beneficiary;

    /**
     * @dev Set beneficiary
     * @param _beneficiary is address of beneficiary
     */
    function setBeneficiary(address _beneficiary) onlyOwner
    { beneficiary = _beneficiary; }

    /* Building cost  */
    uint public buildingCostWei;

    /**
     * @dev Set building cost
     * @param _buildingCostWei is cost
     */
    function setCost(uint _buildingCostWei) onlyOwner
    { buildingCostWei = _buildingCostWei; }

    /* Security check report */
    string public securityCheckURI;

    /**
     * @dev Set security check report URI
     * @param _uri is an URI to report
     */
    function setSecurityCheck(string _uri) onlyOwner
    { securityCheckURI = _uri; }
}
//
// AIRA Builder for Congress contract
//
contract BuilderPresale is Builder {
    /**
     * @dev Run script creation contract
     * @return address new contract
     */
    function create(address _token,
                    uint256 _bounty,
                    uint256 _donation,
                    address _client) payable returns (address) {
        if (buildingCostWei > 0 && beneficiary != 0) {
            // Too low value
            if (msg.value < buildingCostWei) throw;
            // Beneficiary send
            if (!beneficiary.send(buildingCostWei)) throw;
            // Refund
            if (msg.value > buildingCostWei) {
                if (!msg.sender.send(msg.value - buildingCostWei)) throw;
            }
        } else {
            // Refund all
            if (msg.value > 0) {
                if (!msg.sender.send(msg.value)) throw;
            }
        }

        if (_client == 0)
            _client = msg.sender;
 
        var inst = CreatorPresale.create(_token, _bounty, _donation);
        inst.setOwner(_client);
        inst.setHammer(_client);
        getContractsOf[_client].push(inst);
        Builded(_client, inst);
        return inst;
    }
}

  Contract ABI  
[{"constant":false,"inputs":[{"name":"_uri","type":"string"}],"name":"setSecurityCheck","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_buildingCostWei","type":"uint256"}],"name":"setCost","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"hammer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"buildingCostWei","outputs":[{"name":"","type":"uint256"}],"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":false,"inputs":[{"name":"_token","type":"address"},{"name":"_bounty","type":"uint256"},{"name":"_donation","type":"uint256"},{"name":"_client","type":"address"}],"name":"create","outputs":[{"name":"","type":"address"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"getLastContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hammer","type":"address"}],"name":"setHammer","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"getContractsOf","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"securityCheckURI","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"address"},{"indexed":true,"name":"instance","type":"address"}],"name":"Builded","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040525b60008054600160a060020a033316600160a060020a031991821681179092556001805490911690911790555b5b6109e6806100416000396000f300606060405236156100b45763ffffffff60e060020a60003504166303ca71d681146100b657806313af40351461010e5780631c31f7101461012c57806338af3eed1461014a57806344a0d68a14610176578063457f4d411461018b5780636e942f82146101b757806383197ef0146101d95780638da5cb5b146101eb578063a5d048d314610217578063c53833fe14610255578063d31fdffd14610281578063f70532fe1461029f578063fdc37c85146102da575bfe5b34156100be57fe5b61010c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061036a95505050505050565b005b341561011657fe5b61010c600160a060020a036004351661039e565b005b341561013457fe5b61010c600160a060020a03600435166103d9565b005b341561015257fe5b61015a610414565b60408051600160a060020a039092168252519081900360200190f35b341561017e57fe5b61010c600435610423565b005b341561019357fe5b61015a610448565b60408051600160a060020a039092168252519081900360200190f35b34156101bf57fe5b6101c7610457565b60408051918252519081900360200190f35b34156101e157fe5b61010c61045d565b005b34156101f357fe5b61015a610487565b60408051600160a060020a039092168252519081900360200190f35b61015a600160a060020a03600435811690602435906044359060643516610496565b60408051600160a060020a039092168252519081900360200190f35b341561025d57fe5b61015a610794565b60408051600160a060020a039092168252519081900360200190f35b341561028957fe5b61010c600160a060020a03600435166107e5565b005b34156102a757fe5b61015a600160a060020a0360043516602435610820565b60408051600160a060020a039092168252519081900360200190f35b34156102e257fe5b6102ea610862565b604080516020808252835181830152835191928392908301918501908083838215610330575b80518252602083111561033057601f199092019160209182019101610310565b505050905090810190601f16801561035c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60005433600160a060020a0390811691161461038557610000565b80516103989060059060208401906108f0565b505b5b50565b60005433600160a060020a039081169116146103b957610000565b60008054600160a060020a031916600160a060020a0383161790555b5b50565b60005433600160a060020a039081169116146103f457610000565b60038054600160a060020a031916600160a060020a0383161790555b5b50565b600354600160a060020a031681565b60005433600160a060020a0390811691161461043e57610000565b60048190555b5b50565b600154600160a060020a031681565b60045481565b60015433600160a060020a0390811691161461047857610000565b33600160a060020a0316ff5b5b565b600054600160a060020a031681565b6000600060006004541180156104b65750600354600160a060020a031615155b15610543576004543410156104ca57610000565b600354600454604051600160a060020a039092169181156108fc0291906000818181858888f19350505050151561050057610000565b60045434111561053d57600454604051600160a060020a03331691340380156108fc02916000818181858888f19350505050151561053d57610000565b5b61057b565b600034111561057b57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561057b57610000565b5b5b600160a060020a0383161515610591573392505b60408051600060209182015281517f5165da30000000000000000000000000000000000000000000000000000000008152600160a060020a038916600482015260248101889052604481018790529151737ca240a2f7db1dda2a1e84f67214216f85542d9092635165da30926064808301939192829003018186803b151561061557fe5b60325a03f4151561062257fe5b50506040805180517f13af4035000000000000000000000000000000000000000000000000000000008252600160a060020a038781166004840152925190945091841692506313af403591602480830192600092919082900301818387803b151561068957fe5b60325a03f1151561069657fe5b50505080600160a060020a031663d31fdffd846040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b15156106f057fe5b60325a03f115156106fd57fe5b505050600160a060020a0383166000908152600260205260409020805460018101610728838261096f565b916000526020600020900160005b81546101009190910a600160a060020a0381810219909216858316918202179092556040519192508516907f39a897fc2f5613d2a2b9ec75f5b36723b03492a752d0951ba46507590ec5265090600090a38091505b50949350505050565b600160a060020a03331660009081526002602052604081208054819060001981019081106107be57fe5b906000526020600020900160005b9054906101000a9004600160a060020a031691505b5090565b60015433600160a060020a0390811691161461080057610000565b60018054600160a060020a031916600160a060020a0383161790555b5b50565b60026020528160005260406000208181548110151561083b57fe5b906000526020600020900160005b915091509054906101000a9004600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108e85780601f106108bd576101008083540402835291602001916108e8565b820191906000526020600020905b8154815290600101906020018083116108cb57829003601f168201915b505050505081565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061093157805160ff191683800117855561095e565b8280016001018555821561095e579182015b8281111561095e578251825591602001919060010190610943565b5b506107e1929150610999565b5090565b81548183558181151161099357600083815260209020610993918101908301610999565b5b505050565b6109b791905b808211156107e1576000815560010161099f565b5090565b905600a165627a7a723058200639f8831882bbff94eb876614444122e10feaac29a436ea1ee70cf8d17371770029

   Library Used
 : 0xCreatorPresale

   Swarm Source:
bzzr://0639f8831882bbff94eb876614444122e10feaac29a436ea1ee70cf8d1737177
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.