@alice-network/zos-lib
Version:
JavaScript library for the ZeppelinOS smart contract platform
1,216 lines • 119 kB
JSON
{
"contractName": "SampleFather",
"abi": [
{
"constant": true,
"inputs": [],
"name": "father",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isHuman",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "gramps",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_gramps",
"type": "uint256"
},
{
"name": "_father",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "value",
"type": "uint256"
}
],
"name": "initialize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506105b5806100206000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631c8aca3b1461007d5780634a6c9db6146100a85780638129fc1c146100d7578063e4a30116146100ee578063fa39851f14610125578063fe4b84df14610150575b600080fd5b34801561008957600080fd5b5061009261017d565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd610183565b604051808215151515815260200191505060405180910390f35b3480156100e357600080fd5b506100ec610196565b005b3480156100fa57600080fd5b5061012360048036038101908080359060200190929190803590602001909291905050506102e6565b005b34801561013157600080fd5b5061013a61042d565b6040518082815260200191505060405180910390f35b34801561015c57600080fd5b5061017b60048036038101908080359060200190929190505050610433565b005b60355481565b603360009054906101000a900460ff1681565b60008060019054906101000a900460ff16806101b657506101b5610578565b5b806101cd57506000809054906101000a900460ff16155b1515610267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055506001603360006101000a81548160ff02191690831515021790555080600060016101000a81548160ff02191690831515021790555050565b60008060019054906101000a900460ff16806103065750610305610578565b5b8061031d57506000809054906101000a900460ff16155b15156103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555061040783610433565b8160358190555080600060016101000a81548160ff021916908315150217905550505050565b60345481565b60008060019054906101000a900460ff16806104535750610452610578565b5b8061046a57506000809054906101000a900460ff16155b1515610504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff021916908315150217905550610553610196565b8160348190555080600060016101000a81548160ff0219169083151502179055505050565b600080303b905060008114915050905600a165627a7a72305820abe66c747a623b3ea563d8489597c27926f9bf1f1799f191536065503e1084f80029",
"deployedBytecode": "0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631c8aca3b1461007d5780634a6c9db6146100a85780638129fc1c146100d7578063e4a30116146100ee578063fa39851f14610125578063fe4b84df14610150575b600080fd5b34801561008957600080fd5b5061009261017d565b6040518082815260200191505060405180910390f35b3480156100b457600080fd5b506100bd610183565b604051808215151515815260200191505060405180910390f35b3480156100e357600080fd5b506100ec610196565b005b3480156100fa57600080fd5b5061012360048036038101908080359060200190929190803590602001909291905050506102e6565b005b34801561013157600080fd5b5061013a61042d565b6040518082815260200191505060405180910390f35b34801561015c57600080fd5b5061017b60048036038101908080359060200190929190505050610433565b005b60355481565b603360009054906101000a900460ff1681565b60008060019054906101000a900460ff16806101b657506101b5610578565b5b806101cd57506000809054906101000a900460ff16155b1515610267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055506001603360006101000a81548160ff02191690831515021790555080600060016101000a81548160ff02191690831515021790555050565b60008060019054906101000a900460ff16806103065750610305610578565b5b8061031d57506000809054906101000a900460ff16155b15156103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555061040783610433565b8160358190555080600060016101000a81548160ff021916908315150217905550505050565b60345481565b60008060019054906101000a900460ff16806104535750610452610578565b5b8061046a57506000809054906101000a900460ff16155b1515610504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff021916908315150217905550610553610196565b8160348190555080600060016101000a81548160ff0219169083151502179055505050565b600080303b905060008114915050905600a165627a7a72305820abe66c747a623b3ea563d8489597c27926f9bf1f1799f191536065503e1084f80029",
"sourceMap": "1198:223:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1198:223:12;;;;;;;",
"deployedSourceMap": "1198:223:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1255:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1255:21:12;;;;;;;;;;;;;;;;;;;;;;;471:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;471:19:12;;;;;;;;;;;;;;;;;;;;;;;;;;;495:66;;8:9:-1;5:2;;;30:1;27;20:12;5:2;495:66:12;;;;;;1281:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1281:138:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;962:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;962:21:12;;;;;;;;;;;;;;;;;;;;;;;988:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;988:109:12;;;;;;;;;;;;;;;;;;;;;;;;;;1255:21;;;;:::o;471:19::-;;;;;;;;;;;;;:::o;495:66::-;1129:20:0;1024:12;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1152:12;;;;;;;;;;;1129:35;;1185:4;1170:12;;:19;;;;;;;;;;;;;;;;;;1209:4;1195:11;;:18;;;;;;;;;;;;;;;;;;552:4:12;542:7;;:14;;;;;;;;;;;;;;;;;;1243:15:0;1228:12;;:30;;;;;;;;;;;;;;;;;;495:66:12;:::o;1281:138::-;1129:20:0;1024:12;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1152:12;;;;;;;;;;;1129:35;;1185:4;1170:12;;:19;;;;;;;;;;;;;;;;;;1209:4;1195:11;;:18;;;;;;;;;;;;;;;;;;1360:32:12;1384:7;1360:23;:32::i;:::-;1407:7;1398:6;:16;;;;1243:15:0;1228:12;;:30;;;;;;;;;;;;;;;;;;1281:138:12;;;:::o;962:21::-;;;;:::o;988:109::-;1129:20:0;1024:12;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1152:12;;;;;;;;;;;1129:35;;1185:4;1170:12;;:19;;;;;;;;;;;;;;;;;;1209:4;1195:11;;:18;;;;;;;;;;;;;;;;;;1048:24:12;:22;:24::i;:::-;1087:5;1078:6;:14;;;;1243:15:0;1228:12;;:30;;;;;;;;;;;;;;;;;;988:109:12;;:::o;1349:467:0:-;1396:4;1737:10;1782:7;1770:20;1764:26;;1810:1;1804:2;:7;1797:14;;1349:467;;:::o",
"source": "pragma solidity ^0.4.24;\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 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 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 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 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",
"sourcePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/MultipleInheritanceInitializableMocks.sol",
"ast": {
"absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/MultipleInheritanceInitializableMocks.sol",
"exportedSymbols": {
"SampleChild": [
1849
],
"SampleFather": [
1809
],
"SampleGramps": [
1782
],
"SampleHuman": [
1734
],
"SampleMother": [
1758
]
},
"id": 1850,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1718,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:12"
},
{
"absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/Initializable.sol",
"file": "../Initializable.sol",
"id": 1719,
"nodeType": "ImportDirective",
"scope": 1850,
"sourceUnit": 56,
"src": "26:30:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1720,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 55,
"src": "453:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$55",
"typeString": "contract Initializable"
}
},
"id": 1721,
"nodeType": "InheritanceSpecifier",
"src": "453:13:12"
}
],
"contractDependencies": [
55
],
"contractKind": "contract",
"documentation": "Sample base intializable contract that is a human",
"fullyImplemented": true,
"id": 1734,
"linearizedBaseContracts": [
1734,
55
],
"name": "SampleHuman",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1723,
"name": "isHuman",
"nodeType": "VariableDeclaration",
"scope": 1734,
"src": "471:19:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1722,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "471:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1732,
"nodeType": "Block",
"src": "536:25:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1728,
"name": "isHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1723,
"src": "542:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1729,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "552:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "542:14:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1731,
"nodeType": "ExpressionStatement",
"src": "542:14:12"
}
]
},
"documentation": null,
"id": 1733,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1726,
"modifierName": {
"argumentTypes": null,
"id": 1725,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 36,
"src": "517:11:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "517:11:12"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1724,
"nodeType": "ParameterList",
"parameters": [],
"src": "514:2:12"
},
"payable": false,
"returnParameters": {
"id": 1727,
"nodeType": "ParameterList",
"parameters": [],
"src": "536:0:12"
},
"scope": 1734,
"src": "495:66:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1850,
"src": "429:134:12"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1735,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 55,
"src": "663:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$55",
"typeString": "contract Initializable"
}
},
"id": 1736,
"nodeType": "InheritanceSpecifier",
"src": "663:13:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1737,
"name": "SampleHuman",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1734,
"src": "678:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleHuman_$1734",
"typeString": "contract SampleHuman"
}
},
"id": 1738,
"nodeType": "InheritanceSpecifier",
"src": "678:11:12"
}
],
"contractDependencies": [
55,
1734
],
"contractKind": "contract",
"documentation": "Sample base intializable contract that defines a field mother",
"fullyImplemented": true,
"id": 1758,
"linearizedBaseContracts": [
1758,
1734,
55
],
"name": "SampleMother",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1740,
"name": "mother",
"nodeType": "VariableDeclaration",
"scope": 1758,
"src": "694:21:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1739,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "694:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1756,
"nodeType": "Block",
"src": "774:55:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 1747,
"name": "SampleHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1734,
"src": "780:11:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleHuman_$1734_$",
"typeString": "type(contract SampleHuman)"
}
},
"id": 1749,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1733,
"src": "780:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "780:24:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1751,
"nodeType": "ExpressionStatement",
"src": "780:24:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1752,
"name": "mother",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1740,
"src": "810:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1753,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1742,
"src": "819:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "810:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1755,
"nodeType": "ExpressionStatement",
"src": "810:14:12"
}
]
},
"documentation": null,
"id": 1757,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1745,
"modifierName": {
"argumentTypes": null,
"id": 1744,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 36,
"src": "755:11:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "755:11:12"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1743,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1742,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1757,
"src": "740:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1741,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "740:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "739:15:12"
},
"payable": false,
"returnParameters": {
"id": 1746,
"nodeType": "ParameterList",
"parameters": [],
"src": "774:0:12"
},
"scope": 1758,
"src": "720:109:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1850,
"src": "638:193:12"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1759,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 55,
"src": "931:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$55",
"typeString": "contract Initializable"
}
},
"id": 1760,
"nodeType": "InheritanceSpecifier",
"src": "931:13:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1761,
"name": "SampleHuman",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1734,
"src": "946:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleHuman_$1734",
"typeString": "contract SampleHuman"
}
},
"id": 1762,
"nodeType": "InheritanceSpecifier",
"src": "946:11:12"
}
],
"contractDependencies": [
55,
1734
],
"contractKind": "contract",
"documentation": "Sample base intializable contract that defines a field gramps",
"fullyImplemented": true,
"id": 1782,
"linearizedBaseContracts": [
1782,
1734,
55
],
"name": "SampleGramps",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1764,
"name": "gramps",
"nodeType": "VariableDeclaration",
"scope": 1782,
"src": "962:21:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1763,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "962:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1780,
"nodeType": "Block",
"src": "1042:55:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 1771,
"name": "SampleHuman",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1734,
"src": "1048:11:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleHuman_$1734_$",
"typeString": "type(contract SampleHuman)"
}
},
"id": 1773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1733,
"src": "1048:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1048:24:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1775,
"nodeType": "ExpressionStatement",
"src": "1048:24:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1776,
"name": "gramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "1078:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1777,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1766,
"src": "1087:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1078:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1779,
"nodeType": "ExpressionStatement",
"src": "1078:14:12"
}
]
},
"documentation": null,
"id": 1781,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1769,
"modifierName": {
"argumentTypes": null,
"id": 1768,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 36,
"src": "1023:11:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1023:11:12"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1767,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1766,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1781,
"src": "1008:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1765,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1008:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1007:15:12"
},
"payable": false,
"returnParameters": {
"id": 1770,
"nodeType": "ParameterList",
"parameters": [],
"src": "1042:0:12"
},
"scope": 1782,
"src": "988:109:12",
"stateMutability": "nonpayable",
"superFunction": 1757,
"visibility": "public"
}
],
"scope": 1850,
"src": "906:193:12"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1783,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 55,
"src": "1223:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$55",
"typeString": "contract Initializable"
}
},
"id": 1784,
"nodeType": "InheritanceSpecifier",
"src": "1223:13:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1785,
"name": "SampleGramps",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1782,
"src": "1238:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleGramps_$1782",
"typeString": "contract SampleGramps"
}
},
"id": 1786,
"nodeType": "InheritanceSpecifier",
"src": "1238:12:12"
}
],
"contractDependencies": [
55,
1734,
1782
],
"contractKind": "contract",
"documentation": "Sample base intializable contract that defines a field father and extends from gramps",
"fullyImplemented": true,
"id": 1809,
"linearizedBaseContracts": [
1809,
1782,
1734,
55
],
"name": "SampleFather",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1788,
"name": "father",
"nodeType": "VariableDeclaration",
"scope": 1809,
"src": "1255:21:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1787,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1255:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1807,
"nodeType": "Block",
"src": "1354:65:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1800,
"name": "_gramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1790,
"src": "1384:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1797,
"name": "SampleGramps",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1782,
"src": "1360:12:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SampleGramps_$1782_$",
"typeString": "type(contract SampleGramps)"
}
},
"id": 1799,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "initialize",
"nodeType": "MemberAccess",
"referencedDeclaration": 1781,
"src": "1360:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1801,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1360:32:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1802,
"nodeType": "ExpressionStatement",
"src": "1360:32:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1805,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1803,
"name": "father",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1788,
"src": "1398:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1804,
"name": "_father",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1792,
"src": "1407:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1398:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1806,
"nodeType": "ExpressionStatement",
"src": "1398:16:12"
}
]
},
"documentation": null,
"id": 1808,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1795,
"modifierName": {
"argumentTypes": null,
"id": 1794,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 36,
"src": "1335:11:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1335:11:12"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1793,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1790,
"name": "_gramps",
"nodeType": "VariableDeclaration",
"scope": 1808,
"src": "1301:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1789,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1301:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1792,
"name": "_father",
"nodeType": "VariableDeclaration",
"scope": 1808,
"src": "1318:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1791,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1318:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1300:34:12"
},
"payable": false,
"returnParameters": {
"id": 1796,
"nodeType": "ParameterList",
"parameters": [],
"src": "1354:0:12"
},
"scope": 1809,
"src": "1281:138:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1850,
"src": "1198:223:12"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1810,
"name": "Initializable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 55,
"src": "1501:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$55",
"typeString": "contract Initializable"
}
},
"id": 1811,
"nodeType": "InheritanceSpecifier",
"src": "1501:13:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1812,
"name": "SampleMother",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1758,
"src": "1516:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleMother_$1758",
"typeString": "contract SampleMother"
}
},
"id": 1813,
"nodeType": "InheritanceSpecifier",
"src": "1516:12:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1814,
"name": "SampleFather",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1809,
"src": "1530:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SampleFather_$1809",
"typeString": "contract SampleFather"
}
},
"id": 1815,
"nodeType": "InheritanceSpecifier",
"src": "1530:12:12"
}
],
"contractDependencies": [
55,
1734,
1758,
1782,
1809
],
"contractKind": "contract",
"documentation": "Child extends from mother, father (gramps)",
"fullyImplemented": true,
"id": 1849,
"linearizedBaseContract