open-dex/contracts/libraries/artifacts/build-info/698eb999a99b64fb7cca953dc5950434.json
2024-08-24 12:08:46 +03:00

2120 lines
68 KiB
JSON

{
"id": "698eb999a99b64fb7cca953dc5950434",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/libraries/LowGasSafeMath.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\r\npragma solidity >=0.7.0;\r\n\r\n/// @title Optimized overflow and underflow safe math operations\r\n/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost\r\nlibrary LowGasSafeMath {\r\n /// @notice Returns x + y, reverts if sum overflows uint256\r\n /// @param x The augend\r\n /// @param y The addend\r\n /// @return z The sum of x and y\r\n function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\r\n require((z = x + y) >= x);\r\n }\r\n\r\n /// @notice Returns x - y, reverts if underflows\r\n /// @param x The minuend\r\n /// @param y The subtrahend\r\n /// @return z The difference of x and y\r\n function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\r\n require((z = x - y) <= x);\r\n }\r\n\r\n /// @notice Returns x * y, reverts if overflows\r\n /// @param x The multiplicand\r\n /// @param y The multiplier\r\n /// @return z The product of x and y\r\n function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {\r\n require(x == 0 || (z = x * y) / x == y);\r\n }\r\n\r\n /// @notice Returns x + y, reverts if overflows or underflows\r\n /// @param x The augend\r\n /// @param y The addend\r\n /// @return z The sum of x and y\r\n function add(int256 x, int256 y) internal pure returns (int256 z) {\r\n require((z = x + y) >= x == (y >= 0));\r\n }\r\n\r\n /// @notice Returns x - y, reverts if overflows or underflows\r\n /// @param x The minuend\r\n /// @param y The subtrahend\r\n /// @return z The difference of x and y\r\n function sub(int256 x, int256 y) internal pure returns (int256 z) {\r\n require((z = x - y) <= x == (y >= 0));\r\n }\r\n}\r\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"contracts/libraries/LowGasSafeMath.sol": {
"LowGasSafeMath": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Optimized overflow and underflow safe math operations",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/libraries/LowGasSafeMath.sol\":254:1740 library LowGasSafeMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/libraries/LowGasSafeMath.sol\":254:1740 library LowGasSafeMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212204748b0fa79e5a6ed65bf321453a7079942acf9907810dc2c617cc57eda5d70de64736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204748b0fa79e5a6ed65bf321453a7079942acf9907810dc2c617cc57eda5d70de64736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFBALANCE BASEFEE 0xB0 STATICCALL PUSH26 0xE5A6ED65BF321453A7079942ACF9907810DC2C617CC57EDA5D70 0xDE PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "254:1486:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204748b0fa79e5a6ed65bf321453a7079942acf9907810dc2c617cc57eda5d70de64736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFBALANCE BASEFEE 0xB0 STATICCALL PUSH26 0xE5A6ED65BF321453A7079942ACF9907810DC2C617CC57EDA5D70 0xDE PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
"sourceMap": "254:1486:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"add(int256,int256)": "infinite",
"add(uint256,uint256)": "infinite",
"mul(uint256,uint256)": "infinite",
"sub(int256,int256)": "infinite",
"sub(uint256,uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 254,
"end": 1740,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 254,
"end": 1740,
"name": "DUP3",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "DUP3",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "DUP3",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "CODECOPY",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "DUP1",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "MLOAD",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "BYTE",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 254,
"end": 1740,
"name": "EQ",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 254,
"end": 1740,
"name": "JUMPI",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "MSTORE",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 254,
"end": 1740,
"name": "MSTORE",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "REVERT",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 254,
"end": 1740,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "ADDRESS",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "MSTORE",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 254,
"end": 1740,
"name": "DUP2",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "MSTORE8",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "DUP3",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "DUP2",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212204748b0fa79e5a6ed65bf321453a7079942acf9907810dc2c617cc57eda5d70de64736f6c634300081a0033",
".code": [
{
"begin": 254,
"end": 1740,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "ADDRESS",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "EQ",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 254,
"end": 1740,
"name": "MSTORE",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 254,
"end": 1740,
"name": "DUP1",
"source": 0
},
{
"begin": 254,
"end": 1740,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"contracts/libraries/LowGasSafeMath.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Optimized overflow and underflow safe math operations\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/libraries/LowGasSafeMath.sol\":\"LowGasSafeMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/LowGasSafeMath.sol\":{\"keccak256\":\"0xace198277a90cabd10817b1226718204a297e3ff70a9937b6a4bea60e7978e1f\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e5a79a038cd3b2d5475d2a6ff5d46f28e0d65d1c2cce085d8bf100d7e026a9fa\",\"dweb:/ipfs/QmVDAK77ydqRK74AFV14Z5uEtdoZoKvQNyh2z4C2RNFf7V\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"notice": "Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost",
"version": 1
}
}
}
},
"sources": {
"contracts/libraries/LowGasSafeMath.sol": {
"ast": {
"absolutePath": "contracts/libraries/LowGasSafeMath.sol",
"exportedSymbols": {
"LowGasSafeMath": [
129
]
},
"id": 130,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "46:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "LowGasSafeMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "74:180:0",
"text": "@title Optimized overflow and underflow safe math operations\n @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost"
},
"fullyImplemented": true,
"id": 129,
"linearizedBaseContracts": [
129
],
"name": "LowGasSafeMath",
"nameLocation": "262:14:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 23,
"nodeType": "Block",
"src": "514:44:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"id": 17,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 13,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "534:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 14,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "538:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 15,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "542:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "538:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "534:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 18,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "533:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 19,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "548:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "533:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 12,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "525:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "525:25:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22,
"nodeType": "ExpressionStatement",
"src": "525:25:0"
}
]
},
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "284:155:0",
"text": "@notice Returns x + y, reverts if sum overflows uint256\n @param x The augend\n @param y The addend\n @return z The sum of x and y"
},
"id": 24,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "454:3:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nameLocation": "466:1:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "458:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "458:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "y",
"nameLocation": "477:1:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "469:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "469:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "457:22:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "z",
"nameLocation": "511:1:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "503:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "503:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "502:11:0"
},
"scope": 129,
"src": "445:113:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 45,
"nodeType": "Block",
"src": "797:44:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 35,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 32,
"src": "817:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 36,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27,
"src": "821:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 37,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "825:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "821:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "817:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 40,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "816:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 41,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 27,
"src": "831:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "816:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 34,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "808:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "808:25:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 44,
"nodeType": "ExpressionStatement",
"src": "808:25:0"
}
]
},
"documentation": {
"id": 25,
"nodeType": "StructuredDocumentation",
"src": "566:156:0",
"text": "@notice Returns x - y, reverts if underflows\n @param x The minuend\n @param y The subtrahend\n @return z The difference of x and y"
},
"id": 46,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "737:3:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 30,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 27,
"mutability": "mutable",
"name": "x",
"nameLocation": "749:1:0",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "741:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 26,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "741:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "y",
"nameLocation": "760:1:0",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "752:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 28,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "752:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "740:22:0"
},
"returnParameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "z",
"nameLocation": "794:1:0",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "786:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "786:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "785:11:0"
},
"scope": 129,
"src": "728:113:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 73,
"nodeType": "Block",
"src": "1081:58:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 59,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 57,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 49,
"src": "1100:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 58,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1105:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1100:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 69,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 67,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 60,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 54,
"src": "1111:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 61,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 49,
"src": "1115:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 62,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 51,
"src": "1119:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1115:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1111:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 65,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1110:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 66,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 49,
"src": "1124:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1110:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 68,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 51,
"src": "1129:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1110:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1100:30:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 56,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1092:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 71,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1092:39:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 72,
"nodeType": "ExpressionStatement",
"src": "1092:39:0"
}
]
},
"documentation": {
"id": 47,
"nodeType": "StructuredDocumentation",
"src": "849:157:0",
"text": "@notice Returns x * y, reverts if overflows\n @param x The multiplicand\n @param y The multiplier\n @return z The product of x and y"
},
"id": 74,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mul",
"nameLocation": "1021:3:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 52,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 49,
"mutability": "mutable",
"name": "x",
"nameLocation": "1033:1:0",
"nodeType": "VariableDeclaration",
"scope": 74,
"src": "1025:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1025:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 51,
"mutability": "mutable",
"name": "y",
"nameLocation": "1044:1:0",
"nodeType": "VariableDeclaration",
"scope": 74,
"src": "1036:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 50,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1036:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1024:22:0"
},
"returnParameters": {
"id": 55,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 54,
"mutability": "mutable",
"name": "z",
"nameLocation": "1078:1:0",
"nodeType": "VariableDeclaration",
"scope": 74,
"src": "1070:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 53,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1070:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1069:11:0"
},
"scope": 129,
"src": "1012:127:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 100,
"nodeType": "Block",
"src": "1376:56:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 92,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"id": 89,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 85,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 82,
"src": "1396:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 86,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1400:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"id": 87,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 79,
"src": "1404:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1400:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1396:9:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 90,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1395:11:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"id": 91,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1410:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1395:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 95,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 93,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 79,
"src": "1416:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30",
"id": 94,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1421:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1416:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 96,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1415:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1395:28:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 84,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1387:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1387:37:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 99,
"nodeType": "ExpressionStatement",
"src": "1387:37:0"
}
]
},
"documentation": {
"id": 75,
"nodeType": "StructuredDocumentation",
"src": "1147:157:0",
"text": "@notice Returns x + y, reverts if overflows or underflows\n @param x The augend\n @param y The addend\n @return z The sum of x and y"
},
"id": 101,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "add",
"nameLocation": "1319:3:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 80,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 77,
"mutability": "mutable",
"name": "x",
"nameLocation": "1330:1:0",
"nodeType": "VariableDeclaration",
"scope": 101,
"src": "1323:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 76,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1323:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 79,
"mutability": "mutable",
"name": "y",
"nameLocation": "1340:1:0",
"nodeType": "VariableDeclaration",
"scope": 101,
"src": "1333:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 78,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1333:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1322:20:0"
},
"returnParameters": {
"id": 83,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 82,
"mutability": "mutable",
"name": "z",
"nameLocation": "1373:1:0",
"nodeType": "VariableDeclaration",
"scope": 101,
"src": "1366:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 81,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1366:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1365:10:0"
},
"scope": 129,
"src": "1310:122:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 127,
"nodeType": "Block",
"src": "1681:56:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 119,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"id": 116,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 112,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 109,
"src": "1701:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 113,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 104,
"src": "1705:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"id": 114,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "1709:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1705:5:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1701:9:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
}
],
"id": 117,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1700:11:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"id": 118,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 104,
"src": "1715:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"src": "1700:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"id": 122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 120,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "1721:1:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30",
"id": 121,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1726:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1721:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 123,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1720:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1700:28:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 111,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1692:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1692:37:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 126,
"nodeType": "ExpressionStatement",
"src": "1692:37:0"
}
]
},
"documentation": {
"id": 102,
"nodeType": "StructuredDocumentation",
"src": "1440:169:0",
"text": "@notice Returns x - y, reverts if overflows or underflows\n @param x The minuend\n @param y The subtrahend\n @return z The difference of x and y"
},
"id": 128,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sub",
"nameLocation": "1624:3:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 107,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 104,
"mutability": "mutable",
"name": "x",
"nameLocation": "1635:1:0",
"nodeType": "VariableDeclaration",
"scope": 128,
"src": "1628:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 103,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1628:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 106,
"mutability": "mutable",
"name": "y",
"nameLocation": "1645:1:0",
"nodeType": "VariableDeclaration",
"scope": 128,
"src": "1638:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 105,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1638:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1627:20:0"
},
"returnParameters": {
"id": 110,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 109,
"mutability": "mutable",
"name": "z",
"nameLocation": "1678:1:0",
"nodeType": "VariableDeclaration",
"scope": 128,
"src": "1671:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 108,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1671:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
}
],
"src": "1670:10:0"
},
"scope": 129,
"src": "1615:122:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 130,
"src": "254:1486:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "46:1696:0"
},
"id": 0
}
}
}
}