UNPKG

@windfallswap/periphery

Version:

🎚 Peripheral smart contracts for interacting with Windfall Swap

1,164 lines (1,163 loc) • 92.2 kB
{ "contractName": "SafeMath", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/D/defi/windfall/windfallswap-periphery/contracts/libraries/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"/D/defi/windfall/windfallswap-periphery/contracts/libraries/SafeMath.sol\":{\"keccak256\":\"0x977f38b601109ee7a0c1b70a32e08b7aecf5b4672bdea39fa6b7fec810943b80\",\"urls\":[\"bzz-raw://50296b94e299cd690f4a7966a93ac6ac58128080b0a14fdb1c2e07d71b50930c\",\"dweb:/ipfs/QmSCqtcNbmcXUekQk2NYGDQcWt34sASe6ru1v2FLBX9coc\"]}},\"version\":1}", "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c65dfef5661188e4f53d5b77d481e0c730c5710119b20b1df8d675ed4baf904464736f6c63430006060033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c65dfef5661188e4f53d5b77d481e0c730c5710119b20b1df8d675ed4baf904464736f6c63430006060033", "immutableReferences": {}, "sourceMap": "135:442:6:-:0;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", "deployedSourceMap": "135:442:6:-:0;;;;;;12:1:-1;9;2:12", "source": "pragma solidity =0.6.6;\r\n\r\n// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)\r\n\r\nlibrary SafeMath {\r\n function add(uint x, uint y) internal pure returns (uint z) {\r\n require((z = x + y) >= x, 'ds-math-add-overflow');\r\n }\r\n\r\n function sub(uint x, uint y) internal pure returns (uint z) {\r\n require((z = x - y) <= x, 'ds-math-sub-underflow');\r\n }\r\n\r\n function mul(uint x, uint y) internal pure returns (uint z) {\r\n require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');\r\n }\r\n}\r\n", "sourcePath": "D:\\defi\\windfall\\windfallswap-periphery\\contracts\\libraries\\SafeMath.sol", "ast": { "absolutePath": "/D/defi/windfall/windfallswap-periphery/contracts/libraries/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 2887 ] }, "id": 2888, "nodeType": "SourceUnit", "nodes": [ { "id": 2814, "literals": [ "solidity", "=", "0.6", ".6" ], "nodeType": "PragmaDirective", "src": "0:23:6" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 2887, "linearizedBaseContracts": [ 2887 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 2835, "nodeType": "Block", "src": "219:68:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2831, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 2828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2824, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2821, "src": "239:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2827, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2825, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2816, "src": "243:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "id": 2826, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2818, "src": "247:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "243:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "239:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 2829, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "238:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 2830, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2816, "src": "253:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "238:16:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "64732d6d6174682d6164642d6f766572666c6f77", "id": 2832, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "256:22:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3903056b84ed2aba2be78662dc6c5c99b160cebe9af9bd9493d0fc28ff16f6db", "typeString": "literal_string \"ds-math-add-overflow\"" }, "value": "ds-math-add-overflow" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_3903056b84ed2aba2be78662dc6c5c99b160cebe9af9bd9493d0fc28ff16f6db", "typeString": "literal_string \"ds-math-add-overflow\"" } ], "id": 2823, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "230:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2833, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "230:49:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2834, "nodeType": "ExpressionStatement", "src": "230:49:6" } ] }, "documentation": null, "id": 2836, "implemented": true, "kind": "function", "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2819, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2816, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2836, "src": "172:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2815, "name": "uint", "nodeType": "ElementaryTypeName", "src": "172:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2818, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2836, "src": "180:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2817, "name": "uint", "nodeType": "ElementaryTypeName", "src": "180:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "171:16:6" }, "returnParameters": { "id": 2822, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2821, "mutability": "mutable", "name": "z", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2836, "src": "211:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2820, "name": "uint", "nodeType": "ElementaryTypeName", "src": "211:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "210:8:6" }, "scope": 2887, "src": "159:128:6", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 2857, "nodeType": "Block", "src": "355:69:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2853, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 2850, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2846, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2843, "src": "375:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2849, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2847, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2838, "src": "379:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "argumentTypes": null, "id": 2848, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "383:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "379:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "375:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 2851, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "374:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 2852, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2838, "src": "389:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "374:16:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "64732d6d6174682d7375622d756e646572666c6f77", "id": 2854, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "392:23:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_03b20b9f6e6e7905f077509fd420fb44afc685f254bcefe49147296e1ba25590", "typeString": "literal_string \"ds-math-sub-underflow\"" }, "value": "ds-math-sub-underflow" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_03b20b9f6e6e7905f077509fd420fb44afc685f254bcefe49147296e1ba25590", "typeString": "literal_string \"ds-math-sub-underflow\"" } ], "id": 2845, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "366:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2855, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "366:50:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2856, "nodeType": "ExpressionStatement", "src": "366:50:6" } ] }, "documentation": null, "id": 2858, "implemented": true, "kind": "function", "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2841, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2838, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2858, "src": "308:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2837, "name": "uint", "nodeType": "ElementaryTypeName", "src": "308:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2840, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2858, "src": "316:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2839, "name": "uint", "nodeType": "ElementaryTypeName", "src": "316:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "307:16:6" }, "returnParameters": { "id": 2844, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2843, "mutability": "mutable", "name": "z", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2858, "src": "347:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2842, "name": "uint", "nodeType": "ElementaryTypeName", "src": "347:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "346:8:6" }, "scope": 2887, "src": "295:129:6", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 2885, "nodeType": "Block", "src": "492:82:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 2881, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2870, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2868, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2862, "src": "511:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2869, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "516:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "511:6:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2880, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2878, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 2875, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2871, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2865, "src": "522:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2872, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2860, "src": "526:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "argumentTypes": null, "id": 2873, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2862, "src": "530:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "526:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "522:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 2876, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "521:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 2877, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2862, "src": "535:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "521:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2879, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2860, "src": "540:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "521:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "511:30:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "64732d6d6174682d6d756c2d6f766572666c6f77", "id": 2882, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "543:22:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_25a0ef6406c6af6852555433653ce478274cd9f03a5dec44d001868a76b3bfdd", "typeString": "literal_string \"ds-math-mul-overflow\"" }, "value": "ds-math-mul-overflow" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_25a0ef6406c6af6852555433653ce478274cd9f03a5dec44d001868a76b3bfdd", "typeString": "literal_string \"ds-math-mul-overflow\"" } ], "id": 2867, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "503:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2883, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "503:63:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2884, "nodeType": "ExpressionStatement", "src": "503:63:6" } ] }, "documentation": null, "id": 2886, "implemented": true, "kind": "function", "modifiers": [], "name": "mul", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2863, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2860, "mutability": "mutable", "name": "x", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2886, "src": "445:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2859, "name": "uint", "nodeType": "ElementaryTypeName", "src": "445:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2862, "mutability": "mutable", "name": "y", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2886, "src": "453:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2861, "name": "uint", "nodeType": "ElementaryTypeName", "src": "453:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "444:16:6" }, "returnParameters": { "id": 2866, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2865, "mutability": "mutable", "name": "z", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2886, "src": "484:6:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2864, "name": "uint", "nodeType": "ElementaryTypeName", "src": "484:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "483:8:6" }, "scope": 2887, "src": "432:142:6", "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "scope": 2888, "src": "135:442:6" } ], "src": "0:579:6" }, "legacyAST": { "absolutePath": "/D/defi/windfall/windfallswap-periphery/contracts/libraries/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 2887 ] }, "id": 2888, "nodeType": "SourceUnit", "nodes": [ { "id": 2814, "literals": [ "solidity", "=", "0.6", ".6" ], "nodeType": "PragmaDirective", "src": "0:23:6" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 2887, "linearizedBaseContracts": [ 2887 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 2835, "nodeType": "Block", "src": "219:68:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2831, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 2828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2824, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2821, "src": "239:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": {