Balance:0.4373333333333333 Ether | Buy more
Created by: 0x359aea6abf4baf0852b5210913b05afbb8e2e4cefe634d1d2e8af373f1ffcde4

Last 100 sent transactions

HashToAmountTime
 0xf8ea5b...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.6 Ether2016-05-02 04:52:17 (9 months ago)
 0x7c6e39...0x172e2A53AABa49287A8F7303acaF650945f623920.25266666666666666 Ether2016-05-02 03:28:13 (9 months ago)
 0x110f0b...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.4 Ether2016-05-02 03:11:08 (9 months ago)

Last 100 received transactions

HashFromAmountTime
0x7ddda6fb...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.3 Ether2016-05-02 04:52:17 (9 months ago)
0x7809cda6...0x172e2A53AABa49287A8F7303acaF650945f623920.2 Ether2016-05-02 03:28:13 (9 months ago)
0xec8b4b4c...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.49 Ether2016-05-02 03:11:08 (9 months ago)
0x5ebd2b61...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.3 Ether2016-05-02 03:09:57 (9 months ago)
0xffacb8af...0x5EedFd706405f3Bd91B41dC7383af34BC568103b0.2 Ether2016-05-02 03:09:49 (9 months ago)
0x359aea6a...0x172e2A53AABa49287A8F7303acaF650945f623920.2 Ether2016-05-02 02:51:25 (9 months ago)

Last 100 mined blocks

NumberDifficultyTimeReward

Last 100 mined uncles

Block NumberUncle NumberReward

Verified contract source code available!

