Contract Overview | SmartPool.io
ETH Balance: 47,918.338537797696587232 Ether
Mined:  9365 blocks and 358 uncles
No Of Transactions: 1941 txns
  Latest 25 txns from a total Of 1941 transactions View All

TxHash Age From To Value [TxFee]
0x308b6c874d547f38e813601f16057bd44e204ebe2fde66303e8042d09e2e68574 days 12 hrs ago0x56e292a201c0cffc3c7b008cc4d572d7f82aa733  IN   SmartPool.io0 Ether0.03289184
0x65e2ff716b1351d86d508812a9083c8dda896d79a6113001927912fb3317d5434 days 12 hrs ago0x56e292a201c0cffc3c7b008cc4d572d7f82aa733  IN   SmartPool.io0 Ether0.00163412
0x6bf1486e6b30bc76aa8da305963c49adab74df17c0079ad8fda718fb3b0c2b084 days 12 hrs ago0x56e292a201c0cffc3c7b008cc4d572d7f82aa733  IN   SmartPool.io0 Ether0.00403412
0xd919b08664f47aa8a7413dd4e88e7bf4f44318200071e5380f734c58fb084c284 days 12 hrs ago0x56e292a201c0cffc3c7b008cc4d572d7f82aa733  IN   SmartPool.io0 Ether0.00177104
0x872ee6eb4a69020c24e5b70a3d77fb6767d8c0d20c78f3107f5034779c064c4363 days 10 hrs ago0x002f6f379dfa31a54d89f03e28b1492762b9f2bb  IN   SmartPool.io0 Ether0.00177144
0x126d4ab074af669754f0a2caa7f4674f7f3743d6aedf2d4438a332c62742a5c076 days 20 hrs ago0xe3088d590ce4cdeb09368db31354a566d64b7c99  IN   SmartPool.io0 Ether0.0017718
0x04c16fac506eaa2830237aab83dd3b2368a9df6984d409989decc67a3544615e136 days 3 hrs ago0xe034afdcc2ba0441ff215ee9ba0da3e86450108d  IN   SmartPool.io1 Ether0.001520187709
0x9eefeddeda749fad9961140c74cc7e7a3738579462020dc1c66c325a95b1f64c139 days 38 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00193412
0x08d4700fe8f0a890afdf2bebe61a12798e22f12e984590f854ed70ae9931371f139 days 38 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.0708936
0x8e473b2c3889043708d2760475f495e3ae5fc62e86cfd4159d5db88175380eda139 days 39 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00193412
0x5bb6775a28caf421c0cb1175ef2973332b77b032100fd266ef51434df31583ab139 days 40 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.07088492
0x49fdb45c4649f131ffff21a0dc4b9143e3d87c21d5e250b2a20413d6be1a9131139 days 43 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00193412
0xcdad249a063a8f1e78e126bf0bf1d26fc0d6bac76b79ce5051e7d868cac1d35c139 days 43 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.07089268
0x74ea9965c007285c565f1490f585db08ed46931a6e64939b3f28c58986d75b6e139 days 46 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00193284
0x4ef137d686fd7eebe9a41b939150221e6f8e7c694c0baa3ad293b4b8868f62c1139 days 47 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.07093628
0x80ffbca78e5bb5d47e293f37e2088a37244fc86257686f9455cadd8c2db146b2139 days 49 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00403412
0x729a36da3556e5d951e0a6392529b52777c59fa1f49156b5960330ec5abbadfe139 days 54 mins ago0x7ebacfc8f0930ddd165ee366dc61b561f6db9239  IN   SmartPool.io0 Ether0.00177284
0xe362f2dff4b5cb12f674557a1ac6af70683a5a1512c7e588f874d5df56783633141 days 13 hrs ago0xc6d78a05d62970942f973f447fa4f18f23c9f41f  IN   SmartPool.io0 Ether0.0017724
0x8108cebfafdd0cb09cc4b4b68788553e397dd18412ca8d8a664a4ab7df56e31e158 days 8 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.07111278
0x0683859fb9e8e58183aca9ce221da8ac92f4b5fcc717bd34ccc40b131e24905a158 days 8 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.0019354
0x922257bfa8bd37f53096048f8bf0960ba2dcfd80a20e9e97e238e56ac65553ae158 days 11 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.07116838
0x89149f5c6ed2364a2c720a495f78b0974d5f7901c1b52eeed70608227d127e53158 days 11 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.0019354
0xe25c23d07a47adad60443957622c4220c1557a8a28601297cc01d104049120c4158 days 12 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.0711403
0x7661993b33264a673b80fac6962754f4e0a7044efe61c679850b3370f49198d7158 days 12 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.0016354
0x9e19a9622ecd28293f39a7da9caaa71e7e214f2815640c8a4bd5d268b443ebcb158 days 13 hrs ago0x34b0d4aea31f16b302484cc1441c3ea229648e8f  IN   SmartPool.io0 Ether0.00193412
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x08d4700fe8f0a890afdf2bebe61a12798e22f12e984590f854ed70ae9931371f874164139 days 38 mins ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7ebacfc8f0930ddd165ee366dc61b561f6db92392.705488002180710402 Ether
0x5bb6775a28caf421c0cb1175ef2973332b77b032100fd266ef51434df31583ab874150139 days 40 mins ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7ebacfc8f0930ddd165ee366dc61b561f6db92392.152031339340002116 Ether
0xcdad249a063a8f1e78e126bf0bf1d26fc0d6bac76b79ce5051e7d868cac1d35c874142139 days 43 mins ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7ebacfc8f0930ddd165ee366dc61b561f6db92392.485375792532360982 Ether
0x4ef137d686fd7eebe9a41b939150221e6f8e7c694c0baa3ad293b4b8868f62c1874130139 days 47 mins ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7ebacfc8f0930ddd165ee366dc61b561f6db92392.173642991963063718 Ether
0x8108cebfafdd0cb09cc4b4b68788553e397dd18412ca8d8a664a4ab7df56e31e757653158 days 8 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x34b0d4aea31f16b302484cc1441c3ea229648e8f25.331669305002623826 Ether
0x922257bfa8bd37f53096048f8bf0960ba2dcfd80a20e9e97e238e56ac65553ae756535158 days 11 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x34b0d4aea31f16b302484cc1441c3ea229648e8f29.530167953534732776 Ether
0xe25c23d07a47adad60443957622c4220c1557a8a28601297cc01d104049120c4756375158 days 12 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x34b0d4aea31f16b302484cc1441c3ea229648e8f29.458247614562086474 Ether
0xc99a9118d08b1c8669b50b1afd071c6ec09ca194c083a09bd4dc3c8d47b9f20d706683167 days 2 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b832.17103722750276925 Ether
0x18dba27c2ef3f87e554917b47458c9b0ce53c67cc90179b9d2c6b55d1d1eef9f706564167 days 2 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b829.657938353630410264 Ether
0x8d6a0cea702e17b7b17d59a3295f06fc2bd9106763f4f36856452df0ea702fe7706466167 days 3 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b829.404175522773072884 Ether
0xba5bd7e99bb265c56827ace7f8dfd9c5b4ed3d68db1650e307d0b039de02015b706371167 days 3 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b832.099157426363456946 Ether
0x33472a96be7e1d8972997d264a25268d392ea24e22483207b106311810106fc7706284167 days 3 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b829.998106585508157212 Ether
0x3e1b64f5725d198209d57e2effa3e186a1cad431cba4884d09117ef9214f46fa706223167 days 3 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b833.482297109530449598 Ether
0x1004fb8a8c500d781b0de018b7f9d051f69d85881506ad66013476be9e89594c706133167 days 4 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b830.232207637162582804 Ether
0x0db1a4cfc35e2bc842a0d41049274ed340dbf44c41d558ae69826011e65b51d5706039167 days 4 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b830.761027884137734402 Ether
0xbc6ddd9719e7f656f5407664bb512821eed0b2747b1e6fbc81ac2d3cd06fe8b6705989167 days 4 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b830.846772088978565252 Ether
0xebc5fd02e54292b0cd3cabc74f53beedbf0845cb1e53ad69af77ab373d592ae5705907167 days 5 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b830.327133166022503986 Ether
0x77e7431b033b30e55fb051577ebae57e06726daf47a39dba3b93d607181d4d45705752167 days 5 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b830.40726792863874948 Ether
0x49e1f060c6fb248d7f7cdca65fcad803d4b6082eb595ef95f247f28a8229bcd3705636167 days 6 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b832.96787302386097064 Ether
0x6beec378f8ed5f364ed63b4d411ee8b260de088143c67ae0e0f120acf0d8c40b705502167 days 6 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b831.595214873979440562 Ether
0x324528b3384ba72dab8dbcccec113b862fc935ea8884db17ccdc925d632ba355705370167 days 7 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b831.998035546485931974 Ether
0x9b181bf5e1d8443cee9c6dba85f7d35cb3f192eb1733380e5e48b6e43041560d705262167 days 7 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b832.217107056684909538 Ether
0x94cb1721f8920524634dd4a319b8cceb386cfe45d5a468528444a9d95226a72d705164167 days 7 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b834.312230036377940658 Ether
0x8049b0f581dc5feb26b25d6a73cbfa14037dbf8c31f7c1b50bae2c1fff3bc626705083167 days 8 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b831.972408394732075338 Ether
0xbef7f514d6184bd64a15442496e73291e8a0dd73e4cec3de368acc0954bd7158705002167 days 8 hrs ago0xf7d93bcb8e4372f46383ecee82f9adf1aa397ba90x7237f567ce82e50e3a9efa04b1fd16d4ff6cf0b832.14404056244649568 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: TestPool
Compiler Version: v0.4.9+commit.364da425
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.9;

//import "./SHA3_512.sol";

