@daostack/upgrades
Version:
Proxy upgadable contracts based on openzeppelin-sdk
1,374 lines (1,373 loc) • 75.9 kB
JSON
{
"fileName": "MultipleInheritanceInitializableMocks.sol",
"contractName": "SampleFather",
"source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\nimport '../Initializable.sol';\n\n// Sample contracts showing upgradeability with multiple inheritance.\n// Child contract inherits from Father and Mother contracts, and Father extends from Gramps.\n//\n// Human\n// / \\\n// | Gramps\n// | |\n// Mother Father\n// | |\n// -- Child --\n\n/**\n * Sample base intializable contract that is a human\n */\ncontract SampleHuman is Initializable {\n bool public isHuman;\n\n function initialize() initializer virtual public {\n isHuman = true;\n }\n}\n\n/**\n * Sample base intializable contract that defines a field mother\n */\ncontract SampleMother is Initializable, SampleHuman {\n uint256 public mother;\n\n function initialize(uint256 value) initializer virtual public {\n SampleHuman.initialize();\n mother = value;\n }\n}\n\n/**\n * Sample base intializable contract that defines a field gramps\n */\ncontract SampleGramps is Initializable, SampleHuman {\n uint256 public gramps;\n\n function initialize(uint256 value) initializer virtual public {\n SampleHuman.initialize();\n gramps = value;\n }\n}\n\n/**\n * Sample base intializable contract that defines a field father and extends from gramps\n */\ncontract SampleFather is Initializable, SampleGramps {\n uint256 public father;\n\n function initialize(uint256 _gramps, uint256 _father) initializer virtual public {\n SampleGramps.initialize(_gramps);\n father = _father;\n }\n}\n\n/**\n * Child extends from mother, father (gramps)\n */\ncontract SampleChild is Initializable, SampleMother, SampleFather {\n uint256 public child;\n\n function initialize(uint256 _mother, uint256 _gramps, uint256 _father, uint256 _child) initializer public {\n SampleMother.initialize(_mother);\n SampleFather.initialize(_gramps, _father);\n child = _child;\n }\n\n function initialize(uint256 value) initializer override(SampleMother, SampleGramps) public {\n }\n\n function initialize(uint256 _gramps, uint256 _father) initializer override(SampleFather) public {\n }\n\n\n}\n",
"sourcePath": "contracts/mocks/MultipleInheritanceInitializableMocks.sol",
"sourceMap": "1252:231:14:-:0;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "1252:231:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1309:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;501:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;525:74;;;:::i;:::-;;1335:146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1008:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1034:117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1309:21;;;;;;:::o;501:19::-;;;;;;;;;;;;;:::o;525:74::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;590:4:14::1;580:7;;:14;;;;;;;;;;;;;;;;;;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;525:74:14;;:::o;1335:146::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;1422:32:14::1;1446:7;1422:23;:32;;:::i;:::-;1469:7;1460:6;;:16;;;;;;;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;1335:146:14;;;;:::o;1008:21::-;;;;;;:::o;1034:117::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;1102:24:14::1;:22;:24;;:::i;:::-;1141:5;1132:6;;:14;;;;;;;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;1034:117:14;;;:::o;1441:498:0:-;1488:4;1829:12;1852:4;1829:28;;1863:10;1908:4;1896:17;1890:23;;1933:1;1927:2;:7;1920:14;;;;;;1441:498;;;;:::o",
"abi": [
{
"inputs": [],
"name": "father",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gramps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_gramps",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_father",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "isHuman",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"ast": {
"absolutePath": "contracts/mocks/MultipleInheritanceInitializableMocks.sol",
"exportedSymbols": {
"SampleChild": [
4331
],
"SampleFather": [
4267
],
"SampleGramps": [
4239
],
"SampleHuman": [
4189
],
"SampleMother": [
4214
]
},
"id": 4332,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4172,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:14"
},
{
"absolutePath": "contracts/Initializable.sol",
"file": "../Initializable.sol",
"id": 4173,
"nodeType": "ImportDirective",
"scope": 4332,
"sourceUnit": 75,
"src": "57:30:14",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4175,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 74,
"src": "483:13:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$74",
"typeString": "contract Initializable"
}
},
"id": 4176,
"nodeType": "InheritanceSpecifier",
"src": "483:13:14"
}
],
"contractDependencies": [
74
],
"contractKind": "contract",
"documentation": {
"id": 4174,
"nodeType": "StructuredDocumentation",
"src": "398:60:14",
"text": " Sample base intializable contract that is a human"
},
"fullyImplemented": true,
"id": 4189,
"linearizedBaseContracts": [
4189,
74
],
"name": "SampleHuman",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "4a6c9db6",
"id": 4178,
"mutability": "mutable",
"name": "isHuman",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4189,
"src": "501:19:14",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4177,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "501:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4187,
"nodeType": "Block",
"src": "574:25:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 4185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4183,
"name": "isHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4178,
"src": "580:7:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 4184,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "590:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "580:14:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 4186,
"nodeType": "ExpressionStatement",
"src": "580:14:14"
}
]
},
"documentation": null,
"functionSelector": "8129fc1c",
"id": 4188,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 4181,
"modifierName": {
"argumentTypes": null,
"id": 4180,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47,
"src": "547:11:14",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "547:11:14"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4179,
"nodeType": "ParameterList",
"parameters": [],
"src": "544:2:14"
},
"returnParameters": {
"id": 4182,
"nodeType": "ParameterList",
"parameters": [],
"src": "574:0:14"
},
"scope": 4189,
"src": "525:74:14",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 4332,
"src": "459:142:14"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4191,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 74,
"src": "701:13:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$74",
"typeString": "contract Initializable"
}
},
"id": 4192,
"nodeType": "InheritanceSpecifier",
"src": "701:13:14"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4193,
"name": "SampleHuman",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4189,
"src": "716:11:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleHuman_$4189",
"typeString": "contract SampleHuman"
}
},
"id": 4194,
"nodeType": "InheritanceSpecifier",
"src": "716:11:14"
}
],
"contractDependencies": [
74,
4189
],
"contractKind": "contract",
"documentation": {
"id": 4190,
"nodeType": "StructuredDocumentation",
"src": "603:72:14",
"text": " Sample base intializable contract that defines a field mother"
},
"fullyImplemented": true,
"id": 4214,
"linearizedBaseContracts": [
4214,
4189,
74
],
"name": "SampleMother",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "ed7dfee3",
"id": 4196,
"mutability": "mutable",
"name": "mother",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4214,
"src": "732:21:14",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4195,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "732:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4212,
"nodeType": "Block",
"src": "820:55:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 4203,
"name": "SampleHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4189,
"src": "826:11:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleHuman_$4189_$",
"typeString": "type(contract SampleHuman)"
}
},
"id": 4205,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 4188,
"src": "826:22:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 4206,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "826:24:14",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4207,
"nodeType": "ExpressionStatement",
"src": "826:24:14"
},
{
"expression": {
"argumentTypes": null,
"id": 4210,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4208,
"name": "mother",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4196,
"src": "856:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4209,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4198,
"src": "865:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "856:14:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4211,
"nodeType": "ExpressionStatement",
"src": "856:14:14"
}
]
},
"documentation": null,
"functionSelector": "fe4b84df",
"id": 4213,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 4201,
"modifierName": {
"argumentTypes": null,
"id": 4200,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47,
"src": "793:11:14",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "793:11:14"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4199,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4198,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4213,
"src": "778:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4197,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "778:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "777:15:14"
},
"returnParameters": {
"id": 4202,
"nodeType": "ParameterList",
"parameters": [],
"src": "820:0:14"
},
"scope": 4214,
"src": "758:117:14",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 4332,
"src": "676:201:14"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4216,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 74,
"src": "977:13:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$74",
"typeString": "contract Initializable"
}
},
"id": 4217,
"nodeType": "InheritanceSpecifier",
"src": "977:13:14"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4218,
"name": "SampleHuman",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4189,
"src": "992:11:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleHuman_$4189",
"typeString": "contract SampleHuman"
}
},
"id": 4219,
"nodeType": "InheritanceSpecifier",
"src": "992:11:14"
}
],
"contractDependencies": [
74,
4189
],
"contractKind": "contract",
"documentation": {
"id": 4215,
"nodeType": "StructuredDocumentation",
"src": "879:72:14",
"text": " Sample base intializable contract that defines a field gramps"
},
"fullyImplemented": true,
"id": 4239,
"linearizedBaseContracts": [
4239,
4189,
74
],
"name": "SampleGramps",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "fa39851f",
"id": 4221,
"mutability": "mutable",
"name": "gramps",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4239,
"src": "1008:21:14",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1008:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4237,
"nodeType": "Block",
"src": "1096:55:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 4228,
"name": "SampleHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4189,
"src": "1102:11:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleHuman_$4189_$",
"typeString": "type(contract SampleHuman)"
}
},
"id": 4230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 4188,
"src": "1102:22:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 4231,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1102:24:14",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4232,
"nodeType": "ExpressionStatement",
"src": "1102:24:14"
},
{
"expression": {
"argumentTypes": null,
"id": 4235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4233,
"name": "gramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4221,
"src": "1132:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4234,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4223,
"src": "1141:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1132:14:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4236,
"nodeType": "ExpressionStatement",
"src": "1132:14:14"
}
]
},
"documentation": null,
"functionSelector": "fe4b84df",
"id": 4238,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 4226,
"modifierName": {
"argumentTypes": null,
"id": 4225,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47,
"src": "1069:11:14",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1069:11:14"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4224,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4223,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4238,
"src": "1054:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4222,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1054:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1053:15:14"
},
"returnParameters": {
"id": 4227,
"nodeType": "ParameterList",
"parameters": [],
"src": "1096:0:14"
},
"scope": 4239,
"src": "1034:117:14",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 4332,
"src": "952:201:14"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4241,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 74,
"src": "1277:13:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$74",
"typeString": "contract Initializable"
}
},
"id": 4242,
"nodeType": "InheritanceSpecifier",
"src": "1277:13:14"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4243,
"name": "SampleGramps",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4239,
"src": "1292:12:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleGramps_$4239",
"typeString": "contract SampleGramps"
}
},
"id": 4244,
"nodeType": "InheritanceSpecifier",
"src": "1292:12:14"
}
],
"contractDependencies": [
74,
4189,
4239
],
"contractKind": "contract",
"documentation": {
"id": 4240,
"nodeType": "StructuredDocumentation",
"src": "1155:96:14",
"text": " Sample base intializable contract that defines a field father and extends from gramps"
},
"fullyImplemented": true,
"id": 4267,
"linearizedBaseContracts": [
4267,
4239,
4189,
74
],
"name": "SampleFather",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "1c8aca3b",
"id": 4246,
"mutability": "mutable",
"name": "father",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4267,
"src": "1309:21:14",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4245,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1309:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4265,
"nodeType": "Block",
"src": "1416:65:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4258,
"name": "_gramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4248,
"src": "1446:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 4255,
"name": "SampleGramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4239,
"src": "1422:12:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleGramps_$4239_$",
"typeString": "type(contract SampleGramps)"
}
},
"id": 4257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 4238,
"src": "1422:23:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 4259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1422:32:14",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4260,
"nodeType": "ExpressionStatement",
"src": "1422:32:14"
},
{
"expression": {
"argumentTypes": null,
"id": 4263,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4261,
"name": "father",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4246,
"src": "1460:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4262,
"name": "_father",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4250,
"src": "1469:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1460:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4264,
"nodeType": "ExpressionStatement",
"src": "1460:16:14"
}
]
},
"documentation": null,
"functionSelector": "e4a30116",
"id": 4266,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 4253,
"modifierName": {
"argumentTypes": null,
"id": 4252,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 47,
"src": "1389:11:14",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1389:11:14"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4251,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4248,
"mutability": "mutable",
"name": "_gramps",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4266,
"src": "1355:15:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4247,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1355:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4250,
"mutability": "mutable",
"name": "_father",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4266,
"src": "1372:15:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4249,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1372:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1354:34:14"
},
"returnParameters": {
"id": 4254,
"nodeType": "ParameterList",
"parameters": [],
"src": "1416:0:14"
},
"scope": 4267,
"src": "1335:146:14",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 4332,
"src": "1252:231:14"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4269,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 74,
"src": "1563:13:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$74",
"typeString": "contract Initializable"
}
},
"id": 4270,
"nodeType": "InheritanceSpecifier",
"src": "1563:13:14"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4271,
"name": "SampleMother",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4214,
"src": "1578:12:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleMother_$4214",
"typeString": "contract SampleMother"
}
},
"id": 4272,
"nodeType": "InheritanceSpecifier",
"src": "1578:12:14"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4273,
"name": "SampleFather",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4267,
"src": "1592:12:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleFather_$4267",
"typeString": "contract SampleFather"
}
},
"id": 4274,
"nodeType": "InheritanceSpecifier",
"src": "1592:12:14"
}
],
"contractDependencies": [
74,
4189,
4214,
4239,
4267
],
"contractKind": "contract",
"documentation": {
"id": 4268,
"nodeType": "StructuredDocumentation",
"src": "1485:53:14",
"text": " Child extends from mother, father (gramps)"
},
"fullyImplemented": true,
"id": 4331,
"linearizedBaseContracts": [
4331,
4267,
4239,
4214,
4189,
74
],
"name": "SampleChild",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "237b5e96",
"id": 4276,
"mutability": "mutable",
"name": "child",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 4331,
"src": "1609:20:14",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1609:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4306,
"nodeType": "Block",
"src": "1740:110:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 4292,
"name": "_mother",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4278,
"src": "1770:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 4289,
"name": "SampleMother",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4214,
"src": "1746:12:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleMother_$4214_$",
"typeString": "type(contract SampleMother)"
}
},
"id": 4291,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 4213,
"src": "1746:23:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 4293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1746:32:14",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"