Balance:0 Ether ($0.00) | Buy more

Last 100 sent transactions

HashToAmountTime
 0xcdeeb5...0xd9145eCbbfD234Db0802df65983A56A2bd59A99610.1 Ether ($2,990.61)2017-05-12 00:25:08 (a month ago)

Last 100 received transactions

HashFromAmountTime
0xf0f24ca3...0xd9145eCbbfD234Db0802df65983A56A2bd59A9960 Ether ($0.00)2017-05-12 00:25:08 (a month ago)
0x5f42bc49...0xd9145eCbbfD234Db0802df65983A56A2bd59A9960.1 Ether ($29.61)2016-06-17 22:26:45 (a year ago)
0xb0029cea...0xd9145eCbbfD234Db0802df65983A56A2bd59A99610 Ether ($2,961.00)2016-06-17 21:50:55 (a year ago)
 0x1e1209...0xd9145eCbbfD234Db0802df65983A56A2bd59A99610 Ether ($2,961.00)2016-06-17 21:50:55 (a year ago)

Last 100 mined blocks

NumberDifficultyTimeReward

Last 100 mined uncles

Block NumberUncle NumberReward

Verified contract source code available!

How does it work?
  • Contract name: PRNG_Challenge
  • Compiler version: v0.3.2-2016-04-22-dd4300d
  • Optimization used: Yes
  • Source:
    contract PRNG_Challenge {
    
        // PRIVATE VARIABLES
        address private admin;
        uint256 private constant min_value = 100 finney; // 0.1 ETH
        
        // PUBLIC VARIABLES
        uint256 public constant lucky_number = 108435827775939881852079940206236050880764931249577763315065068000725104274235;
        uint256 public last_number;
        uint256 public attempts;
        address public winner;
        
        // EVENTS
        event Attempt(address Participant, uint256 Number);
        event Winner(address Winner_Address, uint256 Amount);
    
        // CONSTRUCTOR
        function PRNG_Challenge()
            private
        {
            admin = msg.sender;
            last_number = 0;
            attempts = 0;
            winner = 0;
        }
    
        // MODIFIERS
        modifier only_min_value() {
            if (msg.value < min_value) throw;
            _
        }
        modifier only_no_value() {
            if (msg.value != 0)  throw;
            _
        }
        modifier only_admin() {
            if (msg.sender != admin) throw;
            _
        }
        modifier not_killed() {
            if (winner != 0) throw;
            _
        }
        
        // CHALLENGE
        function challenge()
            private
        {
            address participant = msg.sender;
            uint64 shift_32 = uint64(4294967296); // Shift by 32 bit
            uint32 hash32 = uint32(sha3(msg.value,participant,participant.balance,block.blockhash(block.number-1),block.timestamp,block.number)); // Entropy
            uint64 hash64 = uint64(hash32)*shift_32 + uint32(sha3(hash32));
            uint96 hash96 = uint96(hash64)*shift_32 + uint32(sha3(hash64));
            uint128 hash128 = uint128(hash96)*shift_32 + uint32(sha3(hash96));
            uint160 hash160 = uint160(hash128)*shift_32 + uint32(sha3(hash128));
            uint192 hash192 = uint192(hash160)*shift_32 + uint32(sha3(hash160));
            uint224 hash224 = uint224(hash192)*shift_32 + uint32(sha3(hash192));
            uint256 hash256 = uint256(hash224)*shift_32 + uint32(sha3(hash224));
            if (hash256 == lucky_number) {
                Winner(participant, this.balance);
                if (!participant.send(this.balance)) throw;
                winner = participant;
            }
            last_number = hash256;
            attempts++;
            Attempt(participant, last_number);
        }
        
        // KILL
        function admin_kill()
            public
            not_killed()
            only_admin()
            only_no_value()
        {
            if (!admin.send(this.balance)) throw;
            winner = admin;
        }
        
        // DEFAULT FUNCTION
        function()
            public
            not_killed()
            only_min_value()
        {
            challenge();
        }
    
    }
  • ABI:
    [
      {
        "constant": true,
        "inputs": [],
        "name": "lucky_number",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "attempts",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "last_number",
        "outputs": [
          {
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function"
      },
      {
        "constant": false,
        "inputs": [],
        "name": "admin_kill",
        "outputs": [],
        "type": "function"
      },
      {
        "constant": true,
        "inputs": [],
        "name": "winner",
        "outputs": [
          {
            "name": "",
            "type": "address"
          }
        ],
        "type": "function"
      },
      {
        "inputs": [],
        "type": "constructor"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": false,
            "name": "Participant",
            "type": "address"
          },
          {
            "indexed": false,
            "name": "Number",
            "type": "uint256"
          }
        ],
        "name": "Attempt",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": false,
            "name": "Winner_Address",
            "type": "address"
          },
          {
            "indexed": false,
            "name": "Amount",
            "type": "uint256"
          }
        ],
        "name": "Winner",
        "type": "event"
      }
    ]
  • Contract creation bytecode:
    0x606060405260008054600160a060020a031990811633178255600182905560029190915560038054909116905561040c8061003a6000396000f36060604052361561004b5760e060020a60003504634d94994c81146100665780635754a0421461008d578063646798061461009657806376da56671461009f578063dfbf53ae146100ba575b6100cc600354600160a060020a03166000146100ce57610002565b6102fb7fefbc80e969faaf2a20be15184d685ac7875ee5039b75ebe0d1d02fdf0a932b3b81565b6102fb60025481565b6102fb60015481565b6100cc600354600160a060020a031660001461038357610002565b6102fb600354600160a060020a031681565b005b67016345785d8a00003410156100e357610002565b34606090815233600160a060020a038181166c0100000000000000000000000081810260805290316094524360001981014060b49081524260d45260f491909152842063ffffffff80821660e060020a810287526004872082166401000000009182020167ffffffffffffffff8116780100000000000000000000000000000000000000000000000081028952600889208416908302016bffffffffffffffffffffffff81167401000000000000000000000000000000000000000081028a52600c8a208516908402016fffffffffffffffffffffffffffffffff811670010000000000000000000000000000000081028b5260108b208616908502019788169687028a5260148a2085169684029690960177ffffffffffffffffffffffffffffffffffffffffffffffff81166801000000000000000081028b5260188b208616908502017bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168502808c52601c909b206102f99b9599979894979396949593949293919216017fefbc80e969faaf2a20be15184d685ac7875ee5039b75ebe0d1d02fdf0a932b3b81141561032557600160a060020a038a8116606090815230909116316080527f9c2270628a9b29d30ae96b6c4c14ed646ee134febdce38a5b77f2bde9cea2e2090604090a1600160a060020a038a811690600090301631606082818181858883f19350505050151561030557610002565b565b6060908152602090f35b6003805473ffffffffffffffffffffffffffffffffffffffff19168b1790555b600181815560028054909101905560408051600160a060020a038c1681526020810183905281517f95eb8f158d368917721446e05d3241c9a5ee01f5a9d7dede3fbb1b243addd0b9929181900390910190a150505050505050505050565b600054600160a060020a03908116339091161461039f57610002565b346000146103ac57610002565b60008054600160a060020a039081169190301631606082818181858883f1935050505015156103da57610002565b6000546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905556
