UNPKG

@windfallswap/periphery

Version:

🎚 Peripheral smart contracts for interacting with Windfall Swap

1,091 lines (1,090 loc) • 318 kB
{ "contractName": "BitMath", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@windfallswap/lib/contracts/libraries/BitMath.sol\":\"BitMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"@windfallswap/lib/contracts/libraries/BitMath.sol\":{\"keccak256\":\"0x5610a7da9b61b3d8426eef6191e59557535570dbbc814cee70ae200972d47654\",\"urls\":[\"bzz-raw://c4cf4baaf6ce8f3e49c3738b56c1ad18651debacef9683eb1a5a0ab3895b0cfd\",\"dweb:/ipfs/QmQn8izKRZZTg8e4sjzWuj5rqZfmiQFS5PRhfDeJiUJdeX\"]}},\"version\":1}", "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220667777e67c8fd2c4d35be41a8827425a3db398b0661e871cd4afc8af28ed2c9364736f6c63430006060033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220667777e67c8fd2c4d35be41a8827425a3db398b0661e871cd4afc8af28ed2c9364736f6c63430006060033", "immutableReferences": {}, "sourceMap": "74:2124:16:-:0;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", "deployedSourceMap": "74:2124:16:-:0;;;;;;12:1:-1;9;2:12", "source": "// SPDX-License-Identifier: GPL-3.0-or-later\r\npragma solidity >=0.5.0;\r\n\r\nlibrary BitMath {\r\n // returns the 0 indexed position of the most significant bit of the input x\r\n // s.t. x >= 2**msb and x < 2**(msb+1)\r\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\r\n require(x > 0, 'BitMath::mostSignificantBit: zero');\r\n\r\n if (x >= 0x100000000000000000000000000000000) {\r\n x >>= 128;\r\n r += 128;\r\n }\r\n if (x >= 0x10000000000000000) {\r\n x >>= 64;\r\n r += 64;\r\n }\r\n if (x >= 0x100000000) {\r\n x >>= 32;\r\n r += 32;\r\n }\r\n if (x >= 0x10000) {\r\n x >>= 16;\r\n r += 16;\r\n }\r\n if (x >= 0x100) {\r\n x >>= 8;\r\n r += 8;\r\n }\r\n if (x >= 0x10) {\r\n x >>= 4;\r\n r += 4;\r\n }\r\n if (x >= 0x4) {\r\n x >>= 2;\r\n r += 2;\r\n }\r\n if (x >= 0x2) r += 1;\r\n }\r\n\r\n // returns the 0 indexed position of the least significant bit of the input x\r\n // s.t. (x & 2**lsb) != 0 and (x & (2**(lsb) - 1)) == 0)\r\n // i.e. the bit at the index is set and the mask of all lower bits is 0\r\n function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {\r\n require(x > 0, 'BitMath::leastSignificantBit: zero');\r\n\r\n r = 255;\r\n if (x & uint128(-1) > 0) {\r\n r -= 128;\r\n } else {\r\n x >>= 128;\r\n }\r\n if (x & uint64(-1) > 0) {\r\n r -= 64;\r\n } else {\r\n x >>= 64;\r\n }\r\n if (x & uint32(-1) > 0) {\r\n r -= 32;\r\n } else {\r\n x >>= 32;\r\n }\r\n if (x & uint16(-1) > 0) {\r\n r -= 16;\r\n } else {\r\n x >>= 16;\r\n }\r\n if (x & uint8(-1) > 0) {\r\n r -= 8;\r\n } else {\r\n x >>= 8;\r\n }\r\n if (x & 0xf > 0) {\r\n r -= 4;\r\n } else {\r\n x >>= 4;\r\n }\r\n if (x & 0x3 > 0) {\r\n r -= 2;\r\n } else {\r\n x >>= 2;\r\n }\r\n if (x & 0x1 > 0) r -= 1;\r\n }\r\n}\r\n", "sourcePath": "@windfallswap\\lib\\contracts\\libraries\\BitMath.sol", "ast": { "absolutePath": "@windfallswap/lib/contracts/libraries/BitMath.sol", "exportedSymbols": { "BitMath": [ 5633 ] }, "id": 5634, "nodeType": "SourceUnit", "nodes": [ { "id": 5357, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "46:24:16" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 5633, "linearizedBaseContracts": [ 5633 ], "name": "BitMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 5470, "nodeType": "Block", "src": "294:729:16", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5365, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "313:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5366, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "317:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "313:5:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4269744d6174683a3a6d6f73745369676e69666963616e744269743a207a65726f", "id": 5368, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "320:35:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_03c73b0187854c5090030bbfe0f7d97709bd7eabff8b89faf5be84b9d8c785d2", "typeString": "literal_string \"BitMath::mostSignificantBit: zero\"" }, "value": "BitMath::mostSignificantBit: zero" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_03c73b0187854c5090030bbfe0f7d97709bd7eabff8b89faf5be84b9d8c785d2", "typeString": "literal_string \"BitMath::mostSignificantBit: zero\"" } ], "id": 5364, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "305:7:16", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5369, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "305:51:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5370, "nodeType": "ExpressionStatement", "src": "305:51:16" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5373, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5371, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "373:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", "id": 5372, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "378:35:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", "typeString": "int_const 3402...(31 digits omitted)...1456" }, "value": "0x100000000000000000000000000000000" }, "src": "373:40:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5383, "nodeType": "IfStatement", "src": "369:105:16", "trueBody": { "id": 5382, "nodeType": "Block", "src": "415:59:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5376, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5374, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "430:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "313238", "id": 5375, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "436:3:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "430:9:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5377, "nodeType": "ExpressionStatement", "src": "430:9:16" }, { "expression": { "argumentTypes": null, "id": 5380, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5378, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5362, "src": "454:1:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "313238", "id": 5379, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "459:3:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "454:8:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 5381, "nodeType": "ExpressionStatement", "src": "454:8:16" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5386, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5384, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "488:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130303030303030303030303030303030", "id": 5385, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "493:19:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18446744073709551616_by_1", "typeString": "int_const 18446744073709551616" }, "value": "0x10000000000000000" }, "src": "488:24:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5396, "nodeType": "IfStatement", "src": "484:87:16", "trueBody": { "id": 5395, "nodeType": "Block", "src": "514:57:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5389, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5387, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "529:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3634", "id": 5388, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "535:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "529:8:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5390, "nodeType": "ExpressionStatement", "src": "529:8:16" }, { "expression": { "argumentTypes": null, "id": 5393, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5391, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5362, "src": "552:1:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3634", "id": 5392, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "557:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "552:7:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 5394, "nodeType": "ExpressionStatement", "src": "552:7:16" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5399, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5397, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "585:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030303030303030", "id": 5398, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "590:11:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4294967296_by_1", "typeString": "int_const 4294967296" }, "value": "0x100000000" }, "src": "585:16:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5409, "nodeType": "IfStatement", "src": "581:79:16", "trueBody": { "id": 5408, "nodeType": "Block", "src": "603:57:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5400, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "618:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3332", "id": 5401, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "624:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "618:8:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5403, "nodeType": "ExpressionStatement", "src": "618:8:16" }, { "expression": { "argumentTypes": null, "id": 5406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5404, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5362, "src": "641:1:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3332", "id": 5405, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "646:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "641:7:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 5407, "nodeType": "ExpressionStatement", "src": "641:7:16" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5412, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5410, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "674:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130303030", "id": 5411, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "679:7:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536" }, "value": "0x10000" }, "src": "674:12:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5422, "nodeType": "IfStatement", "src": "670:75:16", "trueBody": { "id": 5421, "nodeType": "Block", "src": "688:57:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5415, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5413, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "703:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3136", "id": 5414, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "709:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "703:8:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5416, "nodeType": "ExpressionStatement", "src": "703:8:16" }, { "expression": { "argumentTypes": null, "id": 5419, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5417, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5362, "src": "726:1:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3136", "id": 5418, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "731:2:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "726:7:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 5420, "nodeType": "ExpressionStatement", "src": "726:7:16" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5425, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5423, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "759:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030", "id": 5424, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "764:5:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_256_by_1", "typeString": "int_const 256" }, "value": "0x100" }, "src": "759:10:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5435, "nodeType": "IfStatement", "src": "755:71:16", "trueBody": { "id": 5434, "nodeType": "Block", "src": "771:55:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5428, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5426, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "786:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "38", "id": 5427, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "792:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "786:7:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5429, "nodeType": "ExpressionStatement", "src": "786:7:16" }, { "expression": { "argumentTypes": null, "id": 5432, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5430, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5362, "src": "808:1:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "38", "id": 5431, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "813:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "808:6:16", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 5433, "nodeType": "ExpressionStatement", "src": "808:6:16" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5438, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5436, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "840:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130", "id": 5437, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "845:4:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "0x10" }, "src": "840:9:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5448, "nodeType": "IfStatement", "src": "836:70:16", "trueBody": { "id": 5447, "nodeType": "Block", "src": "851:55:16", "statements": [ { "expression": { "argumentTypes": null, "id": 5441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5439, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5359, "src": "866:1:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "34", "id": 5440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "872:1:16", "subdenomination": null, "typeDescriptions": {