Sponsored Link:   Revain - How to find moon tokens to invest? See what crypto experts are saying. Read reviews!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 17 txns
 Latest 17 txns


TxHash Age From To Value [TxFee]
0xc4f2b0637e8f8cd44df7264963f826e1b639d279349fa99a1e4c0aa8af7c3373201 days 41 mins ago0x4a17e1794118ba60b3e9c0569a4f7d1c65c7e094  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.00412283
0xc66ad3f8ea219440a080f0ce9f1a528b39798746e0801dab9615ad0a50805ab4204 days 11 hrs ago0x4a17e1794118ba60b3e9c0569a4f7d1c65c7e094  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.00647704
0x87857fdd01c9596a9e213039772903d2deddd6902a60053b1ab011a20ed7adde204 days 12 hrs ago0x4a17e1794118ba60b3e9c0569a4f7d1c65c7e094  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.00647704
0xa9f2d12b5b175bff3bac3dd5762fcbb6dcbf8b399572068259e4d91556908a90204 days 13 hrs ago0x4a17e1794118ba60b3e9c0569a4f7d1c65c7e094  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.00659704
0x80157f6375b5f69930e4cc71a81aec61c9aef96f539caf2b3424ff46c490f6c4256 days 23 hrs ago0x6cec6913ff2f8802a0eaa183fb61c0234aab5830  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.00714879
0xa61862fffcfe9e079886179e9d764358254e2dda1cf961c1f52e31d386b8159c258 days 2 hrs ago0x6cec6913ff2f8802a0eaa183fb61c0234aab5830  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.018498562209
0xb2f90c4c188d4804a1951650d7e36ad17349b2cead9051e0c646633703818322258 days 19 hrs ago0x6cec6913ff2f8802a0eaa183fb61c0234aab5830  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.020299668408
0x225cdfcc139408208d881a0c9d97cc8cf0f167572c407a8356f1cfae4aef33e5259 days 2 hrs ago0x6cec6913ff2f8802a0eaa183fb61c0234aab5830  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.008556559191
0x5fac33a3e647d1adeb4b96cab77ee6e77be4401df453b7a82a8979a49aa6ca31261 days 15 hrs ago0x51e26d51518240270ec24692fac9a83165da757d  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70 Ether0.134017086
0x4c47c2c3c7e149a3cb59463b0481ebd353637af3570bac51fe32ca4f4718c51a338 days 41 mins ago0x775ab769456345e7272766c2f3b8bd7f5c624f77  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.01 Ether0.0008
0x31c85edb9a906627dcc432cfbf20077acc50407db7c047e4f2369f97224601ed338 days 42 mins ago0x775ab769456345e7272766c2f3b8bd7f5c624f77  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.01 Ether0.00042
0xf0d6585bb25dad0c876f25b7ceeafb648b7ae1b98693bd735c45357e0bc7e0db338 days 46 mins ago0x775ab769456345e7272766c2f3b8bd7f5c624f77  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.018 Ether0.00042
0x73dccb6ded62631a75ec0a8ff078644fd4355cec012077a56149e0c25de47710338 days 1 hr ago0x52bbe72fb2997bb5fee66ec1cd4992a8a96ffacd  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether0.01644666
0xbff02ae49286ddea155197aa30dac9954c538176dd5977d19952a4523b241799359 days 22 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70 Ether0.00057342
0xbe770e6b8786acb816289a19df0d90920a39c5d3d03d01d3e5d9c66b07783f4f371 days 1 hr ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70 Ether0.0008477
0x35d1bb4b852511c7b89c8fff210781789276a3f35c969da33a6cff18fc2bd64d371 days 1 hr ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN   0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70 Ether0.00087342
0xeed073d5dccd938b210f0e0aa8fead0308386cc856a7d91e326f9c33268101dd371 days 23 hrs ago0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a  IN    Contract Creation0 Ether0.01706874
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 24 Internal Transactions

