Sponsored Link:   Learn and build dApps today without code using Crowd Machine's Crowd App Studio.
Contract Overview
Balance: 0.2 Ether
Ether Value: $95.27 (@ $476.37/ETH)
Transactions: 5 txns
 Latest 5 txns

TxHash Age From To Value [TxFee]
0x580f6f022f811fe44fbe93053a31a60cb1ce0ca033d361dcfda7ae099a751c467 days 22 hrs ago0x0ae8c3beb0abe4c6d941fa3429b21622bf74df45  IN   0xfe99dfa5ba203a5757310589e1265f585b7abb270 Ether0.000150885
0x2fa14030e0beeba8fb4b56891425ef14a06922c71d2707009ac26ae536f9c4bc75 days 7 hrs ago0xef312785a2c2ee41f119b13dd01500504e24d903  IN   0xfe99dfa5ba203a5757310589e1265f585b7abb270 Ether0.000175528
0xa608894bba4807ca2d1df7a5a0c57a5831baf95d81b3017c6a0d07f6ee843fb8159 days 11 hrs ago0xef312785a2c2ee41f119b13dd01500504e24d903  IN   0xfe99dfa5ba203a5757310589e1265f585b7abb270.1 Ether0.000085085
0x9112c5279e5f033b4e8e5c6cb7fecea5a22e344f87113d4fb677061da8c420dc163 days 7 hrs ago0x0b32aa5c1e71715206fe29b7badb21ad95f272c0  IN   0xfe99dfa5ba203a5757310589e1265f585b7abb270.1 Ether0.00020017
0x280d84a331d46f5ff5021e59086012f43fc8082ed02fa1e96e1dee7ec9ada109176 days 8 hrs ago0x0ae8c3beb0abe4c6d941fa3429b21622bf74df45  IN    Contract Creation0 Ether0.00528841
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact match)
Contract Name: Crowdsale
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

interface token {
    function    transfer(address _to, uint256 _value) public returns (bool success);
    function    burn( uint256 value ) public returns ( bool success );
    function    balanceOf( address user ) public view returns ( uint256 );
}

