@ethsub/sol
Version:
ethsub contracts
1,235 lines • 53.8 kB
JSON
{
"contractName": "SafeMath",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. note that this is a stripped down version of open zeppelin's safemath https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/utils/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/utils/SafeMath.sol\":{\"keccak256\":\"0xd311c0b947fff45b8b2d2f3037daae297e25b7fc1e151adbb02137280c57f4af\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://908d68e7092418aae30047c58ecf489fde57da07caf04ee29252ba4e25009e0f\",\"dweb:/ipfs/QmYbufMHUrWWNttUVEESjAa2CTB45FkxLap4D6ZTHa4Bin\"]}},\"version\":1}",
"bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220e6eb03f04ae1fd42a02b64e22d4ec6ca8826d6dfed51452f24ef857bd2a568dd64736f6c634300060c0033",
"deployedBytecode": "0x6080604052600080fdfea2646970667358221220e6eb03f04ae1fd42a02b64e22d4ec6ca8826d6dfed51452f24ef857bd2a568dd64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "327:892:56:-:0;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "327:892:56:-:0;;;;;",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.12;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * note that this is a stripped down version of open zeppelin's safemath\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol\n */\n\ncontract SafeMath {\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 * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return _sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function _sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n}",
"sourcePath": "/home/sigo/w/deer/ethsub/packages/sol/contracts/utils/SafeMath.sol",
"ast": {
"absolutePath": "project:/contracts/utils/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
10390
]
},
"id": 10391,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10343,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "33:23:56"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 10344,
"nodeType": "StructuredDocumentation",
"src": "58:267:56",
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n note that this is a stripped down version of open zeppelin's safemath\n https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol"
},
"fullyImplemented": true,
"id": 10390,
"linearizedBaseContracts": [
10390
],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 10360,
"nodeType": "Block",
"src": "677:68:56",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 10355,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10347,
"src": "699:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 10356,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10349,
"src": "702:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"id": 10357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "705:32:56",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
},
"value": "SafeMath: subtraction overflow"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"id": 10354,
"name": "_sub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10389,
"src": "694:4:56",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,string memory) pure returns (uint256)"
}
},
"id": 10358,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "694:44:56",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 10353,
"id": 10359,
"nodeType": "Return",
"src": "687:51:56"
}
]
},
"documentation": {
"id": 10345,
"nodeType": "StructuredDocumentation",
"src": "352:253:56",
"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": 10361,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 10350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10347,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10361,
"src": "623:9:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10346,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "623:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10349,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10361,
"src": "634:9:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10348,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "634:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "622:22:56"
},
"returnParameters": {
"id": 10353,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10352,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10361,
"src": "668:7:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10351,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "668:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "667:9:56"
},
"scope": 10390,
"src": "610:135:56",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 10388,
"nodeType": "Block",
"src": "1125:92:56",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 10376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 10374,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10366,
"src": "1143:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 10375,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10364,
"src": "1148:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1143:6:56",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 10377,
"name": "errorMessage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10368,
"src": "1151:12:56",
"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": 10373,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1135:7:56",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 10378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1135:29:56",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 10379,
"nodeType": "ExpressionStatement",
"src": "1135:29:56"
},
{
"assignments": [
10381
],
"declarations": [
{
"constant": false,
"id": 10381,
"mutability": "mutable",
"name": "c",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10388,
"src": "1174:9:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10380,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1174:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 10385,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 10384,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 10382,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10364,
"src": "1186:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 10383,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10366,
"src": "1190:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1186:5:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1174:17:56"
},
{
"expression": {
"argumentTypes": null,
"id": 10386,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10381,
"src": "1209:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 10372,
"id": 10387,
"nodeType": "Return",
"src": "1202:8:56"
}
]
},
"documentation": {
"id": 10362,
"nodeType": "StructuredDocumentation",
"src": "751:273:56",
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 10389,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_sub",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 10369,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10364,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10389,
"src": "1043:9:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10363,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1043:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10366,
"mutability": "mutable",
"name": "b",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10389,
"src": "1054:9:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10365,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1054:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10368,
"mutability": "mutable",
"name": "errorMessage",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10389,
"src": "1065:26:56",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 10367,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1065:6:56",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1042:50:56"
},
"returnParameters": {
"id": 10372,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10371,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 10389,
"src": "1116:7:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10370,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1116:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1115:9:56"
},
"scope": 10390,
"src": "1029:188:56",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 10391,
"src": "327:892:56"
}
],
"src": "33:1186:56"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/utils/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
10390
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"0.6",
".12"
]
},
"id": 10343,
"name": "PragmaDirective",
"src": "33:23:56"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
10390
],
"name": "SafeMath",
"scope": 10391
},
"children": [
{
"attributes": {
"text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n note that this is a stripped down version of open zeppelin's safemath\n https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol"
},
"id": 10344,
"name": "StructuredDocumentation",
"src": "58:267:56"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "sub",
"overrides": null,
"scope": 10390,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 10345,
"name": "StructuredDocumentation",
"src": "352:253:56"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 10361,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10346,
"name": "ElementaryTypeName",
"src": "623:7:56"
}
],
"id": 10347,
"name": "VariableDeclaration",
"src": "623:9:56"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 10361,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10348,
"name": "ElementaryTypeName",
"src": "634:7:56"
}
],
"id": 10349,
"name": "VariableDeclaration",
"src": "634:9:56"
}
],
"id": 10350,
"name": "ParameterList",
"src": "622:22:56"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 10361,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10351,
"name": "ElementaryTypeName",
"src": "668:7:56"
}
],
"id": 10352,
"name": "VariableDeclaration",
"src": "668:7:56"
}
],
"id": 10353,
"name": "ParameterList",
"src": "667:9:56"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 10353
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862",
"typeString": "literal_string \"SafeMath: subtraction overflow\""
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10389,
"type": "function (uint256,uint256,string memory) pure returns (uint256)",
"value": "_sub"
},
"id": 10354,
"name": "Identifier",
"src": "694:4:56"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10347,
"type": "uint256",
"value": "a"
},
"id": 10355,
"name": "Identifier",
"src": "699:1:56"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10349,
"type": "uint256",
"value": "b"
},
"id": 10356,
"name": "Identifier",
"src": "702:1:56"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"SafeMath: subtraction overflow\"",
"value": "SafeMath: subtraction overflow"
},
"id": 10357,
"name": "Literal",
"src": "705:32:56"
}
],
"id": 10358,
"name": "FunctionCall",
"src": "694:44:56"
}
],
"id": 10359,
"name": "Return",
"src": "687:51:56"
}
],
"id": 10360,
"name": "Block",
"src": "677:68:56"
}
],
"id": 10361,
"name": "FunctionDefinition",
"src": "610:135:56"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "_sub",
"overrides": null,
"scope": 10390,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
},
"id": 10362,
"name": "StructuredDocumentation",
"src": "751:273:56"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "a",
"overrides": null,
"scope": 10389,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10363,
"name": "ElementaryTypeName",
"src": "1043:7:56"
}
],
"id": 10364,
"name": "VariableDeclaration",
"src": "1043:9:56"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "b",
"overrides": null,
"scope": 10389,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10365,
"name": "ElementaryTypeName",
"src": "1054:7:56"
}
],
"id": 10366,
"name": "VariableDeclaration",
"src": "1054:9:56"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "errorMessage",
"overrides": null,
"scope": 10389,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string"
},
"id": 10367,
"name": "ElementaryTypeName",
"src": "1065:6:56"
}
],
"id": 10368,
"name": "VariableDeclaration",
"src": "1065:26:56"
}
],
"id": 10369,
"name": "ParameterList",
"src": "1042:50:56"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"overrides": null,
"scope": 10389,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10370,
"name": "ElementaryTypeName",
"src": "1116:7:56"
}
],
"id": 10371,
"name": "VariableDeclaration",
"src": "1116:7:56"
}
],
"id": 10372,
"name": "ParameterList",
"src": "1115:9:56"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"type": "function (bool,string memory) pure",
"value": "require"
},
"id": 10373,
"name": "Identifier",
"src": "1135:7:56"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10366,
"type": "uint256",
"value": "b"
},
"id": 10374,
"name": "Identifier",
"src": "1143:1:56"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10364,
"type": "uint256",
"value": "a"
},
"id": 10375,
"name": "Identifier",
"src": "1148:1:56"
}
],
"id": 10376,
"name": "BinaryOperation",
"src": "1143:6:56"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10368,
"type": "string memory",
"value": "errorMessage"
},
"id": 10377,
"name": "Identifier",
"src": "1151:12:56"
}
],
"id": 10378,
"name": "FunctionCall",
"src": "1135:29:56"
}
],
"id": 10379,
"name": "ExpressionStatement",
"src": "1135:29:56"
},
{
"attributes": {
"assignments": [
10381
]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "c",
"overrides": null,
"scope": 10388,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 10380,
"name": "ElementaryTypeName",
"src": "1174:7:56"
}
],
"id": 10381,
"name": "VariableDeclaration",
"src": "1174:9:56"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstan