* Update ERC721 to latest 1.11.0 from OpenZeppelin-solidity * Hardcode supported interfaces instead of using lookup table. This avoids shifting storage when extending supports interface. * Update build artifacts * Fix linter errors
1838 lines
68 KiB
JSON
1838 lines
68 KiB
JSON
{
|
|
"contractName": "SafeMathMock",
|
|
"abi": [
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "a",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "b",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "mul",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "a",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "b",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "div",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "a",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "b",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "sub",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "a",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "b",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "add",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x608060405234801561001057600080fd5b50610292806100206000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063771602f714610067578063a391c15b146100b2578063b67d77c5146100fd578063c8a4ac9c14610148575b600080fd5b34801561007357600080fd5b5061009c6004803603810190808035906020019092919080359060200190929190505050610193565b6040518082815260200191505060405180910390f35b3480156100be57600080fd5b506100e760048036038101908080359060200190929190803590602001909291905050506101a7565b6040518082815260200191505060405180910390f35b34801561010957600080fd5b5061013260048036038101908080359060200190929190803590602001909291905050506101bb565b6040518082815260200191505060405180910390f35b34801561015457600080fd5b5061017d60048036038101908080359060200190929190803590602001909291905050506101cf565b6040518082815260200191505060405180910390f35b600061019f83836101e3565b905092915050565b60006101b383836101ff565b905092915050565b60006101c78383610215565b905092915050565b60006101db838361022e565b905092915050565b600081830190508281101515156101f657fe5b80905092915050565b6000818381151561020c57fe5b04905092915050565b600082821115151561022357fe5b818303905092915050565b6000808314156102415760009050610260565b818302905081838281151561025257fe5b0414151561025c57fe5b8090505b929150505600a165627a7a72305820a76cbc781f9f5d152fcc2bec6b56eee8bbf2df6a0da014c64e7a1b8f0ba808e20029",
|
|
"deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063771602f714610067578063a391c15b146100b2578063b67d77c5146100fd578063c8a4ac9c14610148575b600080fd5b34801561007357600080fd5b5061009c6004803603810190808035906020019092919080359060200190929190505050610193565b6040518082815260200191505060405180910390f35b3480156100be57600080fd5b506100e760048036038101908080359060200190929190803590602001909291905050506101a7565b6040518082815260200191505060405180910390f35b34801561010957600080fd5b5061013260048036038101908080359060200190929190803590602001909291905050506101bb565b6040518082815260200191505060405180910390f35b34801561015457600080fd5b5061017d60048036038101908080359060200190929190803590602001909291905050506101cf565b6040518082815260200191505060405180910390f35b600061019f83836101e3565b905092915050565b60006101b383836101ff565b905092915050565b60006101c78383610215565b905092915050565b60006101db838361022e565b905092915050565b600081830190508281101515156101f657fe5b80905092915050565b6000818381151561020c57fe5b04905092915050565b600082821115151561022357fe5b818303905092915050565b6000808314156102415760009050610260565b818302905081838281151561025257fe5b0414151561025c57fe5b8090505b929150505600a165627a7a72305820a76cbc781f9f5d152fcc2bec6b56eee8bbf2df6a0da014c64e7a1b8f0ba808e20029",
|
|
"sourceMap": "60:445:24:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;60:445:24;;;;;;;",
|
|
"deployedSourceMap": "60:445:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;402:101;;8:9:-1;5:2;;;30:1;27;20:12;5:2;402:101:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;192:101:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;297;;8:9:-1;5:2;;;30:1;27;20:12;5:2;297:101:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;87;;8:9:-1;5:2;;;30:1;27;20:12;5:2;87:101:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;402;458:7;480:18;493:1;496;480:12;:18::i;:::-;473:25;;402:101;;;;:::o;192:::-;248:7;270:18;283:1;286;270:12;:18::i;:::-;263:25;;192:101;;;;:::o;297:::-;353:7;375:18;388:1;391;375:12;:18::i;:::-;368:25;;297:101;;;;:::o;87:::-;143:7;165:18;178:1;181;165:12;:18::i;:::-;158:25;;87:101;;;;:::o;1008:123:8:-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::o;452:272::-;510:7;718:1;714;:5;;;;;;;;707:12;;452:272;;;;:::o;836:110::-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;203:167::-;261:9;287:1;282;:6;278:35;;;305:1;298:8;;;;278:35;326:1;322;:5;318:9;;349:1;344;340;:5;;;;;;;;:10;333:18;;;;;;364:1;357:8;;203:167;;;;;:::o",
|
|
"source": "pragma solidity ^0.4.21;\n\n\nimport \"../math/SafeMath.sol\";\n\n\ncontract SafeMathMock {\n\n function mul(uint256 a, uint256 b) public pure returns (uint256) {\n return SafeMath.mul(a, b);\n }\n\n function div(uint256 a, uint256 b) public pure returns (uint256) {\n return SafeMath.div(a, b);\n }\n\n function sub(uint256 a, uint256 b) public pure returns (uint256) {\n return SafeMath.sub(a, b);\n }\n\n function add(uint256 a, uint256 b) public pure returns (uint256) {\n return SafeMath.add(a, b);\n }\n}\n",
|
|
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/SafeMathMock.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/SafeMathMock.sol",
|
|
"exportedSymbols": {
|
|
"SafeMathMock": [
|
|
1516
|
|
]
|
|
},
|
|
"id": 1517,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1450,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:24"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../math/SafeMath.sol",
|
|
"id": 1451,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1517,
|
|
"sourceUnit": 580,
|
|
"src": "27:30:24",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1516,
|
|
"linearizedBaseContracts": [
|
|
1516
|
|
],
|
|
"name": "SafeMathMock",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1466,
|
|
"nodeType": "Block",
|
|
"src": "152:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1462,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1453,
|
|
"src": "178:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1463,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1455,
|
|
"src": "181:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1460,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "165:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1461,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 520,
|
|
"src": "165:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1464,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "165:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1459,
|
|
"id": 1465,
|
|
"nodeType": "Return",
|
|
"src": "158:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1467,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "mul",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1456,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1453,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "100:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1452,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "100:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1455,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "111:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1454,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "111:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "99:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1459,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1458,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "143:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1457,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "143:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "142:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "87:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1482,
|
|
"nodeType": "Block",
|
|
"src": "257:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1478,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1469,
|
|
"src": "283:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1479,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1471,
|
|
"src": "286:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1476,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "270:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 534,
|
|
"src": "270:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "270:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1475,
|
|
"id": 1481,
|
|
"nodeType": "Return",
|
|
"src": "263:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1483,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "div",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1472,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1469,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "205:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1468,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "205:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1471,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "216:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1470,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "216:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "204:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1475,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1474,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "248:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1473,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "248:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "247:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "192:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1498,
|
|
"nodeType": "Block",
|
|
"src": "362:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1494,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1485,
|
|
"src": "388:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1495,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1487,
|
|
"src": "391:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1492,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "375:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1493,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "375:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "375:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1491,
|
|
"id": 1497,
|
|
"nodeType": "Return",
|
|
"src": "368:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1499,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "sub",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1488,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1485,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "310:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1484,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "310:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1487,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "321:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1486,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "321:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "309:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1491,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1490,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "353:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1489,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "353:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "352:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "297:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1514,
|
|
"nodeType": "Block",
|
|
"src": "467:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1510,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1501,
|
|
"src": "493:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1511,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1503,
|
|
"src": "496:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1508,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "480:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1509,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "480:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1512,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "480:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1507,
|
|
"id": 1513,
|
|
"nodeType": "Return",
|
|
"src": "473:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1515,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "add",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1504,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1501,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "415:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1500,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "415:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1503,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "426:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1502,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "426:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "414:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1507,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1506,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "458:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1505,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "458:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "457:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "402:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1517,
|
|
"src": "60:445:24"
|
|
}
|
|
],
|
|
"src": "0:506:24"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/SafeMathMock.sol",
|
|
"exportedSymbols": {
|
|
"SafeMathMock": [
|
|
1516
|
|
]
|
|
},
|
|
"id": 1517,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1450,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:24"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../math/SafeMath.sol",
|
|
"id": 1451,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1517,
|
|
"sourceUnit": 580,
|
|
"src": "27:30:24",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1516,
|
|
"linearizedBaseContracts": [
|
|
1516
|
|
],
|
|
"name": "SafeMathMock",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1466,
|
|
"nodeType": "Block",
|
|
"src": "152:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1462,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1453,
|
|
"src": "178:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1463,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1455,
|
|
"src": "181:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1460,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "165:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1461,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 520,
|
|
"src": "165:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1464,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "165:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1459,
|
|
"id": 1465,
|
|
"nodeType": "Return",
|
|
"src": "158:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1467,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "mul",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1456,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1453,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "100:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1452,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "100:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1455,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "111:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1454,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "111:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "99:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1459,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1458,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1467,
|
|
"src": "143:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1457,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "143:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "142:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "87:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1482,
|
|
"nodeType": "Block",
|
|
"src": "257:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1478,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1469,
|
|
"src": "283:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1479,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1471,
|
|
"src": "286:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1476,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "270:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 534,
|
|
"src": "270:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "270:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1475,
|
|
"id": 1481,
|
|
"nodeType": "Return",
|
|
"src": "263:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1483,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "div",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1472,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1469,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "205:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1468,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "205:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1471,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "216:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1470,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "216:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "204:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1475,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1474,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1483,
|
|
"src": "248:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1473,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "248:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "247:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "192:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1498,
|
|
"nodeType": "Block",
|
|
"src": "362:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1494,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1485,
|
|
"src": "388:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1495,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1487,
|
|
"src": "391:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1492,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "375:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1493,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 554,
|
|
"src": "375:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "375:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1491,
|
|
"id": 1497,
|
|
"nodeType": "Return",
|
|
"src": "368:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1499,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "sub",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1488,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1485,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "310:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1484,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "310:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1487,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "321:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1486,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "321:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "309:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1491,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1490,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1499,
|
|
"src": "353:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1489,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "353:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "352:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "297:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1514,
|
|
"nodeType": "Block",
|
|
"src": "467:36:24",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1510,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1501,
|
|
"src": "493:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1511,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1503,
|
|
"src": "496:1:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1508,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "480:8:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SafeMath_$579_$",
|
|
"typeString": "type(library SafeMath)"
|
|
}
|
|
},
|
|
"id": 1509,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 578,
|
|
"src": "480:12:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1512,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "480:18:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1507,
|
|
"id": 1513,
|
|
"nodeType": "Return",
|
|
"src": "473:25:24"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1515,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "add",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1504,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1501,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "415:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1500,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "415:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1503,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "426:9:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1502,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "426:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "414:22:24"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1507,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1506,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1515,
|
|
"src": "458:7:24",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1505,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "458:7:24",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "457:9:24"
|
|
},
|
|
"scope": 1516,
|
|
"src": "402:101:24",
|
|
"stateMutability": "pure",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1517,
|
|
"src": "60:445:24"
|
|
}
|
|
],
|
|
"src": "0:506:24"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.0",
|
|
"updatedAt": "2018-08-27T20:45:00.209Z"
|
|
} |