UNPKG

@alpsfinance/core

Version:

This is the official Alps Finance smart contract repository.

1,242 lines (1,241 loc) 87.5 kB
{ "contractName": "Math", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"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\":{\"@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xc995bddbca1ae19788db9f8b61e63385edd3fddf89693b612d5abd1a275974d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab84f13e6e6e0823854a0cddd49e96df052092d5919f95587607f0ed28a64cb6\",\"dweb:/ipfs/QmbNtqAq23ZDjCzHukQaa7B3y6rcobscm6FZF5PMQXcnVr\"]}},\"version\":1}", "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d281b8166fa31ee00cff179ad3f4c54b43ea3fc95114303959d9d4a6cb0a73e764736f6c634300080b0033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d281b8166fa31ee00cff179ad3f4c54b43ea3fc95114303959d9d4a6cb0a73e764736f6c634300080b0033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "202:1024:35:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;202:1024:35;;;;;;;;;;;;;;;;;", "deployedSourceMap": "202:1024:35:-:0;;;;;;;;", "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a / b + (a % b == 0 ? 0 : 1);\n }\n}\n", "sourcePath": "@openzeppelin/contracts/utils/math/Math.sol", "ast": { "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", "exportedSymbols": { "Math": [ 6352 ] }, "id": 6353, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 6266, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "103:23:35" }, { "abstract": false, "baseContracts": [], "canonicalName": "Math", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 6267, "nodeType": "StructuredDocumentation", "src": "128:73:35", "text": " @dev Standard math utilities missing in the Solidity language." }, "fullyImplemented": true, "id": 6352, "linearizedBaseContracts": [ 6352 ], "name": "Math", "nameLocation": "210:4:35", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 6284, "nodeType": "Block", "src": "352:38:35", "statements": [ { "expression": { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6277, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6270, "src": "369:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "id": 6278, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6272, "src": "374:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "369:6:35", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "id": 6281, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6272, "src": "382:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "369:14:35", "trueExpression": { "id": 6280, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6270, "src": "378:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 6276, "id": 6283, "nodeType": "Return", "src": "362:21:35" } ] }, "documentation": { "id": 6268, "nodeType": "StructuredDocumentation", "src": "221:59:35", "text": " @dev Returns the largest of two numbers." }, "id": 6285, "implemented": true, "kind": "function", "modifiers": [], "name": "max", "nameLocation": "294:3:35", "nodeType": "FunctionDefinition", "parameters": { "id": 6273, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6270, "mutability": "mutable", "name": "a", "nameLocation": "306:1:35", "nodeType": "VariableDeclaration", "scope": 6285, "src": "298:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6269, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "298:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6272, "mutability": "mutable", "name": "b", "nameLocation": "317:1:35", "nodeType": "VariableDeclaration", "scope": 6285, "src": "309:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6271, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "309:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "297:22:35" }, "returnParameters": { "id": 6276, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6275, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 6285, "src": "343:7:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6274, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "343:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "342:9:35" }, "scope": 6352, "src": "285:105:35", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 6302, "nodeType": "Block", "src": "528:37:35", "statements": [ { "expression": { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6297, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6295, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6288, "src": "545:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "id": 6296, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6290, "src": "549:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "545:5:35", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "id": 6299, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6290, "src": "557:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6300, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "545:13:35", "trueExpression": { "id": 6298, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6288, "src": "553:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 6294, "id": 6301, "nodeType": "Return", "src": "538:20:35" } ] }, "documentation": { "id": 6286, "nodeType": "StructuredDocumentation", "src": "396:60:35", "text": " @dev Returns the smallest of two numbers." }, "id": 6303, "implemented": true, "kind": "function", "modifiers": [], "name": "min", "nameLocation": "470:3:35", "nodeType": "FunctionDefinition", "parameters": { "id": 6291, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6288, "mutability": "mutable", "name": "a", "nameLocation": "482:1:35", "nodeType": "VariableDeclaration", "scope": 6303, "src": "474:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6287, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "474:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6290, "mutability": "mutable", "name": "b", "nameLocation": "493:1:35", "nodeType": "VariableDeclaration", "scope": 6303, "src": "485:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6289, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "485:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "473:22:35" }, "returnParameters": { "id": 6294, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6293, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 6303, "src": "519:7:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6292, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "519:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "518:9:35" }, "scope": 6352, "src": "461:104:35", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 6325, "nodeType": "Block", "src": "749:82:35", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6313, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6306, "src": "804:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "&", "rightExpression": { "id": 6314, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6308, "src": "808:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "804:5:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 6316, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "803:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6322, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6319, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6317, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6306, "src": "814:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "^", "rightExpression": { "id": 6318, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6308, "src": "818:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "814:5:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 6320, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "813:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "hexValue": "32", "id": 6321, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "823:1:35", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "813:11:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "803:21:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 6312, "id": 6324, "nodeType": "Return", "src": "796:28:35" } ] }, "documentation": { "id": 6304, "nodeType": "StructuredDocumentation", "src": "571:102:35", "text": " @dev Returns the average of two numbers. The result is rounded towards\n zero." }, "id": 6326, "implemented": true, "kind": "function", "modifiers": [], "name": "average", "nameLocation": "687:7:35", "nodeType": "FunctionDefinition", "parameters": { "id": 6309, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6306, "mutability": "mutable", "name": "a", "nameLocation": "703:1:35", "nodeType": "VariableDeclaration", "scope": 6326, "src": "695:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6305, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "695:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6308, "mutability": "mutable", "name": "b", "nameLocation": "714:1:35", "nodeType": "VariableDeclaration", "scope": 6326, "src": "706:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6307, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "706:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "694:22:35" }, "returnParameters": { "id": 6312, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6311, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 6326, "src": "740:7:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6310, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "740:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "739:9:35" }, "scope": 6352, "src": "678:153:35", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 6350, "nodeType": "Block", "src": "1101:123:35", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6348, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6338, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6336, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6329, "src": "1189:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "id": 6337, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6331, "src": "1193:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1189:5:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "components": [ { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6343, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6341, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6339, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6329, "src": "1198:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": { "id": 6340, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6331, "src": "1202:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1198:5:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 6342, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1207:1:35", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1198:10:35", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "hexValue": "31", "id": 6345, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1215:1:35", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "id": 6346, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "1198:18:35", "trueExpression": { "hexValue": "30", "id": 6344, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1211:1:35", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } } ], "id": 6347, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1197:20:35", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "1189:28:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 6335, "id": 6349, "nodeType": "Return", "src": "1182:35:35" } ] }, "documentation": { "id": 6327, "nodeType": "StructuredDocumentation", "src": "837:188:35", "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." }, "id": 6351, "implemented": true, "kind": "function", "modifiers": [], "name": "ceilDiv", "nameLocation": "1039:7:35", "nodeType": "FunctionDefinition", "parameters": { "id": 6332, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6329, "mutability": "mutable", "name": "a", "nameLocation": "1055:1:35", "nodeType": "VariableDeclaration", "scope": 6351, "src": "1047:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6328, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1047:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6331, "mutability": "mutable", "name": "b", "nameLocation": "1066:1:35", "nodeType": "VariableDeclaration", "scope": 6351, "src": "1058:9:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6330, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1058:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1046:22:35" }, "returnParameters": { "id": 6335, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6334, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 6351, "src": "1092:7:35", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1092:7:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1091:9:35" }, "scope": 6352, "src": "1030:194:35", "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "scope": 6353, "src": "202:1024:35", "usedErrors": [] } ], "src": "103:1124:35" }, "legacyAST": { "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", "exportedSymbols": { "Math": [ 6352 ] }, "id": 6353, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 6266, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "103:23:35" }, { "abstract": false, "baseContracts": [], "canonicalName": "Math", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 6267, "nodeType": "StructuredDocumentation", "src": "128:73:35", "text": " @dev Standard math utilities missing in the Solidity language." }, "fullyImplemented": true, "id": 6352, "linearizedBaseContracts": [ 6352 ], "name": "Math", "nameLocation": "210:4:35", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 6284, "nodeType": "Block", "src": "352:38:35", "statements": [ { "expression": { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 6277, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6270, "src": "369:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "id": 6278, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6272, "src": "374:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "369:6:35", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "id": 6281, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6272, "src": "382:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "369:14:35", "trueExpression": { "id": 6280, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6270, "src": "378:1:35", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 6276, "id": 6283, "nodeType": "Return", "src": "362:21:35" } ] }, "documentation": { "id": 6268, "nodeType": "StructuredDocumentation", "src": "221:59:35", "text": " @dev Returns the largest of two numbers." },