You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7538 lines
304 KiB
JSON

{
"contractName": "SafeMath",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations. NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler now has built in overflow checking.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://973868f808e88e21a1a0a01d4839314515ee337ad096286c88e41b74dcc11fc2\",\"dweb:/ipfs/QmfYuZxRfx2J2xdk4EXN7jKg4bUYEMTaYk9BAw9Bqn4o2Y\"]}},\"version\":1}",
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fd04830778f7e44e9648e7a1e743f996041ee587daa54484479e0358db132f7064736f6c634300080b0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fd04830778f7e44e9648e7a1e743f996041ee587daa54484479e0358db132f7064736f6c634300080b0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "467:6301:12:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;467:6301:12;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "467:6301:12:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n
"sourcePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
2168
]
},
"id": 2169,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1858,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "92:23:12"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SafeMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1859,
"nodeType": "StructuredDocumentation",
"src": "270:196:12",
"text": " @dev Wrappers over Solidity's arithmetic operations.\n NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n now has built in overflow checking."
},
"fullyImplemented": true,
"id": 2168,
"linearizedBaseContracts": [
2168
],
"name": "SafeMath",
"nameLocation": "475:8:12",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1890,
"nodeType": "Block",
"src": "702:140:12",
"statements": [
{
"id": 1889,
"nodeType": "UncheckedBlock",
"src": "712:124:12",
"statements": [
{
"assignments": [
1872
],
"declarations": [
{
"constant": false,
"id": 1872,
"mutability": "mutable",
"name": "c",
"nameLocation": "744:1:12",
"nodeType": "VariableDeclaration",
"scope": 1889,
"src": "736:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1871,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "736:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1876,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1875,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1873,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1862,
"src": "748:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 1874,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1864,
"src": "752:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "748:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "736:17:12"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1879,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1877,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1872,
"src": "771:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 1878,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1862,
"src": "775:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "771:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1884,
"nodeType": "IfStatement",
"src": "767:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1880,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "786:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1881,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "793:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1882,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "785:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1870,
"id": 1883,
"nodeType": "Return",
"src": "778:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1885,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "817:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 1886,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1872,
"src": "823:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1887,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "816:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1870,
"id": 1888,
"nodeType": "Return",
"src": "809:16:12"
}
]
}
]
},
"documentation": {
"id": 1860,
"nodeType": "StructuredDocumentation",
"src": "490:131:12",
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1891,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryAdd",
"nameLocation": "635:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1865,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1862,
"mutability": "mutable",
"name": "a",
"nameLocation": "650:1:12",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "642:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1861,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "642:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1864,
"mutability": "mutable",
"name": "b",
"nameLocation": "661:1:12",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "653:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1863,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "653:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "641:22:12"
},
"returnParameters": {
"id": 1870,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1867,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "687:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1866,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "687:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1869,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "693:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1868,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "693:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "686:15:12"
},
"scope": 2168,
"src": "626:216:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1918,
"nodeType": "Block",
"src": "1064:113:12",
"statements": [
{
"id": 1917,
"nodeType": "UncheckedBlock",
"src": "1074:97:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1905,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1903,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "1102:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 1904,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1894,
"src": "1106:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1102:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1910,
"nodeType": "IfStatement",
"src": "1098:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1906,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1907,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1124:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1908,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1116:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1902,
"id": 1909,
"nodeType": "Return",
"src": "1109:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1911,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1148:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1912,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1894,
"src": "1154:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 1913,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "1158:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1154:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1915,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1147:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1902,
"id": 1916,
"nodeType": "Return",
"src": "1140:20:12"
}
]
}
]
},
"documentation": {
"id": 1892,
"nodeType": "StructuredDocumentation",
"src": "848:135:12",
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1919,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "trySub",
"nameLocation": "997:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1897,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1894,
"mutability": "mutable",
"name": "a",
"nameLocation": "1012:1:12",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1004:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1004:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1896,
"mutability": "mutable",
"name": "b",
"nameLocation": "1023:1:12",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1015:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1895,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1015:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1003:22:12"
},
"returnParameters": {
"id": 1902,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1049:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1898,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1049:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1901,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1055:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1900,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1055:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1048:15:12"
},
"scope": 2168,
"src": "988:189:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1960,
"nodeType": "Block",
"src": "1401:417:12",
"statements": [
{
"id": 1959,
"nodeType": "UncheckedBlock",
"src": "1411:401:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1931,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1669:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 1932,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1674:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1669:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1938,
"nodeType": "IfStatement",
"src": "1665:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1934,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1685:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"hexValue": "30",
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1691:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1936,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1684:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1930,
"id": 1937,
"nodeType": "Return",
"src": "1677:16:12"
}
},
{
"assignments": [
1940
],
"declarations": [
{
"constant": false,
"id": 1940,
"mutability": "mutable",
"name": "c",
"nameLocation": "1715:1:12",
"nodeType": "VariableDeclaration",
"scope": 1959,
"src": "1707:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1939,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1707:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1944,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1943,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1941,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1719:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 1942,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1924,
"src": "1723:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1719:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1707:17:12"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1949,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1945,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1940,
"src": "1742:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 1946,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1746:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1948,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1924,
"src": "1751:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1954,
"nodeType": "IfStatement",
"src": "1738:33:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1950,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1762:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1951,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1769:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1952,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1761:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1930,
"id": 1953,
"nodeType": "Return",
"src": "1754:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1955,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1793:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 1956,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1940,
"src": "1799:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1957,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1792:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1930,
"id": 1958,
"nodeType": "Return",
"src": "1785:16:12"
}
]
}
]
},
"documentation": {
"id": 1920,
"nodeType": "StructuredDocumentation",
"src": "1183:137:12",
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1961,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMul",
"nameLocation": "1334:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1925,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1922,
"mutability": "mutable",
"name": "a",
"nameLocation": "1349:1:12",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1341:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1921,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1341:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1924,
"mutability": "mutable",
"name": "b",
"nameLocation": "1360:1:12",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1352:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1923,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1352:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1340:22:12"
},
"returnParameters": {
"id": 1930,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1927,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1386:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1926,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1386:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1929,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1392:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1928,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1392:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1385:15:12"
},
"scope": 2168,
"src": "1325:493:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1988,
"nodeType": "Block",
"src": "2043:114:12",
"statements": [
{
"id": 1987,
"nodeType": "UncheckedBlock",
"src": "2053:98:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1975,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1973,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1966,
"src": "2081:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 1974,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2086:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2081:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1980,
"nodeType": "IfStatement",
"src": "2077:29:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1976,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2097:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1977,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2104:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1978,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2096:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1972,
"id": 1979,
"nodeType": "Return",
"src": "2089:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1981,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2128:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1984,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1982,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1964,
"src": "2134:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 1983,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1966,
"src": "2138:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2134:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1985,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2127:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1972,
"id": 1986,
"nodeType": "Return",
"src": "2120:20:12"
}
]
}
]
},
"documentation": {
"id": 1962,
"nodeType": "StructuredDocumentation",
"src": "1824:138:12",
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 1989,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryDiv",
"nameLocation": "1976:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1964,
"mutability": "mutable",
"name": "a",
"nameLocation": "1991:1:12",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "1983:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1963,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1983:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1966,
"mutability": "mutable",
"name": "b",
"nameLocation": "2002:1:12",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "1994:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1965,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1982:22:12"
},
"returnParameters": {
"id": 1972,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1969,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "2028:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1968,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2028:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1971,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "2034:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1970,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2034:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2027:15:12"
},
"scope": 2168,
"src": "1967:190:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2016,
"nodeType": "Block",
"src": "2392:114:12",
"statements": [
{
"id": 2015,
"nodeType": "UncheckedBlock",
"src": "2402:98:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2001,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1994,
"src": "2430:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 2002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2435:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2430:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2008,
"nodeType": "IfStatement",
"src": "2426:29:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2446:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 2005,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2453:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2006,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2445:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2000,
"id": 2007,
"nodeType": "Return",
"src": "2438:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 2009,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2477:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2010,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1992,
"src": "2483:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2011,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1994,
"src": "2487:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2483:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2013,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2476:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2000,
"id": 2014,
"nodeType": "Return",
"src": "2469:20:12"
}
]
}
]
},
"documentation": {
"id": 1990,
"nodeType": "StructuredDocumentation",
"src": "2163:148:12",
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2017,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMod",
"nameLocation": "2325:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1995,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1992,
"mutability": "mutable",
"name": "a",
"nameLocation": "2340:1:12",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2332:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1991,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2332:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1994,
"mutability": "mutable",
"name": "b",
"nameLocation": "2351:1:12",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2343:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1993,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2343:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2331:22:12"
},
"returnParameters": {
"id": 2000,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1997,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2377:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1996,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2377:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1999,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2383:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1998,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2383:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2376:15:12"
},
"scope": 2168,
"src": "2316:190:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2031,
"nodeType": "Block",
"src": "2808:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2029,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2027,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2020,
"src": "2825:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 2028,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2022,
"src": "2829:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2825:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2026,
"id": 2030,
"nodeType": "Return",
"src": "2818:12:12"
}
]
},
"documentation": {
"id": 2018,
"nodeType": "StructuredDocumentation",
"src": "2512:224:12",
"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": 2032,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "2750:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2023,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2020,
"mutability": "mutable",
"name": "a",
"nameLocation": "2762:1:12",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2754:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2019,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2754:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2022,
"mutability": "mutable",
"name": "b",
"nameLocation": "2773:1:12",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2765:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2021,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2765:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2753:22:12"
},
"returnParameters": {
"id": 2026,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2025,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2799:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2024,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2799:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2798:9:12"
},
"scope": 2168,
"src": "2741:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2046,
"nodeType": "Block",
"src": "3175:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2044,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2042,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2035,
"src": "3192:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 2043,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2037,
"src": "3196:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3192:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2041,
"id": 2045,
"nodeType": "Return",
"src": "3185:12:12"
}
]
},
"documentation": {
"id": 2033,
"nodeType": "StructuredDocumentation",
"src": "2843:260:12",
"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": 2047,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "3117:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2038,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2035,
"mutability": "mutable",
"name": "a",
"nameLocation": "3129:1:12",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3121:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2034,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3121:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2037,
"mutability": "mutable",
"name": "b",
"nameLocation": "3140:1:12",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3132:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2036,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3132:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3120:22:12"
},
"returnParameters": {
"id": 2041,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2040,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3166:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2039,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3166:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3165:9:12"
},
"scope": 2168,
"src": "3108:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2061,
"nodeType": "Block",
"src": "3518:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2057,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3535:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 2058,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2052,
"src": "3539:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3535:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2056,
"id": 2060,
"nodeType": "Return",
"src": "3528:12:12"
}
]
},
"documentation": {
"id": 2048,
"nodeType": "StructuredDocumentation",
"src": "3210:236:12",
"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": 2062,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nameLocation": "3460:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2053,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2050,
"mutability": "mutable",
"name": "a",
"nameLocation": "3472:1:12",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3464:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2049,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3464:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2052,
"mutability": "mutable",
"name": "b",
"nameLocation": "3483:1:12",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3475:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2051,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3475:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3463:22:12"
},
"returnParameters": {
"id": 2056,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2055,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3509:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2054,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3509:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3508:9:12"
},
"scope": 2168,
"src": "3451:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2076,
"nodeType": "Block",
"src": "3903:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2072,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "3920:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 2073,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2067,
"src": "3924:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3920:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2071,
"id": 2075,
"nodeType": "Return",
"src": "3913:12:12"
}
]
},
"documentation": {
"id": 2063,
"nodeType": "StructuredDocumentation",
"src": "3553:278:12",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator.\n Requirements:\n - The divisor cannot be zero."
},
"id": 2077,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "3845:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2068,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2065,
"mutability": "mutable",
"name": "a",
"nameLocation": "3857:1:12",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3849:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2064,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3849:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2067,
"mutability": "mutable",
"name": "b",
"nameLocation": "3868:1:12",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3860:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2066,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3860:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3848:22:12"
},
"returnParameters": {
"id": 2071,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2070,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3894:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2069,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3894:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3893:9:12"
},
"scope": 2168,
"src": "3836:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2091,
"nodeType": "Block",
"src": "4452:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2087,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2080,
"src": "4469:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2088,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2082,
"src": "4473:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4469:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2086,
"id": 2090,
"nodeType": "Return",
"src": "4462:12:12"
}
]
},
"documentation": {
"id": 2078,
"nodeType": "StructuredDocumentation",
"src": "3938:442:12",
"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": 2092,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "4394:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2083,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2080,
"mutability": "mutable",
"name": "a",
"nameLocation": "4406:1:12",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4398:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2079,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4398:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2082,
"mutability": "mutable",
"name": "b",
"nameLocation": "4417:1:12",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4409:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2081,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4409:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4397:22:12"
},
"returnParameters": {
"id": 2086,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2085,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4443:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2084,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4443:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4442:9:12"
},
"scope": 2168,
"src": "4385:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2116,
"nodeType": "Block",
"src": "5070:106:12",
"statements": [
{
"id": 2115,
"nodeType": "UncheckedBlock",
"src": "5080:90:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2105,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2097,
"src": "5112:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 2106,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "5117:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5112:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2108,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2099,
"src": "5120:12:12",
"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": 2104,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5104:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5104:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2110,
"nodeType": "ExpressionStatement",
"src": "5104:29:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2113,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2111,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "5154:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 2112,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2097,
"src": "5158:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5154:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2103,
"id": 2114,
"nodeType": "Return",
"src": "5147:12:12"
}
]
}
]
},
"documentation": {
"id": 2093,
"nodeType": "StructuredDocumentation",
"src": "4487:453:12",
"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": 2117,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "4954:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2095,
"mutability": "mutable",
"name": "a",
"nameLocation": "4975:1:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "4967:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2094,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4967:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2097,
"mutability": "mutable",
"name": "b",
"nameLocation": "4994:1:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "4986:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2096,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4986:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2099,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5019:12:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "5005:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2098,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5005:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "4957:80:12"
},
"returnParameters": {
"id": 2103,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2102,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "5061:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2101,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5061:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5060:9:12"
},
"scope": 2168,
"src": "4945:231:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2141,
"nodeType": "Block",
"src": "5785:105:12",
"statements": [
{
"id": 2140,
"nodeType": "UncheckedBlock",
"src": "5795:89:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2130,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2122,
"src": "5827:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 2131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5831:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5827:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2133,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "5834:12:12",
"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": 2129,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5819:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5819:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2135,
"nodeType": "ExpressionStatement",
"src": "5819:28:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2136,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2120,
"src": "5868:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 2137,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2122,
"src": "5872:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5868:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2128,
"id": 2139,
"nodeType": "Return",
"src": "5861:12:12"
}
]
}
]
},
"documentation": {
"id": 2118,
"nodeType": "StructuredDocumentation",
"src": "5182:473:12",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 2142,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "5669:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2125,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2120,
"mutability": "mutable",
"name": "a",
"nameLocation": "5690:1:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5682:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2119,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5682:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2122,
"mutability": "mutable",
"name": "b",
"nameLocation": "5709:1:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5701:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2121,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5701:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2124,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5734:12:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5720:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2123,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5720:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "5672:80:12"
},
"returnParameters": {
"id": 2128,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2127,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5776:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2126,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5776:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5775:9:12"
},
"scope": 2168,
"src": "5660:230:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2166,
"nodeType": "Block",
"src": "6661:105:12",
"statements": [
{
"id": 2165,
"nodeType": "UncheckedBlock",
"src": "6671:89:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2155,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "6703:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 2156,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6707:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6703:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2158,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2149,
"src": "6710:12:12",
"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": 2154,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6695:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6695:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2160,
"nodeType": "ExpressionStatement",
"src": "6695:28:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2161,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2145,
"src": "6744:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2162,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "6748:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6744:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2153,
"id": 2164,
"nodeType": "Return",
"src": "6737:12:12"
}
]
}
]
},
"documentation": {
"id": 2143,
"nodeType": "StructuredDocumentation",
"src": "5896:635:12",
"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": 2167,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "6545:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2150,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2145,
"mutability": "mutable",
"name": "a",
"nameLocation": "6566:1:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6558:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2144,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6558:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2147,
"mutability": "mutable",
"name": "b",
"nameLocation": "6585:1:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6577:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2146,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6577:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2149,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "6610:12:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6596:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2148,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6596:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "6548:80:12"
},
"returnParameters": {
"id": 2153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2152,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6652:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2151,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6652:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6651:9:12"
},
"scope": 2168,
"src": "6536:230:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 2169,
"src": "467:6301:12",
"usedErrors": []
}
],
"src": "92:6677:12"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
2168
]
},
"id": 2169,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1858,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "92:23:12"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "SafeMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 1859,
"nodeType": "StructuredDocumentation",
"src": "270:196:12",
"text": " @dev Wrappers over Solidity's arithmetic operations.\n NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n now has built in overflow checking."
},
"fullyImplemented": true,
"id": 2168,
"linearizedBaseContracts": [
2168
],
"name": "SafeMath",
"nameLocation": "475:8:12",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1890,
"nodeType": "Block",
"src": "702:140:12",
"statements": [
{
"id": 1889,
"nodeType": "UncheckedBlock",
"src": "712:124:12",
"statements": [
{
"assignments": [
1872
],
"declarations": [
{
"constant": false,
"id": 1872,
"mutability": "mutable",
"name": "c",
"nameLocation": "744:1:12",
"nodeType": "VariableDeclaration",
"scope": 1889,
"src": "736:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1871,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "736:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1876,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1875,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1873,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1862,
"src": "748:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 1874,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1864,
"src": "752:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "748:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "736:17:12"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1879,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1877,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1872,
"src": "771:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 1878,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1862,
"src": "775:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "771:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1884,
"nodeType": "IfStatement",
"src": "767:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1880,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "786:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1881,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "793:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1882,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "785:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1870,
"id": 1883,
"nodeType": "Return",
"src": "778:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1885,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "817:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 1886,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1872,
"src": "823:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1887,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "816:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1870,
"id": 1888,
"nodeType": "Return",
"src": "809:16:12"
}
]
}
]
},
"documentation": {
"id": 1860,
"nodeType": "StructuredDocumentation",
"src": "490:131:12",
"text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1891,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryAdd",
"nameLocation": "635:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1865,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1862,
"mutability": "mutable",
"name": "a",
"nameLocation": "650:1:12",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "642:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1861,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "642:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1864,
"mutability": "mutable",
"name": "b",
"nameLocation": "661:1:12",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "653:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1863,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "653:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "641:22:12"
},
"returnParameters": {
"id": 1870,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1867,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "687:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1866,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "687:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1869,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1891,
"src": "693:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1868,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "693:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "686:15:12"
},
"scope": 2168,
"src": "626:216:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1918,
"nodeType": "Block",
"src": "1064:113:12",
"statements": [
{
"id": 1917,
"nodeType": "UncheckedBlock",
"src": "1074:97:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1905,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1903,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "1102:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"id": 1904,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1894,
"src": "1106:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1102:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1910,
"nodeType": "IfStatement",
"src": "1098:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1906,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1117:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1907,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1124:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1908,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1116:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1902,
"id": 1909,
"nodeType": "Return",
"src": "1109:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1911,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1148:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1912,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1894,
"src": "1154:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 1913,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "1158:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1154:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1915,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1147:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1902,
"id": 1916,
"nodeType": "Return",
"src": "1140:20:12"
}
]
}
]
},
"documentation": {
"id": 1892,
"nodeType": "StructuredDocumentation",
"src": "848:135:12",
"text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1919,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "trySub",
"nameLocation": "997:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1897,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1894,
"mutability": "mutable",
"name": "a",
"nameLocation": "1012:1:12",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1004:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1004:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1896,
"mutability": "mutable",
"name": "b",
"nameLocation": "1023:1:12",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1015:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1895,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1015:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1003:22:12"
},
"returnParameters": {
"id": 1902,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1049:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1898,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1049:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1901,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1919,
"src": "1055:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1900,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1055:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1048:15:12"
},
"scope": 2168,
"src": "988:189:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1960,
"nodeType": "Block",
"src": "1401:417:12",
"statements": [
{
"id": 1959,
"nodeType": "UncheckedBlock",
"src": "1411:401:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1931,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1669:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 1932,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1674:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1669:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1938,
"nodeType": "IfStatement",
"src": "1665:28:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1934,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1685:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"hexValue": "30",
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1691:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1936,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1684:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1930,
"id": 1937,
"nodeType": "Return",
"src": "1677:16:12"
}
},
{
"assignments": [
1940
],
"declarations": [
{
"constant": false,
"id": 1940,
"mutability": "mutable",
"name": "c",
"nameLocation": "1715:1:12",
"nodeType": "VariableDeclaration",
"scope": 1959,
"src": "1707:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1939,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1707:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 1944,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1943,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1941,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1719:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 1942,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1924,
"src": "1723:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1719:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1707:17:12"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1949,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1945,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1940,
"src": "1742:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 1946,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1922,
"src": "1746:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 1948,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1924,
"src": "1751:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1742:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1954,
"nodeType": "IfStatement",
"src": "1738:33:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1950,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1762:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1951,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1769:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1952,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1761:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1930,
"id": 1953,
"nodeType": "Return",
"src": "1754:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1955,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1793:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 1956,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1940,
"src": "1799:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1957,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1792:9:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1930,
"id": 1958,
"nodeType": "Return",
"src": "1785:16:12"
}
]
}
]
},
"documentation": {
"id": 1920,
"nodeType": "StructuredDocumentation",
"src": "1183:137:12",
"text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._"
},
"id": 1961,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMul",
"nameLocation": "1334:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1925,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1922,
"mutability": "mutable",
"name": "a",
"nameLocation": "1349:1:12",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1341:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1921,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1341:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1924,
"mutability": "mutable",
"name": "b",
"nameLocation": "1360:1:12",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1352:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1923,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1352:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1340:22:12"
},
"returnParameters": {
"id": 1930,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1927,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1386:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1926,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1386:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1929,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1961,
"src": "1392:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1928,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1392:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1385:15:12"
},
"scope": 2168,
"src": "1325:493:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1988,
"nodeType": "Block",
"src": "2043:114:12",
"statements": [
{
"id": 1987,
"nodeType": "UncheckedBlock",
"src": "2053:98:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1975,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1973,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1966,
"src": "2081:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 1974,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2086:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2081:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1980,
"nodeType": "IfStatement",
"src": "2077:29:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 1976,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2097:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 1977,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2104:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 1978,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2096:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 1972,
"id": 1979,
"nodeType": "Return",
"src": "2089:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 1981,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2128:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1984,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 1982,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1964,
"src": "2134:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 1983,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1966,
"src": "2138:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2134:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1985,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2127:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 1972,
"id": 1986,
"nodeType": "Return",
"src": "2120:20:12"
}
]
}
]
},
"documentation": {
"id": 1962,
"nodeType": "StructuredDocumentation",
"src": "1824:138:12",
"text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 1989,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryDiv",
"nameLocation": "1976:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1964,
"mutability": "mutable",
"name": "a",
"nameLocation": "1991:1:12",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "1983:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1963,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1983:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1966,
"mutability": "mutable",
"name": "b",
"nameLocation": "2002:1:12",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "1994:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1965,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1982:22:12"
},
"returnParameters": {
"id": 1972,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1969,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "2028:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1968,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2028:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1971,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 1989,
"src": "2034:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1970,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2034:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2027:15:12"
},
"scope": 2168,
"src": "1967:190:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2016,
"nodeType": "Block",
"src": "2392:114:12",
"statements": [
{
"id": 2015,
"nodeType": "UncheckedBlock",
"src": "2402:98:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2001,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1994,
"src": "2430:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 2002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2435:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2430:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2008,
"nodeType": "IfStatement",
"src": "2426:29:12",
"trueBody": {
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2446:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"hexValue": "30",
"id": 2005,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2453:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"id": 2006,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2445:10:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$",
"typeString": "tuple(bool,int_const 0)"
}
},
"functionReturnParameters": 2000,
"id": 2007,
"nodeType": "Return",
"src": "2438:17:12"
}
},
{
"expression": {
"components": [
{
"hexValue": "74727565",
"id": 2009,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2477:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2010,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1992,
"src": "2483:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2011,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1994,
"src": "2487:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2483:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2013,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2476:13:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
"typeString": "tuple(bool,uint256)"
}
},
"functionReturnParameters": 2000,
"id": 2014,
"nodeType": "Return",
"src": "2469:20:12"
}
]
}
]
},
"documentation": {
"id": 1990,
"nodeType": "StructuredDocumentation",
"src": "2163:148:12",
"text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._"
},
"id": 2017,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "tryMod",
"nameLocation": "2325:6:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1995,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1992,
"mutability": "mutable",
"name": "a",
"nameLocation": "2340:1:12",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2332:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1991,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2332:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1994,
"mutability": "mutable",
"name": "b",
"nameLocation": "2351:1:12",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2343:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1993,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2343:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2331:22:12"
},
"returnParameters": {
"id": 2000,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1997,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2377:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1996,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2377:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1999,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2017,
"src": "2383:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1998,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2383:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2376:15:12"
},
"scope": 2168,
"src": "2316:190:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2031,
"nodeType": "Block",
"src": "2808:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2029,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2027,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2020,
"src": "2825:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 2028,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2022,
"src": "2829:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2825:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2026,
"id": 2030,
"nodeType": "Return",
"src": "2818:12:12"
}
]
},
"documentation": {
"id": 2018,
"nodeType": "StructuredDocumentation",
"src": "2512:224:12",
"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": 2032,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "2750:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2023,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2020,
"mutability": "mutable",
"name": "a",
"nameLocation": "2762:1:12",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2754:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2019,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2754:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2022,
"mutability": "mutable",
"name": "b",
"nameLocation": "2773:1:12",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2765:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2021,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2765:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2753:22:12"
},
"returnParameters": {
"id": 2026,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2025,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2032,
"src": "2799:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2024,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2799:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2798:9:12"
},
"scope": 2168,
"src": "2741:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2046,
"nodeType": "Block",
"src": "3175:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2044,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2042,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2035,
"src": "3192:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 2043,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2037,
"src": "3196:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3192:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2041,
"id": 2045,
"nodeType": "Return",
"src": "3185:12:12"
}
]
},
"documentation": {
"id": 2033,
"nodeType": "StructuredDocumentation",
"src": "2843:260:12",
"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": 2047,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "3117:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2038,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2035,
"mutability": "mutable",
"name": "a",
"nameLocation": "3129:1:12",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3121:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2034,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3121:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2037,
"mutability": "mutable",
"name": "b",
"nameLocation": "3140:1:12",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3132:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2036,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3132:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3120:22:12"
},
"returnParameters": {
"id": 2041,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2040,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2047,
"src": "3166:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2039,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3166:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3165:9:12"
},
"scope": 2168,
"src": "3108:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2061,
"nodeType": "Block",
"src": "3518:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2057,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3535:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 2058,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2052,
"src": "3539:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3535:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2056,
"id": 2060,
"nodeType": "Return",
"src": "3528:12:12"
}
]
},
"documentation": {
"id": 2048,
"nodeType": "StructuredDocumentation",
"src": "3210:236:12",
"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": 2062,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nameLocation": "3460:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2053,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2050,
"mutability": "mutable",
"name": "a",
"nameLocation": "3472:1:12",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3464:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2049,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3464:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2052,
"mutability": "mutable",
"name": "b",
"nameLocation": "3483:1:12",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3475:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2051,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3475:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3463:22:12"
},
"returnParameters": {
"id": 2056,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2055,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2062,
"src": "3509:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2054,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3509:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3508:9:12"
},
"scope": 2168,
"src": "3451:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2076,
"nodeType": "Block",
"src": "3903:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2072,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "3920:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 2073,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2067,
"src": "3924:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3920:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2071,
"id": 2075,
"nodeType": "Return",
"src": "3913:12:12"
}
]
},
"documentation": {
"id": 2063,
"nodeType": "StructuredDocumentation",
"src": "3553:278:12",
"text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator.\n Requirements:\n - The divisor cannot be zero."
},
"id": 2077,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "3845:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2068,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2065,
"mutability": "mutable",
"name": "a",
"nameLocation": "3857:1:12",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3849:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2064,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3849:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2067,
"mutability": "mutable",
"name": "b",
"nameLocation": "3868:1:12",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3860:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2066,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3860:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3848:22:12"
},
"returnParameters": {
"id": 2071,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2070,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2077,
"src": "3894:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2069,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3894:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "3893:9:12"
},
"scope": 2168,
"src": "3836:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2091,
"nodeType": "Block",
"src": "4452:29:12",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2087,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2080,
"src": "4469:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2088,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2082,
"src": "4473:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4469:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2086,
"id": 2090,
"nodeType": "Return",
"src": "4462:12:12"
}
]
},
"documentation": {
"id": 2078,
"nodeType": "StructuredDocumentation",
"src": "3938:442:12",
"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": 2092,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "4394:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2083,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2080,
"mutability": "mutable",
"name": "a",
"nameLocation": "4406:1:12",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4398:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2079,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4398:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2082,
"mutability": "mutable",
"name": "b",
"nameLocation": "4417:1:12",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4409:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2081,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4409:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4397:22:12"
},
"returnParameters": {
"id": 2086,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2085,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2092,
"src": "4443:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2084,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4443:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "4442:9:12"
},
"scope": 2168,
"src": "4385:96:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2116,
"nodeType": "Block",
"src": "5070:106:12",
"statements": [
{
"id": 2115,
"nodeType": "UncheckedBlock",
"src": "5080:90:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2105,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2097,
"src": "5112:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 2106,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "5117:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5112:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2108,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2099,
"src": "5120:12:12",
"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": 2104,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5104:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5104:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2110,
"nodeType": "ExpressionStatement",
"src": "5104:29:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2113,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2111,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "5154:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 2112,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2097,
"src": "5158:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5154:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2103,
"id": 2114,
"nodeType": "Return",
"src": "5147:12:12"
}
]
}
]
},
"documentation": {
"id": 2093,
"nodeType": "StructuredDocumentation",
"src": "4487:453:12",
"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": 2117,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "4954:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2095,
"mutability": "mutable",
"name": "a",
"nameLocation": "4975:1:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "4967:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2094,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4967:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2097,
"mutability": "mutable",
"name": "b",
"nameLocation": "4994:1:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "4986:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2096,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4986:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2099,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5019:12:12",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "5005:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2098,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5005:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "4957:80:12"
},
"returnParameters": {
"id": 2103,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2102,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2117,
"src": "5061:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2101,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5061:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5060:9:12"
},
"scope": 2168,
"src": "4945:231:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2141,
"nodeType": "Block",
"src": "5785:105:12",
"statements": [
{
"id": 2140,
"nodeType": "UncheckedBlock",
"src": "5795:89:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2130,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2122,
"src": "5827:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 2131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5831:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5827:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2133,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "5834:12:12",
"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": 2129,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "5819:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5819:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2135,
"nodeType": "ExpressionStatement",
"src": "5819:28:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2136,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2120,
"src": "5868:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 2137,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2122,
"src": "5872:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5868:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2128,
"id": 2139,
"nodeType": "Return",
"src": "5861:12:12"
}
]
}
]
},
"documentation": {
"id": 2118,
"nodeType": "StructuredDocumentation",
"src": "5182:473:12",
"text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero."
},
"id": 2142,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "div",
"nameLocation": "5669:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2125,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2120,
"mutability": "mutable",
"name": "a",
"nameLocation": "5690:1:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5682:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2119,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5682:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2122,
"mutability": "mutable",
"name": "b",
"nameLocation": "5709:1:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5701:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2121,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5701:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2124,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "5734:12:12",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5720:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2123,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "5720:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "5672:80:12"
},
"returnParameters": {
"id": 2128,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2127,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2142,
"src": "5776:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2126,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5776:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5775:9:12"
},
"scope": 2168,
"src": "5660:230:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 2166,
"nodeType": "Block",
"src": "6661:105:12",
"statements": [
{
"id": 2165,
"nodeType": "UncheckedBlock",
"src": "6671:89:12",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2155,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "6703:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 2156,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6707:1:12",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "6703:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"id": 2158,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2149,
"src": "6710:12:12",
"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": 2154,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "6695:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6695:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2160,
"nodeType": "ExpressionStatement",
"src": "6695:28:12"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 2161,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2145,
"src": "6744:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 2162,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2147,
"src": "6748:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6744:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2153,
"id": 2164,
"nodeType": "Return",
"src": "6737:12:12"
}
]
}
]
},
"documentation": {
"id": 2143,
"nodeType": "StructuredDocumentation",
"src": "5896:635:12",
"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": 2167,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mod",
"nameLocation": "6545:3:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2150,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2145,
"mutability": "mutable",
"name": "a",
"nameLocation": "6566:1:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6558:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2144,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6558:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2147,
"mutability": "mutable",
"name": "b",
"nameLocation": "6585:1:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6577:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2146,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6577:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2149,
"mutability": "mutable",
"name": "errorMessage",
"nameLocation": "6610:12:12",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6596:26:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2148,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "6596:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "6548:80:12"
},
"returnParameters": {
"id": 2153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2152,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2167,
"src": "6652:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2151,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6652:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "6651:9:12"
},
"scope": 2168,
"src": "6536:230:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 2169,
"src": "467:6301:12",
"usedErrors": []
}
],
"src": "92:6677:12"
},
"compiler": {
"name": "solc",
"version": "0.8.11+commit.d7f03943.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2021-12-29T22:14:28.602Z",
"devdoc": {
"details": "Wrappers over Solidity's arithmetic operations. NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler now has built in overflow checking.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}