moonwalkerswap-v2-periphery
Version:
Moonwalkerswap v2 periphery
1,130 lines (1,129 loc) • 257 kB
JSON
{
"contractName": "Babylonian",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"moonwalkerswap-libraries/contracts/libraries/Babylonian.sol\":\"Babylonian\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"moonwalkerswap-libraries/contracts/libraries/Babylonian.sol\":{\"keccak256\":\"0xeb1c2a281a00f4660775f75ccfa1e51fbe1d75f86aeb9d0d297151ecdb900177\",\"urls\":[\"bzz-raw://68515f0265381bddfb1d1356ea10ce4e5784276fc09f197fcdcedfa5c75cc069\",\"dweb:/ipfs/QmXWVVPnuJwRUAu3Qpu1s7Fyc5WPQxmZPczVEe5cJ5wVHZ\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122022dddec4b294ba520f9e34a3fc929703d07d5b4c7a42bcb8858f959f822f79d464736f6c63430006060033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122022dddec4b294ba520f9e34a3fc929703d07d5b4c7a42bcb8858f959f822f79d464736f6c63430006060033",
"immutableReferences": {},
"sourceMap": "210:1371:18:-: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": "210:1371:18:-:0;;;;;;12:1:-1;9;2:12",
"source": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity >=0.4.0;\n\n// computes square roots using the babylonian method\n// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method\nlibrary Babylonian {\n // credit for this implementation goes to\n // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);\n // however that code costs significantly more gas\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n",
"sourcePath": "moonwalkerswap-libraries/contracts/libraries/Babylonian.sol",
"ast": {
"absolutePath": "moonwalkerswap-libraries/contracts/libraries/Babylonian.sol",
"exportedSymbols": {
"Babylonian": [
6951
]
},
"id": 6952,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6750,
"literals": [
"solidity",
">=",
"0.4",
".0"
],
"nodeType": "PragmaDirective",
"src": "46:24:18"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 6951,
"linearizedBaseContracts": [
6951
],
"name": "Babylonian",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6949,
"nodeType": "Block",
"src": "439:1140:18",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6759,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6757,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6752,
"src": "453:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6758,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "458:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "453:6:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6762,
"nodeType": "IfStatement",
"src": "449:20:18",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6760,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "468:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 6756,
"id": 6761,
"nodeType": "Return",
"src": "461:8:18"
}
},
{
"assignments": [
6764
],
"declarations": [
{
"constant": false,
"id": 6764,
"mutability": "mutable",
"name": "xx",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6949,
"src": "631:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6763,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "631:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6766,
"initialValue": {
"argumentTypes": null,
"id": 6765,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6752,
"src": "644:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "631:14:18"
},
{
"assignments": [
6768
],
"declarations": [
{
"constant": false,
"id": 6768,
"mutability": "mutable",
"name": "r",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6949,
"src": "655:9:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6767,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "655:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6770,
"initialValue": {
"argumentTypes": null,
"hexValue": "31",
"id": 6769,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "667:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "VariableDeclarationStatement",
"src": "655:13:18"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6771,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "682:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030",
"id": 6772,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "688:35:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1",
"typeString": "int_const 3402...(31 digits omitted)...1456"
},
"value": "0x100000000000000000000000000000000"
},
"src": "682:41:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6783,
"nodeType": "IfStatement",
"src": "678:104:18",
"trueBody": {
"id": 6782,
"nodeType": "Block",
"src": "725:57:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6774,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "739:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "313238",
"id": 6775,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "746:3:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "739:10:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6777,
"nodeType": "ExpressionStatement",
"src": "739:10:18"
},
{
"expression": {
"argumentTypes": null,
"id": 6780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6778,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6768,
"src": "763:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "<<=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3634",
"id": 6779,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "769:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "763:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6781,
"nodeType": "ExpressionStatement",
"src": "763:8:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6786,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6784,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "795:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130303030303030303030303030303030",
"id": 6785,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "801:19:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_18446744073709551616_by_1",
"typeString": "int_const 18446744073709551616"
},
"value": "0x10000000000000000"
},
"src": "795:25:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6796,
"nodeType": "IfStatement",
"src": "791:87:18",
"trueBody": {
"id": 6795,
"nodeType": "Block",
"src": "822:56:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6787,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "836:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3634",
"id": 6788,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "843:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "836:9:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6790,
"nodeType": "ExpressionStatement",
"src": "836:9:18"
},
{
"expression": {
"argumentTypes": null,
"id": 6793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6791,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6768,
"src": "859:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "<<=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3332",
"id": 6792,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "865:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "859:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6794,
"nodeType": "ExpressionStatement",
"src": "859:8:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6799,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6797,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "891:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3078313030303030303030",
"id": 6798,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "897:11:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4294967296_by_1",
"typeString": "int_const 4294967296"
},
"value": "0x100000000"
},
"src": "891:17:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6809,
"nodeType": "IfStatement",
"src": "887:79:18",
"trueBody": {
"id": 6808,
"nodeType": "Block",
"src": "910:56:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6800,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "924:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3332",
"id": 6801,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "931:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "924:9:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6803,
"nodeType": "ExpressionStatement",
"src": "924:9:18"
},
{
"expression": {
"argumentTypes": null,
"id": 6806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6804,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6768,
"src": "947:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "<<=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3136",
"id": 6805,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "953:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "947:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6807,
"nodeType": "ExpressionStatement",
"src": "947:8:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6812,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6810,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "979:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130303030",
"id": 6811,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "985:7:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_65536_by_1",
"typeString": "int_const 65536"
},
"value": "0x10000"
},
"src": "979:13:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6822,
"nodeType": "IfStatement",
"src": "975:74:18",
"trueBody": {
"id": 6821,
"nodeType": "Block",
"src": "994:55:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6815,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6813,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "1008:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3136",
"id": 6814,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1015:2:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "1008:9:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6816,
"nodeType": "ExpressionStatement",
"src": "1008:9:18"
},
{
"expression": {
"argumentTypes": null,
"id": 6819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6817,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6768,
"src": "1031:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "<<=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "38",
"id": 6818,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1037:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1031:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6820,
"nodeType": "ExpressionStatement",
"src": "1031:7:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6825,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6823,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "1062:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3078313030",
"id": 6824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1068:5:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "0x100"
},
"src": "1062:11:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6835,
"nodeType": "IfStatement",
"src": "1058:71:18",
"trueBody": {
"id": 6834,
"nodeType": "Block",
"src": "1075:54:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6828,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6826,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "1089:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "38",
"id": 6827,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1096:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1089:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6829,
"nodeType": "ExpressionStatement",
"src": "1089:8:18"
},
{
"expression": {
"argumentTypes": null,
"id": 6832,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6830,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6768,
"src": "1111:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "<<=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "34",
"id": 6831,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "1111:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6833,
"nodeType": "ExpressionStatement",
"src": "1111:7:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6836,
"name": "xx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6764,
"src": "1142:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30783130",
"id": 6837,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1148:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "0x10"
},
"src": "1142:10:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6848,
"nodeType": "IfStatement",
"src": "1138:70:18",
"trueBody": {
"id": 6847,
"nodeType": "Block",
"src": "1154:54:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6841,
"isConstant": false,