2022-01-27 19:13:37 +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\":\"0xfaad496c1c944b6259b7dc70b4865eb1775d6402bc0c81b38a0b24d9f525ae37\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2f60ddc4639589b1d7a87cd647561be4c71ddf9a9dcf55f38db75e24ef1f6c5b\",\"dweb:/ipfs/QmTocvyQx3DPrzsFePtrhDGM6eYxUh3v8iBN3D59yoeuBt\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122082a6e50d1721a038ab4046da0519558f26249b4635fad71dfac76bd86194b89364736f6c634300080a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122082a6e50d1721a038ab4046da0519558f26249b4635fad71dfac76bd86194b89364736f6c634300080a0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "187:1024:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "187:1024:26:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (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": [
4307
]
},
"id": 4308,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4221,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "88:23:26"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 4222,
"nodeType": "StructuredDocumentation",
"src": "113:73:26",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 4307,
"linearizedBaseContracts": [
4307
],
"name": "Math",
"nameLocation": "195:4:26",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4239,
"nodeType": "Block",
"src": "337:38:26",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4232,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4225,
"src": "354:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 4233,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4227,
"src": "359:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "354:6:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 4236,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4227,
"src": "367:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "354:14:26",
"trueExpression": {
"id": 4235,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4225,
"src": "363:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4231,
"id": 4238,
"nodeType": "Return",
"src": "347:21:26"
}
]
},
"documentation": {
"id": 4223,
"nodeType": "StructuredDocumentation",
"src": "206:59:26",
"text": " @dev Returns the largest of two numbers."
},
"id": 4240,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "279:3:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4228,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4225,
"mutability": "mutable",
"name": "a",
"nameLocation": "291:1:26",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "283:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4224,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "283:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4227,
"mutability": "mutable",
"name": "b",
"nameLocation": "302:1:26",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "294:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4226,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "294:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "282:22:26"
},
"returnParameters": {
"id": 4231,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4230,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "328:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4229,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "328:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "327:9:26"
},
"scope": 4307,
"src": "270:105:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4257,
"nodeType": "Block",
"src": "513:37:26",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4252,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4250,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "530:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 4251,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "534:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "530:5:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 4254,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "542:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "530:13:26",
"trueExpression": {
"id": 4253,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "538:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4249,
"id": 4256,
"nodeType": "Return",
"src": "523:20:26"
}
]
},
"documentation": {
"id": 4241,
"nodeType": "StructuredDocumentation",
"src": "381:60:26",
"text": " @dev Returns the smallest of two numbers."
},
"id": 4258,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "455:3:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4246,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4243,
"mutability": "mutable",
"name": "a",
"nameLocation": "467:1:26",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "459:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4242,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "459:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4245,
"mutability": "mutable",
"name": "b",
"nameLocation": "478:1:26",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "470:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4244,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "470:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "458:22:26"
},
"returnParameters": {
"id": 4249,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4248,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "504:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4247,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "504:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "503:9:26"
},
"scope": 4307,
"src": "446:104:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4280,
"nodeType": "Block",
"src": "734:82:26",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4278,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4268,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4261,
"src": "789:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 4269,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4263,
"src": "793:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "789:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 4271,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "788:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4274,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4272,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4261,
"src": "799:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 4273,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4263,
"src": "803:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "799:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 4275,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "798:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 4276,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "808:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "798:11:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "788:21:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4267,
"id": 4279,
"nodeType": "Return",
"src": "781:28:26"
}
]
},
"documentation": {
"id": 4259,
"nodeType": "StructuredDocumentation",
"src": "556:102:26",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 4281,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "672:7:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4264,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4261,
"mutability": "mutable",
"name": "a",
"nameLocation": "688:1:26",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "680:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4260,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "680:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4263,
"mutability": "mutable",
"name": "b",
"nameLocation": "699:1:26",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "691:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4262,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "691:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "679:22:26"
},
"returnParameters": {
"id": 4267,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4266,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "725:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4265,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "725:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "724:9:26"
},
"scope": 4307,
"src": "663:153:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4305,
"nodeType": "Block",
"src": "1086:123:26",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4291,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4284,
"src": "1174:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 4292,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4286,
"src": "1178:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1174:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4294,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4284,
"src": "1183:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 4295,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4286,
"src": "1187:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1183:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 4297,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1192:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1183:10:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 4300,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1200:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 4301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1183:18:26",
"trueExpression": {
"hexValue": "30",
"id": 4299,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1196:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 4302,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1182:20:26",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1174:28:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4290,
"id": 4304,
"nodeType": "Return",
"src": "1167:35:26"
}
]
},
"documentation": {
"id": 4282,
"nodeType": "StructuredDocumentation",
"src": "822:188:26",
"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": 4306,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1024:7:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4287,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4284,
"mutability": "mutable",
"name": "a",
"nameLocation": "1040:1:26",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1032:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4283,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1032:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4286,
"mutability": "mutable",
"name": "b",
"nameLocation": "1051:1:26",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1043:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4285,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1043:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1031:22:26"
},
"returnParameters": {
"id": 4290,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4289,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1077:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4288,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1077:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1076:9:26"
},
"scope": 4307,
"src": "1015:194:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 4308,
"src": "187:1024:26",
"usedErrors": []
}
],
"src": "88:1124:26"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/math/Math.sol",
"exportedSymbols": {
"Math": [
4307
]
},
"id": 4308,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4221,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "88:23:26"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Math",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 4222,
"nodeType": "StructuredDocumentation",
"src": "113:73:26",
"text": " @dev Standard math utilities missing in the Solidity language."
},
"fullyImplemented": true,
"id": 4307,
"linearizedBaseContracts": [
4307
],
"name": "Math",
"nameLocation": "195:4:26",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4239,
"nodeType": "Block",
"src": "337:38:26",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4232,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4225,
"src": "354:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 4233,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4227,
"src": "359:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "354:6:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 4236,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4227,
"src": "367:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "354:14:26",
"trueExpression": {
"id": 4235,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4225,
"src": "363:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4231,
"id": 4238,
"nodeType": "Return",
"src": "347:21:26"
}
]
},
"documentation": {
"id": 4223,
"nodeType": "StructuredDocumentation",
"src": "206:59:26",
"text": " @dev Returns the largest of two numbers."
},
"id": 4240,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nameLocation": "279:3:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4228,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4225,
"mutability": "mutable",
"name": "a",
"nameLocation": "291:1:26",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "283:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4224,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "283:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4227,
"mutability": "mutable",
"name": "b",
"nameLocation": "302:1:26",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "294:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4226,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "294:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "282:22:26"
},
"returnParameters": {
"id": 4231,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4230,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4240,
"src": "328:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4229,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "328:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "327:9:26"
},
"scope": 4307,
"src": "270:105:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4257,
"nodeType": "Block",
"src": "513:37:26",
"statements": [
{
"expression": {
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4252,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4250,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "530:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 4251,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "534:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "530:5:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"id": 4254,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "542:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "530:13:26",
"trueExpression": {
"id": 4253,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4243,
"src": "538:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4249,
"id": 4256,
"nodeType": "Return",
"src": "523:20:26"
}
]
},
"documentation": {
"id": 4241,
"nodeType": "StructuredDocumentation",
"src": "381:60:26",
"text": " @dev Returns the smallest of two numbers."
},
"id": 4258,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nameLocation": "455:3:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4246,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4243,
"mutability": "mutable",
"name": "a",
"nameLocation": "467:1:26",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "459:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4242,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "459:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4245,
"mutability": "mutable",
"name": "b",
"nameLocation": "478:1:26",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "470:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4244,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "470:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "458:22:26"
},
"returnParameters": {
"id": 4249,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4248,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4258,
"src": "504:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4247,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "504:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "503:9:26"
},
"scope": 4307,
"src": "446:104:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4280,
"nodeType": "Block",
"src": "734:82:26",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4278,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4268,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4261,
"src": "789:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"id": 4269,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4263,
"src": "793:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "789:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 4271,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "788:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4274,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4272,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4261,
"src": "799:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"id": 4273,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4263,
"src": "803:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "799:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 4275,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "798:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "32",
"id": 4276,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "808:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "798:11:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "788:21:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4267,
"id": 4279,
"nodeType": "Return",
"src": "781:28:26"
}
]
},
"documentation": {
"id": 4259,
"nodeType": "StructuredDocumentation",
"src": "556:102:26",
"text": " @dev Returns the average of two numbers. The result is rounded towards\n zero."
},
"id": 4281,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nameLocation": "672:7:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4264,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4261,
"mutability": "mutable",
"name": "a",
"nameLocation": "688:1:26",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "680:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4260,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "680:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4263,
"mutability": "mutable",
"name": "b",
"nameLocation": "699:1:26",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "691:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4262,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "691:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "679:22:26"
},
"returnParameters": {
"id": 4267,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4266,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4281,
"src": "725:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4265,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "725:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "724:9:26"
},
"scope": 4307,
"src": "663:153:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4305,
"nodeType": "Block",
"src": "1086:123:26",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4303,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4291,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4284,
"src": "1174:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 4292,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4286,
"src": "1178:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1174:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"components": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 4294,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4284,
"src": "1183:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 4295,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4286,
"src": "1187:1:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1183:5:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 4297,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1192:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1183:10:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"hexValue": "31",
"id": 4300,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1200:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"id": 4301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "1183:18:26",
"trueExpression": {
"hexValue": "30",
"id": 4299,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1196:1:26",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"id": 4302,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1182:20:26",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1174:28:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4290,
"id": 4304,
"nodeType": "Return",
"src": "1167:35:26"
}
]
},
"documentation": {
"id": 4282,
"nodeType": "StructuredDocumentation",
"src": "822:188:26",
"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": 4306,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceilDiv",
"nameLocation": "1024:7:26",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4287,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4284,
"mutability": "mutable",
"name": "a",
"nameLocation": "1040:1:26",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1032:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4283,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1032:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4286,
"mutability": "mutable",
"name": "b",
"nameLocation": "1051:1:26",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1043:9:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4285,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1043:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1031:22:26"
},
"returnParameters": {
"id": 4290,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4289,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4306,
"src": "1077:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4288,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1077:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1076:9:26"
},
"scope": 4307,
"src": "1015:194:26",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 4308,
"src": "187:1024:26",
"usedErrors": []
}
],
"src": "88:1124:26"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-27T10:56:47.029Z",
"devdoc": {
"details": "Standard math utilities missing in the Solidity language.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}