2023-06-21 14:46:19 +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:34:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "202:1024:34:-: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": [
6487
]
},
"id": 6488,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6401,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "103:23:34"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6402,
"nodeType": "StructuredDocumentation",
"src": "128:73:34",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 6487,
"linearizedBaseContracts": [
6487
],
"name": "Math",
"nameLocation": "210:4:34",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6419,
"nodeType": "Block",
"src": "352:38:34",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6412,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6405,
"src": "369:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 6413,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6407,
"src": "374:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "369:6:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6416,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6407,
"src": "382:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6417,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "369:14:34",
"trueExpression": {
"id": 6415,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6405,
"src": "378:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6411,
"id": 6418,
"nodeType": "Return",
"src": "362:21:34"
}
]
},
"documentation": {
"id": 6403,
"nodeType": "StructuredDocumentation",
"src": "221:59:34",
"text": " @dev Returns the largest of two numbers."
},
"id": 6420,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "294:3:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6408,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6405,
"mutability": "mutable",
"name": "a",
"nameLocation": "306:1:34",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "298:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6404,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "298:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6407,
"mutability": "mutable",
"name": "b",
"nameLocation": "317:1:34",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "309:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6406,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "297:22:34"
},
"returnParameters": {
"id": 6411,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6410,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "343:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6409,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "343:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "342:9:34"
},
"scope": 6487,
"src": "285:105:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6437,
"nodeType": "Block",
"src": "528:37:34",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6430,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6423,
"src": "545:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6431,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6425,
"src": "549:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "545:5:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6434,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6425,
"src": "557:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "545:13:34",
"trueExpression": {
"id": 6433,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6423,
"src": "553:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6429,
"id": 6436,
"nodeType": "Return",
"src": "538:20:34"
}
]
},
"documentation": {
"id": 6421,
"nodeType": "StructuredDocumentation",
"src": "396:60:34",
"text": " @dev Returns the smallest of two numbers."
},
"id": 6438,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "470:3:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6426,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6423,
"mutability": "mutable",
"name": "a",
"nameLocation": "482:1:34",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "474:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6422,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "474:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6425,
"mutability": "mutable",
"name": "b",
"nameLocation": "493:1:34",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "485:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6424,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "473:22:34"
},
"returnParameters": {
"id": 6429,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6428,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "519:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6427,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "519:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "518:9:34"
},
"scope": 6487,
"src": "461:104:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6460,
"nodeType": "Block",
"src": "749:82:34",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6458,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6450,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6448,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6441,
"src": "804:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 6449,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6443,
"src": "808:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "804:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6451,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "803:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6454,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6452,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6441,
"src": "814:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 6453,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6443,
"src": "818:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "814:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6455,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "813:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 6456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "823:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "813:11:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "803:21:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6447,
"id": 6459,
"nodeType": "Return",
"src": "796:28:34"
}
]
},
"documentation": {
"id": 6439,
"nodeType": "StructuredDocumentation",
"src": "571:102:34",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 6461,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "687:7:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6444,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6441,
"mutability": "mutable",
"name": "a",
"nameLocation": "703:1:34",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "695:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6440,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "695:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6443,
"mutability": "mutable",
"name": "b",
"nameLocation": "714:1:34",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "706:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6442,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "706:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "694:22:34"
},
"returnParameters": {
"id": 6447,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6446,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "740:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6445,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "740:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "739:9:34"
},
"scope": 6487,
"src": "678:153:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6485,
"nodeType": "Block",
"src": "1101:123:34",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6471,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6464,
"src": "1189:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6472,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6466,
"src": "1193:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1189:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6474,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6464,
"src": "1198:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6475,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6466,
"src": "1202:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1198:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6477,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1207:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1198:10:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 6480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 6481,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1198:18:34",
"trueExpression": {
"hexValue": "30",
"id": 6479,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1211:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 6482,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1197:20:34",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1189:28:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6470,
"id": 6484,
"nodeType": "Return",
"src": "1182:35:34"
}
]
},
"documentation": {
"id": 6462,
"nodeType": "StructuredDocumentation",
"src": "837:188:34",
"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": 6486,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1039:7:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6467,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6464,
"mutability": "mutable",
"name": "a",
"nameLocation": "1055:1:34",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1047:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6463,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1047:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6466,
"mutability": "mutable",
"name": "b",
"nameLocation": "1066:1:34",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1058:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6465,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1046:22:34"
},
"returnParameters": {
"id": 6470,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6469,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1092:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6468,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1092:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1091:9:34"
},
"scope": 6487,
"src": "1030:194:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6488,
"src": "202:1024:34",
"usedErrors": []
}
],
"src": "103:1124:34"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/math/Math.sol",
"exportedSymbols": {
"Math": [
6487
]
},
"id": 6488,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6401,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "103:23:34"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6402,
"nodeType": "StructuredDocumentation",
"src": "128:73:34",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 6487,
"linearizedBaseContracts": [
6487
],
"name": "Math",
"nameLocation": "210:4:34",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6419,
"nodeType": "Block",
"src": "352:38:34",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6412,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6405,
"src": "369:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 6413,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6407,
"src": "374:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "369:6:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6416,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6407,
"src": "382:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6417,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "369:14:34",
"trueExpression": {
"id": 6415,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6405,
"src": "378:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6411,
"id": 6418,
"nodeType": "Return",
"src": "362:21:34"
}
]
},
"documentation": {
"id": 6403,
"nodeType": "StructuredDocumentation",
"src": "221:59:34",
"text": " @dev Returns the largest of two numbers."
},
"id": 6420,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "294:3:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6408,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6405,
"mutability": "mutable",
"name": "a",
"nameLocation": "306:1:34",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "298:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6404,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "298:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6407,
"mutability": "mutable",
"name": "b",
"nameLocation": "317:1:34",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "309:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6406,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "297:22:34"
},
"returnParameters": {
"id": 6411,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6410,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6420,
"src": "343:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6409,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "343:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "342:9:34"
},
"scope": 6487,
"src": "285:105:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6437,
"nodeType": "Block",
"src": "528:37:34",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6430,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6423,
"src": "545:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6431,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6425,
"src": "549:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "545:5:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 6434,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6425,
"src": "557:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "545:13:34",
"trueExpression": {
"id": 6433,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6423,
"src": "553:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6429,
"id": 6436,
"nodeType": "Return",
"src": "538:20:34"
}
]
},
"documentation": {
"id": 6421,
"nodeType": "StructuredDocumentation",
"src": "396:60:34",
"text": " @dev Returns the smallest of two numbers."
},
"id": 6438,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "470:3:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6426,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6423,
"mutability": "mutable",
"name": "a",
"nameLocation": "482:1:34",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "474:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6422,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "474:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6425,
"mutability": "mutable",
"name": "b",
"nameLocation": "493:1:34",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "485:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6424,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "485:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "473:22:34"
},
"returnParameters": {
"id": 6429,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6428,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6438,
"src": "519:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6427,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "519:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "518:9:34"
},
"scope": 6487,
"src": "461:104:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6460,
"nodeType": "Block",
"src": "749:82:34",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6458,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6450,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6448,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6441,
"src": "804:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 6449,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6443,
"src": "808:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "804:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6451,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "803:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6454,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6452,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6441,
"src": "814:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 6453,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6443,
"src": "818:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "814:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6455,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "813:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 6456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "823:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "813:11:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "803:21:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6447,
"id": 6459,
"nodeType": "Return",
"src": "796:28:34"
}
]
},
"documentation": {
"id": 6439,
"nodeType": "StructuredDocumentation",
"src": "571:102:34",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 6461,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "687:7:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6444,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6441,
"mutability": "mutable",
"name": "a",
"nameLocation": "703:1:34",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "695:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6440,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "695:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6443,
"mutability": "mutable",
"name": "b",
"nameLocation": "714:1:34",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "706:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6442,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "706:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "694:22:34"
},
"returnParameters": {
"id": 6447,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6446,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6461,
"src": "740:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6445,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "740:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "739:9:34"
},
"scope": 6487,
"src": "678:153:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6485,
"nodeType": "Block",
"src": "1101:123:34",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6471,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6464,
"src": "1189:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6472,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6466,
"src": "1193:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1189:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6474,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6464,
"src": "1198:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6475,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6466,
"src": "1202:1:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1198:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6477,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1207:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1198:10:34",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 6480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 6481,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1198:18:34",
"trueExpression": {
"hexValue": "30",
"id": 6479,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1211:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 6482,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1197:20:34",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1189:28:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6470,
"id": 6484,
"nodeType": "Return",
"src": "1182:35:34"
}
]
},
"documentation": {
"id": 6462,
"nodeType": "StructuredDocumentation",
"src": "837:188:34",
"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": 6486,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1039:7:34",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6467,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6464,
"mutability": "mutable",
"name": "a",
"nameLocation": "1055:1:34",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1047:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6463,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1047:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6466,
"mutability": "mutable",
"name": "b",
"nameLocation": "1066:1:34",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1058:9:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6465,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1046:22:34"
},
"returnParameters": {
"id": 6470,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6469,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6486,
"src": "1092:7:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6468,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1092:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1091:9:34"
},
"scope": 6487,
"src": "1030:194:34",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6488,
"src": "202:1024:34",
"usedErrors": []
}
],
"src": "103:1124:34"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2023-06-21T06:18:19.760Z",
"devdoc": {
"details": "Standard math utilities missing in the Solidity language.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}