ParentTxHash Block Age From To Value
0xc4f2b0637e8f8cd44df7264963f826e1b639d279349fa99a1e4c0aa8af7c33734488464201 days 41 mins ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xc4f2b0637e8f8cd44df7264963f826e1b639d279349fa99a1e4c0aa8af7c33734488464201 days 41 mins ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0xc66ad3f8ea219440a080f0ce9f1a528b39798746e0801dab9615ad0a50805ab44467234204 days 11 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xc66ad3f8ea219440a080f0ce9f1a528b39798746e0801dab9615ad0a50805ab44467234204 days 11 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0x87857fdd01c9596a9e213039772903d2deddd6902a60053b1ab011a20ed7adde4466970204 days 12 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0x87857fdd01c9596a9e213039772903d2deddd6902a60053b1ab011a20ed7adde4466970204 days 12 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0xa9f2d12b5b175bff3bac3dd5762fcbb6dcbf8b399572068259e4d91556908a904466680204 days 13 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xa9f2d12b5b175bff3bac3dd5762fcbb6dcbf8b399572068259e4d91556908a904466680204 days 13 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0x80157f6375b5f69930e4cc71a81aec61c9aef96f539caf2b3424ff46c490f6c44255237256 days 23 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0x80157f6375b5f69930e4cc71a81aec61c9aef96f539caf2b3424ff46c490f6c44255237256 days 23 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0xa61862fffcfe9e079886179e9d764358254e2dda1cf961c1f52e31d386b8159c4251304258 days 2 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xa61862fffcfe9e079886179e9d764358254e2dda1cf961c1f52e31d386b8159c4251304258 days 2 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0xb2f90c4c188d4804a1951650d7e36ad17349b2cead9051e0c6466337038183224248628258 days 19 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xb2f90c4c188d4804a1951650d7e36ad17349b2cead9051e0c6466337038183224248628258 days 19 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0x225cdfcc139408208d881a0c9d97cc8cf0f167572c407a8356f1cfae4aef33e54247584259 days 2 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0x225cdfcc139408208d881a0c9d97cc8cf0f167572c407a8356f1cfae4aef33e54247584259 days 2 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0x73dccb6ded62631a75ec0a8ff078644fd4355cec012077a56149e0c25de477103902745338 days 1 hr ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0x73dccb6ded62631a75ec0a8ff078644fd4355cec012077a56149e0c25de477103902745338 days 1 hr ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x97282a7a15f9beadc854e8793aae43b089f14b4e0.1 Ether
0xff0a61ce85f1afaa04498455f768c5779bda9d69847c91ce3d79edab5869f0553764282364 days 3 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0xff0a61ce85f1afaa04498455f768c5779bda9d69847c91ce3d79edab5869f0553764282364 days 3 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x4af013afbadb22d8a88c92d68fc96b033b9ebb8a0.1 Ether
0xff0a61ce85f1afaa04498455f768c5779bda9d69847c91ce3d79edab5869f0553764282364 days 3 hrs ago0x97282a7a15f9beadc854e8793aae43b089f14b4e0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether
0x74991a7a7b661799b0f82fafcbb0383794038f947e81f32b5213fe190def4aad3727212370 days 23 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a7  Contract Creation0 Ether
0x74991a7a7b661799b0f82fafcbb0383794038f947e81f32b5213fe190def4aad3727212370 days 23 hrs ago0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70x4af013afbadb22d8a88c92d68fc96b033b9ebb8a0.1 Ether
0x74991a7a7b661799b0f82fafcbb0383794038f947e81f32b5213fe190def4aad3727212370 days 23 hrs ago0x97282a7a15f9beadc854e8793aae43b089f14b4e0x113058c101b2d78e001d4a7d2174a66b5ff3a4a70.1 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: BuilderCrowdfunding
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);
}

/**
 * @title Asset recipient interface
 */
contract Recipient {
    /**
     * @dev On received ethers
     * @param sender Ether sender
     * @param amount Ether value
     */
    event ReceivedEther(address indexed sender,
                        uint256 indexed amount);

    /**
     * @dev On received custom ERC20 tokens
     * @param from Token sender
     * @param value Token value
     * @param token Token contract address
     * @param extraData Custom additional data
     */
    event ReceivedTokens(address indexed from,
                         uint256 indexed value,
                         address indexed token,
                         bytes extraData);

    /**
     * @dev Receive approved ERC20 tokens
     * @param _from Spender address
     * @param _value Transaction value
     * @param _token ERC20 token contract address
     * @param _extraData Custom additional data
     */
    function receiveApproval(address _from, uint256 _value,
                             ERC20 _token, bytes _extraData) {
        if (!_token.transferFrom(_from, this, _value)) throw;
        ReceivedTokens(_from, _value, _token, _extraData);
    }

    /**
     * @dev Catch sended to contract ethers
     */
    function () payable
    { ReceivedEther(msg.sender, msg.value); }
}