contract SHA3_512 {
    function SHA3_512() {}

    event Result(uint result);

    
    function keccak_f(uint[25] A) constant internal returns(uint[25]) {
        uint[5] memory C;
        uint[5] memory D;
        uint x;
        uint y;
        //uint D_0; uint D_1; uint D_2; uint D_3; uint D_4;
        uint[25] memory B;
        
        uint[24] memory RC= [
                   uint(0x0000000000000001),
                   0x0000000000008082,
                   0x800000000000808A,
                   0x8000000080008000,
                   0x000000000000808B,
                   0x0000000080000001,
                   0x8000000080008081,
                   0x8000000000008009,
                   0x000000000000008A,
                   0x0000000000000088,
                   0x0000000080008009,
                   0x000000008000000A,
                   0x000000008000808B,
                   0x800000000000008B,
                   0x8000000000008089,
                   0x8000000000008003,
                   0x8000000000008002,
                   0x8000000000000080,
                   0x000000000000800A,
                   0x800000008000000A,
                   0x8000000080008081,
                   0x8000000000008080,
                   0x0000000080000001,
                   0x8000000080008008 ];
        
        for( uint i = 0 ; i < 24 ; i++ ) {
            /*
            for( x = 0 ; x < 5 ; x++ ) {
                C[x] = A[5*x]^A[5*x+1]^A[5*x+2]^A[5*x+3]^A[5*x+4];                
            }*/
                       
            C[0]=A[0]^A[1]^A[2]^A[3]^A[4];
            C[1]=A[5]^A[6]^A[7]^A[8]^A[9];
            C[2]=A[10]^A[11]^A[12]^A[13]^A[14];
            C[3]=A[15]^A[16]^A[17]^A[18]^A[19];
            C[4]=A[20]^A[21]^A[22]^A[23]^A[24];

            /*
            for( x = 0 ; x < 5 ; x++ ) {
                D[x] = C[(x+4)%5]^((C[(x+1)%5] * 2)&0xffffffffffffffff | (C[(x+1)%5]/(2**63)));
            }*/
                        
            
            D[0]=C[4] ^ ((C[1] * 2)&0xffffffffffffffff | (C[1] / (2 ** 63)));
            D[1]=C[0] ^ ((C[2] * 2)&0xffffffffffffffff | (C[2] / (2 ** 63)));
            D[2]=C[1] ^ ((C[3] * 2)&0xffffffffffffffff | (C[3] / (2 ** 63)));
            D[3]=C[2] ^ ((C[4] * 2)&0xffffffffffffffff | (C[4] / (2 ** 63)));
            D[4]=C[3] ^ ((C[0] * 2)&0xffffffffffffffff | (C[0] / (2 ** 63)));

            /*
            for( x = 0 ; x < 5 ; x++ ) {
                for( y = 0 ; y < 5 ; y++ ) {
                    A[5*x+y] = A[5*x+y] ^ D[x];
                }            
            }*/
            

            
            A[0]=A[0] ^ D[0];
            A[1]=A[1] ^ D[0];
            A[2]=A[2] ^ D[0];
            A[3]=A[3] ^ D[0];
            A[4]=A[4] ^ D[0];
            A[5]=A[5] ^ D[1];
            A[6]=A[6] ^ D[1];
            A[7]=A[7] ^ D[1];
            A[8]=A[8] ^ D[1];
            A[9]=A[9] ^ D[1];
            A[10]=A[10] ^ D[2];
            A[11]=A[11] ^ D[2];
            A[12]=A[12] ^ D[2];
            A[13]=A[13] ^ D[2];
            A[14]=A[14] ^ D[2];
            A[15]=A[15] ^ D[3];
            A[16]=A[16] ^ D[3];
            A[17]=A[17] ^ D[3];
            A[18]=A[18] ^ D[3];
            A[19]=A[19] ^ D[3];
            A[20]=A[20] ^ D[4];
            A[21]=A[21] ^ D[4];
            A[22]=A[22] ^ D[4];
            A[23]=A[23] ^ D[4];
            A[24]=A[24] ^ D[4];

            /*Rho and pi steps*/            
            B[0]=A[0];
            B[8]=((A[1] * (2 ** 36))&0xffffffffffffffff | (A[1] / (2 ** 28)));
            B[11]=((A[2] * (2 ** 3))&0xffffffffffffffff | (A[2] / (2 ** 61)));
            B[19]=((A[3] * (2 ** 41))&0xffffffffffffffff | (A[3] / (2 ** 23)));
            B[22]=((A[4] * (2 ** 18))&0xffffffffffffffff | (A[4] / (2 ** 46)));
            B[2]=((A[5] * (2 ** 1))&0xffffffffffffffff | (A[5] / (2 ** 63)));
            B[5]=((A[6] * (2 ** 44))&0xffffffffffffffff | (A[6] / (2 ** 20)));
            B[13]=((A[7] * (2 ** 10))&0xffffffffffffffff | (A[7] / (2 ** 54)));
            B[16]=((A[8] * (2 ** 45))&0xffffffffffffffff | (A[8] / (2 ** 19)));
            B[24]=((A[9] * (2 ** 2))&0xffffffffffffffff | (A[9] / (2 ** 62)));
            B[4]=((A[10] * (2 ** 62))&0xffffffffffffffff | (A[10] / (2 ** 2)));
            B[7]=((A[11] * (2 ** 6))&0xffffffffffffffff | (A[11] / (2 ** 58)));
            B[10]=((A[12] * (2 ** 43))&0xffffffffffffffff | (A[12] / (2 ** 21)));
            B[18]=((A[13] * (2 ** 15))&0xffffffffffffffff | (A[13] / (2 ** 49)));
            B[21]=((A[14] * (2 ** 61))&0xffffffffffffffff | (A[14] / (2 ** 3)));
            B[1]=((A[15] * (2 ** 28))&0xffffffffffffffff | (A[15] / (2 ** 36)));
            B[9]=((A[16] * (2 ** 55))&0xffffffffffffffff | (A[16] / (2 ** 9)));
            B[12]=((A[17] * (2 ** 25))&0xffffffffffffffff | (A[17] / (2 ** 39)));
            B[15]=((A[18] * (2 ** 21))&0xffffffffffffffff | (A[18] / (2 ** 43)));
            B[23]=((A[19] * (2 ** 56))&0xffffffffffffffff | (A[19] / (2 ** 8)));
            B[3]=((A[20] * (2 ** 27))&0xffffffffffffffff | (A[20] / (2 ** 37)));
            B[6]=((A[21] * (2 ** 20))&0xffffffffffffffff | (A[21] / (2 ** 44)));
            B[14]=((A[22] * (2 ** 39))&0xffffffffffffffff | (A[22] / (2 ** 25)));
            B[17]=((A[23] * (2 ** 8))&0xffffffffffffffff | (A[23] / (2 ** 56)));
            B[20]=((A[24] * (2 ** 14))&0xffffffffffffffff | (A[24] / (2 ** 50)));

            /*Xi state*/
            /*
            for( x = 0 ; x < 5 ; x++ ) {
                for( y = 0 ; y < 5 ; y++ ) {
                    A[5*x+y] = B[5*x+y]^((~B[5*((x+1)%5)+y]) & B[5*((x+2)%5)+y]);
                }
            }*/
            
            
            A[0]=B[0]^((~B[5]) & B[10]);
            A[1]=B[1]^((~B[6]) & B[11]);
            A[2]=B[2]^((~B[7]) & B[12]);
            A[3]=B[3]^((~B[8]) & B[13]);
            A[4]=B[4]^((~B[9]) & B[14]);
            A[5]=B[5]^((~B[10]) & B[15]);
            A[6]=B[6]^((~B[11]) & B[16]);
            A[7]=B[7]^((~B[12]) & B[17]);
            A[8]=B[8]^((~B[13]) & B[18]);
            A[9]=B[9]^((~B[14]) & B[19]);
            A[10]=B[10]^((~B[15]) & B[20]);
            A[11]=B[11]^((~B[16]) & B[21]);
            A[12]=B[12]^((~B[17]) & B[22]);
            A[13]=B[13]^((~B[18]) & B[23]);
            A[14]=B[14]^((~B[19]) & B[24]);
            A[15]=B[15]^((~B[20]) & B[0]);
            A[16]=B[16]^((~B[21]) & B[1]);
            A[17]=B[17]^((~B[22]) & B[2]);
            A[18]=B[18]^((~B[23]) & B[3]);
            A[19]=B[19]^((~B[24]) & B[4]);
            A[20]=B[20]^((~B[0]) & B[5]);
            A[21]=B[21]^((~B[1]) & B[6]);
            A[22]=B[22]^((~B[2]) & B[7]);
            A[23]=B[23]^((~B[3]) & B[8]);
            A[24]=B[24]^((~B[4]) & B[9]);

            /*Last step*/
            A[0]=A[0]^RC[i];            
        }

        
        return A;
    }
 
    
    function sponge(uint[9] M) constant internal returns(uint[16]) {
        if( (M.length * 8) != 72 ) throw;
        M[5] = 0x01;
        M[8] = 0x8000000000000000;
        
        uint r = 72;
        uint w = 8;
        uint size = M.length * 8;
        
        uint[25] memory S;
        uint i; uint y; uint x;
        /*Absorbing Phase*/
        for( i = 0 ; i < size/r ; i++ ) {
            for( y = 0 ; y < 5 ; y++ ) {
                for( x = 0 ; x < 5 ; x++ ) {
                    if( (x+5*y) < (r/w) ) {
                        S[5*x+y] = S[5*x+y] ^ M[i*9 + x + 5*y];
                    }
                }
            }
            S = keccak_f(S);
        }

        /*Squeezing phase*/
        uint[16] memory result;
        uint b = 0;
        while( b < 16 ) {
            for( y = 0 ; y < 5 ; y++ ) {
                for( x = 0 ; x < 5 ; x++ ) {
                    if( (x+5*y)<(r/w) && (b<16) ) {
                        result[b] = S[5*x+y] & 0xFFFFFFFF; 
                        result[b+1] = S[5*x+y] / 0x100000000;
                        b+=2;
                    }
                }
            }
        }
         
        return result;
   }

}

////////////////////////////////////////////////////////////////////////////////

