Contract 0xade45fd0e602543b76cfabbc0c8515f3a91b25b9

 

TxHash Block Age From To Value [TxFee]
0xa5bc541bd3db4c4072c8d07462649db64bdbc36ce6d1a29d5e180cce505eed905462890336 days 9 hrs ago0xa3d9064c16bd7ce12d47f5054ee14c81aa12128c IN  0xade45fd0e602543b76cfabbc0c8515f3a91b25b90 Ether0.000042266
0x1ed3aeb625c014e6f403046522aa3a5d6781aa1fa85daf0930de5916b7cf4f3c5462820336 days 10 hrs ago0xa3d9064c16bd7ce12d47f5054ee14c81aa12128c IN  0xade45fd0e602543b76cfabbc0c8515f3a91b25b90 Ether0.000027662
0xb29ccfdc055e3f8cd83402819513babdfee2d9e7ca566d5880cca004e45790315462733336 days 10 hrs ago0x398916eb050f8ef7b7c7aca2085af215f46edcda IN  0xade45fd0e602543b76cfabbc0c8515f3a91b25b90 Ether0.000899622
0xeb05d9def83147f4a4121ce5b09a615dd693730d89dd60a62d82e9b5823d74865380450350 days 5 hrs ago0x398916eb050f8ef7b7c7aca2085af215f46edcda IN  0xade45fd0e602543b76cfabbc0c8515f3a91b25b90.01 Ether0.000079134
0x6ccc725c07d27525c3a1512aa439bac48f5a1869c6b39a19be4dbf3ba35e109e5380395350 days 5 hrs ago0xa3d9064c16bd7ce12d47f5054ee14c81aa12128c IN  Contract Creation0 Ether0.00053216
[ Download CSV Export 

Latest 1 internal transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xb29ccfdc055e3f8cd83402819513babdfee2d9e7ca566d5880cca004e45790315462733336 days 10 hrs ago0xade45fd0e602543b76cfabbc0c8515f3a91b25b90x398916eb050f8ef7b7c7aca2085af215f46edcda0.01 Ether
[ Download CSV Export 

Contract Source Code Verified (Exact Match)

Contract Name:
Crowdsale

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

pragma solidity ^0.4.16;

interface token {
    function transfer(address receiver, uint amount) external;
}

contract Crowdsale {
    address public beneficiary;
    uint public fundingGoal;
    uint public amountRaised;
    uint public deadline;
    uint public price;
    token public tokenReward;
    mapping(address => uint256) public balanceOf;
    bool fundingGoalReached = false;
    bool crowdsaleClosed = false;

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

    /**
     * Constrctor function
     *
     * Setup the owner
     */
    function Crowdsale(
        address ifSuccessfulSendTo,
        uint fundingGoalInEthers,
        uint durationInMinutes,
        uint etherCostOfEachToken,
        address addressOfTokenUsedAsReward
    ) public {
        beneficiary = ifSuccessfulSendTo;
        fundingGoal = fundingGoalInEthers * 1 ether;
        deadline = now + durationInMinutes * 1 minutes;
        price = etherCostOfEachToken * 1 ether / 10000000000000000;
        tokenReward = token(addressOfTokenUsedAsReward);
    }

    /**
     * Fallback function
     *
     * The function without name is the default function that is called whenever anyone sends funds to a contract
     */
    function () payable public {
        require(!crowdsaleClosed);
        uint amount = msg.value;
        balanceOf[msg.sender] += amount;
        amountRaised += amount;
        tokenReward.transfer(msg.sender, amount / price);
        emit FundTransfer(msg.sender, amount, true);
    }

    modifier afterDeadline() { if (now >= deadline) _; }

    /**
     * Check if goal was reached
     *
     * Checks if the goal or time limit has been reached and ends the campaign
     */
    function checkGoalReached() afterDeadline public {
        if (amountRaised >= fundingGoal){
            fundingGoalReached = true;
            emit GoalReached(beneficiary, amountRaised);
        }
        crowdsaleClosed = true;
    }


    /**
     * 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 safeWithdrawal() afterDeadline public {
        if (!fundingGoalReached) {
            uint amount = balanceOf[msg.sender];
            balanceOf[msg.sender] = 0;
            if (amount > 0) {
                if (msg.sender.send(amount)) {
                    emit FundTransfer(msg.sender, amount, false);
                } else {
                    balanceOf[msg.sender] = amount;
                }
            }
        }

        if (fundingGoalReached && beneficiary == msg.sender) {
            if (beneficiary.send(amountRaised)) {
                emit FundTransfer(beneficiary, amountRaised, false);
            } else {
                //If we fail to send the funds to beneficiary, unlock funders balance
                fundingGoalReached = false;
            }
        }
    }
}

Contract ABI

[{"constant":false,"inputs":[],"name":"checkGoalReached","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"deadline","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":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":"fundingGoal","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":false,"inputs":[],"name":"safeWithdrawal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"ifSuccessfulSendTo","type":"address"},{"name":"fundingGoalInEthers","type":"uint256"},{"name":"durationInMinutes","type":"uint256"},{"name":"etherCostOfEachToken","type":"uint256"},{"name":"addressOfTokenUsedAsReward","type":"address"}],"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"}],"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

60606040526007805461ffff19169055341561001a57600080fd5b60405160a08061060d833981016040528080519190602001805191906020018051919060200180519190602001805160008054600160a060020a031916600160a060020a038916179055670de0b6b3a7640000868102600155603c86024201600355909250662386f26fc10000915083020460045560058054600160a060020a03909216600160a060020a03199092169190911790555050505061054a806100c36000396000f3006060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301cb3b2081146101ba57806329dcb0cf146101cf57806338af3eed146101f45780636e66f6e91461022357806370a08231146102365780637a3a0e84146102555780637b3e5e7b14610268578063a035b1fe1461027b578063fd6b7ef81461028e575b600754600090610100900460ff16156100b057600080fd5b50600160a060020a0333818116600090815260066020526040902080543490810190915560028054820190556005546004549193169163a9059cbb91848115156100f657fe5b046040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561015357600080fd5b5af1151561016057600080fd5b5050507fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633826001604051600160a060020a039093168352602083019190915215156040808301919091526060909101905180910390a150005b34156101c557600080fd5b6101cd6102a1565b005b34156101da57600080fd5b6101e2610328565b60405190815260200160405180910390f35b34156101ff57600080fd5b61020761032e565b604051600160a060020a03909116815260200160405180910390f35b341561022e57600080fd5b61020761033d565b341561024157600080fd5b6101e2600160a060020a036004351661034c565b341561026057600080fd5b6101e261035e565b341561027357600080fd5b6101e2610364565b341561028657600080fd5b6101e261036a565b341561029957600080fd5b6101cd610370565b60035442106103265760015460025410610316576007805460ff191660011790556000546002547fec3f991caf7857d61663fd1bba1739e04abd4781238508cde554bb849d790c8591600160a060020a031690604051600160a060020a03909216825260208201526040908101905180910390a15b6007805461ff0019166101001790555b565b60035481565b600054600160a060020a031681565b600554600160a060020a031681565b60066020526000908152604090205481565b60015481565b60025481565b60045481565b600354600090421061051b5760075460ff16151561044f5750600160a060020a03331660009081526006602052604081208054908290559081111561044f57600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015610433577fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633826000604051600160a060020a039093168352602083019190915215156040808301919091526060909101905180910390a161044f565b600160a060020a03331660009081526006602052604090208190555b60075460ff16801561046f575060005433600160a060020a039081169116145b1561051b57600054600254600160a060020a039091169080156108fc0290604051600060405180830381858888f193505050501561051057600080546002547fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf692600160a060020a0390921691604051600160a060020a039093168352602083019190915215156040808301919091526060909101905180910390a161051b565b6007805460ff191690555b505600a165627a7a72305820a35e24eadff92cf505fde9b53f51b3f9f8fd6b214262f6780e00dcb306e749a90029000000000000000000000000a3d9064c16bd7ce12d47f5054ee14c81aa12128c00000000000000000000000000000000000000000000000000000000000004b00000000000000000000000000000000000000000000000000000000000000870000000000000000000000000000000000000000000000000000000000000271000000000000000000000000040c37192f32be790e1ce15c219fe150c0bb6455f

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

000000000000000000000000a3d9064c16bd7ce12d47f5054ee14c81aa12128c00000000000000000000000000000000000000000000000000000000000004b00000000000000000000000000000000000000000000000000000000000000870000000000000000000000000000000000000000000000000000000000000271000000000000000000000000040c37192f32be790e1ce15c219fe150c0bb6455f

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000a3d9064c16bd7ce12d47f5054ee14c81aa12128c
Arg [1] : 00000000000000000000000000000000000000000000000000000000000004b0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000870
Arg [3] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [4] : 00000000000000000000000040c37192f32be790e1ce15c219fe150c0bb6455f

Swarm Source

bzzr://a35e24eadff92cf505fde9b53f51b3f9f8fd6b214262f6780e00dcb306e749a9
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.