oyster/packages/bridge/contracts/SafeMath.json

9421 lines
377 KiB
JSON

{
"contractName": "SafeMath",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122055f9260f387617f8a3c61d823235142789395d0039759e4f776f3b7674fd13ce64736f6c634300060c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122055f9260f387617f8a3c61d823235142789395d0039759e4f776f3b7674fd13ce64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "630:6594:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "630:6594:4:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\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 uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\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 if (b > a) return (false, 0);\n return (true, a - b);\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 // 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 * @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 if (b == 0) return (false, 0);\n return (true, a / b);\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 if (b == 0) return (false, 0);\n return (true, a % b);\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 uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\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 require(b <= a, \"SafeMath: subtraction overflow\");\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 if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\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. 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(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\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 require(b > 0, \"SafeMath: modulo by zero\");\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/math/SafeMath.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [2505]
},
"id": 2506,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2152,
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"],
"nodeType": "PragmaDirective",
"src": "33:31:4"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2153,
"nodeType": "StructuredDocumentation",
"src": "66:563:4",
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
},
"fullyImplemented": true,
"id": 2505,
"linearizedBaseContracts": [2505],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 2183,
"nodeType": "Block",
"src": "865:98:4",
"statements": [
{
"assignments": [2166],
"declarations": [
{
"constant": false,
"id": 2166,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2183,
"src": "875:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2165,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "875:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2170,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2167,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2156,
"src": "887:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2168,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2158,
"src": "891:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "887:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "875:17:4"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2171,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2166,
"src": "906:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2172,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2156,
"src": "910:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "906:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2178,
"nodeType": "IfStatement",
"src": "902:28:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2174,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "921:5:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "928:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2176,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "920:10:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2164,
"id": 2177,
"nodeType": "Return",
"src": "913:17:4"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2179,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "948:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"id": 2180,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2166,
"src": "954:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2181,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "947:9:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2164,
"id": 2182,
"nodeType": "Return",
"src": "940:16:4"
}
]
},
"documentation": {
"id": 2154,
"nodeType": "StructuredDocumentation",
"src": "653:131:4",
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2184,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryAdd",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2159,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2156,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2184,
"src": "805:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2155,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "805:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2158,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2184,
"src": "816:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2157,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "816:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "804:22:4"
},
"returnParameters": {
"id": 2164,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2161,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2184,
"src": "850:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2160,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "850:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2163,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2184,
"src": "856:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2162,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "856:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "849:15:4"
},
"scope": 2505,
"src": "789:174:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2210,
"nodeType": "Block",
"src": "1185:75:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2196,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2189,
"src": "1199:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 2197,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "1203:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1199:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2203,
"nodeType": "IfStatement",
"src": "1195:28:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2199,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1214:5:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2200,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1221:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2201,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1213:10:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2195,
"id": 2202,
"nodeType": "Return",
"src": "1206:17:4"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2204,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1241:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2207,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2205,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "1247:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 2206,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2189,
"src": "1251:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1247:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2208,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1240:13:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2195,
"id": 2209,
"nodeType": "Return",
"src": "1233:20:4"
}
]
},
"documentation": {
"id": 2185,
"nodeType": "StructuredDocumentation",
"src": "969:135:4",
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2211,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "trySub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2190,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2187,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2211,
"src": "1125:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2186,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1125:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2189,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2211,
"src": "1136:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2188,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1136:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1124:22:4"
},
"returnParameters": {
"id": 2195,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2192,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2211,
"src": "1170:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2191,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1170:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2194,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2211,
"src": "1176:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2193,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1176:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1169:15:4"
},
"scope": 2505,
"src": "1109:151:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2251,
"nodeType": "Block",
"src": "1484:359:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2223,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2214,
"src": "1716:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2224,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1721:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1716:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2230,
"nodeType": "IfStatement",
"src": "1712:28:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2226,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1732:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1738:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2228,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1731:9:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2222,
"id": 2229,
"nodeType": "Return",
"src": "1724:16:4"
}
},
{
"assignments": [2232],
"declarations": [
{
"constant": false,
"id": 2232,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2251,
"src": "1750:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2231,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1750:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2236,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2233,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2214,
"src": "1762:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 2234,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2216,
"src": "1766:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1762:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1750:17:4"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2239,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2237,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2232,
"src": "1781:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 2238,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2214,
"src": "1785:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1781:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 2240,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2216,
"src": "1790:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1781:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2246,
"nodeType": "IfStatement",
"src": "1777:33:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2242,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1801:5:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2243,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1808:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2244,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1800:10:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2222,
"id": 2245,
"nodeType": "Return",
"src": "1793:17:4"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2247,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1828:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"id": 2248,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2232,
"src": "1834:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2249,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1827:9:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2222,
"id": 2250,
"nodeType": "Return",
"src": "1820:16:4"
}
]
},
"documentation": {
"id": 2212,
"nodeType": "StructuredDocumentation",
"src": "1266:137:4",
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2252,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMul",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2217,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2214,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2252,
"src": "1424:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1424:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2216,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2252,
"src": "1435:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2215,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1435:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1423:22:4"
},
"returnParameters": {
"id": 2222,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2219,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2252,
"src": "1469:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2218,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1469:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2221,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2252,
"src": "1475:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1475:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1468:15:4"
},
"scope": 2505,
"src": "1408:435:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2278,
"nodeType": "Block",
"src": "2068:76:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2266,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2264,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2257,
"src": "2082:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2265,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2087:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2082:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2271,
"nodeType": "IfStatement",
"src": "2078:29:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2267,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2098:5:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2105:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2269,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2097:10:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2263,
"id": 2270,
"nodeType": "Return",
"src": "2090:17:4"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2272,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2125:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2273,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2255,
"src": "2131:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 2274,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2257,
"src": "2135:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2131:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2276,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2124:13:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2263,
"id": 2277,
"nodeType": "Return",
"src": "2117:20:4"
}
]
},
"documentation": {
"id": 2253,
"nodeType": "StructuredDocumentation",
"src": "1849:138:4",
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2279,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryDiv",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2258,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2255,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2279,
"src": "2008:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2254,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2008:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2257,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2279,
"src": "2019:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2256,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2019:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2007:22:4"
},
"returnParameters": {
"id": 2263,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2260,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2279,
"src": "2053:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2259,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2053:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2262,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2279,
"src": "2059:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2261,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2059:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2052:15:4"
},
"scope": 2505,
"src": "1992:152:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2305,
"nodeType": "Block",
"src": "2379:76:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2291,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2284,
"src": "2393:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2292,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2398:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2393:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2298,
"nodeType": "IfStatement",
"src": "2389:29:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2294,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2409:5:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2295,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2416:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2296,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2408:10:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2290,
"id": 2297,
"nodeType": "Return",
"src": "2401:17:4"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2299,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2436:4:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2302,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2300,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2282,
"src": "2442:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"id": 2301,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2284,
"src": "2446:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2442:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2303,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2435:13:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2290,
"id": 2304,
"nodeType": "Return",
"src": "2428:20:4"
}
]
},
"documentation": {
"id": 2280,
"nodeType": "StructuredDocumentation",
"src": "2150:148:4",
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2306,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMod",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2282,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2306,
"src": "2319:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2281,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2319:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2284,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2306,
"src": "2330:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2283,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2330:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2318:22:4"
},
"returnParameters": {
"id": 2290,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2287,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2306,
"src": "2364:4:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2286,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2364:4:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2289,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2306,
"src": "2370:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2288,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2370:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2363:15:4"
},
"scope": 2505,
"src": "2303:152:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2331,
"nodeType": "Block",
"src": "2757:108:4",
"statements": [
{
"assignments": [2317],
"declarations": [
{
"constant": false,
"id": 2317,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2331,
"src": "2767:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2316,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2767:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2321,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2320,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2318,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2309,
"src": "2779:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2319,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2311,
"src": "2783:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2779:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2767:17:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2323,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2317,
"src": "2802:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2324,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2309,
"src": "2807:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2802:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77",
"id": 2326,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2810:29:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
},
"value": "SafeMath: addition overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
}
],
"id": 2322,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "2794:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2794:46:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2328,
"nodeType": "ExpressionStatement",
"src": "2794:46:4"
},
{
"expression": {
"argumentTypes": null,
"id": 2329,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2317,
"src": "2857:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2315,
"id": 2330,
"nodeType": "Return",
"src": "2850:8:4"
}
]
},
"documentation": {
"id": 2307,
"nodeType": "StructuredDocumentation",
"src": "2461:224:4",
"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": 2332,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2312,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2309,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2332,
"src": "2703:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2308,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2703:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2311,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2332,
"src": "2714:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2310,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2714:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2702:22:4"
},
"returnParameters": {
"id": 2315,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2314,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2332,
"src": "2748:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2313,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2748:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2747:9:4"
},
"scope": 2505,
"src": "2690:175:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2353,
"nodeType": "Block",
"src": "3203:88:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2343,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2337,
"src": "3221:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2344,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2335,
"src": "3226:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3221:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"id": 2346,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3229:32:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
},
"value": "SafeMath: subtraction overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"id": 2342,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "3213:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3213:49:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2348,
"nodeType": "ExpressionStatement",
"src": "3213:49:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2349,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2335,
"src": "3279:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 2350,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2337,
"src": "3283:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3279:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2341,
"id": 2352,
"nodeType": "Return",
"src": "3272:12:4"
}
]
},
"documentation": {
"id": 2333,
"nodeType": "StructuredDocumentation",
"src": "2871:260:4",
"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": 2354,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2338,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2335,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2354,
"src": "3149:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2334,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3149:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2337,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2354,
"src": "3160:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2336,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3160:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3148:22:4"
},
"returnParameters": {
"id": 2341,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2340,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2354,
"src": "3194:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2339,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3194:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3193:9:4"
},
"scope": 2505,
"src": "3136:155:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2387,
"nodeType": "Block",
"src": "3605:148:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2364,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2357,
"src": "3619:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2365,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3624:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3619:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2369,
"nodeType": "IfStatement",
"src": "3615:20:4",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2367,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3634:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 2363,
"id": 2368,
"nodeType": "Return",
"src": "3627:8:4"
}
},
{
"assignments": [2371],
"declarations": [
{
"constant": false,
"id": 2371,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2387,
"src": "3645:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2370,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3645:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2375,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2372,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2357,
"src": "3657:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 2373,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2359,
"src": "3661:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3657:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3645:17:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2379,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2377,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2371,
"src": "3680:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 2378,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2357,
"src": "3684:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3680:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2380,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2359,
"src": "3689:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3680:10:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77",
"id": 2382,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3692:35:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
},
"value": "SafeMath: multiplication overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
}
],
"id": 2376,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "3672:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2383,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3672:56:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2384,
"nodeType": "ExpressionStatement",
"src": "3672:56:4"
},
{
"expression": {
"argumentTypes": null,
"id": 2385,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2371,
"src": "3745:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2363,
"id": 2386,
"nodeType": "Return",
"src": "3738:8:4"
}
]
},
"documentation": {
"id": 2355,
"nodeType": "StructuredDocumentation",
"src": "3297:236:4",
"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": 2388,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2360,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2357,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2388,
"src": "3551:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2356,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3551:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2359,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2388,
"src": "3562:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2358,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3562:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3550:22:4"
},
"returnParameters": {
"id": 2363,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2362,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2388,
"src": "3596:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2361,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3596:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3595:9:4"
},
"scope": 2505,
"src": "3538:215:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2409,
"nodeType": "Block",
"src": "4284:83:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2401,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2399,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2393,
"src": "4302:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4306:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4302:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206469766973696f6e206279207a65726f",
"id": 2402,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4309:28:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
},
"value": "SafeMath: division by zero"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
}
],
"id": 2398,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4294:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4294:44:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2404,
"nodeType": "ExpressionStatement",
"src": "4294:44:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2405,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2391,
"src": "4355:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 2406,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2393,
"src": "4359:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4355:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2397,
"id": 2408,
"nodeType": "Return",
"src": "4348:12:4"
}
]
},
"documentation": {
"id": 2389,
"nodeType": "StructuredDocumentation",
"src": "3759:453:4",
"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. 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": 2410,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2394,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2391,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2410,
"src": "4230:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2390,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4230:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2393,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2410,
"src": "4241:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2392,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4241:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4229:22:4"
},
"returnParameters": {
"id": 2397,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2396,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2410,
"src": "4275:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2395,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4275:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4274:9:4"
},
"scope": 2505,
"src": "4217:150:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2431,
"nodeType": "Block",
"src": "4887:81:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2423,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2421,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2415,
"src": "4905:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2422,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4909:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4905:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f",
"id": 2424,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4912:26:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832",
"typeString": "literal_string \"SafeMath: modulo by zero\""
},
"value": "SafeMath: modulo by zero"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832",
"typeString": "literal_string \"SafeMath: modulo by zero\""
}
],
"id": 2420,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "4897:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2425,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4897:42:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2426,
"nodeType": "ExpressionStatement",
"src": "4897:42:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2427,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2413,
"src": "4956:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"id": 2428,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2415,
"src": "4960:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4956:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2419,
"id": 2430,
"nodeType": "Return",
"src": "4949:12:4"
}
]
},
"documentation": {
"id": 2411,
"nodeType": "StructuredDocumentation",
"src": "4373:442:4",
"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": 2432,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2416,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2413,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2432,
"src": "4833:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2412,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4833:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2415,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2432,
"src": "4844:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2414,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4844:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4832:22:4"
},
"returnParameters": {
"id": 2419,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2418,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2432,
"src": "4878:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2417,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4878:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4877:9:4"
},
"scope": 2505,
"src": "4820:148:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2455,
"nodeType": "Block",
"src": "5527:68:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2447,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2445,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2437,
"src": "5545:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2446,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2435,
"src": "5550:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5545:6:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 2448,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2439,
"src": "5553:12:4",
"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": 2444,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "5537:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5537:29:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2450,
"nodeType": "ExpressionStatement",
"src": "5537:29:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2451,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2435,
"src": "5583:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 2452,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2437,
"src": "5587:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5583:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2443,
"id": 2454,
"nodeType": "Return",
"src": "5576:12:4"
}
]
},
"documentation": {
"id": 2433,
"nodeType": "StructuredDocumentation",
"src": "4974:453:4",
"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": 2456,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2440,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2435,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2456,
"src": "5445:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2434,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5445:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2437,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2456,
"src": "5456:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2436,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5456:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2439,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2456,
"src": "5467:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2438,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5467:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5444:50:4"
},
"returnParameters": {
"id": 2443,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2442,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2456,
"src": "5518:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2441,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5518:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5517:9:4"
},
"scope": 2505,
"src": "5432:163:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2479,
"nodeType": "Block",
"src": "6347:67:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2469,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2461,
"src": "6365:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2470,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6369:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6365:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 2472,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2463,
"src": "6372:12:4",
"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": 2468,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "6357:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6357:28:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2474,
"nodeType": "ExpressionStatement",
"src": "6357:28:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2475,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2459,
"src": "6402:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 2476,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2461,
"src": "6406:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6402:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2467,
"id": 2478,
"nodeType": "Return",
"src": "6395:12:4"
}
]
},
"documentation": {
"id": 2457,
"nodeType": "StructuredDocumentation",
"src": "5601:646:4",
"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 CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\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": 2480,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2464,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2459,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2480,
"src": "6265:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2458,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6265:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2461,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2480,
"src": "6276:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2460,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6276:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2463,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2480,
"src": "6287:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2462,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6287:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6264:50:4"
},
"returnParameters": {
"id": 2467,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2466,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2480,
"src": "6338:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2465,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6338:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6337:9:4"
},
"scope": 2505,
"src": "6252:162:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2503,
"nodeType": "Block",
"src": "7155:67:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2493,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2485,
"src": "7173:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2494,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7177:1:4",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "7173:5:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 2496,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2487,
"src": "7180:12:4",
"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": 2492,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"src": "7165:7:4",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2497,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7165:28:4",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2498,
"nodeType": "ExpressionStatement",
"src": "7165:28:4"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2501,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2499,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2483,
"src": "7210:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"id": 2500,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2485,
"src": "7214:1:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7210:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2491,
"id": 2502,
"nodeType": "Return",
"src": "7203:12:4"
}
]
},
"documentation": {
"id": 2481,
"nodeType": "StructuredDocumentation",
"src": "6420:635:4",
"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": 2504,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 2488,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2483,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2504,
"src": "7073:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2482,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7073:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2485,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2504,
"src": "7084:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2484,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7084:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2487,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2504,
"src": "7095:26:4",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2486,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "7095:6:4",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7072:50:4"
},
"returnParameters": {
"id": 2491,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2490,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 2504,
"src": "7146:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2489,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7146:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7145:9:4"
},
"scope": 2505,
"src": "7060:162:4",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 2506,
"src": "630:6594:4"
}
],
"src": "33:7192:4"
},
"legacyAST": {
"attributes": {
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [2505]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"]
},
"id": 2152,
"name": "PragmaDirective",
"src": "33:31:4"
},
{
"attributes": {
"abstract": false,
"baseContracts": [null],
"contractDependencies": [null],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts": [2505],
"name": "SafeMath",
"scope": 2506
},
"children": [
{
"attributes": {
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
},
"id": 2153,
"name": "StructuredDocumentation",
"src": "66:563:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "tryAdd",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2154,
"name": "StructuredDocumentation",
"src": "653:131:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2184,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2155,
"name": "ElementaryTypeName",
"src": "805:7:4"
}
],
"id": 2156,
"name": "VariableDeclaration",
"src": "805:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2184,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2157,
"name": "ElementaryTypeName",
"src": "816:7:4"
}
],
"id": 2158,
"name": "VariableDeclaration",
"src": "816:9:4"
}
],
"id": 2159,
"name": "ParameterList",
"src": "804:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2184,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 2160,
"name": "ElementaryTypeName",
"src": "850:4:4"
}
],
"id": 2161,
"name": "VariableDeclaration",
"src": "850:4:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2184,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2162,
"name": "ElementaryTypeName",
"src": "856:7:4"
}
],
"id": 2163,
"name": "VariableDeclaration",
"src": "856:7:4"
}
],
"id": 2164,
"name": "ParameterList",
"src": "849:15:4"
},
{
"children": [
{
"attributes": {
"assignments": [2166]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "c",
"overrides": null,
"scope": 2183,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2165,
"name": "ElementaryTypeName",
"src": "875:7:4"
}
],
"id": 2166,
"name": "VariableDeclaration",
"src": "875:9:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2156,
"type": "uint256",
"value": "a"
},
"id": 2167,
"name": "Identifier",
"src": "887:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2158,
"type": "uint256",
"value": "b"
},
"id": 2168,
"name": "Identifier",
"src": "891:1:4"
}
],
"id": 2169,
"name": "BinaryOperation",
"src": "887:5:4"
}
],
"id": 2170,
"name": "VariableDeclarationStatement",
"src": "875:17:4"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2166,
"type": "uint256",
"value": "c"
},
"id": 2171,
"name": "Identifier",
"src": "906:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2156,
"type": "uint256",
"value": "a"
},
"id": 2172,
"name": "Identifier",
"src": "910:1:4"
}
],
"id": 2173,
"name": "BinaryOperation",
"src": "906:5:4"
},
{
"attributes": {
"functionReturnParameters": 2164
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "66616c7365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "false"
},
"id": 2174,
"name": "Literal",
"src": "921:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2175,
"name": "Literal",
"src": "928:1:4"
}
],
"id": 2176,
"name": "TupleExpression",
"src": "920:10:4"
}
],
"id": 2177,
"name": "Return",
"src": "913:17:4"
}
],
"id": 2178,
"name": "IfStatement",
"src": "902:28:4"
},
{
"attributes": {
"functionReturnParameters": 2164
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "tuple(bool,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2179,
"name": "Literal",
"src": "948:4:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2166,
"type": "uint256",
"value": "c"
},
"id": 2180,
"name": "Identifier",
"src": "954:1:4"
}
],
"id": 2181,
"name": "TupleExpression",
"src": "947:9:4"
}
],
"id": 2182,
"name": "Return",
"src": "940:16:4"
}
],
"id": 2183,
"name": "Block",
"src": "865:98:4"
}
],
"id": 2184,
"name": "FunctionDefinition",
"src": "789:174:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "trySub",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2185,
"name": "StructuredDocumentation",
"src": "969:135:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2211,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2186,
"name": "ElementaryTypeName",
"src": "1125:7:4"
}
],
"id": 2187,
"name": "VariableDeclaration",
"src": "1125:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2211,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2188,
"name": "ElementaryTypeName",
"src": "1136:7:4"
}
],
"id": 2189,
"name": "VariableDeclaration",
"src": "1136:9:4"
}
],
"id": 2190,
"name": "ParameterList",
"src": "1124:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2211,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 2191,
"name": "ElementaryTypeName",
"src": "1170:4:4"
}
],
"id": 2192,
"name": "VariableDeclaration",
"src": "1170:4:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2211,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2193,
"name": "ElementaryTypeName",
"src": "1176:7:4"
}
],
"id": 2194,
"name": "VariableDeclaration",
"src": "1176:7:4"
}
],
"id": 2195,
"name": "ParameterList",
"src": "1169:15:4"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2189,
"type": "uint256",
"value": "b"
},
"id": 2196,
"name": "Identifier",
"src": "1199:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2187,
"type": "uint256",
"value": "a"
},
"id": 2197,
"name": "Identifier",
"src": "1203:1:4"
}
],
"id": 2198,
"name": "BinaryOperation",
"src": "1199:5:4"
},
{
"attributes": {
"functionReturnParameters": 2195
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "66616c7365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "false"
},
"id": 2199,
"name": "Literal",
"src": "1214:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2200,
"name": "Literal",
"src": "1221:1:4"
}
],
"id": 2201,
"name": "TupleExpression",
"src": "1213:10:4"
}
],
"id": 2202,
"name": "Return",
"src": "1206:17:4"
}
],
"id": 2203,
"name": "IfStatement",
"src": "1195:28:4"
},
{
"attributes": {
"functionReturnParameters": 2195
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "tuple(bool,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2204,
"name": "Literal",
"src": "1241:4:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2187,
"type": "uint256",
"value": "a"
},
"id": 2205,
"name": "Identifier",
"src": "1247:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2189,
"type": "uint256",
"value": "b"
},
"id": 2206,
"name": "Identifier",
"src": "1251:1:4"
}
],
"id": 2207,
"name": "BinaryOperation",
"src": "1247:5:4"
}
],
"id": 2208,
"name": "TupleExpression",
"src": "1240:13:4"
}
],
"id": 2209,
"name": "Return",
"src": "1233:20:4"
}
],
"id": 2210,
"name": "Block",
"src": "1185:75:4"
}
],
"id": 2211,
"name": "FunctionDefinition",
"src": "1109:151:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "tryMul",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 2212,
"name": "StructuredDocumentation",
"src": "1266:137:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2252,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2213,
"name": "ElementaryTypeName",
"src": "1424:7:4"
}
],
"id": 2214,
"name": "VariableDeclaration",
"src": "1424:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2252,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2215,
"name": "ElementaryTypeName",
"src": "1435:7:4"
}
],
"id": 2216,
"name": "VariableDeclaration",
"src": "1435:9:4"
}
],
"id": 2217,
"name": "ParameterList",
"src": "1423:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2252,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 2218,
"name": "ElementaryTypeName",
"src": "1469:4:4"
}
],
"id": 2219,
"name": "VariableDeclaration",
"src": "1469:4:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2252,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2220,
"name": "ElementaryTypeName",
"src": "1475:7:4"
}
],
"id": 2221,
"name": "VariableDeclaration",
"src": "1475:7:4"
}
],
"id": 2222,
"name": "ParameterList",
"src": "1468:15:4"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2214,
"type": "uint256",
"value": "a"
},
"id": 2223,
"name": "Identifier",
"src": "1716:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2224,
"name": "Literal",
"src": "1721:1:4"
}
],
"id": 2225,
"name": "BinaryOperation",
"src": "1716:6:4"
},
{
"attributes": {
"functionReturnParameters": 2222
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2226,
"name": "Literal",
"src": "1732:4:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2227,
"name": "Literal",
"src": "1738:1:4"
}
],
"id": 2228,
"name": "TupleExpression",
"src": "1731:9:4"
}
],
"id": 2229,
"name": "Return",
"src": "1724:16:4"
}
],
"id": 2230,
"name": "IfStatement",
"src": "1712:28:4"
},
{
"attributes": {
"assignments": [2232]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "c",
"overrides": null,
"scope": 2251,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2231,
"name": "ElementaryTypeName",
"src": "1750:7:4"
}
],
"id": 2232,
"name": "VariableDeclaration",
"src": "1750:9:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2214,
"type": "uint256",
"value": "a"
},
"id": 2233,
"name": "Identifier",
"src": "1762:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2216,
"type": "uint256",
"value": "b"
},
"id": 2234,
"name": "Identifier",
"src": "1766:1:4"
}
],
"id": 2235,
"name": "BinaryOperation",
"src": "1762:5:4"
}
],
"id": 2236,
"name": "VariableDeclarationStatement",
"src": "1750:17:4"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2232,
"type": "uint256",
"value": "c"
},
"id": 2237,
"name": "Identifier",
"src": "1781:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2214,
"type": "uint256",
"value": "a"
},
"id": 2238,
"name": "Identifier",
"src": "1785:1:4"
}
],
"id": 2239,
"name": "BinaryOperation",
"src": "1781:5:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2216,
"type": "uint256",
"value": "b"
},
"id": 2240,
"name": "Identifier",
"src": "1790:1:4"
}
],
"id": 2241,
"name": "BinaryOperation",
"src": "1781:10:4"
},
{
"attributes": {
"functionReturnParameters": 2222
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "66616c7365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "false"
},
"id": 2242,
"name": "Literal",
"src": "1801:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2243,
"name": "Literal",
"src": "1808:1:4"
}
],
"id": 2244,
"name": "TupleExpression",
"src": "1800:10:4"
}
],
"id": 2245,
"name": "Return",
"src": "1793:17:4"
}
],
"id": 2246,
"name": "IfStatement",
"src": "1777:33:4"
},
{
"attributes": {
"functionReturnParameters": 2222
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "tuple(bool,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2247,
"name": "Literal",
"src": "1828:4:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2232,
"type": "uint256",
"value": "c"
},
"id": 2248,
"name": "Identifier",
"src": "1834:1:4"
}
],
"id": 2249,
"name": "TupleExpression",
"src": "1827:9:4"
}
],
"id": 2250,
"name": "Return",
"src": "1820:16:4"
}
],
"id": 2251,
"name": "Block",
"src": "1484:359:4"
}
],
"id": 2252,
"name": "FunctionDefinition",
"src": "1408:435:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "tryDiv",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2253,
"name": "StructuredDocumentation",
"src": "1849:138:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2279,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2254,
"name": "ElementaryTypeName",
"src": "2008:7:4"
}
],
"id": 2255,
"name": "VariableDeclaration",
"src": "2008:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2279,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2256,
"name": "ElementaryTypeName",
"src": "2019:7:4"
}
],
"id": 2257,
"name": "VariableDeclaration",
"src": "2019:9:4"
}
],
"id": 2258,
"name": "ParameterList",
"src": "2007:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2279,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 2259,
"name": "ElementaryTypeName",
"src": "2053:4:4"
}
],
"id": 2260,
"name": "VariableDeclaration",
"src": "2053:4:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2279,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2261,
"name": "ElementaryTypeName",
"src": "2059:7:4"
}
],
"id": 2262,
"name": "VariableDeclaration",
"src": "2059:7:4"
}
],
"id": 2263,
"name": "ParameterList",
"src": "2052:15:4"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2257,
"type": "uint256",
"value": "b"
},
"id": 2264,
"name": "Identifier",
"src": "2082:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2265,
"name": "Literal",
"src": "2087:1:4"
}
],
"id": 2266,
"name": "BinaryOperation",
"src": "2082:6:4"
},
{
"attributes": {
"functionReturnParameters": 2263
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "66616c7365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "false"
},
"id": 2267,
"name": "Literal",
"src": "2098:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2268,
"name": "Literal",
"src": "2105:1:4"
}
],
"id": 2269,
"name": "TupleExpression",
"src": "2097:10:4"
}
],
"id": 2270,
"name": "Return",
"src": "2090:17:4"
}
],
"id": 2271,
"name": "IfStatement",
"src": "2078:29:4"
},
{
"attributes": {
"functionReturnParameters": 2263
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "tuple(bool,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2272,
"name": "Literal",
"src": "2125:4:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2255,
"type": "uint256",
"value": "a"
},
"id": 2273,
"name": "Identifier",
"src": "2131:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2257,
"type": "uint256",
"value": "b"
},
"id": 2274,
"name": "Identifier",
"src": "2135:1:4"
}
],
"id": 2275,
"name": "BinaryOperation",
"src": "2131:5:4"
}
],
"id": 2276,
"name": "TupleExpression",
"src": "2124:13:4"
}
],
"id": 2277,
"name": "Return",
"src": "2117:20:4"
}
],
"id": 2278,
"name": "Block",
"src": "2068:76:4"
}
],
"id": 2279,
"name": "FunctionDefinition",
"src": "1992:152:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "tryMod",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2280,
"name": "StructuredDocumentation",
"src": "2150:148:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2306,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2281,
"name": "ElementaryTypeName",
"src": "2319:7:4"
}
],
"id": 2282,
"name": "VariableDeclaration",
"src": "2319:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2306,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2283,
"name": "ElementaryTypeName",
"src": "2330:7:4"
}
],
"id": 2284,
"name": "VariableDeclaration",
"src": "2330:9:4"
}
],
"id": 2285,
"name": "ParameterList",
"src": "2318:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2306,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 2286,
"name": "ElementaryTypeName",
"src": "2364:4:4"
}
],
"id": 2287,
"name": "VariableDeclaration",
"src": "2364:4:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2306,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2288,
"name": "ElementaryTypeName",
"src": "2370:7:4"
}
],
"id": 2289,
"name": "VariableDeclaration",
"src": "2370:7:4"
}
],
"id": 2290,
"name": "ParameterList",
"src": "2363:15:4"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2284,
"type": "uint256",
"value": "b"
},
"id": 2291,
"name": "Identifier",
"src": "2393:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2292,
"name": "Literal",
"src": "2398:1:4"
}
],
"id": 2293,
"name": "BinaryOperation",
"src": "2393:6:4"
},
{
"attributes": {
"functionReturnParameters": 2290
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "tuple(bool,int_const 0)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "66616c7365",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "false"
},
"id": 2294,
"name": "Literal",
"src": "2409:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2295,
"name": "Literal",
"src": "2416:1:4"
}
],
"id": 2296,
"name": "TupleExpression",
"src": "2408:10:4"
}
],
"id": 2297,
"name": "Return",
"src": "2401:17:4"
}
],
"id": 2298,
"name": "IfStatement",
"src": "2389:29:4"
},
{
"attributes": {
"functionReturnParameters": 2290
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "tuple(bool,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 2299,
"name": "Literal",
"src": "2436:4:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "%",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2282,
"type": "uint256",
"value": "a"
},
"id": 2300,
"name": "Identifier",
"src": "2442:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2284,
"type": "uint256",
"value": "b"
},
"id": 2301,
"name": "Identifier",
"src": "2446:1:4"
}
],
"id": 2302,
"name": "BinaryOperation",
"src": "2442:5:4"
}
],
"id": 2303,
"name": "TupleExpression",
"src": "2435:13:4"
}
],
"id": 2304,
"name": "Return",
"src": "2428:20:4"
}
],
"id": 2305,
"name": "Block",
"src": "2379:76:4"
}
],
"id": 2306,
"name": "FunctionDefinition",
"src": "2303:152:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "add",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2307,
"name": "StructuredDocumentation",
"src": "2461:224:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2332,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2308,
"name": "ElementaryTypeName",
"src": "2703:7:4"
}
],
"id": 2309,
"name": "VariableDeclaration",
"src": "2703:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2332,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2310,
"name": "ElementaryTypeName",
"src": "2714:7:4"
}
],
"id": 2311,
"name": "VariableDeclaration",
"src": "2714:9:4"
}
],
"id": 2312,
"name": "ParameterList",
"src": "2702:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2332,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2313,
"name": "ElementaryTypeName",
"src": "2748:7:4"
}
],
"id": 2314,
"name": "VariableDeclaration",
"src": "2748:7:4"
}
],
"id": 2315,
"name": "ParameterList",
"src": "2747:9:4"
},
{
"children": [
{
"attributes": {
"assignments": [2317]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "c",
"overrides": null,
"scope": 2331,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2316,
"name": "ElementaryTypeName",
"src": "2767:7:4"
}
],
"id": 2317,
"name": "VariableDeclaration",
"src": "2767:9:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2309,
"type": "uint256",
"value": "a"
},
"id": 2318,
"name": "Identifier",
"src": "2779:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2311,
"type": "uint256",
"value": "b"
},
"id": 2319,
"name": "Identifier",
"src": "2783:1:4"
}
],
"id": 2320,
"name": "BinaryOperation",
"src": "2779:5:4"
}
],
"id": 2321,
"name": "VariableDeclarationStatement",
"src": "2767:17:4"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a",
"typeString": "literal_string \"SafeMath: addition overflow\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2322,
"name": "Identifier",
"src": "2794:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2317,
"type": "uint256",
"value": "c"
},
"id": 2323,
"name": "Identifier",
"src": "2802:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2309,
"type": "uint256",
"value": "a"
},
"id": 2324,
"name": "Identifier",
"src": "2807:1:4"
}
],
"id": 2325,
"name": "BinaryOperation",
"src": "2802:6:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a206164646974696f6e206f766572666c6f77",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: addition overflow\"",
"value": "SafeMath: addition overflow"
},
"id": 2326,
"name": "Literal",
"src": "2810:29:4"
}
],
"id": 2327,
"name": "FunctionCall",
"src": "2794:46:4"
}
],
"id": 2328,
"name": "ExpressionStatement",
"src": "2794:46:4"
},
{
"attributes": {
"functionReturnParameters": 2315
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2317,
"type": "uint256",
"value": "c"
},
"id": 2329,
"name": "Identifier",
"src": "2857:1:4"
}
],
"id": 2330,
"name": "Return",
"src": "2850:8:4"
}
],
"id": 2331,
"name": "Block",
"src": "2757:108:4"
}
],
"id": 2332,
"name": "FunctionDefinition",
"src": "2690:175:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "sub",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2333,
"name": "StructuredDocumentation",
"src": "2871:260:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2354,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2334,
"name": "ElementaryTypeName",
"src": "3149:7:4"
}
],
"id": 2335,
"name": "VariableDeclaration",
"src": "3149:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2354,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2336,
"name": "ElementaryTypeName",
"src": "3160:7:4"
}
],
"id": 2337,
"name": "VariableDeclaration",
"src": "3160:9:4"
}
],
"id": 2338,
"name": "ParameterList",
"src": "3148:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2354,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2339,
"name": "ElementaryTypeName",
"src": "3194:7:4"
}
],
"id": 2340,
"name": "VariableDeclaration",
"src": "3194:7:4"
}
],
"id": 2341,
"name": "ParameterList",
"src": "3193:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2342,
"name": "Identifier",
"src": "3213:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2337,
"type": "uint256",
"value": "b"
},
"id": 2343,
"name": "Identifier",
"src": "3221:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2335,
"type": "uint256",
"value": "a"
},
"id": 2344,
"name": "Identifier",
"src": "3226:1:4"
}
],
"id": 2345,
"name": "BinaryOperation",
"src": "3221:6:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: subtraction overflow\"",
"value": "SafeMath: subtraction overflow"
},
"id": 2346,
"name": "Literal",
"src": "3229:32:4"
}
],
"id": 2347,
"name": "FunctionCall",
"src": "3213:49:4"
}
],
"id": 2348,
"name": "ExpressionStatement",
"src": "3213:49:4"
},
{
"attributes": {
"functionReturnParameters": 2341
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2335,
"type": "uint256",
"value": "a"
},
"id": 2349,
"name": "Identifier",
"src": "3279:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2337,
"type": "uint256",
"value": "b"
},
"id": 2350,
"name": "Identifier",
"src": "3283:1:4"
}
],
"id": 2351,
"name": "BinaryOperation",
"src": "3279:5:4"
}
],
"id": 2352,
"name": "Return",
"src": "3272:12:4"
}
],
"id": 2353,
"name": "Block",
"src": "3203:88:4"
}
],
"id": 2354,
"name": "FunctionDefinition",
"src": "3136:155:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "mul",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2355,
"name": "StructuredDocumentation",
"src": "3297:236:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2388,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2356,
"name": "ElementaryTypeName",
"src": "3551:7:4"
}
],
"id": 2357,
"name": "VariableDeclaration",
"src": "3551:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2388,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2358,
"name": "ElementaryTypeName",
"src": "3562:7:4"
}
],
"id": 2359,
"name": "VariableDeclaration",
"src": "3562:9:4"
}
],
"id": 2360,
"name": "ParameterList",
"src": "3550:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2388,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2361,
"name": "ElementaryTypeName",
"src": "3596:7:4"
}
],
"id": 2362,
"name": "VariableDeclaration",
"src": "3596:7:4"
}
],
"id": 2363,
"name": "ParameterList",
"src": "3595:9:4"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2357,
"type": "uint256",
"value": "a"
},
"id": 2364,
"name": "Identifier",
"src": "3619:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2365,
"name": "Literal",
"src": "3624:1:4"
}
],
"id": 2366,
"name": "BinaryOperation",
"src": "3619:6:4"
},
{
"attributes": {
"functionReturnParameters": 2363
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2367,
"name": "Literal",
"src": "3634:1:4"
}
],
"id": 2368,
"name": "Return",
"src": "3627:8:4"
}
],
"id": 2369,
"name": "IfStatement",
"src": "3615:20:4"
},
{
"attributes": {
"assignments": [2371]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "c",
"overrides": null,
"scope": 2387,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2370,
"name": "ElementaryTypeName",
"src": "3645:7:4"
}
],
"id": 2371,
"name": "VariableDeclaration",
"src": "3645:9:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2357,
"type": "uint256",
"value": "a"
},
"id": 2372,
"name": "Identifier",
"src": "3657:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2359,
"type": "uint256",
"value": "b"
},
"id": 2373,
"name": "Identifier",
"src": "3661:1:4"
}
],
"id": 2374,
"name": "BinaryOperation",
"src": "3657:5:4"
}
],
"id": 2375,
"name": "VariableDeclarationStatement",
"src": "3645:17:4"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3",
"typeString": "literal_string \"SafeMath: multiplication overflow\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2376,
"name": "Identifier",
"src": "3672:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2371,
"type": "uint256",
"value": "c"
},
"id": 2377,
"name": "Identifier",
"src": "3680:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2357,
"type": "uint256",
"value": "a"
},
"id": 2378,
"name": "Identifier",
"src": "3684:1:4"
}
],
"id": 2379,
"name": "BinaryOperation",
"src": "3680:5:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2359,
"type": "uint256",
"value": "b"
},
"id": 2380,
"name": "Identifier",
"src": "3689:1:4"
}
],
"id": 2381,
"name": "BinaryOperation",
"src": "3680:10:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: multiplication overflow\"",
"value": "SafeMath: multiplication overflow"
},
"id": 2382,
"name": "Literal",
"src": "3692:35:4"
}
],
"id": 2383,
"name": "FunctionCall",
"src": "3672:56:4"
}
],
"id": 2384,
"name": "ExpressionStatement",
"src": "3672:56:4"
},
{
"attributes": {
"functionReturnParameters": 2363
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2371,
"type": "uint256",
"value": "c"
},
"id": 2385,
"name": "Identifier",
"src": "3745:1:4"
}
],
"id": 2386,
"name": "Return",
"src": "3738:8:4"
}
],
"id": 2387,
"name": "Block",
"src": "3605:148:4"
}
],
"id": 2388,
"name": "FunctionDefinition",
"src": "3538:215:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "div",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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. 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": 2389,
"name": "StructuredDocumentation",
"src": "3759:453:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2410,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2390,
"name": "ElementaryTypeName",
"src": "4230:7:4"
}
],
"id": 2391,
"name": "VariableDeclaration",
"src": "4230:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2410,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2392,
"name": "ElementaryTypeName",
"src": "4241:7:4"
}
],
"id": 2393,
"name": "VariableDeclaration",
"src": "4241:9:4"
}
],
"id": 2394,
"name": "ParameterList",
"src": "4229:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2410,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2395,
"name": "ElementaryTypeName",
"src": "4275:7:4"
}
],
"id": 2396,
"name": "VariableDeclaration",
"src": "4275:7:4"
}
],
"id": 2397,
"name": "ParameterList",
"src": "4274:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f",
"typeString": "literal_string \"SafeMath: division by zero\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2398,
"name": "Identifier",
"src": "4294:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2393,
"type": "uint256",
"value": "b"
},
"id": 2399,
"name": "Identifier",
"src": "4302:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2400,
"name": "Literal",
"src": "4306:1:4"
}
],
"id": 2401,
"name": "BinaryOperation",
"src": "4302:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a206469766973696f6e206279207a65726f",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: division by zero\"",
"value": "SafeMath: division by zero"
},
"id": 2402,
"name": "Literal",
"src": "4309:28:4"
}
],
"id": 2403,
"name": "FunctionCall",
"src": "4294:44:4"
}
],
"id": 2404,
"name": "ExpressionStatement",
"src": "4294:44:4"
},
{
"attributes": {
"functionReturnParameters": 2397
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2391,
"type": "uint256",
"value": "a"
},
"id": 2405,
"name": "Identifier",
"src": "4355:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2393,
"type": "uint256",
"value": "b"
},
"id": 2406,
"name": "Identifier",
"src": "4359:1:4"
}
],
"id": 2407,
"name": "BinaryOperation",
"src": "4355:5:4"
}
],
"id": 2408,
"name": "Return",
"src": "4348:12:4"
}
],
"id": 2409,
"name": "Block",
"src": "4284:83:4"
}
],
"id": 2410,
"name": "FunctionDefinition",
"src": "4217:150:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "mod",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2411,
"name": "StructuredDocumentation",
"src": "4373:442:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2432,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2412,
"name": "ElementaryTypeName",
"src": "4833:7:4"
}
],
"id": 2413,
"name": "VariableDeclaration",
"src": "4833:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2432,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2414,
"name": "ElementaryTypeName",
"src": "4844:7:4"
}
],
"id": 2415,
"name": "VariableDeclaration",
"src": "4844:9:4"
}
],
"id": 2416,
"name": "ParameterList",
"src": "4832:22:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2432,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2417,
"name": "ElementaryTypeName",
"src": "4878:7:4"
}
],
"id": 2418,
"name": "VariableDeclaration",
"src": "4878:7:4"
}
],
"id": 2419,
"name": "ParameterList",
"src": "4877:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832",
"typeString": "literal_string \"SafeMath: modulo by zero\""
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2420,
"name": "Identifier",
"src": "4897:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2415,
"type": "uint256",
"value": "b"
},
"id": 2421,
"name": "Identifier",
"src": "4905:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2422,
"name": "Literal",
"src": "4909:1:4"
}
],
"id": 2423,
"name": "BinaryOperation",
"src": "4905:5:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a206d6f64756c6f206279207a65726f",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: modulo by zero\"",
"value": "SafeMath: modulo by zero"
},
"id": 2424,
"name": "Literal",
"src": "4912:26:4"
}
],
"id": 2425,
"name": "FunctionCall",
"src": "4897:42:4"
}
],
"id": 2426,
"name": "ExpressionStatement",
"src": "4897:42:4"
},
{
"attributes": {
"functionReturnParameters": 2419
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "%",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2413,
"type": "uint256",
"value": "a"
},
"id": 2427,
"name": "Identifier",
"src": "4956:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2415,
"type": "uint256",
"value": "b"
},
"id": 2428,
"name": "Identifier",
"src": "4960:1:4"
}
],
"id": 2429,
"name": "BinaryOperation",
"src": "4956:5:4"
}
],
"id": 2430,
"name": "Return",
"src": "4949:12:4"
}
],
"id": 2431,
"name": "Block",
"src": "4887:81:4"
}
],
"id": 2432,
"name": "FunctionDefinition",
"src": "4820:148:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "sub",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2433,
"name": "StructuredDocumentation",
"src": "4974:453:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2456,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2434,
"name": "ElementaryTypeName",
"src": "5445:7:4"
}
],
"id": 2435,
"name": "VariableDeclaration",
"src": "5445:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2456,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2436,
"name": "ElementaryTypeName",
"src": "5456:7:4"
}
],
"id": 2437,
"name": "VariableDeclaration",
"src": "5456:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "errorMessage",
"overrides": null,
"scope": 2456,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string"
},
"id": 2438,
"name": "ElementaryTypeName",
"src": "5467:6:4"
}
],
"id": 2439,
"name": "VariableDeclaration",
"src": "5467:26:4"
}
],
"id": 2440,
"name": "ParameterList",
"src": "5444:50:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2456,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2441,
"name": "ElementaryTypeName",
"src": "5518:7:4"
}
],
"id": 2442,
"name": "VariableDeclaration",
"src": "5518:7:4"
}
],
"id": 2443,
"name": "ParameterList",
"src": "5517:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2444,
"name": "Identifier",
"src": "5537:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2437,
"type": "uint256",
"value": "b"
},
"id": 2445,
"name": "Identifier",
"src": "5545:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2435,
"type": "uint256",
"value": "a"
},
"id": 2446,
"name": "Identifier",
"src": "5550:1:4"
}
],
"id": 2447,
"name": "BinaryOperation",
"src": "5545:6:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2439,
"type": "string memory",
"value": "errorMessage"
},
"id": 2448,
"name": "Identifier",
"src": "5553:12:4"
}
],
"id": 2449,
"name": "FunctionCall",
"src": "5537:29:4"
}
],
"id": 2450,
"name": "ExpressionStatement",
"src": "5537:29:4"
},
{
"attributes": {
"functionReturnParameters": 2443
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2435,
"type": "uint256",
"value": "a"
},
"id": 2451,
"name": "Identifier",
"src": "5583:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2437,
"type": "uint256",
"value": "b"
},
"id": 2452,
"name": "Identifier",
"src": "5587:1:4"
}
],
"id": 2453,
"name": "BinaryOperation",
"src": "5583:5:4"
}
],
"id": 2454,
"name": "Return",
"src": "5576:12:4"
}
],
"id": 2455,
"name": "Block",
"src": "5527:68:4"
}
],
"id": 2456,
"name": "FunctionDefinition",
"src": "5432:163:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "div",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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 CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\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": 2457,
"name": "StructuredDocumentation",
"src": "5601:646:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2480,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2458,
"name": "ElementaryTypeName",
"src": "6265:7:4"
}
],
"id": 2459,
"name": "VariableDeclaration",
"src": "6265:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2480,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2460,
"name": "ElementaryTypeName",
"src": "6276:7:4"
}
],
"id": 2461,
"name": "VariableDeclaration",
"src": "6276:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "errorMessage",
"overrides": null,
"scope": 2480,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string"
},
"id": 2462,
"name": "ElementaryTypeName",
"src": "6287:6:4"
}
],
"id": 2463,
"name": "VariableDeclaration",
"src": "6287:26:4"
}
],
"id": 2464,
"name": "ParameterList",
"src": "6264:50:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2480,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2465,
"name": "ElementaryTypeName",
"src": "6338:7:4"
}
],
"id": 2466,
"name": "VariableDeclaration",
"src": "6338:7:4"
}
],
"id": 2467,
"name": "ParameterList",
"src": "6337:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2468,
"name": "Identifier",
"src": "6357:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2461,
"type": "uint256",
"value": "b"
},
"id": 2469,
"name": "Identifier",
"src": "6365:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2470,
"name": "Literal",
"src": "6369:1:4"
}
],
"id": 2471,
"name": "BinaryOperation",
"src": "6365:5:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2463,
"type": "string memory",
"value": "errorMessage"
},
"id": 2472,
"name": "Identifier",
"src": "6372:12:4"
}
],
"id": 2473,
"name": "FunctionCall",
"src": "6357:28:4"
}
],
"id": 2474,
"name": "ExpressionStatement",
"src": "6357:28:4"
},
{
"attributes": {
"functionReturnParameters": 2467
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2459,
"type": "uint256",
"value": "a"
},
"id": 2475,
"name": "Identifier",
"src": "6402:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2461,
"type": "uint256",
"value": "b"
},
"id": 2476,
"name": "Identifier",
"src": "6406:1:4"
}
],
"id": 2477,
"name": "BinaryOperation",
"src": "6402:5:4"
}
],
"id": 2478,
"name": "Return",
"src": "6395:12:4"
}
],
"id": 2479,
"name": "Block",
"src": "6347:67:4"
}
],
"id": 2480,
"name": "FunctionDefinition",
"src": "6252:162:4"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [null],
"name": "mod",
"overrides": null,
"scope": 2505,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"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": 2481,
"name": "StructuredDocumentation",
"src": "6420:635:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 2504,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2482,
"name": "ElementaryTypeName",
"src": "7073:7:4"
}
],
"id": 2483,
"name": "VariableDeclaration",
"src": "7073:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 2504,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2484,
"name": "ElementaryTypeName",
"src": "7084:7:4"
}
],
"id": 2485,
"name": "VariableDeclaration",
"src": "7084:9:4"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "errorMessage",
"overrides": null,
"scope": 2504,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string"
},
"id": 2486,
"name": "ElementaryTypeName",
"src": "7095:6:4"
}
],
"id": 2487,
"name": "VariableDeclaration",
"src": "7095:26:4"
}
],
"id": 2488,
"name": "ParameterList",
"src": "7072:50:4"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 2504,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 2489,
"name": "ElementaryTypeName",
"src": "7146:7:4"
}
],
"id": 2490,
"name": "VariableDeclaration",
"src": "7146:7:4"
}
],
"id": 2491,
"name": "ParameterList",
"src": "7145:9:4"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [null],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"overloadedDeclarations": [-18, -18],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 2492,
"name": "Identifier",
"src": "7165:7:4"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2485,
"type": "uint256",
"value": "b"
},
"id": 2493,
"name": "Identifier",
"src": "7173:1:4"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2494,
"name": "Literal",
"src": "7177:1:4"
}
],
"id": 2495,
"name": "BinaryOperation",
"src": "7173:5:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2487,
"type": "string memory",
"value": "errorMessage"
},
"id": 2496,
"name": "Identifier",
"src": "7180:12:4"
}
],
"id": 2497,
"name": "FunctionCall",
"src": "7165:28:4"
}
],
"id": 2498,
"name": "ExpressionStatement",
"src": "7165:28:4"
},
{
"attributes": {
"functionReturnParameters": 2491
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "%",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2483,
"type": "uint256",
"value": "a"
},
"id": 2499,
"name": "Identifier",
"src": "7210:1:4"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [null],
"referencedDeclaration": 2485,
"type": "uint256",
"value": "b"
},
"id": 2500,
"name": "Identifier",
"src": "7214:1:4"
}
],
"id": 2501,
"name": "BinaryOperation",
"src": "7210:5:4"
}
],
"id": 2502,
"name": "Return",
"src": "7203:12:4"
}
],
"id": 2503,
"name": "Block",
"src": "7155:67:4"
}
],
"id": 2504,
"name": "FunctionDefinition",
"src": "7060:162:4"
}
],
"id": 2505,
"name": "ContractDefinition",
"src": "630:6594:4"
}
],
"id": 2506,
"name": "SourceUnit",
"src": "33:7192:4"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.4",
"updatedAt": "2021-04-12T21:53:29.915Z",
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}