Sponsored Link:   trade.io - The Future of Crypto Trading - A Better, Faster, Smarter Crypto Exchange - Pre-Register Now!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
 Latest 3 txns

TxHash Age From To Value [TxFee]
0x064f1b7c667427be412e624a3633df86cfca1f3a0420f19a0d53b8d01774091323 days 16 hrs ago0x80e3a4345dc5e6f528d00aa93da09e1a8719ba02  IN   0x50ddfe3722fc303cace413df41db23d55025e2e60 Ether0.000029539
0xf7138307e4ba7bb56088c22d84c8fd5457d6270d25b765bd4a34b001827c4d7b26 days 14 hrs ago0x80e3a4345dc5e6f528d00aa93da09e1a8719ba02  IN   0x50ddfe3722fc303cace413df41db23d55025e2e60.501 Ether0.000041344
0x71a848e5ce3fe0f5830bdbc70fe60c1091c18b001da661888731a5c57f22c12a26 days 14 hrs ago0x80e3a4345dc5e6f528d00aa93da09e1a8719ba02  IN    Contract Creation0 Ether0.000301314
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x064f1b7c667427be412e624a3633df86cfca1f3a0420f19a0d53b8d017740913584976123 days 16 hrs ago0x50ddfe3722fc303cace413df41db23d55025e2e60x80e3a4345dc5e6f528d00aa93da09e1a8719ba020.501 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: PikewoodFund
Compiler Version: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

// Pikewood Fund: collecting fund for club paving: Morgantown, WV
// Live till June, 30

contract Ownable {
    address public owner;
    
    function Ownable() public {
        owner = msg.sender;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
}

contract PikewoodFund is Ownable {
    uint constant minContribution = 500000000000000000; // 0.5 ETH
    address public owner;
    mapping (address => uint) public contributors;

    modifier onlyContributor() {
        require(contributors[msg.sender] > 0);
        _;
    }

    function PikewoodFund() public {
        owner = msg.sender;
    }

    function withdraw_funds() public onlyOwner {
        // only owner can withdraw funds at the end of program
        msg.sender.transfer(this.balance);
    }

    function () public payable {
        if (msg.value >= minContribution) {
            // contribution must be greater than a minimum allowed
            contributors[msg.sender] += msg.value;
        }
    }
    
    function exit() public onlyContributor(){
        uint amount;
        amount = contributors[msg.sender] / 10; // charging 10% org fee if contributor exits
        if (contributors[msg.sender] >= amount){
            contributors[msg.sender] = 0;
            msg.sender.transfer(amount); // transfer must be last
        }
    }

    function changeOwner(address newOwner) public onlyContributor() {
        // only owner can transfer ownership
        owner = newOwner;
    }
    
    function getFundsCollected() public view returns (uint){
        return this.balance;
    }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributors","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw_funds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getFundsCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b506000805433600160a060020a0319918216811783556001805490921617905561030890819061004090396000f3006080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631f6d4942811461009e5780632b8f2042146100de5780638da5cb5b146100f3578063a6f9dae114610131578063dd1dffb71461015f578063e9fad8ee14610174575b6706f05b59d3b20000341061009c573360009081526002602052604090208054340190555b005b3480156100aa57600080fd5b506100cc73ffffffffffffffffffffffffffffffffffffffff60043516610189565b60408051918252519081900360200190f35b3480156100ea57600080fd5b5061009c61019b565b3480156100ff57600080fd5b506101086101ef565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561013d57600080fd5b5061009c73ffffffffffffffffffffffffffffffffffffffff6004351661020b565b34801561016b57600080fd5b506100cc610261565b34801561018057600080fd5b5061009c610266565b60026020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101bf57600080fd5b6040513390303180156108fc02916000818181858888f193505050501580156101ec573d6000803e3d6000fd5b50565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b336000908152600260205260408120541161022557600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b303190565b33600090815260026020526040812054811061028157600080fd5b5033600090815260026020526040902054600a81049081116101ec57336000818152600260205260408082208290555183156108fc0291849190818181858888f193505050501580156102d8573d6000803e3d6000fd5b50505600a165627a7a72305820d23f0b5ec9c964140170112e874c501df8c3df5820dafc1c9f1d0c5eaaf83c5c0029

   Swarm Source:
bzzr://d23f0b5ec9c964140170112e874c501df8c3df5820dafc1c9f1d0c5eaaf83c5c

 

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.