@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
1,211 lines (1,210 loc) • 78.5 kB
JSON
{
"contractName": "Math",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/Math.sol\":\"Math\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/Math.sol\":{\"keccak256\":\"0x4b5aa451e4e8801478708f94b118a7821c0500d676255eaf89fc78c14856ce4e\",\"urls\":[\"bzz-raw://bed15b3f35ed05505efc8fb5cb01d06c52230fbcaadf4ed24a85b1ac2f15f33c\",\"dweb:/ipfs/QmS6tW81u8E4tvzVfVuqEuMCkdwAozQ6pKJPRBR4JEVmQp\"]}},\"version\":1}",
"bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158201a1a7dcb7f5947891c206633eb261e2dbfe41704b6fb32c62ff1c3676742737f64736f6c63430005100032",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158201a1a7dcb7f5947891c206633eb261e2dbfe41704b6fb32c62ff1c3676742737f64736f6c63430005100032",
"sourceMap": "99:668:149:-;;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": "99:668:149:-;;;;;;;;",
"source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/math/Math.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/math/Math.sol",
"exportedSymbols": {
"Math": [
37178
]
},
"id": 37179,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 37111,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:149"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev Standard math utilities missing in the Solidity language.",
"fullyImplemented": true,
"id": 37178,
"linearizedBaseContracts": [
37178
],
"name": "Math",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 37127,
"nodeType": "Block",
"src": "249:38:149",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37120,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37113,
"src": "266:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 37121,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37115,
"src": "271:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "266:6:149",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"argumentTypes": null,
"id": 37124,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37115,
"src": "279:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 37125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "266:14:149",
"trueExpression": {
"argumentTypes": null,
"id": 37123,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37113,
"src": "275:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37119,
"id": 37126,
"nodeType": "Return",
"src": "259:21:149"
}
]
},
"documentation": "@dev Returns the largest of two numbers.",
"id": 37128,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 37116,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37113,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "195:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37112,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "195:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 37115,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "206:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37114,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "206:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "194:22:149"
},
"returnParameters": {
"id": 37119,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37118,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "240:7:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37117,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "240:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "239:9:149"
},
"scope": 37178,
"src": "182:105:149",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 37144,
"nodeType": "Block",
"src": "425:37:149",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37137,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37130,
"src": "442:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 37138,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37132,
"src": "446:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "442:5:149",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"argumentTypes": null,
"id": 37141,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37132,
"src": "454:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 37142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "442:13:149",
"trueExpression": {
"argumentTypes": null,
"id": 37140,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37130,
"src": "450:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37136,
"id": 37143,
"nodeType": "Return",
"src": "435:20:149"
}
]
},
"documentation": "@dev Returns the smallest of two numbers.",
"id": 37145,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "min",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 37133,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37130,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 37145,
"src": "371:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37129,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "371:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 37132,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 37145,
"src": "382:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37131,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "382:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "370:22:149"
},
"returnParameters": {
"id": 37136,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37135,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 37145,
"src": "416:7:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37134,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "416:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "415:9:149"
},
"scope": 37178,
"src": "358:104:149",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 37176,
"nodeType": "Block",
"src": "646:119:149",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37162,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37154,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37147,
"src": "718:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 37155,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "722:1:149",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "718:5:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 37157,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "717:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37158,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37149,
"src": "728:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 37159,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "732:1:149",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "728:5:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 37161,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "727:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "717:17:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37163,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37147,
"src": "739:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 37164,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "743:1:149",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "739:5:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37166,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37149,
"src": "747:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 37167,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "751:1:149",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "747:5:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "739:13:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 37170,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "738:15:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 37171,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "756:1:149",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "738:19:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 37173,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "737:21:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "717:41:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37153,
"id": 37175,
"nodeType": "Return",
"src": "710:48:149"
}
]
},
"documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.",
"id": 37177,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "average",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 37150,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37147,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 37177,
"src": "592:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37146,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "592:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 37149,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 37177,
"src": "603:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37148,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "603:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "591:22:149"
},
"returnParameters": {
"id": 37153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37152,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 37177,
"src": "637:7:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37151,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "637:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "636:9:149"
},
"scope": 37178,
"src": "575:190:149",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 37179,
"src": "99:668:149"
}
],
"src": "0:768:149"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/math/Math.sol",
"exportedSymbols": {
"Math": [
37178
]
},
"id": 37179,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 37111,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:149"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev Standard math utilities missing in the Solidity language.",
"fullyImplemented": true,
"id": 37178,
"linearizedBaseContracts": [
37178
],
"name": "Math",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 37127,
"nodeType": "Block",
"src": "249:38:149",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37120,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37113,
"src": "266:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 37121,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37115,
"src": "271:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "266:6:149",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"argumentTypes": null,
"id": 37124,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37115,
"src": "279:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 37125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "266:14:149",
"trueExpression": {
"argumentTypes": null,
"id": 37123,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37113,
"src": "275:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 37119,
"id": 37126,
"nodeType": "Return",
"src": "259:21:149"
}
]
},
"documentation": "@dev Returns the largest of two numbers.",
"id": 37128,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "max",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 37116,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37113,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "195:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37112,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "195:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 37115,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "206:9:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37114,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "206:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "194:22:149"
},
"returnParameters": {
"id": 37119,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37118,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 37128,
"src": "240:7:149",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37117,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "240:7:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "239:9:149"
},
"scope": 37178,
"src": "182:105:149",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 37144,
"nodeType": "Block",
"src": "425:37:149",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 37139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 37137,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 37130,
"src": "442:1:149",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}