@sonicxchain/soxswap-periphery
Version:
Peripheral smart contracts for interacting with Soxswap
1,219 lines • 218 kB
JSON
{
"contractName": "FullMath",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820c5d7ac1b4b11c051b3fe11af615b3fb1c099dcf7e021c8286886ff3dcd9414d60029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820c5d7ac1b4b11c051b3fe11af615b3fb1c099dcf7e021c8286886ff3dcd9414d60029",
"sourceMap": "159:888:12:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
"deployedSourceMap": "159:888:12:-;;;;;;;;",
"source": "pragma solidity >=0.4.0;\r\n\r\n// taken from https://medium.com/coinmonks/math-in-solidity-part-3-percents-and-proportions-4db014e080b1\r\n// license is CC-BY-4.0\r\nlibrary FullMath {\r\n function fullMul(uint256 x, uint256 y) internal pure returns (uint256 l, uint256 h) {\r\n uint256 mm = mulmod(x, y, uint256(-1));\r\n l = x * y;\r\n h = mm - l;\r\n if (mm < l) h -= 1;\r\n }\r\n\r\n function mulDiv(\r\n uint256 x,\r\n uint256 y,\r\n uint256 z\r\n ) internal pure returns (uint256) {\r\n (uint256 l, uint256 h) = fullMul(x, y);\r\n require(h < z);\r\n uint256 mm = mulmod(x, y, z);\r\n if (mm > l) h -= 1;\r\n l -= mm;\r\n uint256 pow2 = z & -z;\r\n z /= pow2;\r\n l /= pow2;\r\n l += h * ((-pow2) / pow2 + 1);\r\n uint256 r = 1;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n r *= 2 - z * r;\r\n return l * r;\r\n }\r\n}\r\n",
"sourcePath": "@sonicxchain\\soxswap-lib\\contracts\\libraries\\FullMath.sol",
"ast": {
"absolutePath": "@sonicxchain/soxswap-lib/contracts/libraries/FullMath.sol",
"exportedSymbols": {
"FullMath": [
4379
]
},
"id": 4380,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4188,
"literals": [
"solidity",
">=",
"0.4",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:24:12"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 4379,
"linearizedBaseContracts": [
4379
],
"name": "FullMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4230,
"nodeType": "Block",
"src": "267:127:12",
"statements": [
{
"assignments": [
4200
],
"declarations": [
{
"constant": false,
"id": 4200,
"name": "mm",
"nodeType": "VariableDeclaration",
"scope": 4230,
"src": "278:10:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4199,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "278:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4209,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4202,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4190,
"src": "298:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 4203,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4192,
"src": "301:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4206,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "312:2:12",
"subExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 4205,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "313:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"typeDescriptions": {
"typeIdentifier": "t_rational_minus_1_by_1",
"typeString": "int_const -1"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_minus_1_by_1",
"typeString": "int_const -1"
}
],
"id": 4204,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "304:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": "uint256"
},
"id": 4207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "304:11:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4201,
"name": "mulmod",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4575,
"src": "291:6:12",
"typeDescriptions": {
"typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 4208,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "291:25:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "278:38:12"
},
{
"expression": {
"argumentTypes": null,
"id": 4214,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4210,
"name": "l",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4195,
"src": "327:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4211,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4190,
"src": "331:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 4212,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4192,
"src": "335:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "331:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "327:9:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4215,
"nodeType": "ExpressionStatement",
"src": "327:9:12"
},
{
"expression": {
"argumentTypes": null,
"id": 4220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4216,
"name": "h",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4197,
"src": "347:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4217,
"name": "mm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4200,
"src": "351:2:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 4218,
"name": "l",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4195,
"src": "356:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "351:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "347:10:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4221,
"nodeType": "ExpressionStatement",
"src": "347:10:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4222,
"name": "mm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4200,
"src": "372:2:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 4223,
"name": "l",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4195,
"src": "377:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "372:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 4229,
"nodeType": "IfStatement",
"src": "368:18:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 4227,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4225,
"name": "h",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4197,
"src": "380:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 4226,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "385:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "380:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4228,
"nodeType": "ExpressionStatement",
"src": "380:6:12"
}
}
]
},
"documentation": null,
"id": 4231,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "fullMul",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4193,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4190,
"name": "x",
"nodeType": "VariableDeclaration",
"scope": 4231,
"src": "200:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4189,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "200:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4192,
"name": "y",
"nodeType": "VariableDeclaration",
"scope": 4231,
"src": "211:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4191,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "211:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "199:22:12"
},
"returnParameters": {
"id": 4198,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4195,
"name": "l",
"nodeType": "VariableDeclaration",
"scope": 4231,
"src": "245:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4194,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "245:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4197,
"name": "h",
"nodeType": "VariableDeclaration",
"scope": 4231,
"src": "256:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "256:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "244:22:12"
},
"scope": 4379,
"src": "183:211:12",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4377,
"nodeType": "Block",
"src": "517:527:12",
"statements": [
{
"assignments": [
4243,
4245
],
"declarations": [
{
"constant": false,
"id": 4243,
"name": "l",
"nodeType": "VariableDeclaration",
"scope": 4377,
"src": "529:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4242,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "529:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4245,
"name": "h",
"nodeType": "VariableDeclaration",
"scope": 4377,
"src": "540:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4244,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "540:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4250,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4247,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4233,
"src": "561:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 4248,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4235,
"src": "564:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4246,
"name": "fullMul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4231,
"src": "553:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256,uint256)"
}
},
"id": 4249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "553:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "528:38:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4254,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4252,
"name": "h",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "585:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 4253,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4237,
"src": "589:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "585:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4251,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4577,
4578
],
"referencedDeclaration": 4577,
"src": "577:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "577:14:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4256,
"nodeType": "ExpressionStatement",
"src": "577:14:12"
},
{
"assignments": [
4258
],
"declarations": [
{
"constant": false,
"id": 4258,
"name": "mm",
"nodeType": "VariableDeclaration",
"scope": 4377,
"src": "602:10:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4257,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "602:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4264,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4260,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4233,
"src": "622:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 4261,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4235,
"src": "625:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 4262,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4237,
"src": "628:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4259,
"name": "mulmod",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4575,
"src": "615:6:12",
"typeDescriptions": {
"typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 4263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "615:15:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "602:28:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4265,
"name": "mm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4258,
"src": "645:2:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 4266,
"name": "l",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "650:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "645:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 4272,
"nodeType": "IfStatement",
"src": "641:18:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 4270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4268,
"name": "h",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "653:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 4269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "658:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "653:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4271,
"nodeType": "ExpressionStatement",
"src": "653:6:12"
}
},
{
"expression": {
"argumentTypes": null,
"id": 4275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4273,
"name": "l",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "670:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"argumentTypes": null,
"id": 4274,
"name": "mm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4258,
"src": "675:2:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "670:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4276,
"nodeType": "ExpressionStatement",
"src": "670:7:12"
},
{
"assignments": [
4278
],
"declarations": [
{
"constant": false,
"id": 4278,
"name": "pow2",
"nodeType": "VariableDeclaration",
"scope": 4377,
"src": "688:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4277,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "688:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4283,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4282,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4279,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4237,
"src": "703:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"argumentTypes": null,
"id": 4281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "-",
"prefix": true,
"src": "707:2:12",
"subExpression": {
"argumentTypes": null,
"id": 4280,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4237,
"src": "708:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "703:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "688:21:12"
},
{
"expression": {
"argumentTypes": null,
"id": 4286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4284,
"name": "z",
"nodeType": "Identifier"