PUSH1 0x60 (`)
PUSH1 0x40 (@)
MSTORE
CALLDATASIZE
ISZERO
PUSH2 0x004b (K)
JUMPI
PUSH1 0xe0 (à)
PUSH1 0x02 ()
EXP
PUSH1 0x00 ()
CALLDATALOAD
DIV
PUSH4 0x4d94994c (M”™L)
DUP2
EQ
PUSH2 0x0066 (f)
JUMPI
DUP1
PUSH4 0x5754a042 (WT B)
EQ
PUSH2 0x008d ()
JUMPI
DUP1
PUSH4 0x64679806 (dg˜)
EQ
PUSH2 0x0096 (–)
JUMPI
DUP1
PUSH4 0x76da5667 (vÚVg)
EQ
PUSH2 0x009f (Ÿ)
JUMPI
DUP1
PUSH4 0xdfbf53ae (ß¿S®)
EQ
PUSH2 0x00ba (º)
JUMPI
JUMPDEST
PUSH2 0x00cc (Ì)
PUSH1 0x03 ()
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
AND
PUSH1 0x00 ()
EQ
PUSH2 0x00ce (Î)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
PUSH2 0x02fb (û)
PUSH32 0xefbc80e969faaf2a20be15184d685ac7875ee5039b75ebe0d1d02fdf0a932b3b (＀éiú¯* ¾MhZLJ^å›uëàÑÐ/ß
“+;)
DUP2
JUMP
JUMPDEST
PUSH2 0x02fb (û)
PUSH1 0x02 ()
SLOAD
DUP2
JUMP
JUMPDEST
PUSH2 0x02fb (û)
PUSH1 0x01 ()
SLOAD
DUP2
JUMP
JUMPDEST
PUSH2 0x00cc (Ì)
PUSH1 0x03 ()
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
AND
PUSH1 0x00 ()
EQ
PUSH2 0x0383 (ƒ)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
PUSH2 0x02fb (û)
PUSH1 0x03 ()
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
AND
DUP2
JUMP
JUMPDEST
STOP
JUMPDEST
PUSH8 0x016345785d8a0000 (cEx]Š)
CALLVALUE
LT
ISZERO
PUSH2 0x00e3 (ã)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
CALLVALUE
PUSH1 0x60 (`)
SWAP1
DUP2
MSTORE
CALLER
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
DUP2
DUP2
AND
PUSH13 0x01000000000000000000000000 ()
DUP2
DUP2
MUL
PUSH1 0x80 (€)
MSTORE
SWAP1
BALANCE
PUSH1 0x94 (”)
MSTORE
NUMBER
PUSH1 0x00 ()
NOT
DUP2
ADD
BLOCKHASH
PUSH1 0xb4 (´)
SWAP1
DUP2
MSTORE
TIMESTAMP
PUSH1 0xd4 (Ô)
MSTORE
PUSH1 0xf4 (ô)
SWAP2
SWAP1
SWAP2
MSTORE
DUP5
SHA3
PUSH4 0xffffffff (ÿÿÿÿ)
DUP1
DUP3
AND
PUSH1 0xe0 (à)
PUSH1 0x02 ()
EXP
DUP2
MUL
DUP8
MSTORE
PUSH1 0x04 ()
DUP8
SHA3
DUP3
AND
PUSH5 0x0100000000 ()
SWAP2
DUP3
MUL
ADD
PUSH8 0xffffffffffffffff (ÿÿÿÿÿÿÿÿ)
DUP2
AND
PUSH25 0x01000000000000000000000000000000000000000000000000 ()
DUP2
MUL
DUP10
MSTORE
PUSH1 0x08 ()
DUP10
SHA3
DUP5
AND
SWAP1
DUP4
MUL
ADD
PUSH12 0xffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿ)
DUP2
AND
PUSH21 0x010000000000000000000000000000000000000000 ()
DUP2
MUL
DUP11
MSTORE
PUSH1 0x0c ()
DUP11
SHA3
DUP6
AND
SWAP1
DUP5
MUL
ADD
PUSH16 0xffffffffffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)
DUP2
AND
PUSH17 0x0100000000000000000000000000000000 ()
DUP2
MUL
DUP12
MSTORE
PUSH1 0x10 ()
DUP12
SHA3
DUP7
AND
SWAP1
DUP6
MUL
ADD
SWAP8
DUP9
AND
SWAP7
DUP8
MUL
DUP11
MSTORE
PUSH1 0x14 ()
DUP11
SHA3
DUP6
AND
SWAP7
DUP5
MUL
SWAP7
SWAP1
SWAP7
ADD
PUSH24 0xffffffffffffffffffffffffffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)
DUP2
AND
PUSH9 0x010000000000000000 ()
DUP2
MUL
DUP12
MSTORE
PUSH1 0x18 ()
DUP12
SHA3
DUP7
AND
SWAP1
DUP6
MUL
ADD
PUSH28 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)
DUP2
AND
DUP6
MUL
DUP1
DUP13
MSTORE
PUSH1 0x1c ()
SWAP1
SWAP12
SHA3
PUSH2 0x02f9 (ù)
SWAP12
SWAP6
SWAP10
SWAP8
SWAP9
SWAP5
SWAP8
SWAP4
SWAP7
SWAP5
SWAP6
SWAP4
SWAP5
SWAP3
SWAP4
SWAP2
SWAP3
AND
ADD
PUSH32 0xefbc80e969faaf2a20be15184d685ac7875ee5039b75ebe0d1d02fdf0a932b3b (＀éiú¯* ¾MhZLJ^å›uëàÑÐ/ß
“+;)
DUP2
EQ
ISZERO
PUSH2 0x0325 (%)
JUMPI
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
DUP11
DUP2
AND
PUSH1 0x60 (`)
SWAP1
DUP2
MSTORE
ADDRESS
SWAP1
SWAP2
AND
BALANCE
PUSH1 0x80 (€)
MSTORE
PUSH32 0x9c2270628a9b29d30ae96b6c4c14ed646ee134febdce38a5b77f2bde9cea2e20 (œ"pbŠ›)Ó
éklLídná4þ½Î8¥·+ޜê. )
SWAP1
PUSH1 0x40 (@)
SWAP1
LOG1
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
DUP11
DUP2
AND
SWAP1
PUSH1 0x00 ()
SWAP1
ADDRESS
AND
BALANCE
PUSH1 0x60 (`)
DUP3
DUP2
DUP2
DUP2
DUP6
DUP9
DUP4
CALL
SWAP4
POP
POP
POP
POP
ISZERO
ISZERO
PUSH2 0x0305 ()
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
JUMP
JUMPDEST
PUSH1 0x60 (`)
SWAP1
DUP2
MSTORE
PUSH1 0x20 ( )
SWAP1
RETURN
JUMPDEST
PUSH1 0x03 ()
DUP1
SLOAD
PUSH20 0xffffffffffffffffffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)
NOT
AND
DUP12
OR
SWAP1
SSTORE
JUMPDEST
PUSH1 0x01 ()
DUP2
DUP2
SSTORE
PUSH1 0x02 ()
DUP1
SLOAD
SWAP1
SWAP2
ADD
SWAP1
SSTORE
PUSH1 0x40 (@)
DUP1
MLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
DUP13
AND
DUP2
MSTORE
PUSH1 0x20 ( )
DUP2
ADD
DUP4
SWAP1
MSTORE
DUP2
MLOAD
PUSH32 0x95eb8f158d368917721446e05d3241c9a5ee01f5a9d7dede3fbb1b243addd0b9 (•ë6‰rFà]2AÉ¥îõ©×ÞÞ?»$:Ýй)
SWAP3
SWAP2
DUP2
SWAP1
SUB
SWAP1
SWAP2
ADD
SWAP1
LOG1
POP
POP
POP
POP
POP
POP
POP
POP
POP
POP
JUMP
JUMPDEST
PUSH1 0x00 ()
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
SWAP1
DUP2
AND
CALLER
SWAP1
SWAP2
AND
EQ
PUSH2 0x039f (Ÿ)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
CALLVALUE
PUSH1 0x00 ()
EQ
PUSH2 0x03ac (¬)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
PUSH1 0x00 ()
DUP1
SLOAD
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
SWAP1
DUP2
AND
SWAP2
SWAP1
ADDRESS
AND
BALANCE
PUSH1 0x60 (`)
DUP3
DUP2
DUP2
DUP2
DUP6
DUP9
DUP4
CALL
SWAP4
POP
POP
POP
POP
ISZERO
ISZERO
PUSH2 0x03da (Ú)
JUMPI
PUSH2 0x0002 ()
JUMP
JUMPDEST
PUSH1 0x00 ()
SLOAD
PUSH1 0x03 ()
DUP1
SLOAD
PUSH20 0xffffffffffffffffffffffffffffffffffffffff (ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)
NOT
AND
PUSH1 0x01 ()
PUSH1 0xa0 ( )
PUSH1 0x02 ()
EXP
SUB
SWAP3
SWAP1
SWAP3
AND
SWAP2
SWAP1
SWAP2
OR
SWAP1
SSTORE
JUMP

Token balances

TokenBalance

Token transactions

Tx HashBlockTimeFromToAmount
blog comments powered by Disqus