becrypto/build/contracts/SafeMath.json
2022-08-17 17:21:15 +08:00

7538 lines
304 KiB
JSON

{
"contractName": "SafeMath",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations. NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler now has built in overflow checking.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://973868f808e88e21a1a0a01d4839314515ee337ad096286c88e41b74dcc11fc2\",\"dweb:/ipfs/QmfYuZxRfx2J2xdk4EXN7jKg4bUYEMTaYk9BAw9Bqn4o2Y\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122001da6497236acfac83aad86debdbfcc8af08703017bdd28723ab3025eee3c9f664736f6c634300080a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122001da6497236acfac83aad86debdbfcc8af08703017bdd28723ab3025eee3c9f664736f6c634300080a0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "467:6301:28:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "467:6301:28:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
6423
]
},
"id": 6424,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6113,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "92:23:28"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SafeMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6114,
"nodeType": "StructuredDocumentation",
"src": "270:196:28",
"text": " @dev Wrappers over Solidity's arithmetic operations.\n NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n now has built in overflow checking."
},
"fullyImplemented": true,
"id": 6423,
"linearizedBaseContracts": [
6423
],
"name": "SafeMath",
"nameLocation": "475:8:28",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6145,
"nodeType": "Block",
"src": "702:140:28",
"statements": [
{
"id": 6144,
"nodeType": "UncheckedBlock",
"src": "712:124:28",
"statements": [
{
"assignments": [
6127
],
"declarations": [
{
"constant": false,
"id": 6127,
"mutability": "mutable",
"name": "c",
"nameLocation": "744:1:28",
"nodeType": "VariableDeclaration",
"scope": 6144,
"src": "736:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6126,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "736:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6131,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6128,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6117,
"src": "748:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 6129,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6119,
"src": "752:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "748:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "736:17:28"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6132,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6127,
"src": "771:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6133,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6117,
"src": "775:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "771:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6139,
"nodeType": "IfStatement",
"src": "767:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "786:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "793:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6137,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "785:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6125,
"id": 6138,
"nodeType": "Return",
"src": "778:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6140,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "817:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 6141,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6127,
"src": "823:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6142,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "816:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6125,
"id": 6143,
"nodeType": "Return",
"src": "809:16:28"
}
]
}
]
},
"documentation": {
"id": 6115,
"nodeType": "StructuredDocumentation",
"src": "490:131:28",
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6146,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryAdd",
"nameLocation": "635:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6120,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6117,
"mutability": "mutable",
"name": "a",
"nameLocation": "650:1:28",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "642:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6116,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "642:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6119,
"mutability": "mutable",
"name": "b",
"nameLocation": "661:1:28",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "653:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6118,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "653:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "641:22:28"
},
"returnParameters": {
"id": 6125,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6122,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "687:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6121,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "687:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6124,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "693:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6123,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "693:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "686:15:28"
},
"scope": 6423,
"src": "626:216:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6173,
"nodeType": "Block",
"src": "1064:113:28",
"statements": [
{
"id": 6172,
"nodeType": "UncheckedBlock",
"src": "1074:97:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6158,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6151,
"src": "1102:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 6159,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6149,
"src": "1106:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1102:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6165,
"nodeType": "IfStatement",
"src": "1098:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6161,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1124:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6163,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1116:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6157,
"id": 6164,
"nodeType": "Return",
"src": "1109:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6166,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1148:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6167,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6149,
"src": "1154:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6168,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6151,
"src": "1158:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1154:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6170,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1147:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6157,
"id": 6171,
"nodeType": "Return",
"src": "1140:20:28"
}
]
}
]
},
"documentation": {
"id": 6147,
"nodeType": "StructuredDocumentation",
"src": "848:135:28",
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6174,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "trySub",
"nameLocation": "997:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6152,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6149,
"mutability": "mutable",
"name": "a",
"nameLocation": "1012:1:28",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1004:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6148,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1004:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6151,
"mutability": "mutable",
"name": "b",
"nameLocation": "1023:1:28",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1015:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6150,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1015:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1003:22:28"
},
"returnParameters": {
"id": 6157,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6154,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1049:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6153,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1049:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6156,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1055:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6155,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1055:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1048:15:28"
},
"scope": 6423,
"src": "988:189:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6215,
"nodeType": "Block",
"src": "1401:417:28",
"statements": [
{
"id": 6214,
"nodeType": "UncheckedBlock",
"src": "1411:401:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6186,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1669:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6187,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1674:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1669:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6193,
"nodeType": "IfStatement",
"src": "1665:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1685:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"hexValue": "30",
"id": 6190,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1691:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6191,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1684:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6185,
"id": 6192,
"nodeType": "Return",
"src": "1677:16:28"
}
},
{
"assignments": [
6195
],
"declarations": [
{
"constant": false,
"id": 6195,
"mutability": "mutable",
"name": "c",
"nameLocation": "1715:1:28",
"nodeType": "VariableDeclaration",
"scope": 6214,
"src": "1707:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6194,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1707:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6199,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6196,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1719:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 6197,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6179,
"src": "1723:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1719:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1707:17:28"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6200,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6195,
"src": "1742:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6201,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1746:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 6203,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6179,
"src": "1751:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:10:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6209,
"nodeType": "IfStatement",
"src": "1738:33:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6205,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1762:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6206,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1769:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6207,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1761:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6185,
"id": 6208,
"nodeType": "Return",
"src": "1754:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1793:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 6211,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6195,
"src": "1799:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6212,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1792:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6185,
"id": 6213,
"nodeType": "Return",
"src": "1785:16:28"
}
]
}
]
},
"documentation": {
"id": 6175,
"nodeType": "StructuredDocumentation",
"src": "1183:137:28",
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6216,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMul",
"nameLocation": "1334:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6180,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6177,
"mutability": "mutable",
"name": "a",
"nameLocation": "1349:1:28",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1341:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6176,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1341:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6179,
"mutability": "mutable",
"name": "b",
"nameLocation": "1360:1:28",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1352:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6178,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1352:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1340:22:28"
},
"returnParameters": {
"id": 6185,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6182,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1386:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6181,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1386:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6184,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1392:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6183,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1392:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1385:15:28"
},
"scope": 6423,
"src": "1325:493:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6243,
"nodeType": "Block",
"src": "2043:114:28",
"statements": [
{
"id": 6242,
"nodeType": "UncheckedBlock",
"src": "2053:98:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6228,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6221,
"src": "2081:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6229,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2086:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2081:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6235,
"nodeType": "IfStatement",
"src": "2077:29:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6231,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2097:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6232,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2104:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6233,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2096:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6227,
"id": 6234,
"nodeType": "Return",
"src": "2089:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6236,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2128:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6239,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6237,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6219,
"src": "2134:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6238,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6221,
"src": "2138:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2134:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6240,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2127:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6227,
"id": 6241,
"nodeType": "Return",
"src": "2120:20:28"
}
]
}
]
},
"documentation": {
"id": 6217,
"nodeType": "StructuredDocumentation",
"src": "1824:138:28",
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 6244,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryDiv",
"nameLocation": "1976:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6222,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6219,
"mutability": "mutable",
"name": "a",
"nameLocation": "1991:1:28",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "1983:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6218,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1983:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6221,
"mutability": "mutable",
"name": "b",
"nameLocation": "2002:1:28",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "1994:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1982:22:28"
},
"returnParameters": {
"id": 6227,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6224,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "2028:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6223,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2028:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6226,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "2034:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6225,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2034:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2027:15:28"
},
"scope": 6423,
"src": "1967:190:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6271,
"nodeType": "Block",
"src": "2392:114:28",
"statements": [
{
"id": 6270,
"nodeType": "UncheckedBlock",
"src": "2402:98:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6256,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "2430:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6257,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2435:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2430:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6263,
"nodeType": "IfStatement",
"src": "2426:29:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6259,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2446:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6260,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2453:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6261,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2445:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6255,
"id": 6262,
"nodeType": "Return",
"src": "2438:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6264,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2477:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6265,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "2483:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6266,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "2487:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2483:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6268,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2476:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6255,
"id": 6269,
"nodeType": "Return",
"src": "2469:20:28"
}
]
}
]
},
"documentation": {
"id": 6245,
"nodeType": "StructuredDocumentation",
"src": "2163:148:28",
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 6272,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMod",
"nameLocation": "2325:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6250,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6247,
"mutability": "mutable",
"name": "a",
"nameLocation": "2340:1:28",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2332:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6246,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2332:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6249,
"mutability": "mutable",
"name": "b",
"nameLocation": "2351:1:28",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2343:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6248,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2343:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2331:22:28"
},
"returnParameters": {
"id": 6255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6252,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2377:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6251,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2377:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6254,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2383:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2383:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2376:15:28"
},
"scope": 6423,
"src": "2316:190:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6286,
"nodeType": "Block",
"src": "2808:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6282,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "2825:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 6283,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6277,
"src": "2829:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2825:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6281,
"id": 6285,
"nodeType": "Return",
"src": "2818:12:28"
}
]
},
"documentation": {
"id": 6273,
"nodeType": "StructuredDocumentation",
"src": "2512:224:28",
"text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow."
},
"id": 6287,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "2750:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6275,
"mutability": "mutable",
"name": "a",
"nameLocation": "2762:1:28",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2754:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6274,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2754:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6277,
"mutability": "mutable",
"name": "b",
"nameLocation": "2773:1:28",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2765:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6276,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2765:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2753:22:28"
},
"returnParameters": {
"id": 6281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6280,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2799:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6279,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2799:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2798:9:28"
},
"scope": 6423,
"src": "2741:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6301,
"nodeType": "Block",
"src": "3175:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6299,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6297,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6290,
"src": "3192:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6298,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6292,
"src": "3196:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3192:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6296,
"id": 6300,
"nodeType": "Return",
"src": "3185:12:28"
}
]
},
"documentation": {
"id": 6288,
"nodeType": "StructuredDocumentation",
"src": "2843:260:28",
"text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 6302,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "3117:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6293,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6290,
"mutability": "mutable",
"name": "a",
"nameLocation": "3129:1:28",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3121:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6289,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3121:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6292,
"mutability": "mutable",
"name": "b",
"nameLocation": "3140:1:28",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3132:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6291,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3132:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3120:22:28"
},
"returnParameters": {
"id": 6296,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6295,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3166:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6294,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3166:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3165:9:28"
},
"scope": 6423,
"src": "3108:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6316,
"nodeType": "Block",
"src": "3518:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6312,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6305,
"src": "3535:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 6313,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6307,
"src": "3539:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3535:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6311,
"id": 6315,
"nodeType": "Return",
"src": "3528:12:28"
}
]
},
"documentation": {
"id": 6303,
"nodeType": "StructuredDocumentation",
"src": "3210:236:28",
"text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow."
},
"id": 6317,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nameLocation": "3460:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6308,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6305,
"mutability": "mutable",
"name": "a",
"nameLocation": "3472:1:28",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3464:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6304,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3464:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6307,
"mutability": "mutable",
"name": "b",
"nameLocation": "3483:1:28",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3475:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6306,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3475:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3463:22:28"
},
"returnParameters": {
"id": 6311,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6310,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3509:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6309,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3509:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3508:9:28"
},
"scope": 6423,
"src": "3451:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6331,
"nodeType": "Block",
"src": "3903:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6327,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6320,
"src": "3920:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6328,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6322,
"src": "3924:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3920:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6326,
"id": 6330,
"nodeType": "Return",
"src": "3913:12:28"
}
]
},
"documentation": {
"id": 6318,
"nodeType": "StructuredDocumentation",
"src": "3553:278:28",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator.\n Requirements:\n - The divisor cannot be zero."
},
"id": 6332,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "3845:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6323,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6320,
"mutability": "mutable",
"name": "a",
"nameLocation": "3857:1:28",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3849:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6319,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3849:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6322,
"mutability": "mutable",
"name": "b",
"nameLocation": "3868:1:28",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3860:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6321,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3860:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3848:22:28"
},
"returnParameters": {
"id": 6326,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6325,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3894:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6324,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3894:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3893:9:28"
},
"scope": 6423,
"src": "3836:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6346,
"nodeType": "Block",
"src": "4452:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6342,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6335,
"src": "4469:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6343,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6337,
"src": "4473:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4469:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6341,
"id": 6345,
"nodeType": "Return",
"src": "4462:12:28"
}
]
},
"documentation": {
"id": 6333,
"nodeType": "StructuredDocumentation",
"src": "3938:442:28",
"text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6347,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "4394:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6335,
"mutability": "mutable",
"name": "a",
"nameLocation": "4406:1:28",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4398:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6334,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4398:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6337,
"mutability": "mutable",
"name": "b",
"nameLocation": "4417:1:28",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4409:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6336,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4409:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4397:22:28"
},
"returnParameters": {
"id": 6341,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6340,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4443:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6339,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4443:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4442:9:28"
},
"scope": 6423,
"src": "4385:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6371,
"nodeType": "Block",
"src": "5070:106:28",
"statements": [
{
"id": 6370,
"nodeType": "UncheckedBlock",
"src": "5080:90:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6360,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6352,
"src": "5112:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 6361,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6350,
"src": "5117:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5112:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6363,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6354,
"src": "5120:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6359,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5104:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5104:29:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6365,
"nodeType": "ExpressionStatement",
"src": "5104:29:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6368,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6366,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6350,
"src": "5154:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6367,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6352,
"src": "5158:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5154:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6358,
"id": 6369,
"nodeType": "Return",
"src": "5147:12:28"
}
]
}
]
},
"documentation": {
"id": 6348,
"nodeType": "StructuredDocumentation",
"src": "4487:453:28",
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 6372,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "4954:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6355,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6350,
"mutability": "mutable",
"name": "a",
"nameLocation": "4975:1:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "4967:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6349,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4967:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6352,
"mutability": "mutable",
"name": "b",
"nameLocation": "4994:1:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "4986:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6351,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4986:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6354,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5019:12:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "5005:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6353,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5005:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "4957:80:28"
},
"returnParameters": {
"id": 6358,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6357,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "5061:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6356,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5061:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5060:9:28"
},
"scope": 6423,
"src": "4945:231:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6396,
"nodeType": "Block",
"src": "5785:105:28",
"statements": [
{
"id": 6395,
"nodeType": "UncheckedBlock",
"src": "5795:89:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6385,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6377,
"src": "5827:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 6386,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5831:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5827:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6388,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6379,
"src": "5834:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6384,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5819:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5819:28:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6390,
"nodeType": "ExpressionStatement",
"src": "5819:28:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6391,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6375,
"src": "5868:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6392,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6377,
"src": "5872:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5868:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6383,
"id": 6394,
"nodeType": "Return",
"src": "5861:12:28"
}
]
}
]
},
"documentation": {
"id": 6373,
"nodeType": "StructuredDocumentation",
"src": "5182:473:28",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6397,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "5669:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6380,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6375,
"mutability": "mutable",
"name": "a",
"nameLocation": "5690:1:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5682:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6374,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5682:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6377,
"mutability": "mutable",
"name": "b",
"nameLocation": "5709:1:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5701:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6376,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5701:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6379,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5734:12:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5720:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6378,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5720:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "5672:80:28"
},
"returnParameters": {
"id": 6383,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6382,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5776:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6381,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5776:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5775:9:28"
},
"scope": 6423,
"src": "5660:230:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6421,
"nodeType": "Block",
"src": "6661:105:28",
"statements": [
{
"id": 6420,
"nodeType": "UncheckedBlock",
"src": "6671:89:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6410,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6402,
"src": "6703:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 6411,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6707:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6703:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6413,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6404,
"src": "6710:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6409,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6695:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6695:28:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6415,
"nodeType": "ExpressionStatement",
"src": "6695:28:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6416,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6400,
"src": "6744:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6417,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6402,
"src": "6748:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6744:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6408,
"id": 6419,
"nodeType": "Return",
"src": "6737:12:28"
}
]
}
]
},
"documentation": {
"id": 6398,
"nodeType": "StructuredDocumentation",
"src": "5896:635:28",
"text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting with custom message when dividing by zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryMod}.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6422,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "6545:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6405,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6400,
"mutability": "mutable",
"name": "a",
"nameLocation": "6566:1:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6558:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6399,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6558:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6402,
"mutability": "mutable",
"name": "b",
"nameLocation": "6585:1:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6577:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6401,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6577:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6404,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "6610:12:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6596:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6403,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6596:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "6548:80:28"
},
"returnParameters": {
"id": 6408,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6407,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6652:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6406,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6652:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6651:9:28"
},
"scope": 6423,
"src": "6536:230:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6424,
"src": "467:6301:28",
"usedErrors": []
}
],
"src": "92:6677:28"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
6423
]
},
"id": 6424,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6113,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "92:23:28"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SafeMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6114,
"nodeType": "StructuredDocumentation",
"src": "270:196:28",
"text": " @dev Wrappers over Solidity's arithmetic operations.\n NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n now has built in overflow checking."
},
"fullyImplemented": true,
"id": 6423,
"linearizedBaseContracts": [
6423
],
"name": "SafeMath",
"nameLocation": "475:8:28",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6145,
"nodeType": "Block",
"src": "702:140:28",
"statements": [
{
"id": 6144,
"nodeType": "UncheckedBlock",
"src": "712:124:28",
"statements": [
{
"assignments": [
6127
],
"declarations": [
{
"constant": false,
"id": 6127,
"mutability": "mutable",
"name": "c",
"nameLocation": "744:1:28",
"nodeType": "VariableDeclaration",
"scope": 6144,
"src": "736:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6126,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "736:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6131,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6128,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6117,
"src": "748:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 6129,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6119,
"src": "752:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "748:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "736:17:28"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6132,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6127,
"src": "771:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 6133,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6117,
"src": "775:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "771:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6139,
"nodeType": "IfStatement",
"src": "767:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "786:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "793:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6137,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "785:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6125,
"id": 6138,
"nodeType": "Return",
"src": "778:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6140,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "817:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 6141,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6127,
"src": "823:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6142,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "816:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6125,
"id": 6143,
"nodeType": "Return",
"src": "809:16:28"
}
]
}
]
},
"documentation": {
"id": 6115,
"nodeType": "StructuredDocumentation",
"src": "490:131:28",
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6146,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryAdd",
"nameLocation": "635:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6120,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6117,
"mutability": "mutable",
"name": "a",
"nameLocation": "650:1:28",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "642:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6116,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "642:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6119,
"mutability": "mutable",
"name": "b",
"nameLocation": "661:1:28",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "653:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6118,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "653:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "641:22:28"
},
"returnParameters": {
"id": 6125,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6122,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "687:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6121,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "687:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6124,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6146,
"src": "693:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6123,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "693:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "686:15:28"
},
"scope": 6423,
"src": "626:216:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6173,
"nodeType": "Block",
"src": "1064:113:28",
"statements": [
{
"id": 6172,
"nodeType": "UncheckedBlock",
"src": "1074:97:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6158,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6151,
"src": "1102:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 6159,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6149,
"src": "1106:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1102:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6165,
"nodeType": "IfStatement",
"src": "1098:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6161,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1124:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6163,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1116:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6157,
"id": 6164,
"nodeType": "Return",
"src": "1109:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6166,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1148:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6167,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6149,
"src": "1154:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6168,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6151,
"src": "1158:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1154:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6170,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1147:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6157,
"id": 6171,
"nodeType": "Return",
"src": "1140:20:28"
}
]
}
]
},
"documentation": {
"id": 6147,
"nodeType": "StructuredDocumentation",
"src": "848:135:28",
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6174,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "trySub",
"nameLocation": "997:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6152,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6149,
"mutability": "mutable",
"name": "a",
"nameLocation": "1012:1:28",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1004:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6148,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1004:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6151,
"mutability": "mutable",
"name": "b",
"nameLocation": "1023:1:28",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1015:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6150,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1015:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1003:22:28"
},
"returnParameters": {
"id": 6157,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6154,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1049:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6153,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1049:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6156,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6174,
"src": "1055:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6155,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1055:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1048:15:28"
},
"scope": 6423,
"src": "988:189:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6215,
"nodeType": "Block",
"src": "1401:417:28",
"statements": [
{
"id": 6214,
"nodeType": "UncheckedBlock",
"src": "1411:401:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6186,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1669:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6187,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1674:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1669:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6193,
"nodeType": "IfStatement",
"src": "1665:28:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1685:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"hexValue": "30",
"id": 6190,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1691:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6191,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1684:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6185,
"id": 6192,
"nodeType": "Return",
"src": "1677:16:28"
}
},
{
"assignments": [
6195
],
"declarations": [
{
"constant": false,
"id": 6195,
"mutability": "mutable",
"name": "c",
"nameLocation": "1715:1:28",
"nodeType": "VariableDeclaration",
"scope": 6214,
"src": "1707:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6194,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1707:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6199,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6196,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1719:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 6197,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6179,
"src": "1723:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1719:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1707:17:28"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6200,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6195,
"src": "1742:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6201,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6177,
"src": "1746:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 6203,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6179,
"src": "1751:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:10:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6209,
"nodeType": "IfStatement",
"src": "1738:33:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6205,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1762:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6206,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1769:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6207,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1761:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6185,
"id": 6208,
"nodeType": "Return",
"src": "1754:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1793:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 6211,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6195,
"src": "1799:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6212,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1792:9:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6185,
"id": 6213,
"nodeType": "Return",
"src": "1785:16:28"
}
]
}
]
},
"documentation": {
"id": 6175,
"nodeType": "StructuredDocumentation",
"src": "1183:137:28",
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 6216,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMul",
"nameLocation": "1334:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6180,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6177,
"mutability": "mutable",
"name": "a",
"nameLocation": "1349:1:28",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1341:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6176,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1341:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6179,
"mutability": "mutable",
"name": "b",
"nameLocation": "1360:1:28",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1352:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6178,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1352:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1340:22:28"
},
"returnParameters": {
"id": 6185,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6182,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1386:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6181,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1386:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6184,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6216,
"src": "1392:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6183,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1392:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1385:15:28"
},
"scope": 6423,
"src": "1325:493:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6243,
"nodeType": "Block",
"src": "2043:114:28",
"statements": [
{
"id": 6242,
"nodeType": "UncheckedBlock",
"src": "2053:98:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6228,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6221,
"src": "2081:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6229,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2086:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2081:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6235,
"nodeType": "IfStatement",
"src": "2077:29:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6231,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2097:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6232,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2104:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6233,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2096:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6227,
"id": 6234,
"nodeType": "Return",
"src": "2089:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6236,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2128:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6239,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6237,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6219,
"src": "2134:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6238,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6221,
"src": "2138:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2134:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6240,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2127:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6227,
"id": 6241,
"nodeType": "Return",
"src": "2120:20:28"
}
]
}
]
},
"documentation": {
"id": 6217,
"nodeType": "StructuredDocumentation",
"src": "1824:138:28",
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 6244,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryDiv",
"nameLocation": "1976:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6222,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6219,
"mutability": "mutable",
"name": "a",
"nameLocation": "1991:1:28",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "1983:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6218,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1983:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6221,
"mutability": "mutable",
"name": "b",
"nameLocation": "2002:1:28",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "1994:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1982:22:28"
},
"returnParameters": {
"id": 6227,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6224,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "2028:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6223,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2028:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6226,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6244,
"src": "2034:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6225,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2034:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2027:15:28"
},
"scope": 6423,
"src": "1967:190:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6271,
"nodeType": "Block",
"src": "2392:114:28",
"statements": [
{
"id": 6270,
"nodeType": "UncheckedBlock",
"src": "2402:98:28",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6256,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "2430:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6257,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2435:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2430:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6263,
"nodeType": "IfStatement",
"src": "2426:29:28",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 6259,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2446:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 6260,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2453:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 6261,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2445:10:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 6255,
"id": 6262,
"nodeType": "Return",
"src": "2438:17:28"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 6264,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2477:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6265,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6247,
"src": "2483:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6266,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6249,
"src": "2487:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2483:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6268,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2476:13:28",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 6255,
"id": 6269,
"nodeType": "Return",
"src": "2469:20:28"
}
]
}
]
},
"documentation": {
"id": 6245,
"nodeType": "StructuredDocumentation",
"src": "2163:148:28",
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 6272,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMod",
"nameLocation": "2325:6:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6250,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6247,
"mutability": "mutable",
"name": "a",
"nameLocation": "2340:1:28",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2332:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6246,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2332:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6249,
"mutability": "mutable",
"name": "b",
"nameLocation": "2351:1:28",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2343:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6248,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2343:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2331:22:28"
},
"returnParameters": {
"id": 6255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6252,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2377:4:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6251,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2377:4:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6254,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6272,
"src": "2383:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2383:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2376:15:28"
},
"scope": 6423,
"src": "2316:190:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6286,
"nodeType": "Block",
"src": "2808:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6282,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "2825:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 6283,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6277,
"src": "2829:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2825:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6281,
"id": 6285,
"nodeType": "Return",
"src": "2818:12:28"
}
]
},
"documentation": {
"id": 6273,
"nodeType": "StructuredDocumentation",
"src": "2512:224:28",
"text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow."
},
"id": 6287,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "2750:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6275,
"mutability": "mutable",
"name": "a",
"nameLocation": "2762:1:28",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2754:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6274,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2754:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6277,
"mutability": "mutable",
"name": "b",
"nameLocation": "2773:1:28",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2765:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6276,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2765:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2753:22:28"
},
"returnParameters": {
"id": 6281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6280,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6287,
"src": "2799:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6279,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2799:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2798:9:28"
},
"scope": 6423,
"src": "2741:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6301,
"nodeType": "Block",
"src": "3175:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6299,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6297,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6290,
"src": "3192:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6298,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6292,
"src": "3196:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3192:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6296,
"id": 6300,
"nodeType": "Return",
"src": "3185:12:28"
}
]
},
"documentation": {
"id": 6288,
"nodeType": "StructuredDocumentation",
"src": "2843:260:28",
"text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 6302,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "3117:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6293,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6290,
"mutability": "mutable",
"name": "a",
"nameLocation": "3129:1:28",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3121:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6289,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3121:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6292,
"mutability": "mutable",
"name": "b",
"nameLocation": "3140:1:28",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3132:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6291,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3132:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3120:22:28"
},
"returnParameters": {
"id": 6296,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6295,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6302,
"src": "3166:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6294,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3166:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3165:9:28"
},
"scope": 6423,
"src": "3108:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6316,
"nodeType": "Block",
"src": "3518:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6312,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6305,
"src": "3535:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 6313,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6307,
"src": "3539:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3535:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6311,
"id": 6315,
"nodeType": "Return",
"src": "3528:12:28"
}
]
},
"documentation": {
"id": 6303,
"nodeType": "StructuredDocumentation",
"src": "3210:236:28",
"text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow."
},
"id": 6317,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nameLocation": "3460:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6308,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6305,
"mutability": "mutable",
"name": "a",
"nameLocation": "3472:1:28",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3464:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6304,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3464:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6307,
"mutability": "mutable",
"name": "b",
"nameLocation": "3483:1:28",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3475:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6306,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3475:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3463:22:28"
},
"returnParameters": {
"id": 6311,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6310,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6317,
"src": "3509:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6309,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3509:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3508:9:28"
},
"scope": 6423,
"src": "3451:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6331,
"nodeType": "Block",
"src": "3903:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6327,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6320,
"src": "3920:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6328,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6322,
"src": "3924:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3920:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6326,
"id": 6330,
"nodeType": "Return",
"src": "3913:12:28"
}
]
},
"documentation": {
"id": 6318,
"nodeType": "StructuredDocumentation",
"src": "3553:278:28",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator.\n Requirements:\n - The divisor cannot be zero."
},
"id": 6332,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "3845:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6323,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6320,
"mutability": "mutable",
"name": "a",
"nameLocation": "3857:1:28",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3849:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6319,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3849:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6322,
"mutability": "mutable",
"name": "b",
"nameLocation": "3868:1:28",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3860:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6321,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3860:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3848:22:28"
},
"returnParameters": {
"id": 6326,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6325,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6332,
"src": "3894:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6324,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3894:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3893:9:28"
},
"scope": 6423,
"src": "3836:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6346,
"nodeType": "Block",
"src": "4452:29:28",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6342,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6335,
"src": "4469:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6343,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6337,
"src": "4473:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4469:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6341,
"id": 6345,
"nodeType": "Return",
"src": "4462:12:28"
}
]
},
"documentation": {
"id": 6333,
"nodeType": "StructuredDocumentation",
"src": "3938:442:28",
"text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6347,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "4394:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6335,
"mutability": "mutable",
"name": "a",
"nameLocation": "4406:1:28",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4398:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6334,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4398:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6337,
"mutability": "mutable",
"name": "b",
"nameLocation": "4417:1:28",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4409:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6336,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4409:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4397:22:28"
},
"returnParameters": {
"id": 6341,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6340,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6347,
"src": "4443:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6339,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4443:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4442:9:28"
},
"scope": 6423,
"src": "4385:96:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6371,
"nodeType": "Block",
"src": "5070:106:28",
"statements": [
{
"id": 6370,
"nodeType": "UncheckedBlock",
"src": "5080:90:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6360,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6352,
"src": "5112:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 6361,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6350,
"src": "5117:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5112:6:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6363,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6354,
"src": "5120:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6359,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5104:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5104:29:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6365,
"nodeType": "ExpressionStatement",
"src": "5104:29:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6368,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6366,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6350,
"src": "5154:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 6367,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6352,
"src": "5158:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5154:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6358,
"id": 6369,
"nodeType": "Return",
"src": "5147:12:28"
}
]
}
]
},
"documentation": {
"id": 6348,
"nodeType": "StructuredDocumentation",
"src": "4487:453:28",
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 6372,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "4954:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6355,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6350,
"mutability": "mutable",
"name": "a",
"nameLocation": "4975:1:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "4967:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6349,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4967:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6352,
"mutability": "mutable",
"name": "b",
"nameLocation": "4994:1:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "4986:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6351,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4986:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6354,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5019:12:28",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "5005:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6353,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5005:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "4957:80:28"
},
"returnParameters": {
"id": 6358,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6357,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6372,
"src": "5061:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6356,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5061:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5060:9:28"
},
"scope": 6423,
"src": "4945:231:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6396,
"nodeType": "Block",
"src": "5785:105:28",
"statements": [
{
"id": 6395,
"nodeType": "UncheckedBlock",
"src": "5795:89:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6385,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6377,
"src": "5827:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 6386,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5831:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5827:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6388,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6379,
"src": "5834:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6384,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5819:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5819:28:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6390,
"nodeType": "ExpressionStatement",
"src": "5819:28:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6391,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6375,
"src": "5868:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 6392,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6377,
"src": "5872:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5868:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6383,
"id": 6394,
"nodeType": "Return",
"src": "5861:12:28"
}
]
}
]
},
"documentation": {
"id": 6373,
"nodeType": "StructuredDocumentation",
"src": "5182:473:28",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6397,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "5669:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6380,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6375,
"mutability": "mutable",
"name": "a",
"nameLocation": "5690:1:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5682:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6374,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5682:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6377,
"mutability": "mutable",
"name": "b",
"nameLocation": "5709:1:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5701:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6376,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5701:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6379,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5734:12:28",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5720:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6378,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5720:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "5672:80:28"
},
"returnParameters": {
"id": 6383,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6382,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6397,
"src": "5776:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6381,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5776:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5775:9:28"
},
"scope": 6423,
"src": "5660:230:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6421,
"nodeType": "Block",
"src": "6661:105:28",
"statements": [
{
"id": 6420,
"nodeType": "UncheckedBlock",
"src": "6671:89:28",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6410,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6402,
"src": "6703:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 6411,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6707:1:28",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6703:5:28",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 6413,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6404,
"src": "6710:12:28",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 6409,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6695:7:28",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6695:28:28",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6415,
"nodeType": "ExpressionStatement",
"src": "6695:28:28"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6416,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6400,
"src": "6744:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 6417,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6402,
"src": "6748:1:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6744:5:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6408,
"id": 6419,
"nodeType": "Return",
"src": "6737:12:28"
}
]
}
]
},
"documentation": {
"id": 6398,
"nodeType": "StructuredDocumentation",
"src": "5896:635:28",
"text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting with custom message when dividing by zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryMod}.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 6422,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "6545:3:28",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6405,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6400,
"mutability": "mutable",
"name": "a",
"nameLocation": "6566:1:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6558:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6399,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6558:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6402,
"mutability": "mutable",
"name": "b",
"nameLocation": "6585:1:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6577:9:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6401,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6577:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6404,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "6610:12:28",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6596:26:28",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6403,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6596:6:28",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "6548:80:28"
},
"returnParameters": {
"id": 6408,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6407,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6422,
"src": "6652:7:28",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6406,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6652:7:28",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6651:9:28"
},
"scope": 6423,
"src": "6536:230:28",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6424,
"src": "467:6301:28",
"usedErrors": []
}
],
"src": "92:6677:28"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-17T06:09:48.190Z",
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations. NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler now has built in overflow checking.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}