/**
 * @title Token contract represents any asset in digital economy
 */
contract Token is Object, ERC20 {
    /* Short description of token */
    string public name;
    string public symbol;

    /* Total count of tokens exist */
    uint public totalSupply;

    /* Fixed point position */
    uint8 public decimals;
    
    /* Token approvement system */
    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowances;
 
    /**
     * @dev Get balance of plain address
     * @param _owner is a target address
     * @return amount of tokens on balance
     */
    function balanceOf(address _owner) constant returns (uint256)
    { return balances[_owner]; }
 
    /**
     * @dev Take allowed tokens
     * @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)
    { return allowances[_owner][_spender]; }

    /* Token constructor */
    function Token(string _name, string _symbol, uint8 _decimals, uint _count) {
        name        = _name;
        symbol      = _symbol;
        decimals    = _decimals;
        totalSupply = _count;
        balances[msg.sender] = _count;
    }
 
    /**
     * @dev Transfer self tokens to given address
     * @param _to destination address
     * @param _value amount of token values to send
     * @notice `_value` tokens will be sended to `_to`
     * @return `true` when transfer done
     */
    function transfer(address _to, uint _value) returns (bool) {
        if (balances[msg.sender] >= _value) {
            balances[msg.sender] -= _value;
            balances[_to]        += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        }
        return false;
    }

    /**
     * @dev Transfer with approvement mechainsm
     * @param _from source address, `_value` tokens shold be approved for `sender`
     * @param _to destination address
     * @param _value amount of token values to send 
     * @notice from `_from` will be sended `_value` tokens to `_to`
     * @return `true` when transfer is done
     */
    function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
        var avail = allowances[_from][msg.sender]
                  > balances[_from] ? balances[_from]
                                    : allowances[_from][msg.sender];
        if (avail >= _value) {
            allowances[_from][msg.sender] -= _value;
            balances[_from] -= _value;
            balances[_to]   += _value;
            Transfer(_from, _to, _value);
            return true;
        }
        return false;
    }

    /**
     * @dev Give to target address ability for self token manipulation without sending
     * @param _spender target address (future requester)
     * @param _value amount of token values for approving
     */
    function approve(address _spender, uint256 _value) returns (bool) {
        allowances[msg.sender][_spender] += _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @dev Reset count of tokens approved for given address
     * @param _spender target address (future requester)
     */
    function unapprove(address _spender)
    { allowances[msg.sender][_spender] = 0; }
}

contract TokenEmission is Token {
    function TokenEmission(string _name, string _symbol, uint8 _decimals,
                           uint _start_count)
             Token(_name, _symbol, _decimals, _start_count)
    {}

    /**
     * @dev Token emission
     * @param _value amount of token values to emit
     * @notice owner balance will be increased by `_value`
     */
    function emission(uint _value) onlyOwner {
        // Overflow check
        if (_value + totalSupply < totalSupply) throw;

        totalSupply     += _value;
        balances[owner] += _value;
    }
 
    /**
     * @dev Burn the token values from sender balance and from total
     * @param _value amount of token values for burn 
     * @notice sender balance will be decreased by `_value`
     */
    function burn(uint _value) {
        if (balances[msg.sender] >= _value) {
            balances[msg.sender] -= _value;
            totalSupply      -= _value;
        }
    }
}

/**
 * @title Crowdfunding contract
 */
