UNPKG

hardlydifficult-eth

Version:

A collection of reusable contracts and Javascript helpers for Ethereum.

1,134 lines (1,133 loc) 137 kB
{ "contractName": "BitMath", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@uniswap/lib/contracts/libraries/BitMath.sol\":\"BitMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"@uniswap/lib/contracts/libraries/BitMath.sol\":{\"keccak256\":\"0x0ef2d7cd41b3f1818fa41019b38948489238efccebe428d4b04919174378abf5\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://696ac37d8731506cbac9b428afb7bdfa35a490df139022be2b04ab3815113cf4\",\"dweb:/ipfs/QmUQ5ty49YATw4Gf5PrtFkxNErcnwhNUpRF3WFaVJxATf9\"]}},\"version\":1}", "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba778e3b1e5048e8909c4c9284e2543b0360ed01239b34f055fbc84003e3d39864736f6c634300060a0033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba778e3b1e5048e8909c4c9284e2543b0360ed01239b34f055fbc84003e3d39864736f6c634300060a0033", "immutableReferences": {}, "sourceMap": "71:772:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "71:772:3:-:0;;;;;;;;", "source": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.5.0;\n\nlibrary BitMath {\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath: ZERO');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n}\n", "sourcePath": "@uniswap/lib/contracts/libraries/BitMath.sol", "ast": { "absolutePath": "@uniswap/lib/contracts/libraries/BitMath.sol", "exportedSymbols": { "BitMath": [ 606 ] }, "id": 607, "license": "GPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 491, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "45:24:3" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 606, "linearizedBaseContracts": [ 606 ], "name": "BitMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 604, "nodeType": "Block", "src": "164:677:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 501, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 499, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "182:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 500, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "186:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "182:5:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4269744d6174683a205a45524f", "id": 502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "189:15:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_85bd0830670701c13cffe320a9f226938b6a134f38f69bbab3366caf568c72c4", "typeString": "literal_string \"BitMath: ZERO\"" }, "value": "BitMath: ZERO" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_85bd0830670701c13cffe320a9f226938b6a134f38f69bbab3366caf568c72c4", "typeString": "literal_string \"BitMath: ZERO\"" } ], "id": 498, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "174:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 503, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "174:31:3", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 504, "nodeType": "ExpressionStatement", "src": "174:31:3" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 507, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 505, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "220:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", "id": 506, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "225:35:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", "typeString": "int_const 3402...(31 digits omitted)...1456" }, "value": "0x100000000000000000000000000000000" }, "src": "220:40:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 517, "nodeType": "IfStatement", "src": "216:102:3", "trueBody": { "id": 516, "nodeType": "Block", "src": "262:56:3", "statements": [ { "expression": { "argumentTypes": null, "id": 510, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 508, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "276:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "313238", "id": 509, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "282:3:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "276:9:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 511, "nodeType": "ExpressionStatement", "src": "276:9:3" }, { "expression": { "argumentTypes": null, "id": 514, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 512, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "299:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "313238", "id": 513, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "304:3:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "299:8:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 515, "nodeType": "ExpressionStatement", "src": "299:8:3" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 518, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "331:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130303030303030303030303030303030", "id": 519, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "336:19:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18446744073709551616_by_1", "typeString": "int_const 18446744073709551616" }, "value": "0x10000000000000000" }, "src": "331:24:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 530, "nodeType": "IfStatement", "src": "327:84:3", "trueBody": { "id": 529, "nodeType": "Block", "src": "357:54:3", "statements": [ { "expression": { "argumentTypes": null, "id": 523, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 521, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "371:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3634", "id": 522, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "377:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "371:8:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 524, "nodeType": "ExpressionStatement", "src": "371:8:3" }, { "expression": { "argumentTypes": null, "id": 527, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 525, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "393:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3634", "id": 526, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "398:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "393:7:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 528, "nodeType": "ExpressionStatement", "src": "393:7:3" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 533, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 531, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "424:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030303030303030", "id": 532, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "429:11:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4294967296_by_1", "typeString": "int_const 4294967296" }, "value": "0x100000000" }, "src": "424:16:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 543, "nodeType": "IfStatement", "src": "420:76:3", "trueBody": { "id": 542, "nodeType": "Block", "src": "442:54:3", "statements": [ { "expression": { "argumentTypes": null, "id": 536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 534, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "456:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3332", "id": 535, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "462:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "456:8:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 537, "nodeType": "ExpressionStatement", "src": "456:8:3" }, { "expression": { "argumentTypes": null, "id": 540, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 538, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "478:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3332", "id": 539, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "483:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "478:7:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 541, "nodeType": "ExpressionStatement", "src": "478:7:3" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 546, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 544, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "509:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130303030", "id": 545, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "514:7:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536" }, "value": "0x10000" }, "src": "509:12:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 556, "nodeType": "IfStatement", "src": "505:72:3", "trueBody": { "id": 555, "nodeType": "Block", "src": "523:54:3", "statements": [ { "expression": { "argumentTypes": null, "id": 549, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 547, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "537:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "3136", "id": 548, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "543:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "537:8:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 550, "nodeType": "ExpressionStatement", "src": "537:8:3" }, { "expression": { "argumentTypes": null, "id": 553, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 551, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "559:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "3136", "id": 552, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "564:2:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "559:7:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 554, "nodeType": "ExpressionStatement", "src": "559:7:3" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 559, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 557, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "590:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "3078313030", "id": 558, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "595:5:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_256_by_1", "typeString": "int_const 256" }, "value": "0x100" }, "src": "590:10:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 569, "nodeType": "IfStatement", "src": "586:68:3", "trueBody": { "id": 568, "nodeType": "Block", "src": "602:52:3", "statements": [ { "expression": { "argumentTypes": null, "id": 562, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 560, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "616:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "38", "id": 561, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "622:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "616:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 563, "nodeType": "ExpressionStatement", "src": "616:7:3" }, { "expression": { "argumentTypes": null, "id": 566, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 564, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "637:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "38", "id": 565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "642:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "637:6:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 567, "nodeType": "ExpressionStatement", "src": "637:6:3" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 572, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 570, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "667:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30783130", "id": 571, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "672:4:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "0x10" }, "src": "667:9:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 582, "nodeType": "IfStatement", "src": "663:67:3", "trueBody": { "id": 581, "nodeType": "Block", "src": "678:52:3", "statements": [ { "expression": { "argumentTypes": null, "id": 575, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 573, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 493, "src": "692:1:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "argumentTypes": null, "hexValue": "34", "id": 574, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "698:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" }, "value": "4" }, "src": "692:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 576, "nodeType": "ExpressionStatement", "src": "692:7:3" }, { "expression": { "argumentTypes": null, "id": 579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 577, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 496, "src": "713:1:3", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "34", "id": 578,