{"sources":{"Etheria.sol":{"content":"// Submitted by EthereumHistory (ethereumhistory.com)\ncontract Etheria {\n\t\n    uint8 mapsize = 17;\n    Tile[17][17] tiles;\n    address initializer;\n    address creator;\n    \n    struct Tile \n    {\n    \tuint8 elevation;\n    \taddress owner;\n    \taddress[] offerers;\n    \tuint[] offers;\n    \tint8[5][] blocks; //0 = which,1 = blockx,2 = blocky,3 = blockz, 4 = color\n    \tuint lastfarm;\n    }\n    \n    function getOfferers(uint8 x, uint8 y) constant returns (address[])\n    {\n    \treturn tiles[x][y].offerers;\n    }\n    \n    function wouldFallOutside(int8 which, int8 x, int8 y) constant returns (bool)\n    {\n    \tint8 occupiesx = 0;\n    \tint8 occupiesy = 0;\n    \t\n    \tfor(uint8 b = 0; b < 8; b++) // always 8 hexes\n    \t{\n    \t\toccupiesx = blocks[uint(which)].occupies[b][0];\n    \t\toccupiesy = blocks[uint(which)].occupies[b][1];\n    \t\tif(y % 2 != 0 && occupiesy%2 != 0) // if y is odd, offset the x by 1\n    \t\t{\n    \t\t\toccupiesx = occupiesx + 1;\n    \t\t}\n    \t\tif(!blockHexCoordsValid(occupiesx+x, occupiesy+y))\n    \t\t\treturn true;\n    \t}\n    \treturn false;\n    }\n    \n    function initBlockDef(uint8 which, int8[3][8] occupies, int8[3][] surroundedby)\n    {\n    \tblocks[which].which = which;\n    \tfor(uint8 o = 0; o < 8; o++)\n    \t{\t\n    \t\tfor(uint8 i = 0; i < 3; i++)\n    \t\t{\n    \t\t\tblocks[which].occupies[o][i] = occupies[o][i];\n    \t\t}\n    \t}\n    \tblocks[which].surroundedby.length = surroundedby.length;\n    \tfor(uint8 oo = 0; oo < surroundedby.length; oo++)\n    \t{\t\n    \t\tfor(uint8 ii = 0; ii < 3; ii++)\n    \t\t{\n    \t\t\tblocks[which].surroundedby[oo][ii] = surroundedby[oo][ii];\n    \t\t}\n    \t}\n    }\n        \n    \n    function getOwners() constant returns(address[17][17])\n    {\n        address[17][17] memory owners;\n        for(uint8 y = 0; y < mapsize; y++)\n        {\n        \tfor(uint8 x = 0; x < mapsize; x++)\n        \t{\n        \t    owners[x][y] = tiles[x][y].owner; \n        \t}\t\n        }\t\n    \treturn owners;\n    }\n    \n    function getElevations() constant returns (uint8[17][17])\n    {\n        uint8[17][17] memory elevations;\n        for(uint8 y = 0; y < mapsize; y++)\n        {\n        \tfor(uint8 x = 0; x < mapsize; x++)\n        \t{\n        \t\televations[x][y] = tiles[x][y].elevation; \n        \t}\t\n        }\t\n    \treturn elevations;\n    }\n    \n    function Etheria() {\n    \tinitializer = 0x1312fd55346f4ced45e0da98cd5ab0dc50a5459f;\n    \tcreator = msg.sender;\n    }\n    \n    function acceptOffer(uint8 x, uint8 y, uint8 i) // accepts the offer at index (1-10)\n    {\n    \ttiles[x][y].owner.send(tiles[x][y].offers[i]); // send offer money to oldowner\n    \ttiles[x][y].owner = tiles[x][y].offerers[i]; // new owner is the offerer\n    \tdelete tiles[x][y].offerers; // delete all offerers\n    \tdelete tiles[x][y].offers; // delete all offers\n    \treturn;\n    }\n    \n    function retractOffer(uint8 x, uint8 y) // retracts the first offer in the array by this user.\n    {\n        for(uint8 i = 0; i < tiles[x][y].offerers.length; i++)\n    \t{\n    \t\tif(tiles[x][y].offerers[i] == msg.sender) // this user has an offer on file. Remove it.\n    \t\t\tremoveOffer(x,y,i);\n    \t}\t\n    }\n    \n    function rejectOffer(uint8 x, uint8 y, uint8 i) // index 0-10\n    {\n    \tif(tiles[x][y].owner != msg.sender) // only the owner can reject offers\n    \t\treturn;\n    \tremoveOffer(x,y,i);\n\t\treturn;\n    }\n    \n    function removeOffer(uint8 x, uint8 y, uint8 i) private // index 0-10, can't be odd\n    {\n    \t// return the money\n        tiles[x][y].offerers[i].send(tiles[x][y].offers[i]);\n    \t\t\t\n    \t// delete user and offer and reshape the array\n    \tdelete tiles[x][y].offerers[i];   // zero out user\n    \tdelete tiles[x][y].offers[i];   // zero out offer\n    \tfor(uint8 j = i+1; j < tiles[x][y].offerers.length; j++) // close the arrays after the gap\n    \t{\n    \t    tiles[x][y].offerers[j-1] = tiles[x][y].offerers[j];\n    \t    tiles[x][y].offers[j-1] = tiles[x][y].offers[j];\n    \t}\n    \ttiles[x][y].offerers.length--;\n    \ttiles[x][y].offers.length--;\n    \treturn;\n    }\n    \n    function getOffers(uint8 x, uint8 y) constant returns (uint[])\n    {\n    \treturn tiles[x][y].offers;\n    }\n    \n    Block[20] blocks;\n    struct Block\n    {\n    \tuint8 which;\n    \tint8[3][8] occupies; // [x,y,z] 8 times\n    \tint8[3][] surroundedby; // [x,y,z]\n    }\n    int8[3][][17][17] occupado; \n    \n    function blockHexCoordsValid(int8 x, int8 y) constant returns (bool)\n    {\n    \tif(-33 <= y && y <= 33)\n    \t{\n    \t\tif(y % 2 != 0 ) // odd\n    \t\t{\n    \t\t\tif(-50 <= x && x <= 49)\n    \t\t\t\treturn true;\n    \t\t}\n    \t\telse // even\n    \t\t{\n    \t\t\tif(-49 <= x && x <= 49)\n    \t\t\t\treturn true;\n    \t\t}\t\n    \t}\t\n    \telse\n    \t{\t\n    \t\tint8 absx;\n\t\t\tint8 absy;\n\t\t\tabsx = x;\n\t\t\tif(absx < 0)\n\t\t\t\tabsx = absx*-1;\n\t\t\tabsy = y;\n\t\t\tif(absy < 0)\n\t\t\t\tabsy = absy*-1;\n    \t\tif((y >= 0 && x >= 0) || (y < 0 && x > 0)) // first or 4th quadrants\n    \t\t{\n    \t\t\tif(y % 2 != 0 ) // odd\n    \t\t\t{\n    \t\t\t\tif (((absx/3) + (absy/2)) <= 33)\n    \t\t\t\t\treturn true;\n    \t\t\t}\t\n    \t\t\telse\t// even\n    \t\t\t{\n    \t\t\t\tif ((((absx+1)/3) + ((absy-1)/2)) <= 33)\n    \t\t\t\t\treturn true;\n    \t\t\t}\n    \t\t}\n    \t\telse\n    \t\t{\t\n    \t\t\tif(y % 2 == 0 ) // even\n    \t\t\t{\n    \t\t\t\tif (((absx/3) + (absy/2)) <= 33)\n    \t\t\t\t\treturn true;\n    \t\t\t}\t\n    \t\t\telse\t// odd\n    \t\t\t{\n    \t\t\t\tif ((((absx+1)/3) + ((absy-1)/2)) <= 33)\n    \t\t\t\t\treturn true;\n    \t\t\t}\n    \t\t}\n    \t}\n    \treturn false;\n    }\n    \n    function initializeTiles(uint8 row, uint8[17] _elevations)\n    {\n    \tif(row >= mapsize)\n    \t\treturn;\n    \tfor(uint8 x = 0; x < mapsize; x++)\n    \t\ttiles[x][row].elevation = _elevations[x];\n    }\n    \n    \n    function editBlock(uint8 x, uint8 y, uint index, int8[5] block)  \n    {\n        if(tiles[x][y].owner != msg.sender)\n            return;\n        block[0] = tiles[x][y].blocks[index][0]; // can't change the which\n        tiles[x][y].blocks[index] = block;\n    \treturn;\n    }\n    \n    function getBlocks(uint8 x, uint8 y) constant returns (int8[5][])\n    {\n    \treturn tiles[x][y].blocks;\n    }\n    \n    // block edit validation\n    \n    \n    \n    // TODO:\n    // DONE block texturing\n    // DONE angle camera\n    // DONE block edit validation coordinate constraints in JS\n    // DONE block edit validation must touch, no overlap in JS\n    // block edit validation coordinate constraints in solidity\n    // block edit validation must touch, no overlap in solidity\n    // DONE block lookup caching \n    // register name for owner\n   \n    // FULL GAME TODO:\n    // Fitness vote\n    // Cast threat\n    // chat\n    // messaging\n    // block trading\n    // reclamation\n    // price modifier\n    \n    \n    function touchesAndAvoidsOverlap(uint8 coordx, uint8 coordy, int8 which, int8 x, int8 y, int8 z) constant returns (bool)\n    {\n    \tint8[3][8] wouldoccupy = blocks[uint(which)].occupies;\n    \tfor(uint8 b = 0; b < 8; b++) // always 8 hexes\n    \t{\n    \t\twouldoccupy[b][0] = wouldoccupy[b][0]+x;\n    \t\twouldoccupy[b][1] = wouldoccupy[b][1]+y;\n    \t\tif(y % 2 != 0 && wouldoccupy[b][1]%2 != 0)\n    \t\t\twouldoccupy[b][0] = wouldoccupy[b][0]+1; // anchor y and this hex y are both odd, offset by +1\n    \t\twouldoccupy[b][2] = wouldoccupy[b][2]+z;\n    \t}\n    \t\n    \tint8[3][] surroundings = blocks[uint(which)].surroundedby;\n    \tfor(uint8 bb = 0; bb < surroundings.length; bb++)\n    \t{\n    \t\tsurroundings[b][0] = surroundings[b][0]+x;\n    \t\tsurroundings[b][1] = surroundings[b][1]+y;\n    \t\tif(y % 2 != 0 && surroundings[b][1]%2 != 0)\n    \t\t\tsurroundings[b][0] = surroundings[b][0]+1; // anchor y and this hex y are both odd, offset by +1\n    \t\tsurroundings[b][2] = surroundings[b][2]+z;\n    \t}\n    \t\n    \tbool touches;\n    \tuint numloops = 8;\n    \tif(surroundings.length > 8)\n    \t\tnumloops = surroundings.length;\n    \t\n    \tfor(uint8 l = 0; l < numloops; l++)\n    \t{\n    \t\tfor(uint o = 0; o < occupado[coordx][coordy].length; o++)\n    \t\t{\n    \t\t\tif(l < 8 && wouldoccupy[l][0] == occupado[coordx][coordy][o][0] && wouldoccupy[l][1] == occupado[coordx][coordy][o][1] && wouldoccupy[l][2] == occupado[coordx][coordy][o][2]) // are the arrays equal?\n\t\t\t\t\treturn false; // this hex conflicts. The proposed block does not avoid overlap. Return false immediately.\n    \t\t\tif(touches == false && l < surroundings.length && surroundings[l][0] == occupado[coordx][coordy][o][0] && surroundings[l][1] == occupado[coordx][coordy][o][1] && surroundings[l][2] == occupado[coordx][coordy][o][2]) // are the arrays equal?\n    \t\t\t\ttouches = true;\n    \t\t}\n    \t\tif(l >= 8 && touches == true)\n    \t\t\treturn true;\n    \t}\t\n    \tif(touches == true)\n    \t\treturn true;\n    \telse\n    \t\treturn false;\n    }\n    function initOccupado(uint col, uint row)\n    {\n    \tint8 x;\n    \tint8 y;\n    \tfor(y = -66; y <= 66; y++)\n\t\t{\n\t\t\tif(y % 2 != 0 ) // odd\n\t\t\t\tx = -50;\n\t\t\telse\n\t\t\t\tx = -49;\n\t\t\t\n\t\t\tif(y >= -33 && y <= 33)\n\t\t\t{\n\t\t\t\tfor(x; x <= 49; x++)\n\t\t\t\t{\n\t\t\t\t\toccupado[col][row].length++;// = occupado[col][row].length+1;\n\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][0] = x;\n\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][1] = y;\n\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][2] = -1;\n\t\t\t\t\t//occupado[col][row][occupado[col][row].length-1] = [x,y,-1]);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tint8 absx;\n\t\t\t\tint8 absy;\n\t\t\t\tfor(x; x <= 49; x++)\n\t\t\t\t{\n\t\t\t\t\tabsx = x;\n\t\t\t\t\tif(absx < 0)\n\t\t\t\t\t\tabsx = absx*-1;\n\t\t\t\t\tabsy = y;\n\t\t\t\t\tif(absy < 0)\n\t\t\t\t\t\tabsy = absy*-1;\n\t\t\t\t\tif((y >= 0 && x >= 0) || (y < 0 && x > 0)) // first or 4th quadrants\n\t\t\t\t\t{\n\t\t\t\t\t\tif(y % 2 != 0 ) // odd\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (((absx/3) + (absy/2)) <= 33)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toccupado[col][row].length++;\n\t\t\t\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][0] = x;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][1] = y;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][2] = -1;\n//\t\t\t\t\t\t\t\toccupado[col][row].push([x,y,-1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse\t// even\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((((absx+1)/3) + ((absy-1)/2)) <= 33)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toccupado[col][row].length++;\n\t\t\t\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][0] = x;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][1] = y;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][2] = -1;\n\t\t\t\t\t\t\t\t//occupado[col][row].push([x,y,-1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\tif(y % 2 == 0 ) // even\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (((absx/3) + (absy/2)) <= 33)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toccupado[col][row].length++;\n\t\t\t\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][0] = x;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][1] = y;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][2] = -1;\n\t\t\t\t\t\t\t\t//occupado[col][row].push([x,y,-1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse\t// odd\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((((absx+1)/3) + ((absy-1)/2)) <= 33)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toccupado[col][row].length++;\n\t\t\t\t\t\t\t\toccupado[col][row][occupado[col][row].length-1][0] = x;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][1] = y;\n\t\t\t\t\t            occupado[col][row][occupado[col][row].length-1][2] = -1;\n\t\t\t\t\t\t\t\t//occupado[col][row].push([x,y,-1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n    }\n    \n    // NEEDS NO INFORMATION FROM MAP... COULD BE PLACED IN ANOTHER CONTRACT\n    function getUint8FromByte32(bytes32 _b32, uint8 byteindex) public constant returns(uint8) {\n    \tuint postheadchop;\n    \tif(byteindex == 0)\n    \t\tpostheadchop = uint(_b32); \t\t\t\t\t\t\t\t//for byteindex 0, buint is just the input number. 16^64 is out of uint range, so this exception has to be made.\n    \telse\n    \t\tpostheadchop = uint(_b32) % (16 ** (64 - (byteindex*2))); \t\t\t\t// @i=0 _b32=a1b2c3d4... postheadchop=a1b2c3d4, @i=1 postheadchop=b2c3d4, @i=2 postheadchop=c3d4\n    \tuint evenedout = postheadchop - (postheadchop % (16 ** (64 - 2 - (byteindex*2)))); \t\t\t\t// @i=0 evenedout=a1000000, @i=1 remainder=b20000, @i=2 remainder=c300\n    \tuint8 b = uint8(evenedout / (16 ** (64 - 2 - (byteindex*2)))); \t\t\t\t\t// @i=0 b=a1 (to uint), @i=1 b=b2, @i=2 b=c3\n    \treturn b;\n    }\n    \n    function makeOffer(uint8 x, uint8 y)\n    {\n    \tif(msg.value < 10000000000000000 || msg.value > 1208925819614629174706175) // .01 ether up to (2^80 - 1) wei is the valid range\n    \t{\n    \t\tif(!(msg.value == 0))\n    \t\t\tmsg.sender.send(msg.value); \t\t// return their money\n    \t\treturn;\n    \t}\n    \telse if(tiles[x][y].elevation >= 125 && tiles[x][y].owner == address(0)) // if unowned and above sea level, accept offer of 1 ETH immediately\n    \t{\n    \t\tif(msg.value != 1000000000000000000) // 1 ETH is the starting value. If not enough or too much...\n    \t\t{\n    \t\t\tmsg.sender.send(msg.value); \t // return their money\n        \t\treturn;\n    \t\t}\t\n    \t\telse\n    \t\t{\n    \t\t\tcreator.send(msg.value);     \t\t // this was a valid offer, send money to contract owner\n    \t\t\ttiles[x][y].owner = msg.sender;  // set tile owner to the buyer\n    \t\t\treturn;\t\t\n    \t\t}\t\n    \t}\t\n    \telse\n    \t{\n    \t\tif(tiles[x][y].offerers.length < 10) // this tile can only hold 10 offers at a time\n    \t\t{\n    \t\t\tfor(uint8 i = 0; i < tiles[x][y].offerers.length; i++)\n    \t\t\t{\n    \t\t\t\tif(tiles[x][y].offerers[i] == msg.sender) // user has already made an offer. Update it and return;\n    \t\t\t\t{\n    \t\t\t\t\tmsg.sender.send(tiles[x][y].offers[i]); // return their previous money\n    \t\t\t\t\ttiles[x][y].offers[i] = msg.value; // set the new offer\n    \t\t\t\t\treturn;\n    \t\t\t\t}\n    \t\t\t}\t\n    \t\t\t// the user has not yet made an offer\n    \t\t\ttiles[x][y].offerers.length++; // make room for 1 more\n    \t\t\ttiles[x][y].offers.length++; // make room for 1 more\n    \t\t\ttiles[x][y].offerers[tiles[x][y].offerers.length - 1] = msg.sender; // record who is making the offer\n    \t\t\ttiles[x][y].offers[tiles[x][y].offers.length - 1] = msg.value; // record the offer\n    \t\t}\t\n    \t}\n    }\n    \n    function farmTile(uint8 x, uint8 y)\n    {\n        if(tiles[x][y].owner != msg.sender)\n            return;\n        if((block.number - tiles[x][y].lastfarm) < 4320) // a day's worth of blocks hasn't passed yet. can only farm once a day. (Assumes block times of 20 seconds.)\n        \treturn;\n        bytes32 lastblockhash = block.blockhash(block.number - 1);\n    \tfor(uint8 i = 0; i < 10; i++)\n    \t{\n            tiles[x][y].blocks.length+=5;\n    \t    tiles[x][y].blocks[tiles[x][y].blocks.length - 1][0] = int8(getUint8FromByte32(lastblockhash,i) % 32); // which, guaranteed 0-31\n    \t    tiles[x][y].blocks[tiles[x][y].blocks.length - 1][1] = 0; // x\n    \t    tiles[x][y].blocks[tiles[x][y].blocks.length - 1][2] = 0; // y\n    \t    tiles[x][y].blocks[tiles[x][y].blocks.length - 1][3] = -1; // z\n    \t    tiles[x][y].blocks[tiles[x][y].blocks.length - 1][4] = 0; // color\n    \t}\n    \ttiles[x][y].lastfarm = block.number;\n    }\n    \n    // NOTE: In this instance, block[0] is irrelevant. We can't change \"which\" type of block it is\n}"}},"abi":[{"name":"getElevations","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8[17][17]"}],"constant":true},{"name":"initOccupado","type":"function","inputs":[{"name":"col","type":"uint256"},{"name":"row","type":"uint256"}],"outputs":[],"constant":false},{"name":"blockHexCoordsValid","type":"function","inputs":[{"name":"x","type":"int8"},{"name":"y","type":"int8"}],"outputs":[{"name":"","type":"bool"}],"constant":true},{"name":"getUint8FromByte32","type":"function","inputs":[{"name":"_b32","type":"bytes32"},{"name":"byteindex","type":"uint8"}],"outputs":[{"name":"","type":"uint8"}],"constant":true},{"name":"initBlockDef","type":"function","inputs":[{"name":"which","type":"uint8"},{"name":"occupies","type":"int8[3][8]"},{"name":"surroundedby","type":"int8[3][]"}],"outputs":[],"constant":false},{"name":"initializeTiles","type":"function","inputs":[{"name":"row","type":"uint8"},{"name":"_elevations","type":"uint8[17]"}],"outputs":[],"constant":false},{"name":"makeOffer","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[],"constant":false},{"name":"getOfferers","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[{"name":"","type":"address[]"}],"constant":true},{"name":"touchesAndAvoidsOverlap","type":"function","inputs":[{"name":"coordx","type":"uint8"},{"name":"coordy","type":"uint8"},{"name":"which","type":"int8"},{"name":"x","type":"int8"},{"name":"y","type":"int8"},{"name":"z","type":"int8"}],"outputs":[{"name":"","type":"bool"}],"constant":true},{"name":"editBlock","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"},{"name":"index","type":"uint256"},{"name":"block","type":"int8[5]"}],"outputs":[],"constant":false},{"name":"farmTile","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[],"constant":false},{"name":"getOwners","type":"function","inputs":[],"outputs":[{"name":"","type":"address[17][17]"}],"constant":true},{"name":"acceptOffer","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"},{"name":"i","type":"uint8"}],"outputs":[],"constant":false},{"name":"rejectOffer","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"},{"name":"i","type":"uint8"}],"outputs":[],"constant":false},{"name":"wouldFallOutside","type":"function","inputs":[{"name":"which","type":"int8"},{"name":"x","type":"int8"},{"name":"y","type":"int8"}],"outputs":[{"name":"","type":"bool"}],"constant":true},{"name":"getOffers","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[{"name":"","type":"uint256[]"}],"constant":true},{"name":"retractOffer","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[],"constant":false},{"name":"getBlocks","type":"function","inputs":[{"name":"x","type":"uint8"},{"name":"y","type":"uint8"}],"outputs":[{"name":"","type":"int8[5][]"}],"constant":true},{"type":"constructor","inputs":[]}],"runtimeBytecode":{"onchainBytecode":"0x606060405236156100da5760e060020a6000350463049b785281146100dc5780633f40a42b146101e657806346c52b1a146102205780634b42d2081461028857806354746dac146102ae5780635f2645911461030c5780636266b514146103565780636a864559146103b157806385c574f3146104515780638cae1374146105e0578063959eac4714610661578063a0e67e2b146106b5578063a5ffca0e146107ca578063a713081c1461094b578063b39559351461099f578063c7dafc7814610a6c578063edffcd5714610b02578063fa93019c14610b96575b005b610c64612420604051908101604052806011905b610220604051908101604052806011905b6000815260200190600190039081610101579050508152602001906001900390816100f05750506040805161242081019091526011815b610220604051908101604052806011905b600081526020019060019003908161014957905050815260200190600190039081610138575060009050805b60005460ff9081169083161015610ff0575060005b60005460ff9081169082161015611004576001816011811015610002576055020182601181101561000257600502015460ff1683826011811015610002576020020151836011811015610002575060208402015260010161018a565b6100da600435602435600060411981805b6042600084900b136115935760028360000b0760000b6000141515611ab3576031199350611ab9565b610ca96004356024355b6000600060008360000b60201913158015610249575060218460000b13155b156112e75760028460000b0760000b6000141515611382578460000b6031191315801561027a575060318560000b13155b156112da57600192506112df565b610cbb6004356024355b60006000600060008460ff166000141561241b5785925061242d565b6040805161010081019091526100da90600480359161032490602460086000835b82821015610cd2576040805160608181019092529083810286019060039083908390808284378201915050505050815260200190600101906102cf565b604080516102208082019092526100da9160048035929091610244919060249060119083908390808284375090955050505050506000805460ff9081169084161061140757611017565b6100da6004356024356000662386f26fc1000034108061037f575069ffffffffffffffffffff34115b1561244e57346000146112d557604051600160a060020a03331690600090349082818181858883f15050505050611017565b610e0f6004356024356040805160208101909152600081526001836011811015610002575060558402018260118110156100025790906005020160005060010180546040805160208381028201810190925282815292919083018282801561044357602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610424575b505050505090505b92915050565b610ca960043560243560443560643560843560a435600080808080808080806105a88d820b601481101561000257600a026105a9019850505b60088760ff1610156115a6578b888860088110156100025781015460000b90910190886008811015610002578101805460ff191660f860020a9384029390930492909217909155508a8888600881101561000257810154610100900460000b909101908860088110156100025701805461ff00191660f860020a9283029290920461010002919091179055600260008c810b91909107810b1480159061054f57506002888860088110156100025701546101009004600090810b810b91909107810b14155b1561058c578787600881101561000257015460000b600101888860088110156100025701805460ff191660f860020a928302929092049190911790555b8988886008811015610002578082015462010000900460000b909201916008811015610002570160005060026101000a81548160ff021916908360f860020a9081020402179055506001969096019561048a565b6040805160a08181019092526100da916004803592602435926044359291610104916064906005908390839080828437509095505050505050600160a060020a03331660018560118110156100025750605586020184601181101561000257909060050201600050546101009004600160a060020a03161461146557611015565b6100da600435602435600080600160a060020a03331660018560118110156100025750605586020184601181101561000257909060050201600050546101009004600160a060020a03161461288d57611015565b610c64612420604051908101604052806011905b610220604051908101604052806011905b60008152602001906001900390816106da579050508152602001906001900390816106c95750506040805161242081019091526011815b610220604051908101604052806011905b600081526020019060019003908161072257905050815260200190600190039081610711575060009050805b60005460ff9081169083161015610ff0575060005b60005460ff9081169082161015610ff857600181601181101561000257605502018260118110156100025760050201546101009004600160a060020a0316838260118110156100025760200201518360118110156100025750602084020152600101610763565b6100da60043560243560443560018360118110156100025750605584020182601181101561000257909060050201600050546101009004600160a060020a031660006001856011811015610002575060558602018460118110156100025790906005020160005060020180548490811015610002579060005260206000209001600050546040516000818181858888f15060019350869250505060118110156100025750605584020182601181101561000257909060050201600050600101805482908110156100025750600090815260209020810154600160a060020a03166001846011811015610002575060558502018360118110156100025790906005020160005080546101009290920274ffffffffffffffffffffffffffffffffffffffff00199092169190911790556001836011811015610002575060558402018260118110156100025790906005020160005060010180546000808355918252602090912061101c918101905b80821115610fd75760008155600101610937565b6100da600435602435604435600160a060020a03331660018460118110156100025750605585020183601181101561000257909060050201600050546101009004600160a060020a03161461106857611017565b610ca960043560243560443560008080805b60088160ff161015610eb4576105a8600088900b601481101561000257600a026105a901905081600881101561000257600089810b600a81029092016105a90154900b94506105a89150601481101561000257600a026105a9019050816008811015610002570160005060019054906101000a900460000b9150815060028560000b0760000b600014158015610a51575060028260000b0760000b600014155b15610a5e57600192909201915b610ec386840186840161022a565b610e0f6004356024356040805160208101909152600081526001836011811015610002575060558402018260118110156100025790906005020160005060020180546040805160208381028201810190925282815292919083018282801561044357602002820191906000526020600020905b816000505481526020019060010190808311610adf575b5050505050905061044b565b6100da60043560243560005b6001836011811015610002576055020182601181101561000257600502016001015460ff8216101561101757600160a060020a0333166001846011811015610002576055020183601181101561000257600502016001018054839081101561000257600091825260209091200154600160a060020a031614156110605761106083838361106f565b610e59600435602435604080516020810190915260008152600183601181101561000257605502016000508260118110156100025760050201600050600301600050805480602002602001604051908101604052809291908181526020016000905b8282101561159b576000848152602081206040805160a08101918290529291850191600591908390855b825461010083900a900460000b815260206001928301818104948501949093039092029101808411610c22579050505050505081526020019060010190610bf8565b6040516000826011835b81841015610c99576020840283015161022080838184600060046042f1509050019260010192610c6e565b9250505091505060405180910390f35b60408051918252519081900360200190f35b6040805160ff929092168252519081900360200190f35b5050604080518535870180356020818102840181019094528083529597968301959194508201925090819060009085015b82821015610d4057604080516060818101909252908381028701906003908390839080828437820191505050505081526020019060010190610d03565b5093955050505050506000808080866105a88160148110156100025750600a9190910201805460ff1916881790555b60088460ff161015610eda57600092505b60038360ff161015610f1c57858460088110156100025760200201518360038110156100025760200201516105a88860148110156100025750506105a9600a890201856008811015610002579090016000508460038110156100025760208082049092019190066101000a81548160ff021916908360f860020a90810204021790555060019290920191610d80565b60405180806020018281038252838181518152602001915080519060200190602002808383829060006004602084601f0104600302600f01f1509050019250505060405180910390f35b60405180806020018281038252838181518152602001915080516000925b81841015610ea35760208481028401015160a08083818460006004601ef1509050019260010192610e77565b925050509250505060405180910390f35b600093505b5050509392505050565b1515610ed25760019350610eb9565b6001016109b1565b84516105a8886014811015610002575050600a88026105b101805482825582908015829011610f2857818360005260206000209182019101610f289190610937565b60019390930192610d6f565b50505050600091505b84518260ff161015610fdb575060005b60038160ff161015610fe4578482815181101561000257906020019060200201518160038110156100025760200201516105a8886014811015610002575050600a88026105b101805484908110156100025760009182526020909120018260038110156100025760208082049092019190066101000a81548160ff021916908360f860020a908102040217905550600101610f41565b5090565b50505050505050565b60019190910190610f31565b509092915050565b6001919091019061074e565b60019190910190610175565b505050505b505b505050565b506001836011811015610002575060558402018260118110156100025790906005020160005060020180546000808355918252602090912061101591810190610937565b600101610b0e565b6112d58383835b60006001846011811015610002576055020183601181101561000257600502016001018054839081101561000257908252602082200154600160a060020a0316816001866011811015610002576055020185601181101561000257600502016002018054859081101561000257908252602082206040519101549082818181858883f1506001935087925050506011811015610002576055020183601181101561000257600502016001018054839081101561000257906000526020600020900160006101000a815490600160a060020a030219169055600160005084601181101561000257605502018360118110156100025760050201600201805483908110156100025790600052602060002090016000506000905550600181015b6001846011811015610002576055020183601181101561000257600502016001015460ff82161015612c28576001846011811015610002576055020183601181101561000257600502016001018054829081101561000257600091825260209091200154600160a060020a03166001856011811015610002576055020184601181101561000257600502016001018054600019840190811015610002576000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19169091179055600184601181101561000257605502018360118110156100025760050201600201805482908110156100025790600052602060002090016000505460018560118110156100025760550201846011811015610002576005020160020180546000198401908110156100025790600052602060002090016000505560010161118d565b611017565b600092505b505092915050565b849150600082810b12156112fe5760001991909102905b5082600081810b1215611312575060001983025b60008460000b1215801561132a575060008560000b12155b80611346575060008460000b128015611346575060008560000b135b156113a75760028460000b0760000b60001415156113dd57602160028260000b0560038460000b050160000b1315156112da57600192506112df565b8460000b6030191315801561027a57506031600086900b136112da57600192506112df565b60028460000b0760000b600014156113dd57602160028260000b0560038460000b050160000b1315156112da57600192506112df565b602160026001830360000b0560038460010160000b050160000b1315156112da57600192506112df565b5060005b60005460ff908116908216101561101757818160118110156100025760200201516001826011811015610002576055020160005084601181101561000257909060050201600050805460ff1916909117905560010161140b565b60018460118110156100025750605585020183601181101561000257909060050201600050600301805483908110156100025750600090815260208120830154810b900b8152806001856011811015610002575060558602018460118110156100025790906005020160005060030180548490811015610002579060005260206000209001600050906001820190600590839091602002820160005b8382111561154557835183826101000a81548160ff021916908360f860020a9081020402179055509260200192600101602081600001049283019260010302611501565b80156115725782816101000a81549060ff0219169055600101602081600001049283019260010302611545565b50506115939291505b80821115610fd757805460ff1916815560010161157b565b505050505050565b50505050905061044b565b6105a860008e900b601481101561000257600a02016000506009019550600094505b855460ff8616101561177c578b868881548110156100025760008281526020812083549083015490910b909301928110156100025760206000208101805460ff191660f860020a948502949094049390931790925580548d9250899081101561000257906000526020600020900160005060019054906101000a900460000b018688815481101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a90810204021790555060028b60000b0760000b6000141580156116c9575060028688815481101561000257906000526020600020900160005060019054906101000a900460000b60000b0760000b600014155b1561171b57858781548110156100025760009182526020822001548754910b6001019087908990811015610002576000918252602090912001805460ff191660f860020a928302929092049190911790555b8986888154811015610002578154600083815260208120830154620100009004900b9093019281101561000257505060206000208801805462ff0000191660f860020a928302929092046201000002919091179055600194909401936115c8565b8554600893508390111561178f57855492505b600091505b828260ff1610156118fe575060005b6106708f6011811015610002579090601102016000508e60118110156100025701600050548110156119105760088260ff1610801561182e57506106708f601181101561000257601102016000508e60118110156100025701600050818154811015610002576000918252602082200154810b900b88836008811015610002570154600090810b900b145b801561188e57506106708f601181101561000257601102016000508e60118110156100025701805482908110156100025760009182526020822001546101009004810b900b888360088110156100025701546101009004600090810b900b145b80156118f057506106708f601181101561000257601102016000508e6011811015610002570180548290811015610002576000918252602082200154620100009004810b900b88836008811015610002570154620100009004600090810b900b145b156119325760009850611aa1565b8360011415611a9c5760019850611aa1565b60088260ff16101580156119245750836001145b15611a905760019850611aa1565b8360001480156119455750855460ff8316105b80156119a657506106708f601181101561000257601102016000508e6011811015610002570180548290811015610002576000918252602082200154875490820b90910b9087908490811015610002576000918252602082200154810b900b145b8015611a1157506106708f601181101561000257601102016000508e60118110156100025701805482908110156100025760009182526020822001548754610100909104820b90910b90879084908110156100025760009182526020822001546101009004810b900b145b8015611a7e57506106708f601181101561000257601102016000508e6011811015610002570180548290811015610002576000918252602082200154875462010000909104820b90910b9087908490811015610002576000918252602082200154620100009004810b900b145b15611a8857600193505b6001016117a3565b60019190910190611794565b600098505b50505050505050509695505050505050565b60301993505b6020198360000b12158015611ad2575060218360000b13155b15611ce0575b6031600085900b13611dd1576106708660118110156100025790906011020160005085601181101561000257909001600050805460018101808355909190828015829011611ddd57600083815260209020611ddd918101908301610937565b505050508361067060005087601181101561000257601102016000508660118110156100025790900160005060016106708960118110156100025790906011020160005088601181101561000257505081546000198101915081101561000257906000526020600020900160005060006101000a81548160ff021916908360f860020a90810204021790555082610670600050876011811015610002579090601102016000508660118110156100025790900160005060016106708960118110156100025790906011020160005088601181101561000257505081546000198101915081101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a90810204021790555060001961067060005087601181101561000257909060110201600050866011811015610002579090016000506001610670896011811015610002579090601102016000508860118110156100025750508154808401915081101561000257906000526020600020900160005060026101000a81548160ff021916908360f860020a9081020402179055505b600193909301925b6031600085900b13611dd157839150600082810b1215611d035760001991909102905b5081600081810b1215611d17575060001982025b60008360000b12158015611d2f575060008460000b12155b80611d4b575060008360000b128015611d4b575060008460000b135b15611f7d5760028360000b0760000b6000141515611ffd57602160028260000b0560038460000b050160000b13151561220657610670866011811015610002579090601102016000508560118110156100025790900160005080546001810180835590919082801582901161207157600083815260209020612071918101908301610937565b600192909201916101f7565b5050505083610670600050876011811015610002576011020160005086601181101561000257909001600050600161067089601181101561000257909060110201600050886011811015610002575050815460001981019150811015610002576000918252602090912001805460ff191660f860020a9283029290920491909117905582610670876011811015610002579090601102016000508660118110156100025790900160005060016106708960118110156100025790906011020160005088601181101561000257505081546000198101915081101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a90810204021790555060001961067060005087601181101561000257909060110201600050866011811015610002579090016000506001610670896011811015610002579090601102016000508860118110156100025750508154808401915081101561000257906000526020600020900160005060026101000a81548160ff021916908360f860020a90810204021790555060019390930192611ad8565b60028360000b0760000b600014156123a757602160028260000b0560038460000b050160000b1315156123a257610670866011811015610002579090601102016000508560118110156100025790900160005080546001810180835590919082801582901161220b5760008381526020902061220b918101908301610937565b602160026001830360000b0560038460010160000b050160000b1315156123a257610670866011811015610002579090601102016000508560118110156100025790900160005080546001810180835590919082801582901161220b5760008381526020902061220b918101908301610937565b5050505083610670600050876011811015610002576011020160005086601181101561000257909001600050600161067089601181101561000257909060110201600050886011811015610002575050815460001981019150811015610002576000918252602090912001805460ff191660f860020a9283029290920491909117905582610670876011811015610002579090601102016000508660118110156100025790900160005060016106708960118110156100025790906011020160005088601181101561000257505081546000198101915081101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a90810204021790555060001961067060005087601181101561000257909060110201600050866011811015610002579090016000506001610670896011811015610002579090601102016000508860118110156100025750508154808401915081101561000257906000526020600020900160005060026101000a81548160ff021916908360f860020a9081020402179055505b6123a2565b50505050836106706000508760118110156100025790906011020160005086601181101561000257909001600050600161067089601181101561000257909060110201600050886011811015610002575050815460001981019150811015610002576000918252602090912001805460ff191660f860020a9283029290920491909117905582610670876011811015610002579090601102016000508660118110156100025790900160005060016106708960118110156100025790906011020160005088601181101561000257505081546000198101915081101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a90810204021790555060001961067060005087601181101561000257909060110201600050866011811015610002579090016000506001610670896011811015610002579090601102016000508860118110156100025750508154808401915081101561000257906000526020600020900160005060026101000a81548160ff021916908360f860020a9081020402179055505b611cd8565b602160026001830360000b0560038460010160000b050160000b131515611cd8576106708660118110156100025790906011020160005085601181101561000257909001600050805460018101808355909190828015829011611b3757600083815260209020611b37918101908301610937565b6002850260400360100a60ff16860692505b5050600292909202603e0360100a60ff168083069092039190910492915050565b607d600184601181101561000257506055850201836011811015610002579090600502016000505460ff16108015906124ba5750600060018460118110156100025750605585020183601181101561000257909060050201600050546101009004600160a060020a0316145b156124f457670de0b6b3a7640000341461265457604051600160a060020a03331690600090349082818181858883f1935050505050611017565b600a60018460118110156100025750605585020183601181101561000257909060050201600050600101541015611017575060005b60018360118110156100025750605584020182601181101561000257600502016000506001015460ff821610156126cf57600160a060020a0333166001846011811015610002576055020160005083601181101561000257600502016000506001018054839081101561000257600091825260209091200154600160a060020a0316141561272557600160a060020a0333166000600185601181101561000257605502018150846011811015610002579090600502016000506002018054849081101561000257908252602082206040519101549082818181858883f193505050505034600160005084601181101561000257506055850201836011811015610002579090600502016000506002018054839081101561000257602060009081209290520155611017565b6040516105a754600160a060020a031690600090349082818181858883f1935050505050336001600050846011811015610002575060558502018360118110156100025790906005020160005080546101009290920274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055611017565b60018360118110156100025760550201600050826011811015610002579090600502016000506001908101805491820180825582801582901161272d5781836000526020600020918201910161272d9190610937565b600101612529565b505050506001600050836011811015610002575060558402018260118110156100025790906005020160005060020180546001810180835590919082801582901161278b5781836000526020600020918201910161278b9190610937565b505050503360016000508460118110156100025750605585020183601181101561000257909060050201600050600190810190808660118110156100025790906055020160005085601181101561000257505081546000198101915081101561000257508054600091825260209091200160001901805473ffffffffffffffffffffffffffffffffffffffff1916909117905534600184601181101561000257506055850201836011811015610002579090600502016000506002016001808660118110156100025790906055020160005085601181101561000257505081546000198101915081101561000257906000526020600020900160005055505050565b6110e06001856011811015610002575060558602018460118110156100025790906005020160005060040154430310156128c657611015565b505043600019014060005b600a8160ff161015612932576005600185601181101561000257506055860201846011811015610002579090600502016000506003018054918201808255918290801582901161296257600083815260209020612962918101908301610937565b43600185601181101561000257506055860201846011811015610002579090600502016000506004015550505050565b5050505060206129728383610292565b60ff16066001856011811015610002575060558602018460118110156100025790906005020160005060030160018087601181101561000257909060550201600050866011811015610002575050815460001981019150811015610002575080546000918252602082200160001901805460ff191660f860020a9384029390930492909217909155600185601181101561000257506055860201846011811015610002579090600502016000506003016001808760118110156100025790906055020160005086601181101561000257505081546000198101915081101561000257906000526020600020900160005060016101000a81548160ff021916908360f860020a9081020402179055506000600160005085601181101561000257506055860201846011811015610002579090600502016000506003016001808760118110156100025790906055020160005086601181101561000257505081546000198101915081101561000257906000526020600020900160005060026101000a81548160ff021916908360f860020a90810204021790555060001960016000508560118110156100025750605586020184601181101561000257909060050201600050600301600180876011811015610002579090605502016000508660118110156100025750508154808401915081101561000257906000526020600020900160005060036101000a81548160ff021916908360f860020a9081020402179055506000600160005085601181101561000257506055860201846011811015610002579090600502016000506003016001808760118110156100025790906055020160005086601181101561000257505081546000198101915081101561000257906000526020600020900160005060046101000a81548160ff021916908360f860020a9081020402179055506001016128d1565b60018460118110156100025760550201836011811015610002576005020160010180546000198101808355909190828015829011612c7757600083815260209020612c77918101908301610937565b50505050600160005084601181101561000257605502018360118110156100025760050201600201805460001981018083559091908280158290116110105760008381526020902061101091810190830161093756"},"matchId":"54911389","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-10-06T04:04:37Z","match":"match","chainId":"1","address":"0x0148368E9EfD8D6a5dD56134cD2b3F941e10D953"}