contract Ethash is SHA3_512 {
    
    
    function Ethash() {
    }
     
    function fnv( uint v1, uint v2 ) constant internal returns(uint) {
        return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;
    }



    function computeCacheRoot( uint index,
                               uint indexInElementsArray,
                               uint[] elements,
                               uint[] witness,
                               uint branchSize ) constant private returns(uint) {
 
                       
        uint leaf = computeLeaf(elements, indexInElementsArray) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

        uint left;
        uint right;
        uint node;
        bool oddBranchSize = (branchSize % 2) > 0;
         
        assembly {
            branchSize := div(branchSize,2)
            //branchSize /= 2;
        }
        uint witnessIndex = indexInElementsArray * branchSize;
        if( oddBranchSize ) witnessIndex += indexInElementsArray;  

        for( uint depth = 0 ; depth < branchSize ; depth++ ) {
            assembly {
                node := mload(add(add(witness,0x20),mul(add(depth,witnessIndex),0x20)))
            }
            //node  = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            if( index & 0x1 == 0 ) {
                left = leaf;
                assembly{
                    //right = node & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;                
                    right := and(node,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
                }
                
            }
            else {
                assembly{
                    //left = node & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
                    left := and(node,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
                }
                right = leaf;
            }
            
            leaf = uint(sha3(left,right)) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            assembly {
                index := div(index,2) 
            }
            //index = index / 2;

            //node  = witness[witnessIndex + depth] / (2**128);
            if( index & 0x1 == 0 ) {
                left = leaf;
                assembly{
                    right := div(node,0x100000000000000000000000000000000)
                    //right = node / 0x100000000000000000000000000000000;
                }
            }
            else {
                assembly {
                    //left = node / 0x100000000000000000000000000000000;
                    left := div(node,0x100000000000000000000000000000000)
                }
                right = leaf;
            }
            
            leaf = uint(sha3(left,right)) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            assembly {
                index := div(index,2) 
            }
            //index = index / 2;
        }
        
        if( oddBranchSize ) {
            assembly {
                node := mload(add(add(witness,0x20),mul(add(depth,witnessIndex),0x20)))
            }
        
            //node  = witness[witnessIndex + depth] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            if( index & 0x1 == 0 ) {
                left = leaf;
                assembly{
                    //right = node & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;                
                    right := and(node,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
                }                
            }
            else {
                assembly{
                    //left = node & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;                
                    left := and(node,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
                }
            
                right = leaf;
            }
            
            leaf = uint(sha3(left,right)) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;        
        }
        
        
        return leaf;
    }

    
    function toBE( uint x ) constant internal returns(uint) {
        uint y = 0;
        for( uint i = 0 ; i < 32 ; i++ ) {
            y = y * 256;
            y += (x & 0xFF);
            x = x / 256;            
        }
        
        return y;
        
    }
    
    function computeSha3( uint[16] s, uint[8] cmix ) constant internal returns(uint) {
        uint s0 = s[0] + s[1] * (2**32) + s[2] * (2**64) + s[3] * (2**96) +
                  (s[4] + s[5] * (2**32) + s[6] * (2**64) + s[7] * (2**96))*(2**128);

        uint s1 = s[8] + s[9] * (2**32) + s[10] * (2**64) + s[11] * (2**96) +
                  (s[12] + s[13] * (2**32) + s[14] * (2**64) + s[15] * (2**96))*(2**128);
                  
        uint c = cmix[0] + cmix[1] * (2**32) + cmix[2] * (2**64) + cmix[3] * (2**96) +
                  (cmix[4] + cmix[5] * (2**32) + cmix[6] * (2**64) + cmix[7] * (2**96))*(2**128);

        
        /* god knows why need to convert to big endian */
        return uint( sha3(toBE(s0),toBE(s1),toBE(c)) );
    }
 
 
    function computeLeaf( uint[] dataSetLookup, uint index ) constant internal returns(uint) {
        return uint( sha3(dataSetLookup[4*index],
                          dataSetLookup[4*index + 1],
                          dataSetLookup[4*index + 2],
                          dataSetLookup[4*index + 3]) );
                                    
    }
 
    function computeS( uint header, uint nonceLe ) constant internal returns(uint[16]) {
        uint[9]  memory M;
        
        header = reverseBytes(header);
        
        M[0] = uint(header) & 0xFFFFFFFFFFFFFFFF;
        header = header / 2**64;
        M[1] = uint(header) & 0xFFFFFFFFFFFFFFFF;
        header = header / 2**64;
        M[2] = uint(header) & 0xFFFFFFFFFFFFFFFF;
        header = header / 2**64;
        M[3] = uint(header) & 0xFFFFFFFFFFFFFFFF;

        // make little endian nonce
        M[4] = nonceLe;
        return sponge(M);
    }
    
    function reverseBytes( uint input ) constant internal returns(uint) {
        uint result = 0;
        for(uint i = 0 ; i < 32 ; i++ ) {
            result = result * 256;
            result += input & 0xff;
            
            input /= 256;
        }
        
        return result;
    }
    
    event Log( uint result );
    function hashimoto( bytes32 header,
                        bytes8 nonceLe,
                        uint fullSizeIn128Resultion,
                        uint[] dataSetLookup,
                        uint[] witnessForLookup,
                        uint   branchSize,
                        uint   root ) constant returns(uint) {
         
        uint[16] memory s;
        uint[32] memory mix;
        uint[8]  memory cmix;
                
        uint i;
        uint j;
        

        
        s = computeS(uint(header), uint(nonceLe));
        for( i = 0 ; i < 16 ; i++ ) {            
            assembly {
                let offset := mul(i,0x20)
                
                //mix[i] = s[i];
                mstore(add(mix,offset),mload(add(s,offset)))
                
                // mix[i+16] = s[i];
                mstore(add(mix,add(0x200,offset)),mload(add(s,offset)))    
            }
        }
        
        for( i = 0 ; i < 64 ; i++ ) {
            uint p = fnv( i ^ s[0], mix[i % 32]) % fullSizeIn128Resultion;
            if( computeCacheRoot( p, i, dataSetLookup,  witnessForLookup, branchSize )  != root ) {
                // PoW failed
                return 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            }        

            for( j = 0 ; j < 8 ; j++ ) {

                assembly{
                    //mix[j] = fnv(mix[j], dataSetLookup[4*i] & varFFFFFFFF );
                    let dataOffset := add(mul(0x80,i),add(dataSetLookup,0x20))
                    let dataValue   := and(mload(dataOffset),0xFFFFFFFF)
                    
                    let mixOffset := add(mix,mul(0x20,j))
                    let mixValue  := mload(mixOffset)
                    
                    // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;
                    let fnvValue := and(xor(mul(mixValue,0x01000193),dataValue),0xFFFFFFFF)                    
                    mstore(mixOffset,fnvValue)
                    
                    //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );
                    dataOffset := add(dataOffset,0x20)
                    dataValue   := and(mload(dataOffset),0xFFFFFFFF)
                    
                    mixOffset := add(mixOffset,0x100)
                    mixValue  := mload(mixOffset)
                    
                    // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;
                    let fnvValue := and(xor(mul(mixValue,0x01000193),dataValue),0xFFFFFFFF)                    
                    mstore(mixOffset,fnvValue)

                    //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );
                    dataOffset := add(dataOffset,0x20)
                    dataValue   := and(mload(dataOffset),0xFFFFFFFF)
                    
                    mixOffset := add(mixOffset,0x100)
                    mixValue  := mload(mixOffset)
                    
                    // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;
                    let fnvValue := and(xor(mul(mixValue,0x01000193),dataValue),0xFFFFFFFF)                    
                    mstore(mixOffset,fnvValue)

                    //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );
                    dataOffset := add(dataOffset,0x20)
                    dataValue   := and(mload(dataOffset),0xFFFFFFFF)
                    
                    mixOffset := add(mixOffset,0x100)
                    mixValue  := mload(mixOffset)
                    
                    // fnv = return ((v1*0x01000193) ^ v2) & 0xFFFFFFFF;
                    let fnvValue := and(xor(mul(mixValue,0x01000193),dataValue),0xFFFFFFFF)                    
                    mstore(mixOffset,fnvValue)                    
                                        
                }

                
                //mix[j] = fnv(mix[j], dataSetLookup[4*i] & 0xFFFFFFFF );
                //mix[j+8] = fnv(mix[j+8], dataSetLookup[4*i + 1] & 0xFFFFFFFF );
                //mix[j+16] = fnv(mix[j+16], dataSetLookup[4*i + 2] & 0xFFFFFFFF );                
                //mix[j+24] = fnv(mix[j+24], dataSetLookup[4*i + 3] & 0xFFFFFFFF );
                
                
                //dataSetLookup[4*i    ] = dataSetLookup[4*i    ]/(2**32);
                //dataSetLookup[4*i + 1] = dataSetLookup[4*i + 1]/(2**32);
                //dataSetLookup[4*i + 2] = dataSetLookup[4*i + 2]/(2**32);
                //dataSetLookup[4*i + 3] = dataSetLookup[4*i + 3]/(2**32);                
                
                assembly{
                    let offset := add(add(dataSetLookup,0x20),mul(i,0x80))
                    let value  := div(mload(offset),0x100000000)
                    mstore(offset,value)
                                       
                    offset := add(offset,0x20)
                    value  := div(mload(offset),0x100000000)
                    mstore(offset,value)
                    
                    offset := add(offset,0x20)
                    value  := div(mload(offset),0x100000000)
                    mstore(offset,value)                    
                    
                    offset := add(offset,0x20)
                    value  := div(mload(offset),0x100000000)
                    mstore(offset,value)                                                                                
                }                
            }
        }
        
        
        for( i = 0 ; i < 32 ; i += 4) {
            cmix[i/4] = (fnv(fnv(fnv(mix[i], mix[i+1]), mix[i+2]), mix[i+3]));
        }
        

        uint result = computeSha3(s,cmix); 
        Log(result);
        return result;
        
    }
}

/**
* @title RLPReader
*
* RLPReader is used to read and parse RLP encoded data in memory.
*
* @author Andreas Olofsson (androlo1980@gmail.com)
*/
library RLP {

 uint constant DATA_SHORT_START = 0x80;
 uint constant DATA_LONG_START = 0xB8;
 uint constant LIST_SHORT_START = 0xC0;
 uint constant LIST_LONG_START = 0xF8;

 uint constant DATA_LONG_OFFSET = 0xB7;
 uint constant LIST_LONG_OFFSET = 0xF7;


 struct RLPItem {
     uint _unsafe_memPtr;    // Pointer to the RLP-encoded bytes.
     uint _unsafe_length;    // Number of bytes. This is the full length of the string.
 }

 struct Iterator {
     RLPItem _unsafe_item;   // Item that's being iterated over.
     uint _unsafe_nextPtr;   // Position of the next item in the list.
 }

 /* Iterator */

 function next(Iterator memory self) internal constant returns (RLPItem memory subItem) {
     if(hasNext(self)) {
         var ptr = self._unsafe_nextPtr;
         var itemLength = _itemLength(ptr);
         subItem._unsafe_memPtr = ptr;
         subItem._unsafe_length = itemLength;
         self._unsafe_nextPtr = ptr + itemLength;
     }
     else
         throw;
 }

 function next(Iterator memory self, bool strict) internal constant returns (RLPItem memory subItem) {
     subItem = next(self);
     if(strict && !_validate(subItem))
         throw;
     return;
 }

 function hasNext(Iterator memory self) internal constant returns (bool) {
     var item = self._unsafe_item;
     return self._unsafe_nextPtr < item._unsafe_memPtr + item._unsafe_length;
 }

 /* RLPItem */

 /// @dev Creates an RLPItem from an array of RLP encoded bytes.
 /// @param self The RLP encoded bytes.
 /// @return An RLPItem
 function toRLPItem(bytes memory self) internal constant returns (RLPItem memory) {
     uint len = self.length;
     if (len == 0) {
         return RLPItem(0, 0);
     }
     uint memPtr;
     assembly {
         memPtr := add(self, 0x20)
     }
     return RLPItem(memPtr, len);
 }

 /// @dev Creates an RLPItem from an array of RLP encoded bytes.
 /// @param self The RLP encoded bytes.
 /// @param strict Will throw if the data is not RLP encoded.
 /// @return An RLPItem
 function toRLPItem(bytes memory self, bool strict) internal constant returns (RLPItem memory) {
     var item = toRLPItem(self);
     if(strict) {
         uint len = self.length;
         if(_payloadOffset(item) > len)
             throw;
         if(_itemLength(item._unsafe_memPtr) != len)
             throw;
         if(!_validate(item))
             throw;
     }
     return item;
 }

 /// @dev Check if the RLP item is null.
 /// @param self The RLP item.
 /// @return 'true' if the item is null.
 function isNull(RLPItem memory self) internal constant returns (bool ret) {
     return self._unsafe_length == 0;
 }

 /// @dev Check if the RLP item is a list.
 /// @param self The RLP item.
 /// @return 'true' if the item is a list.
 function isList(RLPItem memory self) internal constant returns (bool ret) {
     if (self._unsafe_length == 0)
         return false;
     uint memPtr = self._unsafe_memPtr;
     assembly {
         ret := iszero(lt(byte(0, mload(memPtr)), 0xC0))
     }
 }

 /// @dev Check if the RLP item is data.
 /// @param self The RLP item.
 /// @return 'true' if the item is data.
 function isData(RLPItem memory self) internal constant returns (bool ret) {
     if (self._unsafe_length == 0)
         return false;
     uint memPtr = self._unsafe_memPtr;
     assembly {
         ret := lt(byte(0, mload(memPtr)), 0xC0)
     }
 }

 /// @dev Check if the RLP item is empty (string or list).
 /// @param self The RLP item.
 /// @return 'true' if the item is null.
 function isEmpty(RLPItem memory self) internal constant returns (bool ret) {
     if(isNull(self))
         return false;
     uint b0;
     uint memPtr = self._unsafe_memPtr;
     assembly {
         b0 := byte(0, mload(memPtr))
     }
     return (b0 == DATA_SHORT_START || b0 == LIST_SHORT_START);
 }

 /// @dev Get the number of items in an RLP encoded list.
 /// @param self The RLP item.
 /// @return The number of items.
 function items(RLPItem memory self) internal constant returns (uint) {
     if (!isList(self))
         return 0;
     uint b0;
     uint memPtr = self._unsafe_memPtr;
     assembly {
         b0 := byte(0, mload(memPtr))
     }
     uint pos = memPtr + _payloadOffset(self);
     uint last = memPtr + self._unsafe_length - 1;
     uint itms;
     while(pos <= last) {
         pos += _itemLength(pos);
         itms++;
     }
     return itms;
 }

 /// @dev Create an iterator.
 /// @param self The RLP item.
 /// @return An 'Iterator' over the item.
 function iterator(RLPItem memory self) internal constant returns (Iterator memory it) {
     if (!isList(self))
         throw;
     uint ptr = self._unsafe_memPtr + _payloadOffset(self);
     it._unsafe_item = self;
     it._unsafe_nextPtr = ptr;
 }

 /// @dev Return the RLP encoded bytes.
 /// @param self The RLPItem.
 /// @return The bytes.
 function toBytes(RLPItem memory self) internal constant returns (bytes memory bts) {
     var len = self._unsafe_length;
     if (len == 0)
         return;
     bts = new bytes(len);
     _copyToBytes(self._unsafe_memPtr, bts, len);
 }

 /// @dev Decode an RLPItem into bytes. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toData(RLPItem memory self) internal constant returns (bytes memory bts) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     bts = new bytes(len);
     _copyToBytes(rStartPos, bts, len);
 }

 /// @dev Get the list of sub-items from an RLP encoded list.
 /// Warning: This is inefficient, as it requires that the list is read twice.
 /// @param self The RLP item.
 /// @return Array of RLPItems.
 function toList(RLPItem memory self) internal constant returns (RLPItem[] memory list) {
     if(!isList(self))
         throw;
     var numItems = items(self);
     list = new RLPItem[](numItems);
     var it = iterator(self);
     uint idx;
     while(hasNext(it)) {
         list[idx] = next(it);
         idx++;
     }
 }

 /// @dev Decode an RLPItem into an ascii string. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toAscii(RLPItem memory self) internal constant returns (string memory str) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     bytes memory bts = new bytes(len);
     _copyToBytes(rStartPos, bts, len);
     str = string(bts);
 }

 /// @dev Decode an RLPItem into a uint. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toUint(RLPItem memory self) internal constant returns (uint data) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     if (len > 32 || len == 0)
         throw;
     assembly {
         data := div(mload(rStartPos), exp(256, sub(32, len)))
     }
 }

 /// @dev Decode an RLPItem into a boolean. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toBool(RLPItem memory self) internal constant returns (bool data) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     if (len != 1)
         throw;
     uint temp;
     assembly {
         temp := byte(0, mload(rStartPos))
     }
     if (temp > 1)
         throw;
     return temp == 1 ? true : false;
 }

 /// @dev Decode an RLPItem into a byte. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toByte(RLPItem memory self) internal constant returns (byte data) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     if (len != 1)
         throw;
     uint temp;
     assembly {
         temp := byte(0, mload(rStartPos))
     }
     return byte(temp);
 }

 /// @dev Decode an RLPItem into an int. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toInt(RLPItem memory self) internal constant returns (int data) {
     return int(toUint(self));
 }

 /// @dev Decode an RLPItem into a bytes32. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toBytes32(RLPItem memory self) internal constant returns (bytes32 data) {
     return bytes32(toUint(self));
 }

 /// @dev Decode an RLPItem into an address. This will not work if the
 /// RLPItem is a list.
 /// @param self The RLPItem.
 /// @return The decoded string.
 function toAddress(RLPItem memory self) internal constant returns (address data) {
     if(!isData(self))
         throw;
     var (rStartPos, len) = _decode(self);
     if (len != 20)
         throw;
     assembly {
         data := div(mload(rStartPos), exp(256, 12))
     }
 }

 // Get the payload offset.
 function _payloadOffset(RLPItem memory self) private constant returns (uint) {
     if(self._unsafe_length == 0)
         return 0;
     uint b0;
     uint memPtr = self._unsafe_memPtr;
     assembly {
         b0 := byte(0, mload(memPtr))
     }
     if(b0 < DATA_SHORT_START)
         return 0;
     if(b0 < DATA_LONG_START || (b0 >= LIST_SHORT_START && b0 < LIST_LONG_START))
         return 1;
     if(b0 < LIST_SHORT_START)
         return b0 - DATA_LONG_OFFSET + 1;
     return b0 - LIST_LONG_OFFSET + 1;
 }

 // Get the full length of an RLP item.
 function _itemLength(uint memPtr) private constant returns (uint len) {
     uint b0;
     assembly {
         b0 := byte(0, mload(memPtr))
     }
     if (b0 < DATA_SHORT_START)
         len = 1;
     else if (b0 < DATA_LONG_START)
         len = b0 - DATA_SHORT_START + 1;
     else if (b0 < LIST_SHORT_START) {
         assembly {
             let bLen := sub(b0, 0xB7) // bytes length (DATA_LONG_OFFSET)
             let dLen := div(mload(add(memPtr, 1)), exp(256, sub(32, bLen))) // data length
             len := add(1, add(bLen, dLen)) // total length
         }
     }
     else if (b0 < LIST_LONG_START)
         len = b0 - LIST_SHORT_START + 1;
     else {
         assembly {
             let bLen := sub(b0, 0xF7) // bytes length (LIST_LONG_OFFSET)
             let dLen := div(mload(add(memPtr, 1)), exp(256, sub(32, bLen))) // data length
             len := add(1, add(bLen, dLen)) // total length
         }
     }
 }

 // Get start position and length of the data.
 function _decode(RLPItem memory self) private constant returns (uint memPtr, uint len) {
     if(!isData(self))
         throw;
     uint b0;
     uint start = self._unsafe_memPtr;
     assembly {
         b0 := byte(0, mload(start))
     }
     if (b0 < DATA_SHORT_START) {
         memPtr = start;
         len = 1;
         return;
     }
     if (b0 < DATA_LONG_START) {
         len = self._unsafe_length - 1;
         memPtr = start + 1;
     } else {
         uint bLen;
         assembly {
             bLen := sub(b0, 0xB7) // DATA_LONG_OFFSET
         }
         len = self._unsafe_length - 1 - bLen;
         memPtr = start + bLen + 1;
     }
     return;
 }

 // Assumes that enough memory has been allocated to store in target.
 function _copyToBytes(uint btsPtr, bytes memory tgt, uint btsLen) private constant {
     // Exploiting the fact that 'tgt' was the last thing to be allocated,
     // we can write entire words, and just overwrite any excess.
     assembly {
         {
                 let i := 0 // Start at arr + 0x20
                 let words := div(add(btsLen, 31), 32)
                 let rOffset := btsPtr
                 let wOffset := add(tgt, 0x20)
             tag_loop:
                 jumpi(end, eq(i, words))
                 {
                     let offset := mul(i, 0x20)
                     mstore(add(wOffset, offset), mload(add(rOffset, offset)))
                     i := add(i, 1)
                 }
                 jump(tag_loop)
             end:
                 mstore(add(tgt, add(0x20, mload(tgt))), 0)
         }
     }
 }

     // Check that an RLP item is valid.
     function _validate(RLPItem memory self) private constant returns (bool ret) {
         // Check that RLP is well-formed.
         uint b0;
         uint b1;
         uint memPtr = self._unsafe_memPtr;
         assembly {
             b0 := byte(0, mload(memPtr))
             b1 := byte(1, mload(memPtr))
         }
         if(b0 == DATA_SHORT_START + 1 && b1 < DATA_SHORT_START)
             return false;
         return true;
     }
}