contract Crowdfunding is Object, Recipient {
    /**
     * @dev Target fund account address
     */
    address public fund;

    /**
     * @dev Bounty token address
     */
    TokenEmission public bounty;
    
    /**
     * @dev Distribution of donations
     */
    mapping(address => uint256) public donations;

    /**
     * @dev Total funded value
     */
    uint256 public totalFunded;

    /**
     * @dev Documentation reference
     */
    string public reference;

    /**
     * @dev Crowdfunding configuration
     */
    Params public config;

    struct Params {
        /* start/stop block stamps */
        uint256 startBlock;
        uint256 stopBlock;

        /* Minimal/maximal funded value */
        uint256 minValue;
        uint256 maxValue;
        
        /**
         * Bounty ratio equation:
         *   bountyValue = value * ratio / scale
         * where
         *   ratio = R - (block - B) / S * V
         *  R - start bounty ratio
         *  B - start block number
         *  S - bounty reduction step in blocks 
         *  V - bounty reduction value
         */
        uint256 bountyScale;
        uint256 startRatio;
        uint256 reductionStep;
        uint256 reductionValue;
    }

    /**
     * @dev Calculate bounty value by reduction equation
     * @param _value Input donation value
     * @param _block Input block number
     * @return Bounty value
     */
    function bountyValue(uint256 _value, uint256 _block) constant returns (uint256) {
        if (_block < config.startBlock || _block > config.stopBlock)
            return 0;

        var R = config.startRatio;
        var B = config.startBlock;
        var S = config.reductionStep;
        var V = config.reductionValue;
        uint256 ratio = R - (_block - B) / S * V; 
        return _value * ratio / config.bountyScale; 
    }

    /**
     * @dev Crowdfunding running checks
     */
    modifier onlyRunning {
        bool isRunning = totalFunded + msg.value <= config.maxValue
                      && block.number >= config.startBlock
                      && block.number <= config.stopBlock;
        if (!isRunning) throw;
        _;
    }

    /**
     * @dev Crowdfundung failure checks
     */
    modifier onlyFailure {
        bool isFailure = totalFunded  < config.minValue
                      && block.number > config.stopBlock;
        if (!isFailure) throw;
        _;
    }

    /**
     * @dev Crowdfunding success checks
     */
    modifier onlySuccess {
        bool isSuccess = totalFunded >= config.minValue
                      && block.number > config.stopBlock;
        if (!isSuccess) throw;
        _;
    }

    /**
     * @dev Crowdfunding contract initial 
     * @param _fund Destination account address
     * @param _bounty Bounty token address
     * @param _reference Reference documentation link
     * @param _startBlock Funding start block number
     * @param _stopBlock Funding stop block nubmer
     * @param _minValue Minimal funded value in wei 
     * @param _maxValue Maximal funded value in wei
     * @param _scale Bounty scaling factor by funded value
     * @param _startRatio Initial bounty ratio
     * @param _reductionStep Bounty reduction step in blocks 
     * @param _reductionValue Bounty reduction value
     * @notice this contract should be owner of bounty token
     */
    function Crowdfunding(
        address _fund,
        address _bounty,
        string  _reference,
        uint256 _startBlock,
        uint256 _stopBlock,
        uint256 _minValue,
        uint256 _maxValue,
        uint256 _scale,
        uint256 _startRatio,
        uint256 _reductionStep,
        uint256 _reductionValue
    ) {
        fund      = _fund;
        bounty    = TokenEmission(_bounty);
        reference = _reference;

        config.startBlock     = _startBlock;
        config.stopBlock      = _stopBlock;
        config.minValue       = _minValue;
        config.maxValue       = _maxValue;
        config.bountyScale    = _scale;
        config.startRatio     = _startRatio;
        config.reductionStep  = _reductionStep;
        config.reductionValue = _reductionValue;
    }

    /**
     * @dev Receive Ether token and send bounty
     */
    function () payable onlyRunning {
        ReceivedEther(msg.sender, msg.value);

        totalFunded           += msg.value;
        donations[msg.sender] += msg.value;

        var bountyVal = bountyValue(msg.value, block.number);
        if (bountyVal == 0) throw;

        bounty.emission(bountyVal);
        bounty.transfer(msg.sender, bountyVal);
    }

    /**
     * @dev Withdrawal balance on successfull finish
     */
    function withdraw() onlySuccess
    { if (!fund.send(this.balance)) throw; }

    /**
     * @dev Refund donations when no minimal value achieved
     */
    function refund() onlyFailure {
        var donation = donations[msg.sender];
        donations[msg.sender] = 0;
        if (!msg.sender.send(donation)) throw;
    }

    /**
     * @dev Disable receive another tokens
     */
    function receiveApproval(address _from, uint256 _value,
                             ERC20 _token, bytes _extraData)
    { throw; }
}