contract Crowdsale {
    address     public beneficiary;
    uint        public amountRaised;
    uint        public price;
    token       public tokenReward;
    uint        public excess;

    mapping(address => uint256) public balanceOf;

    bool    public crowdsaleClosed = false;
    bool    public crowdsaleSuccess = false;

    event   GoalReached(address recipient, uint totalAmountRaised, bool crowdsaleSuccess);
    event   FundTransfer(address backer, uint amount, bool isContribution);

    /**
     * Constrctor function
     *
     * Setup the owner
     */
    function    Crowdsale( ) public {
        beneficiary = msg.sender;
        price = 0.1 ether;
        tokenReward = token(0x5a2dacf2D90a89B3D135c7691A74d25Afb5F7Fb7);
    }

    /**
    * Fallback function
    *
    * The function without name is the default function that is called whenever anyone sends funds to a contract
    */
    function () public payable {
        require(!crowdsaleClosed);

        uint amount = msg.value;
        tokenReward.transfer(msg.sender, amount / price);
        excess += amount % price;
        balanceOf[msg.sender] = balanceOf[msg.sender] + amount - excess;
        amountRaised = amountRaised + amount - excess;
        FundTransfer(msg.sender, amount, true);
    }

    modifier onlyOwner() {
        require(msg.sender == beneficiary);
        _;
    }

    function goalManagment(bool statement) public onlyOwner {
        require(crowdsaleClosed == false);    
        crowdsaleClosed = true;
        crowdsaleSuccess = statement;
        GoalReached(beneficiary, amountRaised, crowdsaleSuccess);
    }

    /**
    * Withdraw the funds
    *
    * Checks to see if goal or time limit has been reached, and if so, and the funding goal was reached,
    * sends the entire amount to the beneficiary. If goal was not reached, each contributor can withdraw
    * the amount they contributed.
    */
    function    withdrawalMoneyBack() public {
        uint    amount;

        if (crowdsaleClosed == true && crowdsaleSuccess == false) {
            amount = balanceOf[msg.sender];
            balanceOf[msg.sender] = 0;
            amountRaised -= amount;
            msg.sender.transfer(amount);
            FundTransfer(msg.sender, amount, false);
        }
    }

    function    withdrawalOwner() public onlyOwner {
        if (crowdsaleSuccess == true && crowdsaleClosed == true) {
            beneficiary.transfer(amountRaised);
            FundTransfer(beneficiary, amountRaised, false);
            burnToken();
        }
    }

    function takeExcess () public onlyOwner {
        require(excess > 0);
        beneficiary.transfer(excess);
        excess = 0;
        FundTransfer(beneficiary, excess, false);
    }

    function    burnToken() private {
        uint amount;

        amount = tokenReward.balanceOf(this);
        tokenReward.burn(amount);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"crowdsaleSuccess","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawalOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"excess","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"takeExcess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenReward","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"amountRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"statement","type":"bool"}],"name":"goalManagment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawalMoneyBack","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"totalAmountRaised","type":"uint256"},{"indexed":false,"name":"crowdsaleSuccess","type":"bool"}],"name":"GoalReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"backer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"isContribution","type":"bool"}],"name":"FundTransfer","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000600660006101000a81548160ff0219169083151502179055506000600660016101000a81548160ff021916908315150217905550341561004557600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555067016345785d8a0000600281905550735a2dacf2d90a89b3d135c7691a74d25afb5f7fb7600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d95806100f86000396000f3006060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806310c1ff2114610301578063163f9b4f1461032e5780631ae2379c1461034357806338af3eed1461036c578063619f5e72146103c15780636e66f6e9146103d657806370a082311461042b5780637b3e5e7b14610478578063a035b1fe146104a1578063ccb07cef146104ca578063d1933a1b146104f7578063e36dd1f91461051c575b6000600660009054906101000a900460ff161515156100d857600080fd5b349050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336002548481151561012757fe5b046000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156101b557600080fd5b6102c65a03f115156101c657600080fd5b5050506040518051905050600254818115156101de57fe5b0660046000828254019250508190555060045481600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540103600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506004548160015401036001819055507fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633826001604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a150005b341561030c57600080fd5b610314610531565b604051808215151515815260200191505060405180910390f35b341561033957600080fd5b610341610544565b005b341561034e57600080fd5b6103566106e3565b6040518082815260200191505060405180910390f35b341561037757600080fd5b61037f6106e9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103cc57600080fd5b6103d461070e565b005b34156103e157600080fd5b6103e9610882565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043657600080fd5b610462600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a8565b6040518082815260200191505060405180910390f35b341561048357600080fd5b61048b6108c0565b6040518082815260200191505060405180910390f35b34156104ac57600080fd5b6104b46108c6565b6040518082815260200191505060405180910390f35b34156104d557600080fd5b6104dd6108cc565b604051808215151515815260200191505060405180910390f35b341561050257600080fd5b61051a600480803515159060200190919050506108df565b005b341561052757600080fd5b61052f610a3d565b005b600660019054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059f57600080fd5b60011515600660019054906101000a900460ff1615151480156105d5575060011515600660009054906101000a900460ff161515145b156106e1576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6001549081150290604051600060405180830381858888f19350505050151561063d57600080fd5b7fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf66000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001546000604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a16106e0610bcd565b5b565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561076957600080fd5b600060045411151561077a57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6004549081150290604051600060405180830381858888f1935050505015156107dd57600080fd5b60006004819055507fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf66000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166004546000604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60056020528060005260406000206000915090505481565b60015481565b60025481565b600660009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093a57600080fd5b60001515600660009054906101000a900460ff16151514151561095c57600080fd5b6001600660006101000a81548160ff02191690831515021790555080600660016101000a81548160ff0219169083151502179055507f80691858eb40f42b9812d17553fe967c0009248b7ae7b6facf64784f6e5be1f66000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600154600660019054906101000a900460ff16604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a150565b600060011515600660009054906101000a900460ff161515148015610a75575060001515600660019054906101000a900460ff161515145b15610bca57600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610b5157600080fd5b7fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633826000604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a15b50565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610c9457600080fd5b6102c65a03f11515610ca557600080fd5b505050604051805190509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515610d4a57600080fd5b6102c65a03f11515610d5b57600080fd5b5050506040518051905050505600a165627a7a723058208ab81fc66aaca5a575063c87000f51c8454389e9207d905e6e87c58a1dd9e5040029

   Swarm Source:
bzzr://8ab81fc66aaca5a575063c87000f51c8454389e9207d905e6e87c58a1dd9e504

 

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.