How does it work?
  • Contract name: Ai
  • Compiler version: v0.3.1-2016-04-07-054bc2a
  • Optimization used: Yes
  • Source:
    contract Ai {
    
      struct Participant {
          address etherAddress;
          uint amount;
      }
    
      Participant[] public participants;
    
      uint public payoutIdx = 0;
      uint public collectedFees;
      uint public balance = 0;
    
      address public owner;
    
      // simple single-sig function modifier
      modifier onlyowner { if (msg.sender == owner) _ }
    
      // this function is executed at initialization and sets the owner of the contract
      function Ai() {
        owner = msg.sender;
      }
    
      // fallback function - simple transactions trigger this
      function() {
        enter();
      }
      
      function enter() {
        if (msg.value < 10 finney) {
            msg.sender.send(msg.value);
            return;
        }
    
        uint amount;
        if (msg.value > 100 ether) {  
          collectedFees += msg.value - 100 ether;
          amount = 100 ether;
        }
        else {
          amount = msg.value;
        }
    
        // add a new participant to array
        uint idx = participants.length;
        participants.length += 1;
        participants[idx].etherAddress = msg.sender;
        participants[idx].amount = amount;
    
        // collect fees and update contract balance
        if (idx != 0) {
          collectedFees += amount / 15;
          balance += amount - amount / 15;
        } else {
          //  first participant has no one above him,
          //  so it goes all to fees
          collectedFees += amount;
        }
    
        // while there are enough ether on the balance we can pay out to an earlier participant
        while (balance > participants[payoutIdx].amount * 2) {
          uint transactionAmount = participants[payoutIdx].amount *2;
          participants[payoutIdx].etherAddress.send(transactionAmount);
    
          balance -= transactionAmount;
          payoutIdx += 1;
        }
      }
    
      function collectFees() onlyowner {
          if (collectedFees == 0) return;
          owner.send(collectedFees);
          collectedFees = 0;
      }
    
      function setOwner(address _owner) onlyowner {
          owner = _owner;
      }
    }
  • ABI:
    [
      {
        "constant": false,
        "inputs": [
          {
            "name": "_owner",
            "type": "address"
          }
        ],
        "name": "setOwner",
        "outputs": [],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "name": "participants",
        "outputs": [
          {
            "name": "etherAddress",
            "type": "address"
          },
          {
            "name": "amount",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "owner",
        "outputs": [
          {
            "name": "",
            "type": "address"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "collectedFees",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "payoutIdx",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "balance",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": false,
        "inputs": [],
        "name": "collectFees",
        "outputs": [],
        "type": "function"
      },
      {
        "constant": false,
        "inputs": [],
        "name": "enter",
        "outputs": [],
        "type": "function"
      },
      {
        "inputs": [],
        "type": "constructor"
      }
    ]
  • Contract creation bytecode:
    0x60606040526000600181905560035560048054600160a060020a0319163317905561044b8061002e6000396000f36060604052361561006c5760e060020a600035046313af4035811461007757806335c1d349146100ac5780638da5cb5b1461010d5780639003adfe1461011f578063a60f358814610128578063b69ef8a814610131578063c87965721461013a578063e97dcb6214610164575b6101a2610162610168565b6101a2600435600454600160a060020a03908116339190911614156100a95760048054600160a060020a031916821790555b50565b6101a4600435600080548290811015610002575080526002027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56381015460008051602061042b8339815191529190910154600160a060020a03919091169082565b6101ca600454600160a060020a031681565b6101e760025481565b6101e760015481565b6101e760035481565b6101a2600454600160a060020a03908116339190911614156101625760025460001415610400575b565b6101a25b600060006000662386f26fc100003410156101f957604051600160a060020a033316908290349082818181858883f150505050505b505050565b005b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b68056bc75e2d6310000034111561022f5760028054340168056bc75e2d630fffff1901905568056bc75e2d631000009250610233565b3492505b6000805460018101808355909350908184801582901161028e5760020281600202836000526020600020918201910161028e91905b80821115610326578054600160a060020a03191681556000600191909101908155610268565b50505050336000600050838154811015610002578180526002027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563018054600160a060020a031916909217909155805484919084908110156100025760020260008051602061042b8339815191520191909155821461032a5760028054600f8504908101909155600380549185039091019055610333565b5090565b60028054840190555b5b6001546000805490919081101561000257908052600354600291820260008051602061042b833981519152015490910290111561019d5760015460008054909190811015610002576001548254600292830260008051602061042b8339815191520154909202935090811015610002576040516002919091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630154600160a060020a03169190839082818181858883f150506003805491909103905550506001805481019055610334565b600454600254604051600160a060020a0392909216916000919082818181858883f15050506002555056290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564
PUSH1 0x60 (`)
PUSH1 0x40 (@)
MSTORE
CALLDATASIZE
ISZERO
PUSH2 0x006c (l)
JUMPI
PUSH1 0xe0 (à)
PUSH1 0x02 ()
EXP
PUSH1 0x00 ()
CALLDATALOAD
DIV
PUSH4 0x13af4035 ([email protected])
DUP2
EQ
PUSH2 0x0077 (w)
JUMPI
DUP1
PUSH4 0x35c1d349 (5ÁÓI)
EQ
PUSH2 0x00ac (¬)
JUMPI
DUP1
PUSH4 0x8da5cb5b (¥Ë[)
EQ
PUSH2 0x010d (
)
JUMPI
DUP1
PUSH4 0x9003adfe (­þ)
EQ
PUSH2 0x011f ()
JUMPI
DUP1
PUSH4 0xa60f3588 (¦5ˆ)
EQ
PUSH2 0x0128 (()
JUMPI
DUP1
PUSH4 0xb69ef8a8 (¶žø¨)
EQ
PUSH2 0x0131 (1)
JUMPI
DUP1
PUSH4 0xc8796572 (Èyer)
EQ
PUSH2 0x013a (:)
JUMPI
DUP1
PUSH4 0xe97dcb62 (é}Ëb)
EQ
PUSH2 0x0164 (d)
JUMPI
JUMPDEST
PUSH2 0x01a2 (¢)
PUSH2 0x0162 (b)
PUSH2 0x0168 (h)
JUMP
JUMPDEST
PUSH2 0x01a2 (¢)
PUSH1 0x04 ()
CALLDATALOAD
PUSH1 0x04 ()
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
SWAP1
DUP2
AND
CALLER
SWAP2
SWAP1
SWAP2
AND
EQ
ISZERO
PUSH2 0x00a9 (©)
JUMPI
PUSH1 0x04 ()
DUP1
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
NOT
AND
DUP3
OR
SWAP1
SSTORE
JUMPDEST
POP
JUMP
JUMPDEST
PUS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oÈK¦¼•H@ö6/“óåc)
ADD
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
AND
SWAP2
SWAP1
DUP4
SWAP1
DUP3
DUP2
DUP2
DUP2
DUP6
DUP9
DUP4
CALL
POP
POP
PUSH1 0x03 ()
DUP1
SLOAD
SWAP2
SWAP1
SWAP2
SUB
SWAP1
SSTORE
POP
POP
PUSH1 0x01 ()
DUP1
SLOAD
DUP2
ADD
SWAP1
SSTORE
PUSH2 0x0334 (4)
JUMP
JUMPDEST
PUSH1 0x04 ()
SLOAD
PUSH1 0x02 ()
SLOAD
PUSH1 0x40 (@)
MLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
SWAP3
SWAP1
SWAP3
AND
SWAP2
PUSH1 0x00 ()
SWAP2
SWAP1
DUP3
DUP2
DUP2
DUP2
DUP6
DUP9
DUP4
CALL
POP
POP
POP
PUSH1 0x02 ()
SSTORE
POP
JUMP
Missing opcode 
Missing opcode 
Missing opcode 
Missing opcode 
SLOAD
DUP12
PUSH3 0xa8d603 (¨Ö)
GASLIMIT
Missing opcode 
DUP9
CODESIZE
PUSH16 0xc84ba6bc95484008f6362f93160ef3e5 (ÈK¦¼•H@ö6/“óå)
PUSH5 0x ()
blog comments powered by Disqus