11755 lines
515 KiB
JSON
11755 lines
515 KiB
JSON
{
|
|
"abi": [],
|
|
"bytecode": {
|
|
"object": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea26469706673582212209e3b89f489d2e119a45270f90b6d612c2490f2c0e787f8084b097f3497acd36364736f6c63430008110033",
|
|
"sourceMap": "202:12302:29:-:0;;;;;;;;;;;;;;;;;;;;;",
|
|
"linkReferences": {}
|
|
},
|
|
"deployedBytecode": {
|
|
"object": "0x600080fdfea26469706673582212209e3b89f489d2e119a45270f90b6d612c2490f2c0e787f8084b097f3497acd36364736f6c63430008110033",
|
|
"sourceMap": "202:12302:29:-:0;;",
|
|
"linkReferences": {}
|
|
},
|
|
"methodIdentifiers": {},
|
|
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/=node_modules/@ensdomains/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat-deploy/=node_modules/hardhat-deploy/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b\",\"dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz\"]}},\"version\":1}",
|
|
"metadata": {
|
|
"compiler": {
|
|
"version": "0.8.17+commit.8df45f5f"
|
|
},
|
|
"language": "Solidity",
|
|
"output": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
},
|
|
"settings": {
|
|
"remappings": [
|
|
":@ensdomains/=node_modules/@ensdomains/",
|
|
":@openzeppelin/=node_modules/@openzeppelin/",
|
|
":ds-test/=lib/forge-std/lib/ds-test/src/",
|
|
":eth-gas-reporter/=node_modules/eth-gas-reporter/",
|
|
":forge-std/=lib/forge-std/src/",
|
|
":hardhat-deploy/=node_modules/hardhat-deploy/",
|
|
":hardhat/=node_modules/hardhat/"
|
|
],
|
|
"optimizer": {
|
|
"enabled": true,
|
|
"runs": 200
|
|
},
|
|
"metadata": {
|
|
"bytecodeHash": "ipfs"
|
|
},
|
|
"compilationTarget": {
|
|
"node_modules/@openzeppelin/contracts/utils/math/Math.sol": "Math"
|
|
},
|
|
"libraries": {},
|
|
"viaIR": true
|
|
},
|
|
"sources": {
|
|
"node_modules/@openzeppelin/contracts/utils/math/Math.sol": {
|
|
"keccak256": "0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6",
|
|
"urls": [
|
|
"bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b",
|
|
"dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz"
|
|
],
|
|
"license": "MIT"
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"ast": {
|
|
"absolutePath": "node_modules/@openzeppelin/contracts/utils/math/Math.sol",
|
|
"id": 28430,
|
|
"exportedSymbols": {
|
|
"Math": [
|
|
28429
|
|
]
|
|
},
|
|
"nodeType": "SourceUnit",
|
|
"src": "103:12402:29",
|
|
"nodes": [
|
|
{
|
|
"id": 27566,
|
|
"nodeType": "PragmaDirective",
|
|
"src": "103:23:29",
|
|
"nodes": [],
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
]
|
|
},
|
|
{
|
|
"id": 28429,
|
|
"nodeType": "ContractDefinition",
|
|
"src": "202:12302:29",
|
|
"nodes": [
|
|
{
|
|
"id": 27571,
|
|
"nodeType": "EnumDefinition",
|
|
"src": "221:122:29",
|
|
"nodes": [],
|
|
"canonicalName": "Math.Rounding",
|
|
"members": [
|
|
{
|
|
"id": 27568,
|
|
"name": "Down",
|
|
"nameLocation": "245:4:29",
|
|
"nodeType": "EnumValue",
|
|
"src": "245:4:29"
|
|
},
|
|
{
|
|
"id": 27569,
|
|
"name": "Up",
|
|
"nameLocation": "287:2:29",
|
|
"nodeType": "EnumValue",
|
|
"src": "287:2:29"
|
|
},
|
|
{
|
|
"id": 27570,
|
|
"name": "Zero",
|
|
"nameLocation": "318:4:29",
|
|
"nodeType": "EnumValue",
|
|
"src": "318:4:29"
|
|
}
|
|
],
|
|
"name": "Rounding",
|
|
"nameLocation": "226:8:29"
|
|
},
|
|
{
|
|
"id": 27589,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "413:104:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27588,
|
|
"nodeType": "Block",
|
|
"src": "480:37:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27583,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27581,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27574,
|
|
"src": "497:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 27582,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27576,
|
|
"src": "501:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "497:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"id": 27585,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27576,
|
|
"src": "509:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27586,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "497:13:29",
|
|
"trueExpression": {
|
|
"id": 27584,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27574,
|
|
"src": "505:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27580,
|
|
"id": 27587,
|
|
"nodeType": "Return",
|
|
"src": "490:20:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27572,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "349:59:29",
|
|
"text": " @dev Returns the largest of two numbers."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "max",
|
|
"nameLocation": "422:3:29",
|
|
"parameters": {
|
|
"id": 27577,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27574,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "434:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27589,
|
|
"src": "426:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27573,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "426:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27576,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "445:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27589,
|
|
"src": "437:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27575,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "437:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "425:22:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27580,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27579,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27589,
|
|
"src": "471:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27578,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "471:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "470:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27607,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "588:104:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27606,
|
|
"nodeType": "Block",
|
|
"src": "655:37:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27601,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27599,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27592,
|
|
"src": "672:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 27600,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27594,
|
|
"src": "676:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "672:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"id": 27603,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27594,
|
|
"src": "684:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27604,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "672:13:29",
|
|
"trueExpression": {
|
|
"id": 27602,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27592,
|
|
"src": "680:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27598,
|
|
"id": 27605,
|
|
"nodeType": "Return",
|
|
"src": "665:20:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27590,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "523:60:29",
|
|
"text": " @dev Returns the smallest of two numbers."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "min",
|
|
"nameLocation": "597:3:29",
|
|
"parameters": {
|
|
"id": 27595,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27592,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "609:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27607,
|
|
"src": "601:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27591,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "601:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27594,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "620:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27607,
|
|
"src": "612:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27593,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "612:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "600:22:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27598,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27597,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27607,
|
|
"src": "646:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27596,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "646:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "645:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27630,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "805:153:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27629,
|
|
"nodeType": "Block",
|
|
"src": "876:82:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27627,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27619,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27617,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27610,
|
|
"src": "931:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&",
|
|
"rightExpression": {
|
|
"id": 27618,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27612,
|
|
"src": "935:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "931:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27620,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "930:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27626,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27623,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27621,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27610,
|
|
"src": "941:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "^",
|
|
"rightExpression": {
|
|
"id": 27622,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27612,
|
|
"src": "945:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "941:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27624,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "940:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 27625,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "950:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "940:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "930:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27616,
|
|
"id": 27628,
|
|
"nodeType": "Return",
|
|
"src": "923:28:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27608,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "698:102:29",
|
|
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "average",
|
|
"nameLocation": "814:7:29",
|
|
"parameters": {
|
|
"id": 27613,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27610,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "830:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27630,
|
|
"src": "822:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27609,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "822:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27612,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "841:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27630,
|
|
"src": "833:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27611,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "833:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "821:22:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27616,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27615,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27630,
|
|
"src": "867:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27614,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "867:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "866:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27655,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1157:194:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27654,
|
|
"nodeType": "Block",
|
|
"src": "1228:123:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27642,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27640,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27633,
|
|
"src": "1316:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27641,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1321:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1316:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27651,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27646,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27644,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27633,
|
|
"src": "1330:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1334:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "1330:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27647,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1329:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27648,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27635,
|
|
"src": "1339:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1329:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27650,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1343:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "1329:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27652,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "1316:28:29",
|
|
"trueExpression": {
|
|
"hexValue": "30",
|
|
"id": 27643,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1325:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27639,
|
|
"id": 27653,
|
|
"nodeType": "Return",
|
|
"src": "1309:35:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27631,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "964:188:29",
|
|
"text": " @dev Returns the ceiling of the division of two numbers.\n This differs from standard division with `/` in that it rounds up instead\n of rounding down."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "ceilDiv",
|
|
"nameLocation": "1166:7:29",
|
|
"parameters": {
|
|
"id": 27636,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27633,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "1182:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27655,
|
|
"src": "1174:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27632,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1174:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27635,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "1193:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27655,
|
|
"src": "1185:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27634,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1185:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1173:22:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27639,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27638,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27655,
|
|
"src": "1219:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27637,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1219:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1218:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27777,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1667:3925:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27776,
|
|
"nodeType": "Block",
|
|
"src": "1795:3797:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 27775,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1805:3781:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
27668
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27668,
|
|
"mutability": "mutable",
|
|
"name": "prod0",
|
|
"nameLocation": "2134:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27775,
|
|
"src": "2126:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27667,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2126:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27669,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2126:13:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
27671
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27671,
|
|
"mutability": "mutable",
|
|
"name": "prod1",
|
|
"nameLocation": "2206:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27775,
|
|
"src": "2198:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27670,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2198:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27672,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2198:13:29"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "2278:157:29",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "2296:30:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "x",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2313:1:29"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2316:1:29"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "2323:1:29",
|
|
"type": "",
|
|
"value": "0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "not",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2319:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2319:6:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mulmod",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2306:6:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2306:20:29"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "mm",
|
|
"nodeType": "YulTypedName",
|
|
"src": "2300:2:29",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "2343:18:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "x",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2356:1:29"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2359:1:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mul",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2352:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2352:9:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2343:5:29"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "2378:43:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "mm",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2395:2:29"
|
|
},
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2399:5:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "sub",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2391:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2391:14:29"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "mm",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2410:2:29"
|
|
},
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2414:5:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "lt",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2407:2:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2407:13:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "sub",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2387:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "2387:34:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "prod1",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "2378:5:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2343:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2399:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2414:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27671,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2378:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27658,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2313:1:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27658,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2356:1:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27660,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2316:1:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27660,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "2359:1:29",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 27673,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "2269:166:29"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27676,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27674,
|
|
"name": "prod1",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27671,
|
|
"src": "2516:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27675,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2525:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2516:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 27682,
|
|
"nodeType": "IfStatement",
|
|
"src": "2512:75:29",
|
|
"trueBody": {
|
|
"id": 27681,
|
|
"nodeType": "Block",
|
|
"src": "2528:59:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27679,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27677,
|
|
"name": "prod0",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27668,
|
|
"src": "2553:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27678,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "2561:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2553:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27666,
|
|
"id": 27680,
|
|
"nodeType": "Return",
|
|
"src": "2546:26:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27686,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27684,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "2697:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 27685,
|
|
"name": "prod1",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27671,
|
|
"src": "2711:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2697:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 27683,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "2689:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 27687,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2689:28:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 27688,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2689:28:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
27690
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27690,
|
|
"mutability": "mutable",
|
|
"name": "remainder",
|
|
"nameLocation": "2981:9:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27775,
|
|
"src": "2973:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27689,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2973:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27691,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2973:17:29"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "3013:291:29",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3082:38:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "x",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3102:1:29"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3105:1:29"
|
|
},
|
|
{
|
|
"name": "denominator",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3108:11:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mulmod",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3095:6:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3095:25:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "remainder",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3082:9:29"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3202:41:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "prod1",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3215:5:29"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "remainder",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3225:9:29"
|
|
},
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3236:5:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "gt",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3222:2:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3222:20:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "sub",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3211:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3211:32:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "prod1",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3202:5:29"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3260:30:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3273:5:29"
|
|
},
|
|
{
|
|
"name": "remainder",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3280:9:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "sub",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3269:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3269:21:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3260:5:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 27662,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3108:11:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3236:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3260:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3273:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27671,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3202:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27671,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3215:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27690,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3082:9:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27690,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3225:9:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27690,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3280:9:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27658,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3102:1:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27660,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3105:1:29",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 27692,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "3004:300:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
27694
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27694,
|
|
"mutability": "mutable",
|
|
"name": "twos",
|
|
"nameLocation": "3619:4:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27775,
|
|
"src": "3611:12:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27693,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3611:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27702,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27701,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27695,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "3626:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27699,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "~",
|
|
"prefix": true,
|
|
"src": "3641:12:29",
|
|
"subExpression": {
|
|
"id": 27696,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "3642:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27698,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3656:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3641:16:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27700,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3640:18:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3626:32:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3611:47:29"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "3681:362:29",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3746:37:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "denominator",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3765:11:29"
|
|
},
|
|
{
|
|
"name": "twos",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3778:4:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "div",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3761:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3761:22:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "denominator",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3746:11:29"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3850:25:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3863:5:29"
|
|
},
|
|
{
|
|
"name": "twos",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3870:4:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "div",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3859:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3859:16:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "prod0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3850:5:29"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "3990:39:29",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4010:1:29",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"name": "twos",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4013:4:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "sub",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4006:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4006:12:29"
|
|
},
|
|
{
|
|
"name": "twos",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4020:4:29"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "div",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4002:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4002:23:29"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4027:1:29",
|
|
"type": "",
|
|
"value": "1"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3998:3:29"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3998:31:29"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "twos",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3990:4:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 27662,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3746:11:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27662,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3765:11:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3850:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27668,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3863:5:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27694,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3778:4:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27694,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3870:4:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27694,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3990:4:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27694,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "4013:4:29",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 27694,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "4020:4:29",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 27703,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "3672:371:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27708,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27704,
|
|
"name": "prod0",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27668,
|
|
"src": "4109:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "|=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27707,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27705,
|
|
"name": "prod1",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27671,
|
|
"src": "4118:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27706,
|
|
"name": "twos",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27694,
|
|
"src": "4126:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4118:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4109:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27709,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4109:21:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
27711
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27711,
|
|
"mutability": "mutable",
|
|
"name": "inverse",
|
|
"nameLocation": "4456:7:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27775,
|
|
"src": "4448:15:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27710,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4448:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27718,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27717,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27714,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "33",
|
|
"id": 27712,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4467:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_3_by_1",
|
|
"typeString": "int_const 3"
|
|
},
|
|
"value": "3"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27713,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4471:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4467:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27715,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "4466:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "^",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 27716,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4486:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "4466:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4448:39:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27725,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27719,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4704:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27724,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27720,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4715:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27723,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27721,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4719:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27722,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4733:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4719:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4715:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4704:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27726,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4704:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27733,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27727,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4773:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27732,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27728,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4784:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27731,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27729,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4788:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27730,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4802:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4788:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4784:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4773:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27734,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4773:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27735,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4843:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27740,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27736,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4854:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27739,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27737,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4858:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27738,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4872:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4858:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4854:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4843:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27742,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4843:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27749,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27743,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4913:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27748,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27744,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4924:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27747,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27745,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4928:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27746,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4942:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4928:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4924:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4913:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27750,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4913:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27751,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "4983:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27756,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27752,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4994:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27755,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27753,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "4998:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27754,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "5012:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4998:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4994:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4983:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27758,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4983:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27765,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27759,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "5054:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "*=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27764,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 27760,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5065:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27763,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27761,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27662,
|
|
"src": "5069:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27762,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "5083:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5069:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5065:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5054:36:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27766,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5054:36:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27771,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27767,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27665,
|
|
"src": "5524:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27770,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27768,
|
|
"name": "prod0",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27668,
|
|
"src": "5533:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27769,
|
|
"name": "inverse",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27711,
|
|
"src": "5541:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5533:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5524:24:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27772,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5524:24:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27773,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27665,
|
|
"src": "5569:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27666,
|
|
"id": 27774,
|
|
"nodeType": "Return",
|
|
"src": "5562:13:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27656,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1357:305:29",
|
|
"text": " @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n with further edits by Uniswap Labs also under MIT license."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "mulDiv",
|
|
"nameLocation": "1676:6:29",
|
|
"parameters": {
|
|
"id": 27663,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27658,
|
|
"mutability": "mutable",
|
|
"name": "x",
|
|
"nameLocation": "1700:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27777,
|
|
"src": "1692:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27657,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1692:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27660,
|
|
"mutability": "mutable",
|
|
"name": "y",
|
|
"nameLocation": "1719:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27777,
|
|
"src": "1711:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27659,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1711:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27662,
|
|
"mutability": "mutable",
|
|
"name": "denominator",
|
|
"nameLocation": "1738:11:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27777,
|
|
"src": "1730:19:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27661,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1730:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1682:73:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27666,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27665,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "1787:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27777,
|
|
"src": "1779:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27664,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1779:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1778:16:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27821,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5724:337:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27820,
|
|
"nodeType": "Block",
|
|
"src": "5872:189:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
27793
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27793,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "5890:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27820,
|
|
"src": "5882:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27792,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5882:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27799,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 27795,
|
|
"name": "x",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27780,
|
|
"src": "5906:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 27796,
|
|
"name": "y",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27782,
|
|
"src": "5909:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 27797,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27784,
|
|
"src": "5912:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 27794,
|
|
"name": "mulDiv",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
27777,
|
|
27821
|
|
],
|
|
"referencedDeclaration": 27777,
|
|
"src": "5899:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 27798,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5899:25:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5882:42:29"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 27811,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"id": 27803,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27800,
|
|
"name": "rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27787,
|
|
"src": "5938:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 27801,
|
|
"name": "Rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27571,
|
|
"src": "5950:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$27571_$",
|
|
"typeString": "type(enum Math.Rounding)"
|
|
}
|
|
},
|
|
"id": 27802,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5959:2:29",
|
|
"memberName": "Up",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27569,
|
|
"src": "5950:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"src": "5938:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27810,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 27805,
|
|
"name": "x",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27780,
|
|
"src": "5972:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 27806,
|
|
"name": "y",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27782,
|
|
"src": "5975:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 27807,
|
|
"name": "denominator",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27784,
|
|
"src": "5978:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 27804,
|
|
"name": "mulmod",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -16,
|
|
"src": "5965:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 27808,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5965:25:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27809,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5993:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5965:29:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "5938:56:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 27817,
|
|
"nodeType": "IfStatement",
|
|
"src": "5934:98:29",
|
|
"trueBody": {
|
|
"id": 27816,
|
|
"nodeType": "Block",
|
|
"src": "5996:36:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27814,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27812,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27793,
|
|
"src": "6010:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "31",
|
|
"id": 27813,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6020:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "6010:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27815,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6010:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27818,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27793,
|
|
"src": "6048:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27791,
|
|
"id": 27819,
|
|
"nodeType": "Return",
|
|
"src": "6041:13:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27778,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5598:121:29",
|
|
"text": " @notice Calculates x * y / denominator with full precision, following the selected rounding direction."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "mulDiv",
|
|
"nameLocation": "5733:6:29",
|
|
"parameters": {
|
|
"id": 27788,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27780,
|
|
"mutability": "mutable",
|
|
"name": "x",
|
|
"nameLocation": "5757:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27821,
|
|
"src": "5749:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27779,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5749:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27782,
|
|
"mutability": "mutable",
|
|
"name": "y",
|
|
"nameLocation": "5776:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27821,
|
|
"src": "5768:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27781,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5768:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27784,
|
|
"mutability": "mutable",
|
|
"name": "denominator",
|
|
"nameLocation": "5795:11:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27821,
|
|
"src": "5787:19:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27783,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5787:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27787,
|
|
"mutability": "mutable",
|
|
"name": "rounding",
|
|
"nameLocation": "5825:8:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27821,
|
|
"src": "5816:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"typeName": {
|
|
"id": 27786,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27785,
|
|
"name": "Rounding",
|
|
"nameLocations": [
|
|
"5816:8:29"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27571,
|
|
"src": "5816:8:29"
|
|
},
|
|
"referencedDeclaration": 27571,
|
|
"src": "5816:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5739:100:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27791,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27790,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27821,
|
|
"src": "5863:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27789,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5863:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5862:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27933,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "6280:1642:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27932,
|
|
"nodeType": "Block",
|
|
"src": "6337:1585:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27829,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "6351:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27830,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6356:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "6351:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 27835,
|
|
"nodeType": "IfStatement",
|
|
"src": "6347:45:29",
|
|
"trueBody": {
|
|
"id": 27834,
|
|
"nodeType": "Block",
|
|
"src": "6359:33:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"hexValue": "30",
|
|
"id": 27832,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6380:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"functionReturnParameters": 27828,
|
|
"id": 27833,
|
|
"nodeType": "Return",
|
|
"src": "6373:8:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"assignments": [
|
|
27837
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27837,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "7079:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27932,
|
|
"src": "7071:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27836,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7071:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27846,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27845,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "31",
|
|
"id": 27838,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7088:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<<",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27843,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 27840,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7099:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 27839,
|
|
"name": "log2",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
28101,
|
|
28137
|
|
],
|
|
"referencedDeclaration": 28101,
|
|
"src": "7094:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 27841,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7094:7:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27842,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7105:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7094:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27844,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7093:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7088:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7071:36:29"
|
|
},
|
|
{
|
|
"id": 27931,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "7508:408:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27856,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27847,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7532:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27855,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27852,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27848,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7542:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27851,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27849,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7551:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27850,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7555:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7551:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7542:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27853,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7541:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7566:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7541:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7532:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27857,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7532:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27867,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27858,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7581:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27866,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27863,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27859,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7591:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27862,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27860,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7600:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27861,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7604:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7600:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7591:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27864,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7590:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7615:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7590:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7581:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27868,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7581:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27878,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27869,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7630:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27877,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27874,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27870,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7640:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27873,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27871,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7649:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27872,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7653:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7649:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7640:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27875,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7639:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27876,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7664:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7639:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7630:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27879,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7630:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27889,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27880,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7679:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27888,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27885,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27881,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7689:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27884,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27882,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7698:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27883,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7702:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7698:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7689:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27886,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7688:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27887,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7713:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7688:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7679:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27890,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7679:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27891,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7728:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27899,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27892,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7738:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27895,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27893,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7747:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27894,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7751:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7747:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7738:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27897,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7737:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7762:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7737:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7728:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27901,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7728:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27911,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27902,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7777:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27910,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27907,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27903,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7787:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27906,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27904,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7796:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27905,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7800:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7796:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7787:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27908,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7786:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27909,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7811:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7786:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7777:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27912,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7777:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27913,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7826:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27921,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27918,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27914,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7836:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27917,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27915,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7845:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27916,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7849:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7845:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7836:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 27919,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7835:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27920,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7860:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "7835:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7826:35:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27923,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7826:35:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 27925,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7886:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27926,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27824,
|
|
"src": "7894:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "/",
|
|
"rightExpression": {
|
|
"id": 27927,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27837,
|
|
"src": "7898:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7894:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 27924,
|
|
"name": "min",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27607,
|
|
"src": "7882:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 27929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7882:23:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27828,
|
|
"id": 27930,
|
|
"nodeType": "Return",
|
|
"src": "7875:30:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27822,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6067:208:29",
|
|
"text": " @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11)."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sqrt",
|
|
"nameLocation": "6289:4:29",
|
|
"parameters": {
|
|
"id": 27825,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27824,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "6302:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27933,
|
|
"src": "6294:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27823,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6294:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6293:11:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27828,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27827,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27933,
|
|
"src": "6328:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27826,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6328:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6327:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27969,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "8022:237:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27968,
|
|
"nodeType": "Block",
|
|
"src": "8098:161:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 27967,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "8108:145:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
27945
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27945,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "8140:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27967,
|
|
"src": "8132:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27944,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8132:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27949,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 27947,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27936,
|
|
"src": "8154:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 27946,
|
|
"name": "sqrt",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
27933,
|
|
27969
|
|
],
|
|
"referencedDeclaration": 27933,
|
|
"src": "8149:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 27948,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8149:7:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8132:24:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27965,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27950,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27945,
|
|
"src": "8177:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 27960,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"id": 27954,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27951,
|
|
"name": "rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27939,
|
|
"src": "8187:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 27952,
|
|
"name": "Rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27571,
|
|
"src": "8199:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$27571_$",
|
|
"typeString": "type(enum Math.Rounding)"
|
|
}
|
|
},
|
|
"id": 27953,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8208:2:29",
|
|
"memberName": "Up",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27569,
|
|
"src": "8199:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"src": "8187:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27959,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27957,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27955,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27945,
|
|
"src": "8214:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 27956,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27945,
|
|
"src": "8223:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8214:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 27958,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27936,
|
|
"src": "8232:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8214:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "8187:46:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"hexValue": "30",
|
|
"id": 27962,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8240:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"id": 27963,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "8187:54:29",
|
|
"trueExpression": {
|
|
"hexValue": "31",
|
|
"id": 27961,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8236:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"id": 27964,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "8186:56:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "8177:65:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27943,
|
|
"id": 27966,
|
|
"nodeType": "Return",
|
|
"src": "8170:72:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27934,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7928:89:29",
|
|
"text": " @notice Calculates sqrt(a), following the selected rounding direction."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sqrt",
|
|
"nameLocation": "8031:4:29",
|
|
"parameters": {
|
|
"id": 27940,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27936,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "8044:1:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27969,
|
|
"src": "8036:9:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27935,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8036:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 27939,
|
|
"mutability": "mutable",
|
|
"name": "rounding",
|
|
"nameLocation": "8056:8:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27969,
|
|
"src": "8047:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"typeName": {
|
|
"id": 27938,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27937,
|
|
"name": "Rounding",
|
|
"nameLocations": [
|
|
"8047:8:29"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27571,
|
|
"src": "8047:8:29"
|
|
},
|
|
"referencedDeclaration": 27571,
|
|
"src": "8047:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8035:30:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27943,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27942,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27969,
|
|
"src": "8089:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27941,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8089:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8088:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28101,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "8383:983:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28100,
|
|
"nodeType": "Block",
|
|
"src": "8444:922:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
27978
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27978,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "8462:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28100,
|
|
"src": "8454:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27977,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8454:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27980,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 27979,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8471:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8454:18:29"
|
|
},
|
|
{
|
|
"id": 28097,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "8482:855:29",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27985,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27983,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27981,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8510:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "313238",
|
|
"id": 27982,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8519:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_128_by_1",
|
|
"typeString": "int_const 128"
|
|
},
|
|
"value": "128"
|
|
},
|
|
"src": "8510:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27984,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8525:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "8510:16:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 27995,
|
|
"nodeType": "IfStatement",
|
|
"src": "8506:99:29",
|
|
"trueBody": {
|
|
"id": 27994,
|
|
"nodeType": "Block",
|
|
"src": "8528:77:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27988,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27986,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8546:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "313238",
|
|
"id": 27987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8556:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_128_by_1",
|
|
"typeString": "int_const 128"
|
|
},
|
|
"value": "128"
|
|
},
|
|
"src": "8546:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27989,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8546:13:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 27992,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 27990,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "8577:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "313238",
|
|
"id": 27991,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8587:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_128_by_1",
|
|
"typeString": "int_const 128"
|
|
},
|
|
"value": "128"
|
|
},
|
|
"src": "8577:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27993,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8577:13:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28000,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27998,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27996,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8622:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3634",
|
|
"id": 27997,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8631:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "8622:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27999,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8636:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "8622:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28010,
|
|
"nodeType": "IfStatement",
|
|
"src": "8618:96:29",
|
|
"trueBody": {
|
|
"id": 28009,
|
|
"nodeType": "Block",
|
|
"src": "8639:75:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28003,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28001,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8657:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3634",
|
|
"id": 28002,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8667:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "8657:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28004,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8657:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28007,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28005,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "8687:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3634",
|
|
"id": 28006,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8697:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "8687:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28008,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8687:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28015,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28013,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28011,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8731:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 28012,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8740:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "8731:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28014,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8745:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "8731:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28025,
|
|
"nodeType": "IfStatement",
|
|
"src": "8727:96:29",
|
|
"trueBody": {
|
|
"id": 28024,
|
|
"nodeType": "Block",
|
|
"src": "8748:75:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28018,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28016,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8766:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3332",
|
|
"id": 28017,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8776:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "8766:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28019,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8766:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28022,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28020,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "8796:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3332",
|
|
"id": 28021,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8806:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "8796:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28023,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8796:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28030,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28028,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28026,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8840:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3136",
|
|
"id": 28027,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8849:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "8840:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28029,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8854:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "8840:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28040,
|
|
"nodeType": "IfStatement",
|
|
"src": "8836:96:29",
|
|
"trueBody": {
|
|
"id": 28039,
|
|
"nodeType": "Block",
|
|
"src": "8857:75:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28033,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28031,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8875:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3136",
|
|
"id": 28032,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8885:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "8875:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28034,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8875:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28037,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28035,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "8905:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3136",
|
|
"id": 28036,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8915:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "8905:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28038,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8905:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28045,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28043,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28041,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8949:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 28042,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8958:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "8949:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28044,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8962:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "8949:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28055,
|
|
"nodeType": "IfStatement",
|
|
"src": "8945:93:29",
|
|
"trueBody": {
|
|
"id": 28054,
|
|
"nodeType": "Block",
|
|
"src": "8965:73:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28048,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28046,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "8983:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "38",
|
|
"id": 28047,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8993:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "8983:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28049,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8983:11:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28052,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28050,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "9012:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "38",
|
|
"id": 28051,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9022:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "9012:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28053,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9012:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28060,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28058,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28056,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "9055:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "34",
|
|
"id": 28057,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9064:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "9055:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28059,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9068:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "9055:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28070,
|
|
"nodeType": "IfStatement",
|
|
"src": "9051:93:29",
|
|
"trueBody": {
|
|
"id": 28069,
|
|
"nodeType": "Block",
|
|
"src": "9071:73:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28063,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28061,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "9089:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "34",
|
|
"id": 28062,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9099:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "9089:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28064,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9089:11:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28067,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28065,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "9118:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "34",
|
|
"id": 28066,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9128:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "9118:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28068,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9118:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28075,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28073,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28071,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "9161:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 28072,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9170:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "9161:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28074,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9174:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "9161:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28085,
|
|
"nodeType": "IfStatement",
|
|
"src": "9157:93:29",
|
|
"trueBody": {
|
|
"id": 28084,
|
|
"nodeType": "Block",
|
|
"src": "9177:73:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28078,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28076,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "9195:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "32",
|
|
"id": 28077,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9205:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "9195:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28079,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9195:11:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28082,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28080,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "9224:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "32",
|
|
"id": 28081,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9234:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "9224:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28083,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9224:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28090,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28086,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27972,
|
|
"src": "9267:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 28087,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9276:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "9267:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28089,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9280:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "9267:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28096,
|
|
"nodeType": "IfStatement",
|
|
"src": "9263:64:29",
|
|
"trueBody": {
|
|
"id": 28095,
|
|
"nodeType": "Block",
|
|
"src": "9283:44:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28093,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28091,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "9301:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "31",
|
|
"id": 28092,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9311:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "9301:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28094,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9301:11:29"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28098,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27978,
|
|
"src": "9353:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27976,
|
|
"id": 28099,
|
|
"nodeType": "Return",
|
|
"src": "9346:13:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 27970,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "8265:113:29",
|
|
"text": " @dev Return the log in base 2, rounded down, of a positive value.\n Returns 0 if given 0."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log2",
|
|
"nameLocation": "8392:4:29",
|
|
"parameters": {
|
|
"id": 27973,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27972,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "8405:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28101,
|
|
"src": "8397:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27971,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8397:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8396:15:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27976,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27975,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28101,
|
|
"src": "8435:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27974,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8435:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "8434:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28137,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "9519:245:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28136,
|
|
"nodeType": "Block",
|
|
"src": "9599:165:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 28135,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "9609:149:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
28113
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 28113,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "9641:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28135,
|
|
"src": "9633:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28112,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9633:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 28117,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 28115,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28104,
|
|
"src": "9655:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 28114,
|
|
"name": "log2",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
28101,
|
|
28137
|
|
],
|
|
"referencedDeclaration": 28101,
|
|
"src": "9650:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 28116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9650:11:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "9633:28:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28133,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28118,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28113,
|
|
"src": "9682:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 28128,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"id": 28122,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28119,
|
|
"name": "rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28107,
|
|
"src": "9692:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 28120,
|
|
"name": "Rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27571,
|
|
"src": "9704:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$27571_$",
|
|
"typeString": "type(enum Math.Rounding)"
|
|
}
|
|
},
|
|
"id": 28121,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9713:2:29",
|
|
"memberName": "Up",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27569,
|
|
"src": "9704:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"src": "9692:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28127,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28125,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "31",
|
|
"id": 28123,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9719:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<<",
|
|
"rightExpression": {
|
|
"id": 28124,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28113,
|
|
"src": "9724:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9719:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 28126,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28104,
|
|
"src": "9733:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9719:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "9692:46:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"hexValue": "30",
|
|
"id": 28130,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9745:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"id": 28131,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "9692:54:29",
|
|
"trueExpression": {
|
|
"hexValue": "31",
|
|
"id": 28129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9741:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"id": 28132,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "9691:56:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "9682:65:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28111,
|
|
"id": 28134,
|
|
"nodeType": "Return",
|
|
"src": "9675:72:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 28102,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "9372:142:29",
|
|
"text": " @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log2",
|
|
"nameLocation": "9528:4:29",
|
|
"parameters": {
|
|
"id": 28108,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28104,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "9541:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28137,
|
|
"src": "9533:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28103,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9533:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 28107,
|
|
"mutability": "mutable",
|
|
"name": "rounding",
|
|
"nameLocation": "9557:8:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28137,
|
|
"src": "9548:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"typeName": {
|
|
"id": 28106,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 28105,
|
|
"name": "Rounding",
|
|
"nameLocations": [
|
|
"9548:8:29"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27571,
|
|
"src": "9548:8:29"
|
|
},
|
|
"referencedDeclaration": 27571,
|
|
"src": "9548:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9532:34:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28111,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28110,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28137,
|
|
"src": "9590:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28109,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9590:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9589:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28266,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "9889:890:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28265,
|
|
"nodeType": "Block",
|
|
"src": "9951:828:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
28146
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 28146,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "9969:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28265,
|
|
"src": "9961:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28145,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9961:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 28148,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 28147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "9978:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "9961:18:29"
|
|
},
|
|
{
|
|
"id": 28262,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "9989:761:29",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28149,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10017:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(57 digits omitted)...0000"
|
|
},
|
|
"id": 28152,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10026:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3634",
|
|
"id": 28151,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10030:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "10026:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(57 digits omitted)...0000"
|
|
}
|
|
},
|
|
"src": "10017:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28165,
|
|
"nodeType": "IfStatement",
|
|
"src": "10013:99:29",
|
|
"trueBody": {
|
|
"id": 28164,
|
|
"nodeType": "Block",
|
|
"src": "10034:78:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28154,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10052:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(57 digits omitted)...0000"
|
|
},
|
|
"id": 28157,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28155,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10061:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3634",
|
|
"id": 28156,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10065:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "10061:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(57 digits omitted)...0000"
|
|
}
|
|
},
|
|
"src": "10052:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28159,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10052:15:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28162,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28160,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10085:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3634",
|
|
"id": 28161,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10095:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "10085:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28163,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10085:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28170,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28166,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10129:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(25 digits omitted)...0000"
|
|
},
|
|
"id": 28169,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28167,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10138:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 28168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10142:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "10138:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(25 digits omitted)...0000"
|
|
}
|
|
},
|
|
"src": "10129:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28182,
|
|
"nodeType": "IfStatement",
|
|
"src": "10125:99:29",
|
|
"trueBody": {
|
|
"id": 28181,
|
|
"nodeType": "Block",
|
|
"src": "10146:78:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28175,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28171,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10164:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(25 digits omitted)...0000"
|
|
},
|
|
"id": 28174,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28172,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10173:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 28173,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10177:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "10173:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000...(25 digits omitted)...0000"
|
|
}
|
|
},
|
|
"src": "10164:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28176,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10164:15:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28179,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28177,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10197:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3332",
|
|
"id": 28178,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10207:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "10197:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28180,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10197:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28187,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28183,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10241:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000000000000000_by_1",
|
|
"typeString": "int_const 10000000000000000"
|
|
},
|
|
"id": 28186,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28184,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10250:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3136",
|
|
"id": 28185,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10254:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "10250:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000000000000000_by_1",
|
|
"typeString": "int_const 10000000000000000"
|
|
}
|
|
},
|
|
"src": "10241:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28199,
|
|
"nodeType": "IfStatement",
|
|
"src": "10237:99:29",
|
|
"trueBody": {
|
|
"id": 28198,
|
|
"nodeType": "Block",
|
|
"src": "10258:78:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28192,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28188,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10276:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000000000000000_by_1",
|
|
"typeString": "int_const 10000000000000000"
|
|
},
|
|
"id": 28191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28189,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10285:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "3136",
|
|
"id": 28190,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10289:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "10285:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000000000000000_by_1",
|
|
"typeString": "int_const 10000000000000000"
|
|
}
|
|
},
|
|
"src": "10276:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28193,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10276:15:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28194,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10309:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3136",
|
|
"id": 28195,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10319:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "10309:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28197,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10309:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28204,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28200,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10353:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
},
|
|
"id": 28203,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28201,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10362:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 28202,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10366:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "10362:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
},
|
|
"src": "10353:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28216,
|
|
"nodeType": "IfStatement",
|
|
"src": "10349:96:29",
|
|
"trueBody": {
|
|
"id": 28215,
|
|
"nodeType": "Block",
|
|
"src": "10369:76:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28209,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28205,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10387:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
},
|
|
"id": 28208,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28206,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10396:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 28207,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10400:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "10396:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
},
|
|
"src": "10387:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28210,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10387:14:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28213,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28211,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10419:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "38",
|
|
"id": 28212,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10429:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "10419:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28214,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10419:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28217,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10462:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000_by_1",
|
|
"typeString": "int_const 10000"
|
|
},
|
|
"id": 28220,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28218,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10471:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "34",
|
|
"id": 28219,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10475:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "10471:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000_by_1",
|
|
"typeString": "int_const 10000"
|
|
}
|
|
},
|
|
"src": "10462:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28233,
|
|
"nodeType": "IfStatement",
|
|
"src": "10458:96:29",
|
|
"trueBody": {
|
|
"id": 28232,
|
|
"nodeType": "Block",
|
|
"src": "10478:76:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28226,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28222,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10496:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10000_by_1",
|
|
"typeString": "int_const 10000"
|
|
},
|
|
"id": 28225,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10505:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "34",
|
|
"id": 28224,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10509:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "10505:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10000_by_1",
|
|
"typeString": "int_const 10000"
|
|
}
|
|
},
|
|
"src": "10496:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28227,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10496:14:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28230,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28228,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10528:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "34",
|
|
"id": 28229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10538:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "10528:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28231,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10528:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28238,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28234,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10571:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
},
|
|
"id": 28237,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28235,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10580:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 28236,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10584:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "10580:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
}
|
|
},
|
|
"src": "10571:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28250,
|
|
"nodeType": "IfStatement",
|
|
"src": "10567:96:29",
|
|
"trueBody": {
|
|
"id": 28249,
|
|
"nodeType": "Block",
|
|
"src": "10587:76:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28243,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28239,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10605:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
},
|
|
"id": 28242,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10614:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 28241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10618:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "10614:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
}
|
|
},
|
|
"src": "10605:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28244,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10605:14:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28247,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28245,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10637:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "32",
|
|
"id": 28246,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10647:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "10637:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28248,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10637:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28255,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28251,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28140,
|
|
"src": "10680:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"id": 28254,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28252,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10689:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 28253,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10693:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "10689:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
}
|
|
},
|
|
"src": "10680:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28261,
|
|
"nodeType": "IfStatement",
|
|
"src": "10676:64:29",
|
|
"trueBody": {
|
|
"id": 28260,
|
|
"nodeType": "Block",
|
|
"src": "10696:44:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28258,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28256,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10714:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "31",
|
|
"id": 28257,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10724:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "10714:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28259,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10714:11:29"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28263,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28146,
|
|
"src": "10766:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28144,
|
|
"id": 28264,
|
|
"nodeType": "Return",
|
|
"src": "10759:13:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 28138,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "9770:114:29",
|
|
"text": " @dev Return the log in base 10, rounded down, of a positive value.\n Returns 0 if given 0."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log10",
|
|
"nameLocation": "9898:5:29",
|
|
"parameters": {
|
|
"id": 28141,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28140,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "9912:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28266,
|
|
"src": "9904:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28139,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9904:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9903:15:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28144,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28143,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28266,
|
|
"src": "9942:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28142,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9942:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9941:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28302,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "10933:246:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28301,
|
|
"nodeType": "Block",
|
|
"src": "11014:165:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 28300,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "11024:149:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
28278
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 28278,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "11056:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28300,
|
|
"src": "11048:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28277,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11048:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 28282,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 28280,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28269,
|
|
"src": "11071:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 28279,
|
|
"name": "log10",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
28266,
|
|
28302
|
|
],
|
|
"referencedDeclaration": 28266,
|
|
"src": "11065:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 28281,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "11065:12:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "11048:29:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28298,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28283,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28278,
|
|
"src": "11098:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 28293,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"id": 28287,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28284,
|
|
"name": "rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28272,
|
|
"src": "11108:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 28285,
|
|
"name": "Rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27571,
|
|
"src": "11120:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$27571_$",
|
|
"typeString": "type(enum Math.Rounding)"
|
|
}
|
|
},
|
|
"id": 28286,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11129:2:29",
|
|
"memberName": "Up",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27569,
|
|
"src": "11120:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"src": "11108:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28292,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28290,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 28288,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11135:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"id": 28289,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28278,
|
|
"src": "11139:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "11135:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 28291,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28269,
|
|
"src": "11148:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "11135:18:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "11108:45:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"hexValue": "30",
|
|
"id": 28295,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11160:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"id": 28296,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "11108:53:29",
|
|
"trueExpression": {
|
|
"hexValue": "31",
|
|
"id": 28294,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11156:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"id": 28297,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "11107:55:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "11098:64:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28276,
|
|
"id": 28299,
|
|
"nodeType": "Return",
|
|
"src": "11091:71:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 28267,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "10785:143:29",
|
|
"text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log10",
|
|
"nameLocation": "10942:5:29",
|
|
"parameters": {
|
|
"id": 28273,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28269,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "10956:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28302,
|
|
"src": "10948:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28268,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "10948:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 28272,
|
|
"mutability": "mutable",
|
|
"name": "rounding",
|
|
"nameLocation": "10972:8:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28302,
|
|
"src": "10963:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"typeName": {
|
|
"id": 28271,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 28270,
|
|
"name": "Rounding",
|
|
"nameLocations": [
|
|
"10963:8:29"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27571,
|
|
"src": "10963:8:29"
|
|
},
|
|
"referencedDeclaration": 27571,
|
|
"src": "10963:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "10947:34:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28276,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28275,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28302,
|
|
"src": "11005:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28274,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11005:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "11004:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28389,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "11430:663:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28388,
|
|
"nodeType": "Block",
|
|
"src": "11493:600:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
28311
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 28311,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "11511:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28388,
|
|
"src": "11503:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28310,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11503:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 28313,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 28312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11520:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "11503:18:29"
|
|
},
|
|
{
|
|
"id": 28385,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "11531:533:29",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28318,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28316,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28314,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11559:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "313238",
|
|
"id": 28315,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11568:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_128_by_1",
|
|
"typeString": "int_const 128"
|
|
},
|
|
"value": "128"
|
|
},
|
|
"src": "11559:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28317,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11574:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11559:16:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28328,
|
|
"nodeType": "IfStatement",
|
|
"src": "11555:98:29",
|
|
"trueBody": {
|
|
"id": 28327,
|
|
"nodeType": "Block",
|
|
"src": "11577:76:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28321,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28319,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11595:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "313238",
|
|
"id": 28320,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11605:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_128_by_1",
|
|
"typeString": "int_const 128"
|
|
},
|
|
"value": "128"
|
|
},
|
|
"src": "11595:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28322,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11595:13:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28325,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28323,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "11626:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "3136",
|
|
"id": 28324,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11636:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "11626:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28326,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11626:12:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28333,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28331,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28329,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11670:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3634",
|
|
"id": 28330,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11679:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "11670:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11684:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11670:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28343,
|
|
"nodeType": "IfStatement",
|
|
"src": "11666:95:29",
|
|
"trueBody": {
|
|
"id": 28342,
|
|
"nodeType": "Block",
|
|
"src": "11687:74:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28336,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28334,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11705:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3634",
|
|
"id": 28335,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11715:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_64_by_1",
|
|
"typeString": "int_const 64"
|
|
},
|
|
"value": "64"
|
|
},
|
|
"src": "11705:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28337,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11705:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28340,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28338,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "11735:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "38",
|
|
"id": 28339,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11745:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "11735:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28341,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11735:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28348,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28346,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28344,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11778:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3332",
|
|
"id": 28345,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11787:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "11778:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28347,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11792:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11778:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28358,
|
|
"nodeType": "IfStatement",
|
|
"src": "11774:95:29",
|
|
"trueBody": {
|
|
"id": 28357,
|
|
"nodeType": "Block",
|
|
"src": "11795:74:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28349,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11813:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3332",
|
|
"id": 28350,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11823:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_32_by_1",
|
|
"typeString": "int_const 32"
|
|
},
|
|
"value": "32"
|
|
},
|
|
"src": "11813:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28352,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11813:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28355,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28353,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "11843:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "34",
|
|
"id": 28354,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11853:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "11843:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28356,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11843:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28363,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28361,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28359,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11886:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "3136",
|
|
"id": 28360,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11895:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "11886:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28362,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11900:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11886:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28373,
|
|
"nodeType": "IfStatement",
|
|
"src": "11882:95:29",
|
|
"trueBody": {
|
|
"id": 28372,
|
|
"nodeType": "Block",
|
|
"src": "11903:74:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28366,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28364,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11921:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "3136",
|
|
"id": 28365,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11931:2:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_16_by_1",
|
|
"typeString": "int_const 16"
|
|
},
|
|
"value": "16"
|
|
},
|
|
"src": "11921:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28367,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11921:12:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28370,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28368,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "11951:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "32",
|
|
"id": 28369,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11961:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "11951:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28371,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11951:11:29"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28378,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28376,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28374,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28305,
|
|
"src": "11994:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">>",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 28375,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12003:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "11994:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 28377,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12007:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11994:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 28384,
|
|
"nodeType": "IfStatement",
|
|
"src": "11990:64:29",
|
|
"trueBody": {
|
|
"id": 28383,
|
|
"nodeType": "Block",
|
|
"src": "12010:44:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 28381,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 28379,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "12028:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "31",
|
|
"id": 28380,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12038:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "12028:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 28382,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "12028:11:29"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 28386,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28311,
|
|
"src": "12080:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28309,
|
|
"id": 28387,
|
|
"nodeType": "Return",
|
|
"src": "12073:13:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 28303,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "11185:240:29",
|
|
"text": " @dev Return the log in base 256, rounded down, of a positive value.\n Returns 0 if given 0.\n Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log256",
|
|
"nameLocation": "11439:6:29",
|
|
"parameters": {
|
|
"id": 28306,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28305,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "11454:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28389,
|
|
"src": "11446:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28304,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11446:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "11445:15:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28309,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28308,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28389,
|
|
"src": "11484:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28307,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11484:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "11483:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 28428,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "12247:255:29",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 28427,
|
|
"nodeType": "Block",
|
|
"src": "12329:173:29",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 28426,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "12339:157:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
28401
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 28401,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "12371:6:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28426,
|
|
"src": "12363:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28400,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12363:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 28405,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 28403,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28392,
|
|
"src": "12387:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 28402,
|
|
"name": "log256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
28389,
|
|
28428
|
|
],
|
|
"referencedDeclaration": 28389,
|
|
"src": "12380:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 28404,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "12380:13:29",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12363:30:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28424,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28406,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28401,
|
|
"src": "12414:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 28419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"id": 28410,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28407,
|
|
"name": "rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28395,
|
|
"src": "12424:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 28408,
|
|
"name": "Rounding",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27571,
|
|
"src": "12436:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Rounding_$27571_$",
|
|
"typeString": "type(enum Math.Rounding)"
|
|
}
|
|
},
|
|
"id": 28409,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "12445:2:29",
|
|
"memberName": "Up",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27569,
|
|
"src": "12436:11:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"src": "12424:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28416,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "31",
|
|
"id": 28411,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12451:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<<",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 28414,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 28412,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28401,
|
|
"src": "12457:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"hexValue": "38",
|
|
"id": 28413,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12466:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "12457:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 28415,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "12456:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "12451:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 28417,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 28392,
|
|
"src": "12471:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "12451:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "12424:52:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"hexValue": "30",
|
|
"id": 28421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12483:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"id": 28422,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "12424:60:29",
|
|
"trueExpression": {
|
|
"hexValue": "31",
|
|
"id": 28420,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12479:1:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"id": 28423,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "12423:62:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "12414:71:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28399,
|
|
"id": 28425,
|
|
"nodeType": "Return",
|
|
"src": "12407:78:29"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 28390,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "12099:143:29",
|
|
"text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0."
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "log256",
|
|
"nameLocation": "12256:6:29",
|
|
"parameters": {
|
|
"id": 28396,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28392,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "12271:5:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28428,
|
|
"src": "12263:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28391,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12263:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 28395,
|
|
"mutability": "mutable",
|
|
"name": "rounding",
|
|
"nameLocation": "12287:8:29",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28428,
|
|
"src": "12278:17:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
},
|
|
"typeName": {
|
|
"id": 28394,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 28393,
|
|
"name": "Rounding",
|
|
"nameLocations": [
|
|
"12278:8:29"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27571,
|
|
"src": "12278:8:29"
|
|
},
|
|
"referencedDeclaration": 27571,
|
|
"src": "12278:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Rounding_$27571",
|
|
"typeString": "enum Math.Rounding"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "12262:34:29"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28399,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 28398,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 28428,
|
|
"src": "12320:7:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 28397,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12320:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "12319:9:29"
|
|
},
|
|
"scope": 28429,
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Math",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 27567,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "128:73:29",
|
|
"text": " @dev Standard math utilities missing in the Solidity language."
|
|
},
|
|
"fullyImplemented": true,
|
|
"linearizedBaseContracts": [
|
|
28429
|
|
],
|
|
"name": "Math",
|
|
"nameLocation": "210:4:29",
|
|
"scope": 28430,
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"license": "MIT"
|
|
},
|
|
"id": 29
|
|
} |