library CreatorCrowdfunding {
    function create(address _fund, address _bounty, string _reference, uint256 _startBlock, uint256 _stopBlock, uint256 _minValue, uint256 _maxValue, uint256 _scale, uint256 _startRatio, uint256 _reductionStep, uint256 _reductionValue) returns (Crowdfunding)
    { return new Crowdfunding(_fund, _bounty, _reference, _startBlock, _stopBlock, _minValue, _maxValue, _scale, _startRatio, _reductionStep, _reductionValue); }

    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":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"hammer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"config","outputs":[{"name":"startBlock","type":"uint256"},{"name":"stopBlock","type":"uint256"},{"name":"minValue","type":"uint256"},{"name":"maxValue","type":"uint256"},{"name":"bountyScale","type":"uint256"},{"name":"startRatio","type":"uint256"},{"name":"reductionStep","type":"uint256"},{"name":"reductionValue","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_value","type":"uint256"},{"name":"_block","type":"uint256"}],"name":"bountyValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_token","type":"address"},{"name":"_extraData","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"bounty","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalFunded","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fund","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"reference","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"donations","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hammer","type":"address"}],"name":"setHammer","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_fund","type":"address"},{"name":"_bounty","type":"address"},{"name":"_reference","type":"string"},{"name":"_startBlock","type":"uint256"},{"name":"_stopBlock","type":"uint256"},{"name":"_minValue","type":"uint256"},{"name":"_maxValue","type":"uint256"},{"name":"_scale","type":"uint256"},{"name":"_startRatio","type":"uint256"},{"name":"_reductionStep","type":"uint256"},{"name":"_reductionValue","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":true,"name":"amount","type":"uint256"}],"name":"ReceivedEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"value","type":"uint256"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"extraData","type":"bytes"}],"name":"ReceivedTokens","type":"event"}]'; }
}

