1747 lines
63 KiB
JSON
1747 lines
63 KiB
JSON
{
|
|
"contractName": "Math",
|
|
"abi": [],
|
|
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820cf052131d23f0a2cb39d1cca102f4b7186fbc62a6e68c0b78d8b2562f2ac8e210029",
|
|
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820cf052131d23f0a2cb39d1cca102f4b7186fbc62a6e68c0b78d8b2562f2ac8e210029",
|
|
"sourceMap": "83:429:5:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
|
|
"deployedSourceMap": "83:429:5:-;;;;;;;;",
|
|
"source": "pragma solidity ^0.4.21;\n\n\n/**\n * @title Math\n * @dev Assorted math operations\n */\nlibrary Math {\n function max64(uint64 a, uint64 b) internal pure returns (uint64) {\n return a >= b ? a : b;\n }\n\n function min64(uint64 a, uint64 b) internal pure returns (uint64) {\n return a < b ? a : b;\n }\n\n function max256(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n function min256(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n}\n",
|
|
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/Math.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/Math.sol",
|
|
"exportedSymbols": {
|
|
"Math": [
|
|
442
|
|
]
|
|
},
|
|
"id": 443,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 373,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:5"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": "@title Math\n@dev Assorted math operations",
|
|
"fullyImplemented": true,
|
|
"id": 442,
|
|
"linearizedBaseContracts": [
|
|
442
|
|
],
|
|
"name": "Math",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 389,
|
|
"nodeType": "Block",
|
|
"src": "166:32:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"id": 384,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 382,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 375,
|
|
"src": "179:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 383,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 377,
|
|
"src": "184:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"src": "179:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 386,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 377,
|
|
"src": "192:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"id": 387,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "179:14:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 385,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 375,
|
|
"src": "188:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 381,
|
|
"id": 388,
|
|
"nodeType": "Return",
|
|
"src": "172:21:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 390,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "max64",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 378,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 375,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "115:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 374,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "115:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 377,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "125:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 376,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "125:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "114:20:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 381,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 380,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "158:6:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 379,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "158:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "157:8:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "100:98:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 406,
|
|
"nodeType": "Block",
|
|
"src": "268:31:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"id": 401,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 399,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 392,
|
|
"src": "281:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 400,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 394,
|
|
"src": "285:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"src": "281:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 403,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 394,
|
|
"src": "293:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"id": 404,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "281:13:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 402,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 392,
|
|
"src": "289:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 398,
|
|
"id": 405,
|
|
"nodeType": "Return",
|
|
"src": "274:20:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 407,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "min64",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 395,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 392,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "217:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 391,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "217:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 394,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "227:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 393,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "227:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "216:20:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 398,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 397,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "260:6:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 396,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "260:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "259:8:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "202:97:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 423,
|
|
"nodeType": "Block",
|
|
"src": "373:32:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 416,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 409,
|
|
"src": "386:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 417,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 411,
|
|
"src": "391:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "386:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 420,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 411,
|
|
"src": "399:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "386:14:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 419,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 409,
|
|
"src": "395:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 415,
|
|
"id": 422,
|
|
"nodeType": "Return",
|
|
"src": "379:21:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 424,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "max256",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 412,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 409,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "319:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 408,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "319:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 411,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "330:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 410,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "318:22:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 415,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 414,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "364:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 413,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "364:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "363:9:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "303:102:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 440,
|
|
"nodeType": "Block",
|
|
"src": "479:31:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 435,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 433,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 426,
|
|
"src": "492:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 434,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 428,
|
|
"src": "496:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "492:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 437,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 428,
|
|
"src": "504:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 438,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "492:13:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 436,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 426,
|
|
"src": "500:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 432,
|
|
"id": 439,
|
|
"nodeType": "Return",
|
|
"src": "485:20:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 441,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "min256",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 429,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 426,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "425:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 425,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "425:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 428,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "436:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 427,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "436:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "424:22:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 432,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 431,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "470:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 430,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "470:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "469:9:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "409:101:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 443,
|
|
"src": "83:429:5"
|
|
}
|
|
],
|
|
"src": "0:513:5"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/Math.sol",
|
|
"exportedSymbols": {
|
|
"Math": [
|
|
442
|
|
]
|
|
},
|
|
"id": 443,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 373,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:5"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": "@title Math\n@dev Assorted math operations",
|
|
"fullyImplemented": true,
|
|
"id": 442,
|
|
"linearizedBaseContracts": [
|
|
442
|
|
],
|
|
"name": "Math",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 389,
|
|
"nodeType": "Block",
|
|
"src": "166:32:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"id": 384,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 382,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 375,
|
|
"src": "179:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 383,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 377,
|
|
"src": "184:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"src": "179:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 386,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 377,
|
|
"src": "192:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"id": 387,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "179:14:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 385,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 375,
|
|
"src": "188:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 381,
|
|
"id": 388,
|
|
"nodeType": "Return",
|
|
"src": "172:21:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 390,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "max64",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 378,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 375,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "115:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 374,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "115:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 377,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "125:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 376,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "125:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "114:20:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 381,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 380,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 390,
|
|
"src": "158:6:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 379,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "158:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "157:8:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "100:98:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 406,
|
|
"nodeType": "Block",
|
|
"src": "268:31:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"id": 401,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 399,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 392,
|
|
"src": "281:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 400,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 394,
|
|
"src": "285:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"src": "281:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 403,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 394,
|
|
"src": "293:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"id": 404,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "281:13:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 402,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 392,
|
|
"src": "289:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 398,
|
|
"id": 405,
|
|
"nodeType": "Return",
|
|
"src": "274:20:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 407,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "min64",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 395,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 392,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "217:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 391,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "217:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 394,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "227:8:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 393,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "227:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "216:20:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 398,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 397,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 407,
|
|
"src": "260:6:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 396,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "260:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "259:8:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "202:97:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 423,
|
|
"nodeType": "Block",
|
|
"src": "373:32:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 416,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 409,
|
|
"src": "386:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 417,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 411,
|
|
"src": "391:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "386:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 420,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 411,
|
|
"src": "399:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "386:14:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 419,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 409,
|
|
"src": "395:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 415,
|
|
"id": 422,
|
|
"nodeType": "Return",
|
|
"src": "379:21:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 424,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "max256",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 412,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 409,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "319:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 408,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "319:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 411,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "330:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 410,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "318:22:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 415,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 414,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 424,
|
|
"src": "364:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 413,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "364:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "363:9:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "303:102:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 440,
|
|
"nodeType": "Block",
|
|
"src": "479:31:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 435,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 433,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 426,
|
|
"src": "492:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 434,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 428,
|
|
"src": "496:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "492:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 437,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 428,
|
|
"src": "504:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 438,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "492:13:5",
|
|
"trueExpression": {
|
|
"argumentTypes": null,
|
|
"id": 436,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 426,
|
|
"src": "500:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 432,
|
|
"id": 439,
|
|
"nodeType": "Return",
|
|
"src": "485:20:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 441,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "min256",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 429,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 426,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "425:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 425,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "425:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 428,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "436:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 427,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "436:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "424:22:5"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 432,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 431,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 441,
|
|
"src": "470:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 430,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "470:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "469:9:5"
|
|
},
|
|
"scope": 442,
|
|
"src": "409:101:5",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 443,
|
|
"src": "83:429:5"
|
|
}
|
|
],
|
|
"src": "0:513:5"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.1",
|
|
"updatedAt": "2018-08-23T14:35:50.614Z"
|
|
} |