contract RLPReaderTest {

    using RLP for RLP.RLPItem;
    using RLP for RLP.Iterator;
    using RLP for bytes;

    function RLPReaderTest() {}

    function testItemStrict(bytes rlp) constant returns (bool res) {
        res = true;
        rlp.toRLPItem(true);
    }

    function testFirst(bytes rlp) constant returns (uint memPtr, uint len, byte first) {
        var item = rlp.toRLPItem();
        memPtr = item._unsafe_memPtr;
        len = item._unsafe_length;
        uint b0;
        assembly {
            b0 := byte(0, mload(memPtr))
        }
        first = byte(b0);
    }

    function testIsList(bytes rlp) constant returns (bool ret) {
        ret = rlp.toRLPItem().isList();
    }

    function testIsData(bytes rlp) constant returns (bool ret) {
        ret = rlp.toRLPItem().isData();
    }

    function testIsNull(bytes rlp) constant returns (bool ret) {
        ret = rlp.toRLPItem().isNull();
    }

    function testIsEmpty(bytes rlp) constant returns (bool ret) {
        ret = rlp.toRLPItem().isEmpty();
    }

    function testItems(bytes rlp) constant returns (uint) {
        return rlp.toRLPItem().items();
    }

    function testSubItem(bytes rlp, uint index) constant returns (uint memPtr, uint len, bool isList, uint[] list, uint listLen) {
        var it = rlp.toRLPItem().iterator();
        uint idx;
        while(it.hasNext() && idx < index) {
            it.next();
            idx++;
        }
       var si = it.next();
       return _testItem(si);
    }

    function testToData(bytes rlp) constant returns (bytes memory bts) {
        bts = rlp.toRLPItem().toData();
    }

    function testToUint(bytes rlp) constant returns (uint) {
        return rlp.toRLPItem().toUint();
    }

    function testToInt(bytes rlp) constant returns (int) {
        return rlp.toRLPItem().toInt();
    }

    function testToBytes32(bytes rlp) constant returns (bytes32) {
        return rlp.toRLPItem().toBytes32();
    }

    function testToAddress(bytes rlp) constant returns (address) {
        return rlp.toRLPItem().toAddress();
    }

    function testToByte(bytes rlp) constant returns (byte) {
        return rlp.toRLPItem().toByte();
    }

    function testToBool(bytes rlp) constant returns (bool) {
        return rlp.toRLPItem().toBool();
    }

    function _testItem(RLP.RLPItem item) internal constant returns (uint memPtr, uint len, bool isList, uint[] memory list, uint listLen) {
        memPtr = item._unsafe_memPtr;
        len = item._unsafe_length;
        isList = item.isList();

        if (isList) {
            uint i;
            listLen = item.items();
            list = new uint[](listLen);
            var it = item.iterator();
            while(it.hasNext() && i < listLen) {
                var si = it.next();
                uint ptr;
                assembly {
                    ptr := mload(si)
                }
                list[i] = ptr;
                i++;
            }
        }
    }
    
    function testItem(bytes rlp) constant returns (uint memPtr, uint len, bool isList, uint[] list, uint listLen) {
        var item = rlp.toRLPItem();
        return _testItem(item);
    }
    
    function getItem(bytes rlp, uint itemIndex) constant returns(uint) {
        var it = rlp.toRLPItem().iterator();        
        uint idx;
        while(it.hasNext() && idx < itemIndex) {
            it.next();                    
            idx++;
        }

        
        return it.next().toUint();
    }
    
}


contract Agt {
    using RLP for RLP.RLPItem;
    using RLP for RLP.Iterator;
    using RLP for bytes;
 
    struct BlockHeader {
        uint       prevBlockHash; // 0
        uint       coinbase;      // 1
        uint       blockNumber;   // 8
        uint       timestamp;     // 11
        bytes32    extraData;     // 12
    }
 
    function Agt() {}
     
    function parseBlockHeader( bytes rlpHeader ) constant internal returns(BlockHeader) {
        BlockHeader memory header;
        
        var it = rlpHeader.toRLPItem().iterator();        
        uint idx;
        while(it.hasNext()) {
            if( idx == 0 ) header.prevBlockHash = it.next().toUint();
            else if ( idx == 2 ) header.coinbase = it.next().toUint();
            else if ( idx == 8 ) header.blockNumber = it.next().toUint();
            else if ( idx == 11 ) header.timestamp = it.next().toUint();
            else if ( idx == 12 ) header.extraData = bytes32(it.next().toUint());
            else it.next();
            
            idx++;
        }
 
        return header;        
    }
        
    event VerifyAgt( string msg, uint index );
    
    struct VerifyAgtData {
        uint rootHash;
        uint rootMin;
        uint rootMax;
        
        uint leafHash;
        uint leafCounter;        
    }
    
    function verifyAgt( /*uint[3] root, // [0] = min, [1] = max, [2] = root hash
                        uint[2] leafData, // [0] = hash, [1] = counter
                        //uint   leaf32BytesHash,
                        //uint   leafCounter,*/
                        VerifyAgtData data,                        
                        uint   branchIndex,
                        uint[] countersBranch,
                        uint[] hashesBranch ) constant internal returns(bool) {
                        
        uint currentHash = data.leafHash & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
        
        uint leftCounterMin;
        uint leftCounterMax;        
        uint leftHash;
        
        uint rightCounterMin;
        uint rightCounterMax;        
        uint rightHash;
        
        uint min = data.leafCounter;
        uint max = data.leafCounter;
        
        for( uint i = 0 ; i < countersBranch.length ; i++ ) {
            if( branchIndex & 0x1 > 0 ) {
                leftCounterMin = countersBranch[i] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
                leftCounterMax = countersBranch[i] >> 128;                
                leftHash    = hashesBranch[i];
                
                rightCounterMin = min;
                rightCounterMax = max;
                rightHash    = currentHash;                
            }
            else {                
                leftCounterMin = min;
                leftCounterMax = max;
                leftHash    = currentHash;
                
                rightCounterMin = countersBranch[i] & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
                rightCounterMax = countersBranch[i] >> 128;                
                rightHash    = hashesBranch[i];                                            
            }
            
            currentHash = uint(sha3(leftCounterMin + (leftCounterMax << 128),
                                    leftHash,
                                    rightCounterMin + (rightCounterMax << 128),
                                    rightHash)) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
            
            if( (leftCounterMin >= leftCounterMax) || (rightCounterMin >= rightCounterMax) ) {
                if( i > 0 ) {
                    VerifyAgt( "counters mismatch",i);
                    return false;
                }
                if( leftCounterMin > leftCounterMax ) {
                    VerifyAgt( "counters mismatch",i);                
                    return false;
                }
                if( rightCounterMin > rightCounterMax ) {
                    VerifyAgt( "counters mismatch",i);                
                    return false;
                }                
            }
            
            if( leftCounterMax >= rightCounterMin ) return false;

            min = leftCounterMin;
            max = rightCounterMax;
            
            branchIndex = branchIndex / 2;
        }

        if( min != data.rootMin ) {
            VerifyAgt( "min does not match root min",min);                        
            return false;
        }
        if( max != data.rootMax ) {
            VerifyAgt( "max does not match root max",max);        
            return false;
        }
        
        if( currentHash != data.rootHash ) {
            VerifyAgt( "hash does not match root hash",currentHash);        
            return false;
        }
        
        return true;
    }     
}


