Contract 0x9c0C5a14Fde1306686A8a270F271165AcDA670c2

 

TxHash Block Age From To Value [TxFee]
0x957a1e7079328c30d52b12577b4d4c1774a000d85aaeb8824b12e102d956191f6080970231 days 6 hrs ago0xd380e397285c43631d85805d91c7e2bffa0cdffc IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.0051 Ether0.000896768
0x1c9417fde7ed65aa58aadce9ea07609a64883eb646345c4f3489dfdf0ba45f2b4994736417 days 4 hrs ago0xe49f2b735d01ecd464b0a864e2e4d47c22630aaf IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.002 Ether0.001075916
0x9765cd59097c4ec42bc6647d45e483e258ffca397ad6e73789a8f28a061508bd4833934445 days 15 hrs ago0x220fcaf286d9b134a2487bc426e66c3f6347d7df IN  0x9c0c5a14fde1306686a8a270f271165acda670c20 Ether0.00042
0x1583fad3df45b29e88352fd408697668c61961ae06169f6bdcad1b03a4f766f24833913445 days 15 hrs ago0x220fcaf286d9b134a2487bc426e66c3f6347d7df IN  0x9c0c5a14fde1306686a8a270f271165acda670c20 Ether0.00041
0x09994690ce25cf2b8a99223486579d6189f2d164e408fb19c58ef4f78986497c4705439467 days 19 hrs ago0x13b6aa56a834d0af398ebb69dbb5e568311a5896 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.00001 Ether0.00125
0x729deeec8971ca35f25cb1c2ed24833d9aff190757fc4d611b518b01d1416bf54632789480 days 3 hrs ago0x4967c05ae6256a34feeb101ccece2caacf40bfb0 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.006 Ether0.000698789
0xc77302757587bd60b6f7342f0a00935d73ac4cd98b90131c045cef474220bab94568004490 days 14 hrs ago0x561cbb53ba4d7912dbf9969759725bd79d920e2c IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.001 Ether0.003229536
0x629631559901f4e8b69f758f51d5fa70fecabe57964192f4494a63408f08ff5b4515003499 days 2 hrs ago0x59160ebddb554c31dd84c6b62af7e087b04ad022 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.21 Ether0.000265499
0x7f0de0b17b763c2f4b2b7cb854d2e02146f3f14c0471c8abd7c028703d203c3c4514875499 days 3 hrs ago0xc290eb18be56ad0889d4bbbc4700b8d491107778 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.2 Ether0.000398601
0xa9c6fc587dd3752dba0c3290f49c62ee167fbd4d4b8e239f2617bc2ccd9b1f244513859499 days 7 hrs ago0xd7abd9d82fa7b9d25ae2f0bad3a2c9809dc9c422 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.005 Ether0.000268103
0xf82212ae977fd532a26835b2367bd5abf6466025938e3d89052b0ee4d25c21444512765499 days 11 hrs ago0x7a6d917b4076a2cf91114777884aaadc2751d7a8 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.209 Ether0.0006616675
0xbbe708af7dcea0940a3f0b75ca7902f272d5bfb6eca6260edabd3058d9f437254508848500 days 2 hrs ago0x92be9a3f9f5b3ba7d8d18430723d3c4f82539e74 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.1 Ether0.0043659495
0xccd4e109adcd814ac8c8f1ab6ebde51ec1d5cfdd56e85226ee4f6855004fd2444508462500 days 3 hrs ago0x27659614db9cfa0f27329315f6c85f4e118da231 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.01 Ether0.001333300206
0x5897de69daf976e929c60f2b372239ef0ed8cc85678690129f7a8eade4a1c9d64508340500 days 4 hrs ago0x45752f3d6dbb3bc4cc758c7b408186d74acc8041 IN  0x9c0c5a14fde1306686a8a270f271165acda670c20.009 Ether0.00055895
0x9794132687534ca95e9e674384bed9f2afb58ebbd1967cfa3cf4afe38a2031524508061500 days 5 hrs ago0x78e83b0f54c91ec16eb6431bfaf29997f24545a7 IN  Contract Creation0 Ether0.02048886
[ Download CSV Export 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value

Contract Source Code Verified (Exact Match)

Contract Name:
EtherToTheMoon

Compiler Version
v0.4.16+commit.d7661dd9

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

pragma solidity ^0.4.16;
/** @title Ether to the Moon */
contract EtherToTheMoon {
 // Publically visible who is the owner of this contract. Also,
 // this adds get functions for this variable automatically.
 address public owner;
 uint public totalContribution;

 /// Runs only once when the contract is deployed.
 function EtherToTheMoon() public{
   owner = msg.sender;
 }
 modifier onlyOwner() {
   require(msg.sender == owner);
   _;
 }
 struct richData {
   uint amount;
   bytes32 message;
   address sender;
 }
 /* DATABASES */
 // We are creating a publically accessible database for all
 // the bids that we will recieve. We are mapping address of
 // each sender to the value inside it.
 mapping(address => uint) public users;
 richData[10] public richDatabase; // [0] = Richest & [9] = Poorest

 // Function to be called when anyone sends us money. We take the money
 // in wei and add it to his total bid.
 function takeMyMoney(bytes32 message) public payable returns (bool){
   // Add value to his total amount.
   users[msg.sender] += msg.value;
   totalContribution += msg.value;
   if(users[msg.sender] >= users[richDatabase[9].sender] ){
     richData[] memory arr = new richData[](10);
     bool updated = false;
     uint j = 0;
     for (uint i = 0; i < 10; i++) {
       if(j == 10) break;
       if(!updated && users[msg.sender] > richDatabase[i].amount) {
         richData memory newData;
         newData.amount = users[msg.sender];
         newData.message = message;
         newData.sender = msg.sender;
         arr[j] = newData;
         j++;
         if(richDatabase[i].sender != msg.sender) {
          arr[j] = richDatabase[i];
          j++;
         }
         updated = true;
       } else if(richDatabase[i].sender != msg.sender){
         arr[j] = richDatabase[i];
         j++;
       }
     }
     for(i = 0; i < 10; i++) {
         richDatabase[i] = arr[i];
       }
   }
   return updated;
 }
 function buyerHistory() public constant returns (address[], uint[], bytes32[]){

     uint length;
     length = 10;
     address[] memory senders = new address[](length);
     uint[] memory amounts = new uint[](length);
     bytes32[] memory statuses = new bytes32[](length);

     for (uint i = 0; i < length; i++)
     {
         senders[i] = (richDatabase[i].sender);
         amounts[i] = (richDatabase[i].amount);
         statuses[i] = (richDatabase[i].message);
     }
     return (senders, amounts, statuses);
 }
 function withdraw(address _to, uint _amount) onlyOwner external payable{
     require(_amount <= totalContribution);
     totalContribution -= _amount;
     _to.transfer(_amount);
 }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"totalContribution","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"richDatabase","outputs":[{"name":"amount","type":"uint256"},{"name":"message","type":"bytes32"},{"name":"sender","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"buyerHistory","outputs":[{"name":"","type":"address[]"},{"name":"","type":"uint256[]"},{"name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"message","type":"bytes32"}],"name":"takeMyMoney","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"users","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

Contract Creation Code

6060604052341561000f57600080fd5b5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610d2f806100616000396000f30060606040523615610081576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dcf4b8f146100865780633a6157cf146100af5780635f1768c1146101285780638b66bf68146102255780638da5cb5b14610259578063a87430ba146102ae578063f3fef3a3146102fb575b600080fd5b341561009157600080fd5b610099610332565b6040518082815260200191505060405180910390f35b34156100ba57600080fd5b6100d06004808035906020019091905050610338565b6040518084815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b341561013357600080fd5b61013b610388565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156101875780820151818401525b60208101905061016b565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156101ca5780820151818401525b6020810190506101ae565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561020d5780820151818401525b6020810190506101f1565b50505050905001965050505050505060405180910390f35b61023f600480803560001916906020019091905050610552565b604051808215151515815260200191505060405180910390f35b341561026457600080fd5b61026c610b3e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102b957600080fd5b6102e5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b63565b6040518082815260200191505060405180910390f35b610330600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b7b565b005b60015481565b600381600a8110151561034757fe5b6003020160005b915090508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b610390610c3d565b610398610c51565b6103a0610c65565b60006103aa610c3d565b6103b2610c51565b6103ba610c65565b6000600a9450846040518059106103ce5750595b908082528060200260200182016040525b509350846040518059106103f05750595b908082528060200260200182016040525b509250846040518059106104125750595b908082528060200260200182016040525b509150600090505b8481101561053e57600381600a8110151561044257fe5b6003020160005b5060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848281518110151561047c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600381600a811015156104c757fe5b6003020160005b506000015483828151811015156104e157fe5b9060200190602002018181525050600381600a811015156104fe57fe5b6003020160005b5060010154828281518110151561051857fe5b9060200190602002019060001916908160001916815250505b808060010191505061042b565b8383839750975097505b5050505050909192565b600061055c610c79565b6000806000610569610c8d565b34600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346001600082825401925050819055506002600060036009600a811015156105da57fe5b6003020160005b5060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515610b3057600a6040518059106106975750595b9080825280602002602001820160405280156106cd57816020015b6106ba610cc8565b8152602001906001900390816106b25790505b5094506000935060009250600091505b600a821015610a8057600a8314156106f457610a80565b8315801561075a5750600382600a8110151561070c57fe5b6003020160005b5060000154600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b1561094957600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054816000018181525050868160200190600019169081600019168152505033816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080858481518110151561080357fe5b9060200190602002018190525082806001019350503373ffffffffffffffffffffffffffffffffffffffff16600383600a8110151561083e57fe5b6003020160005b5060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561094057600382600a8110151561089657fe5b6003020160005b5060606040519081016040529081600082015481526020016001820154600019166000191681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050858481518110151561092a57fe5b9060200190602002018190525082806001019350505b60019350610a72565b3373ffffffffffffffffffffffffffffffffffffffff16600383600a8110151561096f57fe5b6003020160005b5060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a7157600382600a811015156109c757fe5b6003020160005b5060606040519081016040529081600082015481526020016001820154600019166000191681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250508584815181101515610a5b57fe5b9060200190602002018190525082806001019350505b5b5b81806001019250506106dd565b600091505b600a821015610b2f578482815181101515610a9c57fe5b90602001906020020151600383600a81101515610ab557fe5b6003020160005b50600082015181600001556020820151816001019060001916905560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050505b8180600101925050610a85565b5b8395505b5050505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bd657600080fd5b6001548111151515610be757600080fd5b806001600082825403925050819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610c3757600080fd5b5b5b5050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b6060604051908101604052806000815260200160008019168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6060604051908101604052806000815260200160008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905600a165627a7a72305820c9b28312d8fcd823d714f967b9a73188ac53c08f33c0c0464e1b20da967e12d30029

Swarm Source

bzzr://c9b28312d8fcd823d714f967b9a73188ac53c08f33c0c0464e1b20da967e12d3
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.