2022-08-17 17:21:15 +08:00

2204 lines
86 KiB
JSON

{
"contractName": "Math",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"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\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xc995bddbca1ae19788db9f8b61e63385edd3fddf89693b612d5abd1a275974d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab84f13e6e6e0823854a0cddd49e96df052092d5919f95587607f0ed28a64cb6\",\"dweb:/ipfs/QmbNtqAq23ZDjCzHukQaa7B3y6rcobscm6FZF5PMQXcnVr\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122044f4bfe6dfa35d92d8a6e07f72d8460b695df92889ba3dfbbcbf9959b41e0c7564736f6c634300080a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122044f4bfe6dfa35d92d8a6e07f72d8460b695df92889ba3dfbbcbf9959b41e0c7564736f6c634300080a0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "202:1024:27:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "202:1024:27:-: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": [
6111
]
},
"id": 6112,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6025,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "103:23:27"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6026,
"nodeType": "StructuredDocumentation",
"src": "128:73:27",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 6111,
"linearizedBaseContracts": [
6111
],
"name": "Math",
"nameLocation": "210:4:27",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6043,
"nodeType": "Block",
"src": "352:38:27",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6038,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6036,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6029,
"src": "369:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 6037,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6031,
"src": "374:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "369:6:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6040,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6031,
"src": "382:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6041,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "369:14:27",
"trueExpression": {
"id": 6039,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6029,
"src": "378:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6035,
"id": 6042,
"nodeType": "Return",
"src": "362:21:27"
}
]
},
"documentation": {
"id": 6027,
"nodeType": "StructuredDocumentation",
"src": "221:59:27",
"text": " @dev Returns the largest of two numbers."
},
"id": 6044,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "294:3:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6032,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6029,
"mutability": "mutable",
"name": "a",
"nameLocation": "306:1:27",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "298:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6028,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "298:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6031,
"mutability": "mutable",
"name": "b",
"nameLocation": "317:1:27",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "309:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6030,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "297:22:27"
},
"returnParameters": {
"id": 6035,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6034,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "343:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6033,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "343:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "342:9:27"
},
"scope": 6111,
"src": "285:105:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6061,
"nodeType": "Block",
"src": "528:37:27",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6054,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6047,
"src": "545:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6055,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6049,
"src": "549:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "545:5:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6058,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6049,
"src": "557:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "545:13:27",
"trueExpression": {
"id": 6057,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6047,
"src": "553:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6053,
"id": 6060,
"nodeType": "Return",
"src": "538:20:27"
}
]
},
"documentation": {
"id": 6045,
"nodeType": "StructuredDocumentation",
"src": "396:60:27",
"text": " @dev Returns the smallest of two numbers."
},
"id": 6062,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "470:3:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6050,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6047,
"mutability": "mutable",
"name": "a",
"nameLocation": "482:1:27",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "474:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6046,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "474:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6049,
"mutability": "mutable",
"name": "b",
"nameLocation": "493:1:27",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "485:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6048,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "473:22:27"
},
"returnParameters": {
"id": 6053,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6052,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "519:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6051,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "519:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "518:9:27"
},
"scope": 6111,
"src": "461:104:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6084,
"nodeType": "Block",
"src": "749:82:27",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6082,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6072,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6065,
"src": "804:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 6073,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6067,
"src": "808:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "804:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6075,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "803:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6076,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6065,
"src": "814:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 6077,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6067,
"src": "818:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "814:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6079,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "813:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 6080,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "823:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "813:11:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "803:21:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6071,
"id": 6083,
"nodeType": "Return",
"src": "796:28:27"
}
]
},
"documentation": {
"id": 6063,
"nodeType": "StructuredDocumentation",
"src": "571:102:27",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 6085,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "687:7:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6068,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6065,
"mutability": "mutable",
"name": "a",
"nameLocation": "703:1:27",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "695:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6064,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "695:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6067,
"mutability": "mutable",
"name": "b",
"nameLocation": "714:1:27",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "706:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6066,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "706:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "694:22:27"
},
"returnParameters": {
"id": 6071,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6070,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "740:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6069,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "740:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "739:9:27"
},
"scope": 6111,
"src": "678:153:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6109,
"nodeType": "Block",
"src": "1101:123:27",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6097,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6095,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6088,
"src": "1189:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6096,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6090,
"src": "1193:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1189:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6098,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6088,
"src": "1198:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6099,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6090,
"src": "1202:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1198:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6101,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1207:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1198:10:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 6104,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 6105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1198:18:27",
"trueExpression": {
"hexValue": "30",
"id": 6103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1211:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 6106,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1197:20:27",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1189:28:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6094,
"id": 6108,
"nodeType": "Return",
"src": "1182:35:27"
}
]
},
"documentation": {
"id": 6086,
"nodeType": "StructuredDocumentation",
"src": "837:188:27",
"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": 6110,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1039:7:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6091,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6088,
"mutability": "mutable",
"name": "a",
"nameLocation": "1055:1:27",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1047:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6087,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1047:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6090,
"mutability": "mutable",
"name": "b",
"nameLocation": "1066:1:27",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1058:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6089,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1046:22:27"
},
"returnParameters": {
"id": 6094,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6093,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1092:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6092,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1092:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1091:9:27"
},
"scope": 6111,
"src": "1030:194:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6112,
"src": "202:1024:27",
"usedErrors": []
}
],
"src": "103:1124:27"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/math/Math.sol",
"exportedSymbols": {
"Math": [
6111
]
},
"id": 6112,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6025,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "103:23:27"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6026,
"nodeType": "StructuredDocumentation",
"src": "128:73:27",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 6111,
"linearizedBaseContracts": [
6111
],
"name": "Math",
"nameLocation": "210:4:27",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6043,
"nodeType": "Block",
"src": "352:38:27",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6038,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6036,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6029,
"src": "369:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 6037,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6031,
"src": "374:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "369:6:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6040,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6031,
"src": "382:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6041,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "369:14:27",
"trueExpression": {
"id": 6039,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6029,
"src": "378:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6035,
"id": 6042,
"nodeType": "Return",
"src": "362:21:27"
}
]
},
"documentation": {
"id": 6027,
"nodeType": "StructuredDocumentation",
"src": "221:59:27",
"text": " @dev Returns the largest of two numbers."
},
"id": 6044,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "294:3:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6032,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6029,
"mutability": "mutable",
"name": "a",
"nameLocation": "306:1:27",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "298:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6028,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "298:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6031,
"mutability": "mutable",
"name": "b",
"nameLocation": "317:1:27",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "309:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6030,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "297:22:27"
},
"returnParameters": {
"id": 6035,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6034,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6044,
"src": "343:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6033,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "343:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "342:9:27"
},
"scope": 6111,
"src": "285:105:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6061,
"nodeType": "Block",
"src": "528:37:27",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6054,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6047,
"src": "545:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6055,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6049,
"src": "549:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "545:5:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6058,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6049,
"src": "557:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "545:13:27",
"trueExpression": {
"id": 6057,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6047,
"src": "553:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6053,
"id": 6060,
"nodeType": "Return",
"src": "538:20:27"
}
]
},
"documentation": {
"id": 6045,
"nodeType": "StructuredDocumentation",
"src": "396:60:27",
"text": " @dev Returns the smallest of two numbers."
},
"id": 6062,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "470:3:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6050,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6047,
"mutability": "mutable",
"name": "a",
"nameLocation": "482:1:27",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "474:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6046,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "474:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6049,
"mutability": "mutable",
"name": "b",
"nameLocation": "493:1:27",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "485:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6048,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "473:22:27"
},
"returnParameters": {
"id": 6053,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6052,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6062,
"src": "519:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6051,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "519:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "518:9:27"
},
"scope": 6111,
"src": "461:104:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6084,
"nodeType": "Block",
"src": "749:82:27",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6082,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6072,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6065,
"src": "804:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 6073,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6067,
"src": "808:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "804:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6075,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "803:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6076,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6065,
"src": "814:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 6077,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6067,
"src": "818:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "814:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6079,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "813:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 6080,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "823:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "813:11:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "803:21:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6071,
"id": 6083,
"nodeType": "Return",
"src": "796:28:27"
}
]
},
"documentation": {
"id": 6063,
"nodeType": "StructuredDocumentation",
"src": "571:102:27",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 6085,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "687:7:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6068,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6065,
"mutability": "mutable",
"name": "a",
"nameLocation": "703:1:27",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "695:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6064,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "695:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6067,
"mutability": "mutable",
"name": "b",
"nameLocation": "714:1:27",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "706:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6066,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "706:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "694:22:27"
},
"returnParameters": {
"id": 6071,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6070,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6085,
"src": "740:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6069,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "740:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "739:9:27"
},
"scope": 6111,
"src": "678:153:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6109,
"nodeType": "Block",
"src": "1101:123:27",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6097,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6095,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6088,
"src": "1189:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6096,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6090,
"src": "1193:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1189:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6098,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6088,
"src": "1198:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6099,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6090,
"src": "1202:1:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1198:5:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6101,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1207:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1198:10:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 6104,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 6105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1198:18:27",
"trueExpression": {
"hexValue": "30",
"id": 6103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1211:1:27",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 6106,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1197:20:27",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1189:28:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6094,
"id": 6108,
"nodeType": "Return",
"src": "1182:35:27"
}
]
},
"documentation": {
"id": 6086,
"nodeType": "StructuredDocumentation",
"src": "837:188:27",
"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": 6110,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1039:7:27",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6091,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6088,
"mutability": "mutable",
"name": "a",
"nameLocation": "1055:1:27",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1047:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6087,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1047:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6090,
"mutability": "mutable",
"name": "b",
"nameLocation": "1066:1:27",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1058:9:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6089,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1046:22:27"
},
"returnParameters": {
"id": 6094,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6093,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6110,
"src": "1092:7:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6092,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1092:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1091:9:27"
},
"scope": 6111,
"src": "1030:194:27",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6112,
"src": "202:1024:27",
"usedErrors": []
}
],
"src": "103:1124:27"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-17T06:09:48.189Z",
"devdoc": {
"details": "Standard math utilities missing in the Solidity language.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}