contract TestPool is Ethash, Agt {
    mapping(address=>bool) public owners;    
    string  public version = "0.1.0";
    uint    public creationBlockNumber; 
    
    bool public newVersionReleased = false;
    
    struct SubmissionData {
        uint numShares;
        uint difficulty;
        uint min;
        uint max;
        uint augMerkle;
        uint blockNumber;
    }
    
    struct MinerData {
        bytes32        minerId;
        address        paymentAddress;
        SubmissionData lastSubmission;
        bool           pendingClaim;     
        uint           lastCounter;
    }

    mapping(address=>MinerData) minersData;
    mapping(bytes32=>bool)      public existingIds;

    
    struct EthashCacheData {
        uint128 merkleRoot;
        uint64  fullSizeIn128Resultion;
        uint64  branchDepth;
    }
    
    mapping(uint=>EthashCacheData) public epochData;    
    
    event Debug( string msg );
    event ErrorLog( string msg, uint i );
    event ErrorNumber( uint msg, uint i );    
    event ValidShares( address indexed miner, uint time, uint numShares, uint difficulty );
    
    
    function TestPool( address[3] _owners ) payable {
        owners[_owners[0]] = true; 
        owners[_owners[1]] = true;
        owners[_owners[2]] = true;
        
        creationBlockNumber = block.number;
    }
    
    function declareNewerVersion() {
        if( ! owners[msg.sender] ) throw;
        
        newVersionReleased = true;
        
        if( ! msg.sender.send(this.balance) ) throw;
    }
    
    function to62Encoding( uint id, uint numChars ) constant returns(bytes32) {
        if( id >= (26+26+10)**numChars ) throw;
        uint result = 0;
        for( uint i = 0 ; i < numChars ; i++ ) {
            uint b = id % (26+26+10);
            uint8 char;
            if( b < 10 ) {
                char = uint8(b + 0x30); // 0x30 = '0' 
            }
            else if( b < 26 + 10 ) {
                char = uint8(b + 0x61 - 10); //0x61 = 'a'
            }
            else {
                char = uint8(b + 0x41 - 26 - 10); // 0x41 = 'A'         
            }
            
            result = (result * 256) + char;
            id /= (26+26+10);
        }

        return bytes32(result);
    }
        
    event Register( address indexed sender, uint error, uint errorInfo );    
    function register( address paymentAddress ) {
        address minerAddress = msg.sender;
        
        // build id
        uint id = uint(minerAddress) % (26+26+10)**11;        
        bytes32 minerId = to62Encoding(id,11);
        
        if( existingIds[minersData[minerAddress].minerId] ) {
            // miner id is already in use
            Register( msg.sender, 0x80000000, uint(minerId) ); 
            return;
        }
        
        if( paymentAddress == address(0) ) {
            // payment address is 0
            Register( msg.sender, 0x80000001, uint(paymentAddress) ); 
            return;
        }
        
        
        // last counter is set to 0. 
        // It might be safer to change it to now.
        //minersData[minerAddress].lastCounter = now * (2**64);
        minersData[minerAddress].paymentAddress = paymentAddress;        
        minersData[minerAddress].minerId = minerId;
        existingIds[minersData[minerAddress].minerId] = true;
        
        // succesful registration
        Register( msg.sender, 0, 0 ); 
    }

    function canRegister(address sender) constant returns(bool) {
        uint id = uint(sender) % (26+26+10)**11;
        bytes32 expectedId = to62Encoding(id,11);
        
        return ! existingIds[expectedId];
    }
    
    function isRegistered(address sender) constant returns(bool) {
        return minersData[sender].paymentAddress != address(0);
    }
    
    function getMinerId(address sender) constant returns(bytes32) {
        return minersData[sender].minerId;
    }

    function getClaimSeed(address sender) constant returns(uint){
        MinerData memory data = minersData[sender];
        if( block.number > data.lastSubmission.blockNumber + 200 ) return 0;
        if( block.number <= data.lastSubmission.blockNumber + 1 ) return 0;        
        return uint(block.blockhash(data.lastSubmission.blockNumber + 1));
    }
    
    event SubmitClaim( address indexed sender, uint error, uint errorInfo );
    function submitClaim( uint numShares, uint difficulty, uint min, uint max, uint augMerkle ) {
    
        if( ! isRegistered(msg.sender) ) {
            // miner is not registered
            SubmitClaim( msg.sender, 0x81000000, 0 );
            return;         
        }
    
        MinerData memory data = minersData[msg.sender];
        
        if( data.lastCounter >= min ) {
            // miner cheated. min counter is too low
            SubmitClaim( msg.sender, 0x81000001, data.lastCounter ); 
            return;        
        }
        
        MinerData memory newData = data;
        
        newData.lastCounter = max;
        
        newData.lastSubmission.numShares = numShares;
        newData.lastSubmission.difficulty = difficulty;
        newData.lastSubmission.min = min;
        newData.lastSubmission.max = max;
        newData.lastSubmission.augMerkle = augMerkle;
        newData.lastSubmission.blockNumber = block.number;
        newData.pendingClaim = true;
        
        minersData[msg.sender] = newData;
        
        // everything is ok
        SubmitClaim( msg.sender, 0, 0 );
    }
    
    event SetEpochData( address indexed sender, uint error, uint errorInfo );
    function setEpochData( uint128[] merkleRoot, uint64[] fullSizeIn128Resultion, uint64[] branchDepth, uint[] epoch ) {
        EthashCacheData memory data;
        
        if( ! owners[msg.sender] ) {
            //ErrorLog( "setEpochData: only owner can set data", uint(msg.sender) );
            SetEpochData( msg.sender, 0x82000000, uint(msg.sender) );
            return;        
        }
        
        for( uint i = 0 ; i < epoch.length ; i++ ) {
            data.merkleRoot = merkleRoot[i];
            data.fullSizeIn128Resultion = fullSizeIn128Resultion[i];
            data.branchDepth = branchDepth[i];
            
            if( epochData[epoch[i]].merkleRoot > 0 ) {
                //ErrorLog("epoch already set", epoch[i]);
                SetEpochData( msg.sender, 0x82000001, epoch[i] );
                continue;            
            }
            
            epochData[epoch[i]] = data;        
        }
        
        SetEpochData( msg.sender, 0, 0 );        
    }
    
    function getEpochData( uint epoch ) constant returns(uint[3]) {
        return [uint(epochData[epoch].merkleRoot),
                uint(epochData[epoch].fullSizeIn128Resultion),
                uint(epochData[epoch].branchDepth)];
    }
    
    event VerifyExtraData( address indexed sender, uint error, uint errorInfo );    
    function verifyExtraData( bytes32 extraData, bytes32 minerId, uint difficulty ) constant internal returns(bool) {
        uint i;
        // compare id
        for( i = 0 ; i < 11 ; i++ ) {
            if( extraData[10+i] != minerId[21+i] ) {
                //ErrorLog( "verifyExtraData: miner id not as expected", 0 );
                VerifyExtraData( msg.sender, 0x83000000, uint(minerId) );         
                return false;            
            }
        }
        
        // compare difficulty
        bytes32 encodedDiff = to62Encoding(difficulty,11);
        for( i = 0 ; i < 11 ; i++ ) {
            if(extraData[i+21] != encodedDiff[21+i]) {
                //ErrorLog( "verifyExtraData: difficulty is not as expected", uint(encodedDiff) );
                VerifyExtraData( msg.sender, 0x83000001, uint(encodedDiff) );
                return false;            
            }  
        }
                
        return true;            
    }    
    
    event VerifyClaim( address indexed sender, uint error, uint errorInfo );
    
        
    function verifyClaim( bytes rlpHeader,
                          uint  nonce,
                          uint  shareIndex,
                          uint[] dataSetLookup,
                          uint[] witnessForLookup,
                          uint[] augCountersBranch,
                          uint[] augHashesBranch ) returns(uint) {
                          
        BlockHeader memory header = parseBlockHeader(rlpHeader);
        SubmissionData memory submissionData = minersData[ msg.sender ].lastSubmission;

        if( getClaimSeed(msg.sender) == 0 ) {
            //ErrorLog( "claim seed is 0", 0 );
            VerifyClaim( msg.sender, 0x84000001, 0 );
            return 289;        
        }
        
        if( shareIndex != getShareIndex(msg.sender) ) {
            //ErrorLog( "share index is not as expected. should be:", getShareIndex() );
            VerifyClaim( msg.sender, 0x84000002, getShareIndex(msg.sender) );            
            return 589;                
        } 
        
        if( ! minersData[ msg.sender ].pendingClaim ) {
            //ErrorLog( "there are no pending claims", 0 );
            VerifyClaim( msg.sender, 0x84000003, 0 );            
            return 189;
        }
        
        // check extra data
        if( ! verifyExtraData( header.extraData,
                               minersData[ msg.sender ].minerId,
                               submissionData.difficulty ) ) {
            //ErrorLog( "extra data not as expected", uint(header.extraData) );
            VerifyClaim( msg.sender, 0x84000004, uint(header.extraData) );            
            return 2;                               
        }
        
        // check coinbase data
        if( header.coinbase != uint(this) ) {
            //ErrorLog( "coinbase not as expected", uint(header.coinbase) );
            VerifyClaim( msg.sender, 0x84000005, uint(header.coinbase) );            
            return 3;
        }
         
        
        // check counter
        uint counter = header.timestamp * (2 ** 64) + nonce;
        if( counter < submissionData.min ) {
            //ErrorLog( "counter is smaller than min",counter);
            ErrorNumber( 0x8000000c, counter );
            VerifyClaim( msg.sender, 0x84000007, counter );            
            return 4;                         
        }
        if( counter > submissionData.max ) {
            //ErrorLog( "counter is smaller than max",counter);
            VerifyClaim( msg.sender, 0x84000008, counter );            
            return 5;                         
        }
        
        // verify agt
        uint leafHash = uint(sha3(rlpHeader));
        VerifyAgtData memory agtData;
        agtData.rootHash = submissionData.augMerkle;
        agtData.rootMin = submissionData.min;
        agtData.rootMax = submissionData.max;
        agtData.leafHash = leafHash;
        agtData.leafCounter = counter;
                

        if( ! verifyAgt( agtData,
                         shareIndex,
                         augCountersBranch,
                         augHashesBranch ) ) {
            //ErrorLog( "verifyAgt failed",0);
            VerifyClaim( msg.sender, 0x84000009, 0 );            
            return 6;
        }
                          
        
        // get epoch data
        EthashCacheData memory eData = epochData[header.blockNumber / 30000];
        if( eData.merkleRoot == 0 ) {
            //ErrorLog( "epoch data was not set",header.blockNumber / 30000);
            VerifyClaim( msg.sender, 0x8400000a, header.blockNumber / 30000 );                        
            return 77;        
        }
        
        // verify ethash
        uint ethash = hashimoto( bytes32(leafHash),
                                 bytes8(nonce),
                                 eData.fullSizeIn128Resultion,
                                 dataSetLookup,
                                 witnessForLookup,                                 
                                 eData.branchDepth,
                                 eData.merkleRoot );
        if( ethash > ((2**256-1)/submissionData.difficulty )) {
            //ErrorLog( "ethash difficulty too low",ethash);
            VerifyClaim( msg.sender, 0x8400000b, ethash );            
            return 7;        
        }
        
        minersData[ msg.sender ].pendingClaim = false;
        
        if( ! doPayment(submissionData.numShares, submissionData.difficulty, minersData[ msg.sender ].paymentAddress) ) {
            // error msg is given in doPayment function
            return 19;
        }
        ValidShares( msg.sender, now, submissionData.numShares, submissionData.difficulty );
        VerifyClaim( msg.sender, 0, 0 );                        
        
        
        return 8;
    }    
    
    
    
    function getShareIndex(address sender) constant returns(uint) {
        SubmissionData submissionData = minersData[ sender ].lastSubmission;    
        return (getClaimSeed(sender) % submissionData.numShares);
    }


    uint public extraBalance;
    uint public subsidyFactor = 2;


    function() payable {
        extraBalance += msg.value;
    }

    function setSubsidy( uint factor ) {
        if( ! owners[msg.sender] ) throw;
        if( factor < 1 ) throw;
        
        subsidyFactor = factor;
    }
        
    function doPayment( uint numShares, uint difficulty, address paymentAddress ) internal returns(bool) {

        uint blockDifficulty;
        if( block.difficulty > 0 ) {
            blockDifficulty = block.difficulty;
        }
        else { // testrpc
            blockDifficulty = 100000;
        }
        
        uint payment =  (5 ether * difficulty * numShares / blockDifficulty);

        if( payment > this.balance ){
            //ErrorLog( "cannot afford to pay", calcPayment( submissionData.numShares, submissionData.difficulty ) );
            VerifyClaim( msg.sender, 0x84000000, payment );        
            return false;
        }
        
        uint extraPayment = payment * ( subsidyFactor-1 );
        if( ( extraPayment > extraBalance ) || (payment + extraPayment) > this.balance ) {
            extraPayment = 0;
        }
        
        extraBalance -= extraPayment;
        payment += extraPayment;
        
        if( ! paymentAddress.send( payment ) ) throw;
        
        return true;
    }    
}

  Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"owners","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"newVersionReleased","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"factor","type":"uint256"}],"name":"setSubsidy","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sender","type":"address"}],"name":"getShareIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"creationBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"extraBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sender","type":"address"}],"name":"canRegister","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"rlpHeader","type":"bytes"},{"name":"nonce","type":"uint256"},{"name":"shareIndex","type":"uint256"},{"name":"dataSetLookup","type":"uint256[]"},{"name":"witnessForLookup","type":"uint256[]"},{"name":"augCountersBranch","type":"uint256[]"},{"name":"augHashesBranch","type":"uint256[]"}],"name":"verifyClaim","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"paymentAddress","type":"address"}],"name":"register","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"header","type":"bytes32"},{"name":"nonceLe","type":"bytes8"},{"name":"fullSizeIn128Resultion","type":"uint256"},{"name":"dataSetLookup","type":"uint256[]"},{"name":"witnessForLookup","type":"uint256[]"},{"name":"branchSize","type":"uint256"},{"name":"root","type":"uint256"}],"name":"hashimoto","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"epochData","outputs":[{"name":"merkleRoot","type":"uint128"},{"name":"fullSizeIn128Resultion","type":"uint64"},{"name":"branchDepth","type":"uint64"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sender","type":"address"}],"name":"getClaimSeed","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"epoch","type":"uint256"}],"name":"getEpochData","outputs":[{"name":"","type":"uint256[3]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sender","type":"address"}],"name":"isRegistered","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"subsidyFactor","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sender","type":"address"}],"name":"getMinerId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"declareNewerVersion","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"numShares","type":"uint256"},{"name":"difficulty","type":"uint256"},{"name":"min","type":"uint256"},{"name":"max","type":"uint256"},{"name":"augMerkle","type":"uint256"}],"name":"submitClaim","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"existingIds","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"merkleRoot","type":"uint128[]"},{"name":"fullSizeIn128Resultion","type":"uint64[]"},{"name":"branchDepth","type":"uint64[]"},{"name":"epoch","type":"uint256[]"}],"name":"setEpochData","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"},{"name":"numChars","type":"uint256"}],"name":"to62Encoding","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"inputs":[{"name":"_owners","type":"address[3]"}],"payable":true,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msg","type":"string"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msg","type":"string"},{"indexed":false,"name":"i","type":"uint256"}],"name":"ErrorLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msg","type":"uint256"},{"indexed":false,"name":"i","type":"uint256"}],"name":"ErrorNumber","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"miner","type":"address"},{"indexed":false,"name":"time","type":"uint256"},{"indexed":false,"name":"numShares","type":"uint256"},{"indexed":false,"name":"difficulty","type":"uint256"}],"name":"ValidShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"Register","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"SubmitClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"SetEpochData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"VerifyExtraData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"VerifyClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msg","type":"string"},{"indexed":false,"name":"index","type":"uint256"}],"name":"VerifyAgt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"result","type":"uint256"}],"name":"Log","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"result","type":"uint256"}],"name":"Result","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60a0604052600560608190527f302e312e30000000000000000000000000000000000000000000000000000000608090815262000040916001919062000121565b506003805460ff1916905560026008556040516060806200433e833981016040525b5b5b5b5b5b5b600160008083815b60209081029190910151600160a060020a031682528101919091526040016000908120805460ff1916921515929092179091556001908083835b60209081029190910151600160a060020a031682528101919091526040016000908120805460ff191692151592909217909155600190808360025b60209081029190910151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055436002555b50620001cb565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016457805160ff191683800117855562000194565b8280016001018555821562000194579182015b828111156200019457825182559160200191906001019062000177565b5b50620001a3929150620001a7565b5090565b620001c891905b80821115620001a35760008155600101620001ae565b5090565b90565b61416380620001db6000396000f3006060604052361561010c5763ffffffff60e060020a600035041663022914a7811461011d5780630289e9661461014d5780630e9b6281146101715780630f136527146101865780631bf30929146101b457806321b5b8dd146101d6578063320d46d4146101f857806335ffbe74146102285780634420e4861461037c57806354fd4d501461039a57806358e69c5a1461042a5780636e821b2e146104f05780637087ed2c14610535578063859e7d3214610563578063c3c5a547146105b3578063deb53645146105e3578063e2dea71514610605578063e3d8699814610633578063e7dac98314610645578063ee38530414610666578063f2cfe2671461068d578063ff5d2c391461078a575b61011b5b60078054340190555b565b005b341561012557fe5b610139600160a060020a03600435166107b2565b604080519115158252519081900360200190f35b341561015557fe5b6101396107c7565b604080519115158252519081900360200190f35b341561017957fe5b61011b6004356107d0565b005b341561018e57fe5b6101a2600160a060020a036004351661080e565b60408051918252519081900360200190f35b34156101bc57fe5b6101a2610847565b60408051918252519081900360200190f35b34156101de57fe5b6101a261084d565b60408051918252519081900360200190f35b341561020057fe5b610139600160a060020a0360043516610853565b604080519115158252519081900360200190f35b341561023057fe5b6101a2600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437505060408051818801358901803560208181028481018201909552818452989a8a359a8a8101359a9199506060019750929550908201935091829185019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a99890198929750908201955093508392508501908490808284375094965061089995505050505050565b60408051918252519081900360200190f35b341561038457fe5b61011b600160a060020a0360043516610f1b565b005b34156103a257fe5b6103aa6110bc565b6040805160208082528351818301528351919283929083019185019080838382156103f0575b8051825260208311156103f057601f1990920191602091820191016103d0565b505050905090810190601f16801561041c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561043257fe5b60408051602060046064358181013583810280860185019096528085526101a2958335956024803577ffffffffffffffffffffffffffffffffffffffffffffffff1916966044359695608495939492019291829185019084908082843750506040805187358901803560208181028481018201909552818452989a9989019892975090820195509350839250850190849080828437509496505084359460200135935061114992505050565b60408051918252519081900360200190f35b34156104f857fe5b6105036004356113d0565b604080516001608060020a0390941684526001604060020a039283166020850152911682820152519081900360600190f35b341561053d57fe5b6101a2600160a060020a0360043516611407565b60408051918252519081900360200190f35b341561056b57fe5b6105766004356114fb565b604051808260608083835b8051825260208311156105a157601f199092019160209182019101610581565b50505090500191505060405180910390f35b34156105bb57fe5b610139600160a060020a036004351661155b565b604080519115158252519081900360200190f35b34156105eb57fe5b6101a2611581565b60408051918252519081900360200190f35b341561060d57fe5b6101a2600160a060020a0360043516611587565b60408051918252519081900360200190f35b341561063b57fe5b61011b6115a6565b005b341561064d57fe5b61011b600435602435604435606435608435611611565b005b341561066e57fe5b6101396004356118a4565b604080519115158252519081900360200190f35b341561069557fe5b61011b600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a9989019892975090820195509350839250850190849080828437509496506118b995505050505050565b005b341561079257fe5b6101a2600435602435611b5a565b60408051918252519081900360200190f35b60006020819052908152604090205460ff1681565b60035460ff1681565b600160a060020a03331660009081526020819052604090205460ff1615156107f757610000565b600181101561080557610000565b60088190555b50565b600160a060020a0381166000908152600460205260408120600201805461083484611407565b81151561083d57fe5b0691505b50919050565b60025481565b60075481565b600080806802d227003d8d2af800600160a060020a0385165b06915061087a82600b611b5a565b60008181526005602052604090205460ff1615935090505b5050919050565b60006108a3613e3c565b6108ab613e70565b600060006108b7613ea7565b6108bf613ed7565b60006108ca8f611be5565b96506004600033600160a060020a0316600160a060020a0316815260200190815260200160002060020160c060405190810160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481525050955061094733611407565b151561098c576040805163840000018152600060208201528151600160a060020a03331692600080516020614118833981519152928290030190a26101219750610f09565b6109953361080e565b8d146109e45733600160a060020a031660008051602061411883398151915263840000026109c23361080e565b6040805192835260208301919091528051918290030190a261024d9750610f09565b600160a060020a03331660009081526004602052604090206008015460ff161515610a47576040805163840000038152600060208201528151600160a060020a03331692600080516020614118833981519152928290030190a260bd9750610f09565b6080870151600160a060020a03331660009081526004602090815260409091205490880151610a77929190611cf3565b1515610ac2576080870151604080516384000004815260208101929092528051600160a060020a0333169260008051602061411883398151915292908290030190a260029750610f09565b6020870151600160a060020a03301614610b1e5733600160a060020a031660008051602061411883398151915263840000058960200151604051808381526020018281526020019250505060405180910390a260039750610f09565b8d8760600151604060020a020194508560400151851015610bb65760408051638000000c81526020810187905281517ff2223b217ee93efaf9c3f20e711d59a7fac6a5b5d58418ec8086005f51d8a278929181900390910190a16040805163840000078152602081018790528151600160a060020a03331692600080516020614118833981519152928290030190a260049750610f09565b8560600151851115610c00576040805163840000088152602081018790528151600160a060020a03331692600080516020614118833981519152928290030190a260059750610f09565b8e6040518082805190602001908083835b60208310610c305780518252601f199092019160209182019101610c11565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912060808c8101518a528c850151928a01929092526060808d0151948a01949094529288018390528701899052509550610c9691508490508e8c8c611e74565b1515610cda576040805163840000098152600060208201528151600160a060020a03331692600080516020614118833981519152928290030190a260069750610f09565b600660006175308960400151811515610cef57fe5b0481526020808201929092526040908101600020815160608101835290546001608060020a0381168083526001604060020a03608060020a830481169584019590955260c060020a9091049093169181019190915292501515610d9c5733600160a060020a0316600080516020614118833981519152638400000a6175308a60400151811515610d7b57fe5b6040805193845291900460208301528051918290030190a2604d9750610f09565b610ddb846001028f60c060020a0284602001516001604060020a03168f8f87604001516001604060020a031688600001516001608060020a0316611149565b90508560200151600019811515610dee57fe5b04811115610e345760408051638400000b8152602081018390528151600160a060020a03331692600080516020614118833981519152928290030190a260079750610f09565b600160a060020a03338116600090815260046020908152604090912060088101805460ff19169055885191890151600190910154610e729316612278565b1515610e815760139750610f09565b85516020808801516040805142815292830193909352818301529051600160a060020a033316917febe2151e37e4487a7208c7b98bdf4c0a7a2918639267814765d5aea623dcfc9c919081900360600190a260408051600080825260208201528151600160a060020a03331692600080516020614118833981519152928290030190a2600897505b50505050505050979650505050505050565b336000806802d227003d8d2af800600160a060020a0384165b069150610f4282600b611b5a565b600160a060020a0384166000908152600460209081526040808320548352600590915290205490915060ff1615610fbf576040805163800000008152602081018390528151600160a060020a033316927f1d759fb22634fe2d322d688a4b46aaf185dd0a3db78ccf01a9218f00ac3df03f928290030190a26110b6565b600160a060020a038416151561101e576040805163800000018152600160a060020a038681166020830152825133909116927f1d759fb22634fe2d322d688a4b46aaf185dd0a3db78ccf01a9218f00ac3df03f928290030190a26110b6565b600160a060020a0383811660009081526004602090815260408083206001808201805473ffffffffffffffffffffffffffffffffffffffff19168b88161790559086905585845260058352818420805460ff19169091179055805183815291820192909252815133909316927f1d759fb22634fe2d322d688a4b46aaf185dd0a3db78ccf01a9218f00ac3df03f929181900390910190a25b50505050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111415780601f1061111657610100808354040283529160200191611141565b820191906000526020600020905b81548152906001019060200180831161112457829003601f168201915b505050505081565b6000611153613ef7565b61115b613f20565b611163613f49565b60006000600060006111808f600190048f60c060020a900461237c565b9650600093505b60108410156111b35760208402878101805191880191825251610200909101525b600190930192611187565b600093505b60408410156112e3578c6111f28860005b60200201518618886020888115156111dd57fe5b06602081106111e857fe5b602002015161241e565b8115156111fb57fe5b0691508861120c83868f8f8f612434565b1461121b576000199750610f09565b600092505b60088310156112d757602060808581028e0182810180519387028a01805163ffffffff9586166301000193918202188616825260408401805161010084018051918916918402919091188816905260608501805161020085018051918a1691850291909118891690529490950180516103009093018051938816939092029290921890951690945280516401000000009081900490915282518190049092528051829004905281510490525b600190920191611220565b5b6001909301926111b8565b600093505b60208410156113795761135861133f61132688876020811061130657fe5b602002015189886001016020811015156111e857fe5b602002015161241e565b8860028801602081106111e857fe5b602002015161241e565b8760038701602081106111e857fe5b602002015161241e565b856004865b046008811061136857fe5b60200201525b6004840193506112e8565b61138387866125c5565b6040805182815290519192507f909c57d5c6ac08245cf2a6de3900e2b868513fa59099b92b27d8db823d92df9c919081900360200190a18097505b50505050505050979650505050505050565b6006602052600090815260409020546001608060020a038116906001604060020a03608060020a820481169160c060020a90041683565b6000611411613f72565b50600160a060020a03808316600090815260046020818152604092839020835160a0818101865282548252600183015490961681840152845160c08101865260028301548152600383015493810193909352928101548285015260058101546060808401919091526006820154608080850191909152600783015496840196875294840192909252600881015460ff161515918301919091526009015491810191909152905160c8014311156114ca5760009150610841565b604081015160a0015160010143116114e55760009150610841565b604081015160a001516001014091505b50919050565b611503613fa6565b5060408051606081018252600083815260066020818152848320546001608060020a03811685526001604060020a03608060020a82048116838701529387905291905260c060020a900416918101919091525b919050565b600160a060020a038181166000908152600460205260409020600101541615155b919050565b60085481565b600160a060020a0381166000908152600460205260409020545b919050565b600160a060020a03331660009081526020819052604090205460ff1615156115cd57610000565b6003805460ff19166001179055604051600160a060020a0333811691309091163180156108fc02916000818181858888f19350505050151561011957610000565b5b565b611619613f72565b611621613f72565b61162a3361155b565b151561167c576040805163810000008152600060208201528151600160a060020a033316927f53ab9d877ae22286591454f9a8d58501caa34a07c99eac2c09bc0066c065400d928290030190a261189b565b600160a060020a03338116600090815260046020818152604092839020835160a0818101865282548252600183015490961681840152845160c0810186526002830154815260038301549381019390935292810154828501526005810154606080840191909152600682015460808085019190915260078301549684019690965293830191909152600881015460ff16151592820192909252600990910154918101829052925085901061177d576080820151604080516381000001815260208101929092528051600160a060020a033316927f53ab9d877ae22286591454f9a8d58501caa34a07c99eac2c09bc0066c065400d92908290030190a261189b565b506080818101848152604080840180518a9052805160209081018a905281518301899052815160609081018990528251860188905282514360a091820152600182890181815233600160a060020a03908116600081815260048089528a82208e518155898f0151968101805473ffffffffffffffffffffffffffffffffffffffff19169790951696909617909355975180516002860155808801516003860155808a01519285019290925594810151600584015598890151600683015597909101516007820155955160088701805460ff19169115159190911790559351600990950194909455815181815293840152805184937f53ab9d877ae22286591454f9a8d58501caa34a07c99eac2c09bc0066c065400d92908290030190a25b50505050505050565b60056020526000908152604090205460ff1681565b6118c1613ed7565b600160a060020a03331660009081526020819052604081205460ff161515611930576040805163820000008152600160a060020a03331660208201819052825190927f5cd723400be8430351b9cbaa5ea421b3fb2528c6a7650c493f895e7d97750da1928290030190a2611b52565b5060005b8251811015611b0e57858181518110151561194b57fe5b602090810290910101516001608060020a03168252845185908290811061196e57fe5b60209081029091018101516001604060020a031690830152835184908290811061199457fe5b602090810290910101516001604060020a03166040830152825160009060069082908690859081106119c257fe5b60209081029091018101518252810191909152604001600020546001608060020a03161115611a4d5733600160a060020a03167f5cd723400be8430351b9cbaa5ea421b3fb2528c6a7650c493f895e7d97750da163820000018584815181101515611a2957fe5b602090810290910181015160408051938452918301528051918290030190a2611b06565b81600660008584815181101515611a6057fe5b6020908102919091018101518252818101929092526040908101600020835181549385015194909201516fffffffffffffffffffffffffffffffff199093166001608060020a039092169190911777ffffffffffffffff000000000000000000000000000000001916608060020a6001604060020a03948516021777ffffffffffffffffffffffffffffffffffffffffffffffff1660c060020a93909216929092021790555b600101611934565b60408051600080825260208201528151600160a060020a033316927f5cd723400be8430351b9cbaa5ea421b3fb2528c6a7650c493f895e7d97750da1928290030190a25b505050505050565b600080808080603e86900a8710611b7057610000565b60009350600092505b85831015611bd457603e875b069150600a821015611b9b575060308101611bb4565b6024821015611bae575060578101611bb4565b50601d81015b5b61010090930260ff84160192603e875b0496505b600190920191611b79565b8360010294505b5050505092915050565b611bed613e3c565b611bf5613e3c565b611bfd613fce565b6000611c10611c0b866127a6565b6127fa565b91505b611c1c82612837565b15611ce757801515611c4057611c39611c348361285d565b6128ad565b8352611cdb565b8060021415611c6457611c5a611c348361285d565b6128ad565b6020840152611cdb565b8060081415611c8857611c7e611c348361285d565b6128ad565b6040840152611cdb565b80600b1415611cac57611ca2611c348361285d565b6128ad565b6060840152611cdb565b80600c1415611cd057611cc6611c348361285d565b6128ad565b6080840152611cdb565b611cd98261285d565b505b5b5b5b5b600101611c13565b8293505b505050919050565b600080805b600b821015611da657846015830160208110611d1057fe5b1a60f860020a02600160f860020a0319168683600a01602081101515611d3257fe5b1a60f860020a02600160f860020a031916141515611d9a576040805163830000008152602081018790528151600160a060020a033316927f1f663d8c427e3fbf090ed8c66536b06651bca95051509e3a45cb1cbb286312e8928290030190a260009250611e6b565b5b600190910190611cf8565b611db184600b611b5a565b9050600091505b600b821015611e6657806015830160208110611dd057fe5b1a60f860020a02600160f860020a0319168683601501602081101515611df257fe5b1a60f860020a02600160f860020a031916141515611e5a576040805163830000018152602081018390528151600160a060020a033316927f1f663d8c427e3fbf090ed8c66536b06651bca95051509e3a45cb1cbb286312e8928290030190a260009250611e6b565b5b600190910190611db8565b600192505b50509392505050565b606084015160808501516000916001608060020a03169082908190819081908190819080825b8c5181101561212c5760008e6001161115611f1c578c81815181101515611ebd57fe5b906020019060200201516001608060020a0316985060808d82815181101515611ee257fe5b906020019060200201519060020a900497508b81815181101515611f0257fe5b906020019060200201519650829550819450899350611f85565b8298508197508996508c81815181101515611f3357fe5b906020019060200201516001608060020a0316955060808d82815181101515611f5857fe5b906020019060200201519060020a900494508b81815181101515611f7857fe5b9060200190602002015193505b60408051608060020a808b028c018252602082018a905287028801818301526060810186905290519081900360800190206001608060020a031699508789101580611fd05750848610155b1561210557600081111561203b5760408051602081018390528181526011818301527f636f756e74657273206d69736d61746368000000000000000000000000000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b878911156120a05760408051602081018390528181526011818301527f636f756e74657273206d69736d61746368000000000000000000000000000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b848611156121055760408051602081018390528181526011818301527f636f756e74657273206d69736d61746368000000000000000000000000000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b5b8588106121165760009a50612266565b88925084915060028e5b049d505b600101611e9a565b60208f01518314612194576040805160208101859052818152601b818301527f6d696e20646f6573206e6f74206d6174636820726f6f74206d696e0000000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b60408f015182146121fc576040805160208101849052818152601b818301527f6d617820646f6573206e6f74206d6174636820726f6f74206d61780000000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b8e518a146122615760408051602081018c9052818152601d818301527f6861736820646f6573206e6f74206d6174636820726f6f742068617368000000606082015290516000805160206140f88339815191529181900360800190a160009a50612266565b60019a505b50505050505050505050949350505050565b6000600060006000600044111561229157449250612298565b620186a092505b828787674563918244f4000002028115156122af57fe5b04915030600160a060020a031631821115612302576040805163840000008152602081018490528151600160a060020a03331692600080516020614118833981519152928290030190a260009350612372565b60016008540382029050600754811180612327575030600160a060020a031631818301115b15612330575060005b60078054829003905560405191810191600160a060020a0386169083156108fc029084906000818181858888f19350505050151561236d57610000565b600193505b5050509392505050565b612384613ef7565b61238c613fef565b61239584612900565b93506001604060020a0384168160005b6020020152604060020a845b0493506001604060020a0384168160015b6020020152604060020a845b0493506001604060020a0384168160025b6020020152604060020a845b0493506001604060020a0384168160035b6020020152828160045b602002015261241481612933565b91505b5092915050565b63ffffffff630100019383028218165b92915050565b6000600060006000600060006000600061244e8b8d612b29565b6001608060020a03169650600060028a5b06119250600289049850888c029150821561247957908b01905b5060005b888110156125485760208282010260208b01015193508c600116600014156124b3578695506001608060020a03841694506124c3565b6001608060020a03841695508694505b604080518781526020810187905281519081900390910190206002909d049c6001608060020a0316965060018d16151561250857869550608060020a84049450612515565b608060020a840495508694505b604080518781526020810187905281519081900390910190206002909d049c6001608060020a031696505b60010161247d565b82156125b15760208282010260208b01015193508c6001166000141561257c578695506001608060020a038416945061258c565b6001608060020a03841695508694505b604080518781526020810187905281519081900390910190206001608060020a031696505b8697505b5050505050505095945050505050565b60008080808560075b6020020151606060020a028660065b6020020151604060020a028760055b6020020151640100000000028860045b6020020151010101608060020a0286600360108110151561261957fe5b6020020151606060020a028760025b6020020151604060020a028860015b6020020151640100000000028960005b602002015101010101925085600f5b6020020151606060020a0286600e5b6020020151604060020a0287600d5b60200201516401000000000288600c5b6020020151010101608060020a0286600b6010811015156126a157fe5b6020020151606060020a0287600a5b6020020151604060020a028860095b6020020151640100000000028960085b60200201510101010191508460075b6020020151606060020a028560065b6020020151604060020a028660055b6020020151640100000000028760045b6020020151010101608060020a0285600360088110151561272957fe5b6020020151606060020a028660025b6020020151604060020a028760015b6020020151640100000000028860005b602002015101010101905061276b83612900565b61277483612900565b61277d83612900565b604080519384526020840192909252828201525190819003606001902093505b50505092915050565b6127ae614018565b815160008115156127d45760408051808201909152600080825260208201529250610892565b6020840190506040604051908101604052808281526020018381525092505b5050919050565b612802613fce565b600061280d83612c04565b151561281857610000565b61282183612c37565b8351848452016020830181905290505b50919050565b6000612841614018565b5050805160208082015182519184015191019010905b50919050565b612865614018565b6000600061287284612837565b156128a0578360200151915061288782612cbd565b8284526020808501829052838201908601529050610892565b610000565b5b5050919050565b6000600060006128bc84612d4f565b15156128c757610000565b6128d084612d81565b9150915060208111806128e1575080155b156128eb57610000565b806020036101000a82510492505b5050919050565b600080805b60208110156129285760ff84166101009283020191845b0493505b600101612905565b8192505b5050919050565b61293b613ef7565b60006000600061294961402f565b600060006000612957613ef7565b60005b60018b60055b6020020152603f60020a8b60085b60200201526048985060089750889650600094505b888781151561298e57fe5b04851015612a4257600093505b6005841015612a2b57600092505b6005831015612a1f5787898115156129bd57fe5b048460050284011015612a13578a6009808702850160058702019081106129e057fe5b602002015186600585028601601981106129f657fe5b6020020151188660058502860160198110612a0d57fe5b60200201525b5b6001909201916129a9565b5b60019093019261299b565b612a3486612e01565b95505b600190940193612983565b5060005b6010811015612b1757600093505b6005841015612b1257600092505b6005831015612b06578789811515612a7657fe5b04846005028401108015612a8a5750601081105b15612afa578560058402850160198110612aa057fe5b602002015163ffffffff16828260108110612ab757fe5b60200201526401000000008660058502860160198110612ad357fe5b6020020151811515612ae157fe5b04826001830160108110612af157fe5b60200201526002015b5b600190920191612a62565b5b600190930192612a54565b612a46565b8199505b505050505050505050919050565b60008282600402815181101515612b3c57fe5b906020019060200201518383600402600101815181101515612b5a57fe5b906020019060200201518484600402600201815181101515612b7857fe5b906020019060200201518585600402600301815181101515612b9657fe5b602090810290910181015160408051958652918501939093528381019190915260608301919091525190819003608001902090505b92915050565b600080805b60208110156129285760ff84166101009283020191845b0493505b600101612905565b8192505b5050919050565b60006000826020015160001415612c1e5760009150610841565b8260000151905060c0815160001a101591505b50919050565b600060006000836020015160001415612c535760009250610892565b50508151805160001a906080821015612c6f5760009250610892565b60b8821080612c8a575060c08210158015612c8a575060f882105b5b15612c995760019250610892565b60c0821015612cae5760b51982019250610892565b60f519820192505b5050919050565b8051600090811a6080811015612cd65760019150610841565b60b8811015612ceb57607e1981019150610841565b60c0811015612d1457600183015160b76020839003016101000a9004810160b519019150610841565b60f8811015612d295760be1981019150610841565b600183015160f76020839003016101000a9004810160f5190191505b5b5b5b5b50919050565b60006000826020015160001415612d695760009150610841565b8260000151905060c0815160001a1091505b50919050565b60006000600060006000612d9486612d4f565b1515612d9f57610000565b8551805160001a935091506080831015612dbf5781945060019350612df8565b60b8831015612ddd5760018660200151039350816001019450612df8565b60b78303905080600187602001510303935080820160010194505b5b505050915091565b612e0961402f565b612e11614058565b612e19614058565b60006000612e2561402f565b612e2d614080565b50604080516103008101825260018152618082602082015267800000000000808a91810191909152678000000080008000606082015261808b6080820152638000000160a0820181905267800000008000808160c0830181905267800000000000800960e0840152608a61010084015260886101208401526380008009610140840152638000000a610160840152638000808b61018084015267800000000000008b6101a08401526780000000000080896101c08401526780000000000080036101e084015267800000000000800261020084015267800000000000008061022084015261800a61024084015267800000008000000a6102608401526102808301526780000000000080806102a08301526102c08201526780000000800080086102e082015260005b6018811015613e2c578860045b60200201518960035b60200201518a60025b60200201518b60015b60200201518c60005b6020020151181818188760005b60200201528860095b60200201518960085b60200201518a60075b60200201518b60065b60200201518c60055b6020020151181818188760015b602002015288600e5b602002015189600d5b60200201518a600c5b60200201518b600b5b60200201518c600a5b6020020151181818188760025b60200201528860135b60200201518960125b60200201518a60115b60200201518b60105b60200201518c600f5b6020020151181818188760035b60200201528860185b60200201518960175b60200201518a60165b60200201518b60155b60200201518c60145b6020020151181818188760045b6020020152603f60020a8760015b602002015181151561309857fe5b048760015b60200201516002026001604060020a0316178760045b6020020151188660005b6020020152603f60020a8760025b60200201518115156130d957fe5b048760025b60200201516002026001604060020a0316178760005b6020020151188660015b6020020152603f60020a8760035b602002015181151561311a57fe5b048760035b60200201516002026001604060020a0316178760015b6020020151188660025b6020020152603f60020a8760045b602002015181151561315b57fe5b048760045b60200201516002026001604060020a03161787600260058110151561318157fe5b6020020151188660035b6020020152603f60020a8760005b60200201518115156131a757fe5b048760005b60200201516002026001604060020a0316178760035b6020020151188660045b60200201528560005b60200201518960005b6020020151188960005b60200201528560005b60200201518960015b6020020151188960015b60200201528560005b60200201518960025b6020020151188960025b60200201528560005b60200201518960035b6020020151188960035b60200201528560005b60200201518960045b6020020151188960045b60200201528560015b60200201518960055b6020020151188960055b60200201528560015b60200201518960065b6020020151188960065b60200201528560015b60200201518960075b6020020151188960075b60200201528560015b60200201518960085b6020020151188960085b60200201528560015b60200201518960095b6020020151188960095b60200201528560025b602002015189600a5b60200201511889600a5b60200201528560025b602002015189600b5b60200201511889600b5b60200201528560025b602002015189600c5b60200201511889600c5b60200201528560025b602002015189600d5b60200201511889600d5b60200201528560025b602002015189600e5b60200201511889600e5b60200201528560035b602002015189600f5b60200201511889600f5b60200201528560035b60200201518960105b6020020151188960105b60200201528560035b60200201518960115b6020020151188960115b60200201528560035b60200201518960125b6020020151188960125b60200201528560035b60200201518960135b6020020151188960135b60200201528560045b60200201518960145b6020020151188960145b60200201528560045b60200201518960155b6020020151188960155b60200201528560045b60200201518960165b6020020151188960165b60200201528560045b60200201518960175b6020020151188960175b60200201528560045b60200201518960185b6020020151188960185b60200201528860005b60200201518360005b602002015263100000008960015b60200201518115156134b657fe5b048960015b6020020151641000000000026001604060020a0316178360085b60200201526720000000000000008960025b60200201518115156134f557fe5b048960025b60200201516008026001604060020a03161783600b5b6020020152628000008960035b602002015181151561352b57fe5b048960035b602002015165020000000000026001604060020a0316178360135b6020020152654000000000008960045b602002015181151561356957fe5b048960045b602002015162040000026001604060020a0316178360165b6020020152603f60020a8960055b60200201518115156135a257fe5b048960055b60200201516002026001604060020a0316178360026019811015156135c857fe5b6020020152621000008960065b60200201518115156135e357fe5b048960065b602002015165100000000000026001604060020a0316178360055b602002015266400000000000008960075b602002015181151561362257fe5b048960075b6020020151610400026001604060020a03161783600d5b6020020152620800008960085b602002015181151561365957fe5b048960085b602002015165200000000000026001604060020a0316178360105b60200201526740000000000000008960095b602002015181151561369957fe5b048960095b60200201516004026001604060020a0316178360185b6020020152600489600a5b60200201518115156136cd57fe5b0489600a5b6020020151674000000000000000026001604060020a0316178360045b602002015267040000000000000089600b5b602002015181151561370f57fe5b0489600b5b60200201516040026001604060020a0316178360075b60200201526220000089600c5b602002015181151561374557fe5b0489600c5b602002015165080000000000026001604060020a03161783600a5b6020020152660200000000000089600d5b602002015181151561378457fe5b0489600d5b6020020151618000026001604060020a0316178360125b6020020152600889600e5b60200201518115156137b957fe5b0489600e5b6020020151672000000000000000026001604060020a0316178360155b602002015264100000000089600f5b60200201518115156137f857fe5b0489600f5b60200201516310000000026001604060020a0316178360015b60200201526102008960105b602002015181151561383057fe5b048960105b60200201516680000000000000026001604060020a0316178360095b60200201526480000000008960115b602002015181151561386e57fe5b048960115b60200201516302000000026001604060020a03161783600c5b6020020152650800000000008960125b60200201518115156138aa57fe5b048960125b602002015162200000026001604060020a03161783600f5b60200201526101008960135b60200201518115156138e157fe5b048960135b6020020151670100000000000000026001604060020a0316178360175b60200201526420000000008960145b602002015181151561392057fe5b048960145b60200201516308000000026001604060020a0316178360035b6020020152651000000000008960155b602002015181151561395c57fe5b048960155b602002015162100000026001604060020a0316178360065b602002015263020000008960165b602002015181151561399557fe5b048960165b6020020151648000000000026001604060020a03161783600e5b60200201526701000000000000008960175b60200201518115156139d457fe5b048960175b6020020151610100026001604060020a0316178360115b602002015266040000000000008960185b6020020151811515613a0f57fe5b048960185b6020020151614000026001604060020a0316178360145b602002015282600a5b60200201518360055b602002015119168360005b6020020151188960005b602002015282600b5b60200201518360065b602002015119168360015b6020020151188960015b602002015282600c5b60200201518360075b602002015119168360025b6020020151188960025b602002015282600d5b60200201518360085b602002015119168360035b6020020151188960035b602002015282600e5b60200201518360095b602002015119168360045b6020020151188960045b602002015282600f5b602002015183600a5b602002015119168360055b6020020151188960055b60200201528260105b602002015183600b5b602002015119168360065b6020020151188960065b60200201528260115b602002015183600c5b602002015119168360075b6020020151188960075b60200201528260125b602002015183600d5b602002015119168360085b6020020151188960085b60200201528260135b602002015183600e5b602002015119168360095b6020020151188960095b60200201528260145b602002015183600f5b6020020151191683600a5b60200201511889600a5b60200201528260155b60200201518360105b6020020151191683600b5b60200201511889600b5b60200201528260165b60200201518360115b6020020151191683600c5b60200201511889600c5b60200201528260175b60200201518360125b6020020151191683600d5b60200201511889600d5b60200201528260185b60200201518360135b6020020151191683600e5b60200201511889600e5b60200201528260005b60200201518360145b6020020151191683600f5b60200201511889600f5b60200201528260015b60200201518360155b602002015119168360105b6020020151188960105b60200201528260025b60200201518360165b602002015119168360115b6020020151188960115b60200201528260035b60200201518360175b602002015119168360125b6020020151188960125b60200201528260045b60200201518360185b602002015119168360135b6020020151188960135b60200201528260055b60200201518360005b602002015119168360145b6020020151188960145b60200201528260065b60200201518360015b602002015119168360155b6020020151188960155b60200201528260075b60200201518360025b602002015119168360165b6020020151188960165b60200201528260085b60200201518360035b602002015119168360175b6020020151188960175b60200201528260095b60200201518360045b602002015119168360185b6020020151188960185b6020020152818160188110613e0b57fe5b60200201518960005b6020020151188960005b60200201525b600101612f56565b8897505b50505050505050919050565b60a0604051908101604052806000815260200160008152602001600081526020016000815260200160006000191681525090565b60c0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60a06040519081016040528060008152602001600081526020016000815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b610200604051908101604052806010905b6000815260200190600190039081613f085790505090565b610400604051908101604052806020905b6000815260200190600190039081613f085790505090565b610100604051908101604052806008905b6000815260200190600190039081613f085790505090565b604080516101408101825260008082526020820152908101613f92613e70565b815260006020820181905260409091015290565b6060604051908101604052806003905b6000815260200190600190039081613f085790505090565b606060405190810160405280613fe2614018565b8152602001600081525090565b610120604051908101604052806009905b6000815260200190600190039081613f085790505090565b604080518082019091526000808252602082015290565b610320604051908101604052806019905b6000815260200190600190039081613f085790505090565b60a0604051908101604052806005905b6000815260200190600190039081613f085790505090565b610300604051908101604052806018905b6000815260200190600190039081613f085790505090565b60c0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080518082019091526000808252602082015290560004a027a2ec1b8dd3a88b43842124c099e616f3633aec2eb618ce26757221f3c1096caf97202169a068288f02e51ff9fcc85f98e1477f6ad9acbf6ebf25dbcd00a165627a7a72305820db8dd4b1aff7fd6530db840e30af6e7020979cea034446b7550c86a6d0b0c0e700290000000000000000000000006d87462cb31c1217cf1ed61b4fcc37f823c61624000000000000000000000000e034afdcc2ba0441ff215ee9ba0da3e86450108d00000000000000000000000038b6a9aedee2238f7c0540a6ff0f71ac4a6b0948

    Constructor Arguments (ABI-encoded and appended to the ByteCode above)