/**
 * @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 Crowdfunding contract
//
contract BuilderCrowdfunding is Builder {
    /**
     * @dev Run script creation contract
     * @return address new contract
     */
    function create(
        address _fund,
        address _bounty,
        string _reference,
        uint256 _startBlock,
        uint256 _stopBlock,
        uint256 _minValue,
        uint256 _maxValue,
        uint256 _scale,
        uint256 _startRatio,
        uint256 _reductionStep,
        uint256 _reductionValue,
        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 = CreatorCrowdfunding.create(_fund, _bounty, _reference, _startBlock,
                                              _stopBlock, _minValue, _maxValue, _scale,
                                              _startRatio, _reductionStep, _reductionValue);
        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":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":false,"inputs":[{"name":"_fund","type":"address"},{"name":"_bounty","type":"address"},{"name":"_reference","type":"string"},{"name":"_startBlock","type":"uint256"},{"name":"_stopBlock","type":"uint256"},{"name":"_minValue","type":"uint256"},{"name":"_maxValue","type":"uint256"},{"name":"_scale","type":"uint256"},{"name":"_startRatio","type":"uint256"},{"name":"_reductionStep","type":"uint256"},{"name":"_reductionValue","type":"uint256"},{"name":"_client","type":"address"}],"name":"create","outputs":[{"name":"","type":"address"}],"payable":true,"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
60606040525b60008054600160a060020a033316600160a060020a031991821681179092556001805490911690911790555b5b610b1c806100416000396000f300606060405236156100b45763ffffffff60e060020a60003504166303ca71d681146100b657806313af40351461010e5780631c31f7101461012c57806338af3eed1461014a57806344a0d68a14610176578063457f4d411461018b5780636e942f82146101b757806383197ef0146101d95780638da5cb5b146101eb578063c53833fe14610217578063d31fdffd14610243578063f70532fe14610261578063f7efd1501461029c578063fdc37c8514610352575bfe5b34156100be57fe5b61010c600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496506103e295505050505050565b005b341561011657fe5b61010c600160a060020a0360043516610416565b005b341561013457fe5b61010c600160a060020a0360043516610451565b005b341561015257fe5b61015a61048c565b60408051600160a060020a039092168252519081900360200190f35b341561017e57fe5b61010c60043561049b565b005b341561019357fe5b61015a6104c0565b60408051600160a060020a039092168252519081900360200190f35b34156101bf57fe5b6101c76104cf565b60408051918252519081900360200190f35b34156101e157fe5b61010c6104d5565b005b34156101f357fe5b61015a6104ff565b60408051600160a060020a039092168252519081900360200190f35b341561021f57fe5b61015a61050e565b60408051600160a060020a039092168252519081900360200190f35b341561024b57fe5b61010c600160a060020a036004351661055f565b005b341561026957fe5b61015a600160a060020a036004351660243561059a565b60408051600160a060020a039092168252519081900360200190f35b604080516020600460443581810135601f810184900484028501840190955284845261015a948235600160a060020a0390811695602480359092169560649491939290910191908190840183828082843750949650508435946020810135945060408101359350606081013592506080810135915060a08101359060c08101359060e0810135906101000135600160a060020a03166105dc565b60408051600160a060020a039092168252519081900360200190f35b341561035a57fe5b610362610998565b6040805160208082528351818301528351919283929083019185019080838382156103a8575b8051825260208311156103a857601f199092019160209182019101610388565b505050905090810190601f1680156103d45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60005433600160a060020a039081169116146103fd57610000565b8051610410906005906020840190610a26565b505b5b50565b60005433600160a060020a0390811691161461043157610000565b60008054600160a060020a031916600160a060020a0383161790555b5b50565b60005433600160a060020a0390811691161461046c57610000565b60038054600160a060020a031916600160a060020a0383161790555b5b50565b600354600160a060020a031681565b60005433600160a060020a039081169116146104b657610000565b60048190555b5b50565b600154600160a060020a031681565b60045481565b60015433600160a060020a039081169116146104f057610000565b33600160a060020a0316ff5b5b565b600054600160a060020a031681565b600160a060020a033316600090815260026020526040812080548190600019810190811061053857fe5b906000526020600020900160005b9054906101000a9004600160a060020a031691505b5090565b60015433600160a060020a0390811691161461057a57610000565b60018054600160a060020a031916600160a060020a0383161790555b5b50565b6002602052816000526040600020818154811015156105b557fe5b906000526020600020900160005b915091509054906101000a9004600160a060020a031681565b6000600060006004541180156105fc5750600354600160a060020a031615155b156106895760045434101561061057610000565b600354600454604051600160a060020a039092169181156108fc0291906000818181858888f19350505050151561064657610000565b60045434111561068357600454604051600160a060020a03331691340380156108fc02916000818181858888f19350505050151561068357610000565b5b6106c1565b60003411156106c157604051600160a060020a033316903480156108fc02916000818181858888f1935050505015156106c157610000565b5b5b600160a060020a03831615156106d7573392505b7388ff4d8d6f84a23d45dd8a55d0786eb5d1e41eb8637226d0558f8f8f8f8f8f8f8f8f8f8f6000604051602001526040518c63ffffffff1660e060020a028152600401808c600160a060020a0316600160a060020a031681526020018b600160a060020a0316600160a060020a03168152602001806020018a815260200189815260200188815260200187815260200186815260200185815260200184815260200183815260200182810382528b8181518152602001915080519060200190808383600083146107c2575b8051825260208311156107c257601f1990920191602091820191016107a2565b505050905090810190601f1680156107ee5780820380516001836020036101000a031916815260200191505b509c5050505050505050505050505060206040518083038186803b151561081157fe5b60325a03f4151561081e57fe5b50506040805180517f13af4035000000000000000000000000000000000000000000000000000000008252600160a060020a038781166004840152925190945091841692506313af403591602480830192600092919082900301818387803b151561088557fe5b60325a03f1151561089257fe5b50505080600160a060020a031663d31fdffd846040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b15156108ec57fe5b60325a03f115156108f957fe5b505050600160a060020a03831660009081526002602052604090208054600181016109248382610aa5565b916000526020600020900160005b81546101009190910a600160a060020a0381810219909216858316918202179092556040519192508516907f39a897fc2f5613d2a2b9ec75f5b36723b03492a752d0951ba46507590ec5265090600090a38091505b509c9b505050505050505050505050565b6005805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610a1e5780601f106109f357610100808354040283529160200191610a1e565b820191906000526020600020905b815481529060010190602001808311610a0157829003601f168201915b505050505081565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a6757805160ff1916838001178555610a94565b82800160010185558215610a94579182015b82811115610a94578251825591602001919060010190610a79565b5b5061055b929150610acf565b5090565b815481835581811511610ac957600083815260209020610ac9918101908301610acf565b5b505050565b610aed91905b8082111561055b5760008155600101610ad5565b5090565b905600a165627a7a7230582050b7dfc671451409a95e672370778ab0ee8a9d5e55707ddc607acc1a00eb8ada0029

   Library Used
CreatorCrowdfunding : 0x88FF4d8D6F84A23D45DD8a55D0786eB5D1e41EB8

   Swarm Source:
bzzr://50b7dfc671451409a95e672370778ab0ee8a9d5e55707ddc607acc1a00eb8ada

 

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.