0000000000000000000000006d87462cb31c1217cf1ed61b4fcc37f823c61624000000000000000000000000e034afdcc2ba0441ff215ee9ba0da3e86450108d00000000000000000000000038b6a9aedee2238f7c0540a6ff0f71ac4a6b0948

-----Decoded View---------------
Found 3 constructor arguments :
Arg [0] : 0000000000000000000000006d87462cb31c1217cf1ed61b4fcc37f823c61624
Arg [1] : 000000000000000000000000e034afdcc2ba0441ff215ee9ba0da3e86450108d
Arg [2] : 00000000000000000000000038b6a9aedee2238f7c0540a6ff0f71ac4a6b0948


   Swarm Source:
bzzr://db8dd4b1aff7fd6530db840e30af6e7020979cea034446b7550c86a6d0b0c0e7
  Latest 25 blocks (From a total of 9365 blocks with 47,029.24 Ether mined)
View All
Block Age txn Difficulty GasUsed Reward
874125139 days 48 mins ago10.00 TH2524435.00504886 Ether
757447158 days 8 hrs ago00.00 TH05 Ether
756475158 days 11 hrs ago20.00 TH420005.00084 Ether
756463158 days 12 hrs ago20.00 TH425285.00085056 Ether
756384158 days 12 hrs ago50.00 TH9303335.01860666 Ether
756307158 days 12 hrs ago10.00 TH26481545.05296308 Ether
756306158 days 12 hrs ago20.00 TH420005.00084 Ether
756300158 days 12 hrs ago10.00 TH210005.00042 Ether
706671167 days 2 hrs ago10.00 TH1039185.00207836 Ether
706663167 days 2 hrs ago20.00 TH19307765.03861552 Ether
706540167 days 2 hrs ago00.00 TH05 Ether
706536167 days 2 hrs ago00.00 TH05 Ether
706521167 days 2 hrs ago00.00 TH05.15625 Ether
706511167 days 2 hrs ago00.00 TH05 Ether
706455167 days 3 hrs ago00.00 TH05 Ether
706411167 days 3 hrs ago10.00 TH210005.00042 Ether
706342167 days 3 hrs ago10.00 TH2771515.00554302 Ether
706302167 days 3 hrs ago10.00 TH304805.00643128 Ether
706250167 days 3 hrs ago00.00 TH05 Ether
706186167 days 4 hrs ago10.00 TH47077865.09415572 Ether
706175167 days 4 hrs ago10.00 TH134885.00026976 Ether
706130167 days 4 hrs ago10.00 TH257985.00051596 Ether
706123167 days 4 hrs ago10.00 TH270245.1589524 Ether
706078167 days 4 hrs ago10.00 TH9521575.01904314 Ether
706076167 days 4 hrs ago20.00 TH14817185.02963436 Ether
  Latest 25 uncles (From a total of 358 uncles with 1,401.25 Ether mined) View All
Block Age UncleNumber Difficulty GasUsed Reward
756493158 days 11 hrs ago7564920.00 TH04.375 Ether
706574167 days 2 hrs ago7065730.00 TH210004.375 Ether
706531167 days 2 hrs ago7065290.00 TH03.75 Ether
706288167 days 3 hrs ago7062860.00 TH314473.75 Ether
706074167 days 4 hrs ago7060720.00 TH03.75 Ether
705193167 days 7 hrs ago7051920.00 TH4678064.375 Ether
704901167 days 8 hrs ago7048990.00 TH532823.75 Ether
704792167 days 9 hrs ago7047900.00 TH03.75 Ether
704561167 days 9 hrs ago7045590.00 TH314473.75 Ether
704067167 days 11 hrs ago7040650.00 TH03.75 Ether
704013167 days 11 hrs ago7040120.00 TH04.375 Ether
703830167 days 12 hrs ago7038280.00 TH03.75 Ether
703758167 days 12 hrs ago7037570.00 TH04.375 Ether
703756167 days 12 hrs ago7037550.00 TH04.375 Ether
703125167 days 14 hrs ago7031230.00 TH210003.75 Ether
702717167 days 16 hrs ago7027150.00 TH10329563.75 Ether
701887167 days 19 hrs ago7018860.00 TH04.375 Ether
701750167 days 19 hrs ago7017480.00 TH03.75 Ether
701741167 days 19 hrs ago7017400.00 TH04.375 Ether
700688167 days 23 hrs ago7006860.00 TH03.75 Ether
700590167 days 23 hrs ago7005880.00 TH03.75 Ether
700460167 days 23 hrs ago7004590.00 TH47077864.375 Ether
700118168 days 1 hr ago7001160.00 TH26007173.75 Ether
699823168 days 2 hrs ago6998210.00 TH1747113.75 Ether
699525168 days 3 hrs ago6995230.00 TH304163.75 Ether