diff --git a/package.json b/package.json index 64d08a6a0..0e6227dbd 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "tests/cli/test", "tests/cli/workdir", "tests/kits/test", - "tests/kits/workdir" + "tests/kits/workdir", + "tests/mocks/*" ], "nohoist": [ "**/mock-stdlib" diff --git a/packages/cli/test/utils/solidity.test.js b/packages/cli/test/utils/solidity.test.js index dd4045a09..318369a0f 100644 --- a/packages/cli/test/utils/solidity.test.js +++ b/packages/cli/test/utils/solidity.test.js @@ -2,14 +2,14 @@ require('../setup'); import { getImports } from '../../src/utils/solidity'; -describe('utils.solidity', function () { - describe('getImports', function () { - it('returns no imports from empty file', function () { +describe('utils.solidity', function() { + describe('getImports', function() { + it('returns no imports from empty file', function() { getImports('').should.be.empty; }); - it.skip('returns no imports from commented out file', function () { + it.skip('returns no imports from commented out file', function() { getImports(`// import "Foo.sol";`).should.be.empty; }); }); -}); \ No newline at end of file +}); diff --git a/packages/lib/contracts/Initializable.sol b/packages/lib/contracts/Initializable.sol index 841dee2f5..09a4a0532 100644 --- a/packages/lib/contracts/Initializable.sol +++ b/packages/lib/contracts/Initializable.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.24 <0.6.0; +pragma solidity >=0.4.24 <0.7.0; /** @@ -51,8 +51,9 @@ contract Initializable { // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. + address self = address(this); uint256 cs; - assembly { cs := extcodesize(address) } + assembly { cs := extcodesize(self) } return cs == 0; } diff --git a/packages/lib/package.json b/packages/lib/package.json index f43217686..c285504ff 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -113,8 +113,8 @@ "lodash.times": "^4.3.2", "lodash.zipwith": "^4.2.0", "mocha": "^6.2.2", - "mock-dependency": "file:test/mocks/mock-dependency", - "mock-solc-0.6": "file:test/mocks/mock-solc-0.6", + "mock-dependency": "file:../../tests/mocks/mock-dependency", + "mock-solc-0.6": "file:../../tests/mocks/mock-solc-0.6", "prettier": "^1.19.1", "sinon": "^6.1.4", "sinon-chai": "^3.3.0", diff --git a/packages/lib/test/contracts/Initializable.test.js b/packages/lib/test/contracts/Initializable.test.js index d21260e8b..804c08d4e 100644 --- a/packages/lib/test/contracts/Initializable.test.js +++ b/packages/lib/test/contracts/Initializable.test.js @@ -6,81 +6,87 @@ import assertRevert from '../../src/test/helpers/assertRevert'; import { assert } from 'chai'; -const InitializableMock = Contracts.getFromLocal('InitializableMock'); -const SampleMother = Contracts.getFromLocal('SampleMother'); -const SampleGramps = Contracts.getFromLocal('SampleGramps'); -const SampleFather = Contracts.getFromLocal('SampleFather'); -const SampleChild = Contracts.getFromLocal('SampleChild'); - -describe('Initializable', function() { - describe('basic testing without inheritance', function() { - beforeEach('deploying', async function() { - this.contract = await InitializableMock.new(); - }); +testInitializable(`Initializable on solc 0.5`, { + InitializableMock: Contracts.getFromLocal('InitializableMock'), + SampleChild: Contracts.getFromLocal('SampleChild'), +}); - context('before initialize', function() { - it('initializer has not run', async function() { - assert.isFalse(await this.contract.methods.initializerRan().call()); - }); - }); +testInitializable(`Initializable on solc 0.6`, { + InitializableMock: Contracts.getFromNodeModules('mock-solc-0.6', 'InitializableMock'), + SampleChild: Contracts.getFromNodeModules('mock-solc-0.6', 'SampleChild'), +}); - context('after initialize', function() { - beforeEach('initializing', async function() { - await this.contract.methods.initialize().send(); +function testInitializable(description, { InitializableMock, SampleChild }) { + describe(description, function() { + describe('basic testing without inheritance', function() { + beforeEach('deploying', async function() { + this.contract = await InitializableMock.new(); }); - it('initializer has run', async function() { - assert.isTrue(await this.contract.methods.initializerRan().call()); + context('before initialize', function() { + it('initializer has not run', async function() { + assert.isFalse(await this.contract.methods.initializerRan().call()); + }); }); - it('initializer does not run again', async function() { - await assertRevert(this.contract.methods.initialize().send()); - }); - }); + context('after initialize', function() { + beforeEach('initializing', async function() { + await this.contract.methods.initialize().send(); + }); - context('after nested initialize', function() { - beforeEach('initializing', async function() { - await this.contract.methods.initializeNested().send(); + it('initializer has run', async function() { + assert.isTrue(await this.contract.methods.initializerRan().call()); + }); + + it('initializer does not run again', async function() { + await assertRevert(this.contract.methods.initialize().send()); + }); }); - it('initializer has run', async function() { - assert.isTrue(await this.contract.methods.initializerRan().call()); + context('after nested initialize', function() { + beforeEach('initializing', async function() { + await this.contract.methods.initializeNested().send(); + }); + + it('initializer has run', async function() { + assert.isTrue(await this.contract.methods.initializerRan().call()); + }); }); }); - }); - describe('complex testing with inheritance', function() { - const mother = 12; - const gramps = 56; - const father = 34; - const child = 78; + describe('complex testing with inheritance', function() { + const mother = 12; + const gramps = 56; + const father = 34; + const child = 78; - beforeEach('deploying', async function() { - this.contract = await SampleChild.new(); - }); + beforeEach('deploying', async function() { + this.contract = await SampleChild.new(); + }); - beforeEach('initializing', async function() { - await this.contract.methods.initialize(mother, gramps, father, child).send(); - }); + beforeEach('initializing', async function() { + await this.contract.methods.initialize(mother, gramps, father, child).send(); + }); - it('initializes human', async function() { - assert.equal(await this.contract.methods.isHuman().call(), true); - }); + it('initializes human', async function() { + assert.equal(await this.contract.methods.isHuman().call(), true); + }); - it('initializes mother', async function() { - assert.equal(await this.contract.methods.mother().call(), mother); - }); + it('initializes mother', async function() { + assert.equal(await this.contract.methods.mother().call(), mother); + }); - it('initializes gramps', async function() { - assert.equal(await this.contract.methods.gramps().call(), gramps); - }); + it('initializes gramps', async function() { + assert.equal(await this.contract.methods.gramps().call(), gramps); + }); - it('initializes father', async function() { - assert.equal(await this.contract.methods.father().call(), father); - }); + it('initializes father', async function() { + assert.equal(await this.contract.methods.father().call(), father); + }); - it('initializes child', async function() { - assert.equal(await this.contract.methods.child().call(), child); + it('initializes child', async function() { + assert.equal(await this.contract.methods.child().call(), child); + }); }); }); -}); +} diff --git a/packages/lib/test/mocks/mock-dependency/.gitignore b/tests/mocks/mock-dependency/.gitignore similarity index 100% rename from packages/lib/test/mocks/mock-dependency/.gitignore rename to tests/mocks/mock-dependency/.gitignore diff --git a/packages/lib/test/mocks/mock-dependency/build/contracts/Greeter.json b/tests/mocks/mock-dependency/build/contracts/Greeter.json similarity index 100% rename from packages/lib/test/mocks/mock-dependency/build/contracts/Greeter.json rename to tests/mocks/mock-dependency/build/contracts/Greeter.json diff --git a/packages/lib/test/mocks/mock-dependency/contracts/DependencyInvalid.sol b/tests/mocks/mock-dependency/contracts/DependencyInvalid.sol similarity index 100% rename from packages/lib/test/mocks/mock-dependency/contracts/DependencyInvalid.sol rename to tests/mocks/mock-dependency/contracts/DependencyInvalid.sol diff --git a/packages/lib/test/mocks/mock-dependency/contracts/DependencyStorageMock.sol b/tests/mocks/mock-dependency/contracts/DependencyStorageMock.sol similarity index 100% rename from packages/lib/test/mocks/mock-dependency/contracts/DependencyStorageMock.sol rename to tests/mocks/mock-dependency/contracts/DependencyStorageMock.sol diff --git a/packages/lib/test/mocks/mock-dependency/contracts/Greeter.sol b/tests/mocks/mock-dependency/contracts/Greeter.sol similarity index 100% rename from packages/lib/test/mocks/mock-dependency/contracts/Greeter.sol rename to tests/mocks/mock-dependency/contracts/Greeter.sol diff --git a/packages/lib/test/mocks/mock-dependency/migrations/.gitkeep b/tests/mocks/mock-dependency/migrations/.gitkeep similarity index 100% rename from packages/lib/test/mocks/mock-dependency/migrations/.gitkeep rename to tests/mocks/mock-dependency/migrations/.gitkeep diff --git a/packages/lib/test/mocks/mock-dependency/package-lock.json b/tests/mocks/mock-dependency/package-lock.json similarity index 100% rename from packages/lib/test/mocks/mock-dependency/package-lock.json rename to tests/mocks/mock-dependency/package-lock.json diff --git a/packages/lib/test/mocks/mock-dependency/package.json b/tests/mocks/mock-dependency/package.json similarity index 100% rename from packages/lib/test/mocks/mock-dependency/package.json rename to tests/mocks/mock-dependency/package.json diff --git a/packages/lib/test/mocks/mock-dependency/truffle.js b/tests/mocks/mock-dependency/truffle.js similarity index 100% rename from packages/lib/test/mocks/mock-dependency/truffle.js rename to tests/mocks/mock-dependency/truffle.js diff --git a/tests/mocks/mock-solc-0.6/.gitignore b/tests/mocks/mock-solc-0.6/.gitignore new file mode 100644 index 000000000..0aba28e9b --- /dev/null +++ b/tests/mocks/mock-solc-0.6/.gitignore @@ -0,0 +1 @@ +!build/ diff --git a/packages/lib/test/mocks/mock-solc-0.6/.openzeppelin/project.json b/tests/mocks/mock-solc-0.6/.openzeppelin/project.json similarity index 70% rename from packages/lib/test/mocks/mock-solc-0.6/.openzeppelin/project.json rename to tests/mocks/mock-solc-0.6/.openzeppelin/project.json index b28d792dc..ac25a4e9d 100644 --- a/packages/lib/test/mocks/mock-solc-0.6/.openzeppelin/project.json +++ b/tests/mocks/mock-solc-0.6/.openzeppelin/project.json @@ -7,12 +7,15 @@ "telemetryOptIn": false, "compiler": { "manager": "openzeppelin", - "solcVersion": "0.6.0", + "solcVersion": "0.6.2", "compilerSettings": { "optimizer": { "enabled": false, "runs": "200" } - } + }, + "artifactsDir": "build/contracts", + "contractsDir": "contracts", + "typechain": {} } -} \ No newline at end of file +} diff --git a/packages/lib/test/mocks/mock-solc-0.6/build/contracts/Base.json b/tests/mocks/mock-solc-0.6/build/contracts/Base.json similarity index 98% rename from packages/lib/test/mocks/mock-solc-0.6/build/contracts/Base.json rename to tests/mocks/mock-solc-0.6/build/contracts/Base.json index 24a25077c..d0b5040fc 100644 --- a/packages/lib/test/mocks/mock-solc-0.6/build/contracts/Base.json +++ b/tests/mocks/mock-solc-0.6/build/contracts/Base.json @@ -653,11 +653,11 @@ ], "src": "0:462:0" }, - "bytecode": "0x6080604052348015600f57600080fd5b5060818061001e6000396000f3fe60806040526004361060265760003560e01c806310c82ddf14602b578063f77df40a14603f575b600080fd5b348015603657600080fd5b50603d6047565b005b60456049565b005b565b56fea26469706673582212201883a9831b1f8f6f26caaa345bbf964728ba05ae549373d0f00a92006fd05bff64736f6c63430006000033", - "deployedBytecode": "0x60806040526004361060265760003560e01c806310c82ddf14602b578063f77df40a14603f575b600080fd5b348015603657600080fd5b50603d6047565b005b60456049565b005b565b56fea26469706673582212201883a9831b1f8f6f26caaa345bbf964728ba05ae549373d0f00a92006fd05bff64736f6c63430006000033", + "bytecode": "0x6080604052348015600f57600080fd5b5060818061001e6000396000f3fe60806040526004361060265760003560e01c806310c82ddf14602b578063f77df40a14603f575b600080fd5b348015603657600080fd5b50603d6047565b005b60456049565b005b565b56fea2646970667358221220b27de1792583c12c3ac075a9c535f5d05aa936d0924b6652561ab809b1252a4064736f6c63430006020033", + "deployedBytecode": "0x60806040526004361060265760003560e01c806310c82ddf14602b578063f77df40a14603f575b600080fd5b348015603657600080fd5b50603d6047565b005b60456049565b005b565b56fea2646970667358221220b27de1792583c12c3ac075a9c535f5d05aa936d0924b6652561ab809b1252a4064736f6c63430006020033", "compiler": { "name": "solc", - "version": "0.6.0+commit.26b70077.Emscripten.clang", + "version": "0.6.2+commit.bacdbe57.Linux.g++", "optimizer": { "enabled": false, "runs": 200 diff --git a/tests/mocks/mock-solc-0.6/build/contracts/Initializable.json b/tests/mocks/mock-solc-0.6/build/contracts/Initializable.json new file mode 100644 index 000000000..95e338066 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/Initializable.json @@ -0,0 +1,960 @@ +{ + "fileName": "Initializable.sol", + "contractName": "Initializable", + "source": "pragma solidity >=0.4.24 <0.7.0;\n\n\n/**\n * @title Initializable\n *\n * @dev Helper contract to support initializer functions. To use it, replace\n * the constructor with a function that has the `initializer` modifier.\n * WARNING: Unlike constructors, initializer functions must be manually\n * invoked. This applies both to deploying an Initializable contract, as well\n * as extending an Initializable contract via inheritance.\n * WARNING: When used with inheritance, manual care must be taken to not invoke\n * a parent initializer twice, or ensure that all initializers are idempotent,\n * because this is not dealt with automatically as with constructors.\n */\ncontract Initializable {\n\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private initializing;\n\n /**\n * @dev Modifier to use in the initializer function of a contract.\n */\n modifier initializer() {\n require(initializing || isConstructor() || !initialized, \"Contract instance has already been initialized\");\n\n bool isTopLevelCall = !initializing;\n if (isTopLevelCall) {\n initializing = true;\n initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n initializing = false;\n }\n }\n\n /// @dev Returns true if and only if the function is running in the constructor\n function isConstructor() private view returns (bool) {\n address self = address(this);\n // extcodesize checks the size of the code stored in an address, and\n // address returns the current address. Since the code is still not\n // deployed when running a constructor, any checks on its code size will\n // yield zero, making it an effective way to detect if a contract is\n // under construction or not.\n uint256 cs;\n assembly { cs := extcodesize(self) }\n return cs == 0;\n }\n\n // Reserved storage space to allow for layout changes in the future.\n uint256[50] private ______gap;\n}\n", + "sourcePath": "contracts/initializable/Initializable.sol", + "sourceMap": "657:1357:1:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;657:1357:1;;;;;;;", + "deployedSourceMap": "657:1357:1:-:0;;;;;", + "abi": [], + "ast": { + "absolutePath": "contracts/initializable/Initializable.sol", + "exportedSymbols": { + "Initializable": [ + 125 + ] + }, + "id": 126, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 57, + "literals": [ + "solidity", + ">=", + "0.4", + ".24", + "<", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:32:1" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Initializable\n * @dev Helper contract to support initializer functions. To use it, replace\nthe constructor with a function that has the `initializer` modifier.\nWARNING: Unlike constructors, initializer functions must be manually\ninvoked. This applies both to deploying an Initializable contract, as well\nas extending an Initializable contract via inheritance.\nWARNING: When used with inheritance, manual care must be taken to not invoke\na parent initializer twice, or ensure that all initializers are idempotent,\nbecause this is not dealt with automatically as with constructors.", + "fullyImplemented": true, + "id": 125, + "linearizedBaseContracts": [ + 125 + ], + "name": "Initializable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 59, + "name": "initialized", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 125, + "src": "757:24:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 58, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "757:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 61, + "name": "initializing", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 125, + "src": "876:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "876:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 98, + "nodeType": "Block", + "src": "1010:313:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 64, + "name": "initializing", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "1024:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 65, + "name": "isConstructor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1040:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1040:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1024:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 69, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1059:12:1", + "subExpression": { + "argumentTypes": null, + "id": 68, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1060:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1024:47:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564", + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1073:48:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9fbba6c4dcac9134893b633b9564f36435b3f927c1d5fa152c5c14b20cecb1a4", + "typeString": "literal_string \"Contract instance has already been initialized\"" + }, + "value": "Contract instance has already been initialized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9fbba6c4dcac9134893b633b9564f36435b3f927c1d5fa152c5c14b20cecb1a4", + "typeString": "literal_string \"Contract instance has already been initialized\"" + } + ], + "id": 63, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1016:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1016:106:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 73, + "nodeType": "ExpressionStatement", + "src": "1016:106:1" + }, + { + "assignments": [ + 75 + ], + "declarations": [ + { + "constant": false, + "id": 75, + "name": "isTopLevelCall", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 98, + "src": "1129:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 74, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1129:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 78, + "initialValue": { + "argumentTypes": null, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1151:13:1", + "subExpression": { + "argumentTypes": null, + "id": 76, + "name": "initializing", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "1152:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1129:35:1" + }, + { + "condition": { + "argumentTypes": null, + "id": 79, + "name": "isTopLevelCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1174:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 89, + "nodeType": "IfStatement", + "src": "1170:80:1", + "trueBody": { + "id": 88, + "nodeType": "Block", + "src": "1190:60:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 80, + "name": "initializing", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "1198:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1213:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1198:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "1198:19:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 86, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 84, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1225:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1239:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1225:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 87, + "nodeType": "ExpressionStatement", + "src": "1225:18:1" + } + ] + } + }, + { + "id": 90, + "nodeType": "PlaceholderStatement", + "src": "1256:1:1" + }, + { + "condition": { + "argumentTypes": null, + "id": 91, + "name": "isTopLevelCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1268:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 97, + "nodeType": "IfStatement", + "src": "1264:55:1", + "trueBody": { + "id": 96, + "nodeType": "Block", + "src": "1284:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 92, + "name": "initializing", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "1292:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1307:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1292:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 95, + "nodeType": "ExpressionStatement", + "src": "1292:20:1" + } + ] + } + } + ] + }, + "documentation": "@dev Modifier to use in the initializer function of a contract.", + "id": 99, + "name": "initializer", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 62, + "nodeType": "ParameterList", + "parameters": [], + "src": "1007:2:1" + }, + "src": "987:336:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 119, + "nodeType": "Block", + "src": "1462:445:1", + "statements": [ + { + "assignments": [ + 105 + ], + "declarations": [ + { + "constant": false, + "id": 105, + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 119, + "src": "1468:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1468:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 110, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1491:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + ], + "id": 107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1483:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1483:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1483:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1468:28:1" + }, + { + "assignments": [ + 112 + ], + "declarations": [ + { + "constant": false, + "id": 112, + "name": "cs", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 119, + "src": "1831:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1831:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 113, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1831:10:1" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1856:27:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1858:23:1", + "value": { + "arguments": [ + { + "name": "self", + "nodeType": "YulIdentifier", + "src": "1876:4:1" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "1864:11:1" + }, + "nodeType": "YulFunctionCall", + "src": "1864:17:1" + }, + "variableNames": [ + { + "name": "cs", + "nodeType": "YulIdentifier", + "src": "1858:2:1" + } + ] + } + ] + }, + "evmVersion": "petersburg", + "externalReferences": [ + { + "declaration": 112, + "isOffset": false, + "isSlot": false, + "src": "1858:2:1", + "valueSize": 1 + }, + { + "declaration": 105, + "isOffset": false, + "isSlot": false, + "src": "1876:4:1", + "valueSize": 1 + } + ], + "id": 114, + "nodeType": "InlineAssembly", + "src": "1847:36:1" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 115, + "name": "cs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 112, + "src": "1895:2:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1901:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1895:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 103, + "id": 118, + "nodeType": "Return", + "src": "1888:14:1" + } + ] + }, + "documentation": "@dev Returns true if and only if the function is running in the constructor", + "id": 120, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConstructor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 100, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:2:1" + }, + "returnParameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 102, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 120, + "src": "1456:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 101, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1456:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1455:6:1" + }, + "scope": 125, + "src": "1409:498:1", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": false, + "id": 124, + "name": "______gap", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 125, + "src": "1982:29:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage", + "typeString": "uint256[50]" + }, + "typeName": { + "baseType": { + "id": 121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1982:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 123, + "length": { + "argumentTypes": null, + "hexValue": "3530", + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "nodeType": "ArrayTypeName", + "src": "1982:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", + "typeString": "uint256[50]" + } + }, + "value": null, + "visibility": "private" + } + ], + "scope": 126, + "src": "657:1357:1" + } + ], + "src": "0:2015:1" + }, + "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220a8b630af436e4c53600392e612ffca2c195b6be9440509bbb7bb7d646153885c64736f6c63430006020033", + "deployedBytecode": "0x6080604052600080fdfea2646970667358221220a8b630af436e4c53600392e612ffca2c195b6be9440509bbb7bb7d646153885c64736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/tests/mocks/mock-solc-0.6/build/contracts/InitializableMock.json b/tests/mocks/mock-solc-0.6/build/contracts/InitializableMock.json new file mode 100644 index 000000000..345e76d89 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/InitializableMock.json @@ -0,0 +1,866 @@ +{ + "fileName": "InitializableMock.sol", + "contractName": "InitializableMock", + "source": "pragma solidity ^0.6.0;\n\nimport \"./Initializable.sol\";\n\n/**\n * @title InitializableMock\n * @dev This contract is a mock to test initializable functionality\n */\ncontract InitializableMock is Initializable {\n\n bool public initializerRan;\n uint256 public x;\n\n function initialize() public initializer {\n initializerRan = true;\n }\n\n function initializeNested() public initializer {\n initialize();\n }\n\n function initializeWithX(uint256 _x) public payable initializer {\n x = _x;\n }\n\n function nonInitializable(uint256 _x) public payable {\n x = _x;\n }\n\n function fail() public pure {\n require(false, \"InitializableMock forced failure\");\n }\n\n function secret() private pure returns (string memory) {\n return 'Im secret';\n }\n\n}\n", + "sourcePath": "contracts/initializable/InitializableMock.sol", + "sourceMap": "160:590:2:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;160:590:2;;;;;;;", + "deployedSourceMap": "160:590:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:81;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;411:81:2;;;;;;;;;;;;;;;;;:::i;:::-;;239:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;239:16:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;260:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;260:73:2;;;:::i;:::-;;570:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;570:89:2;;;:::i;:::-;;209:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;209:26:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;337:70;;8:9:-1;5:2;;;30:1;27;20:12;5:2;337:70:2;;;:::i;:::-;;496;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;496:70:2;;;;;;;;;;;;;;;;;:::i;:::-;;411:81;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;485:2:2::1;481:1;:6;;;;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;411:81:2;;:::o;239:16::-;;;;:::o;260:73::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;324:4:2::1;307:14;;:21;;;;;;;;;;;;;;;;;;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;260:73:2;:::o;570:89::-;612:5;604:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;570:89::o;209:26::-;;;;;;;;;;;;;:::o;337:70::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;390:12:2::1;:10;:12::i;:::-;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;337:70:2;:::o;496:::-;559:2;555:1;:6;;;;496:70;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409:498;:::o", + "abi": [ + { + "inputs": [], + "name": "fail", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeNested", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + } + ], + "name": "initializeWithX", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "initializerRan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + } + ], + "name": "nonInitializable", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "x", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "ast": { + "absolutePath": "contracts/initializable/InitializableMock.sol", + "exportedSymbols": { + "InitializableMock": [ + 193 + ] + }, + "id": 194, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 127, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 128, + "nodeType": "ImportDirective", + "scope": 194, + "sourceUnit": 126, + "src": "25:29:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 129, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "190:13:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 130, + "nodeType": "InheritanceSpecifier", + "src": "190:13:2" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "@title InitializableMock\n@dev This contract is a mock to test initializable functionality", + "fullyImplemented": true, + "id": 193, + "linearizedBaseContracts": [ + 193, + 125 + ], + "name": "InitializableMock", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "c3b8ef2a", + "id": 132, + "name": "initializerRan", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 193, + "src": "209:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 131, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "209:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0c55699c", + "id": 134, + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 193, + "src": "239:16:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "239:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 143, + "nodeType": "Block", + "src": "301:32:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 139, + "name": "initializerRan", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "307:14:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "324:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "307:21:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 142, + "nodeType": "ExpressionStatement", + "src": "307:21:2" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 144, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 137, + "modifierName": { + "argumentTypes": null, + "id": 136, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "289:11:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "289:11:2" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 135, + "nodeType": "ParameterList", + "parameters": [], + "src": "279:2:2" + }, + "returnParameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [], + "src": "301:0:2" + }, + "scope": 193, + "src": "260:73:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 152, + "nodeType": "Block", + "src": "384:23:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 149, + "name": "initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "390:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "390:12:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 151, + "nodeType": "ExpressionStatement", + "src": "390:12:2" + } + ] + }, + "documentation": null, + "functionSelector": "cb3a528d", + "id": 153, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 147, + "modifierName": { + "argumentTypes": null, + "id": 146, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "372:11:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "372:11:2" + } + ], + "name": "initializeNested", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 145, + "nodeType": "ParameterList", + "parameters": [], + "src": "362:2:2" + }, + "returnParameters": { + "id": 148, + "nodeType": "ParameterList", + "parameters": [], + "src": "384:0:2" + }, + "scope": 193, + "src": "337:70:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 164, + "nodeType": "Block", + "src": "475:17:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 160, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "481:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 161, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 155, + "src": "485:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "481:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "481:6:2" + } + ] + }, + "documentation": null, + "functionSelector": "0018eaa8", + "id": 165, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 158, + "modifierName": { + "argumentTypes": null, + "id": 157, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "463:11:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "463:11:2" + } + ], + "name": "initializeWithX", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 155, + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 165, + "src": "436:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 154, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "436:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "435:12:2" + }, + "returnParameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [], + "src": "475:0:2" + }, + "scope": 193, + "src": "411:81:2", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 174, + "nodeType": "Block", + "src": "549:17:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 170, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "555:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 171, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "559:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "555:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 173, + "nodeType": "ExpressionStatement", + "src": "555:6:2" + } + ] + }, + "documentation": null, + "functionSelector": "e955c9ec", + "id": 175, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nonInitializable", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 167, + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 175, + "src": "522:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "522:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "521:12:2" + }, + "returnParameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [], + "src": "549:0:2" + }, + "scope": 193, + "src": "496:70:2", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 183, + "nodeType": "Block", + "src": "598:61:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "496e697469616c697a61626c654d6f636b20666f72636564206661696c757265", + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "619:34:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_70458f305ab12a5814a8a6125666b5faf9428e7481e52fe1e943f8addb4009b7", + "typeString": "literal_string \"InitializableMock forced failure\"" + }, + "value": "InitializableMock forced failure" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_70458f305ab12a5814a8a6125666b5faf9428e7481e52fe1e943f8addb4009b7", + "typeString": "literal_string \"InitializableMock forced failure\"" + } + ], + "id": 178, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "604:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "604:50:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "604:50:2" + } + ] + }, + "documentation": null, + "functionSelector": "a9cc4718", + "id": 184, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fail", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [], + "src": "583:2:2" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "598:0:2" + }, + "scope": 193, + "src": "570:89:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 191, + "nodeType": "Block", + "src": "718:29:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "496d20736563726574", + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "731:11:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_917e1920cd22ea08a6fe16f962e32a49c23ad423aee4a52a1181dc229099e711", + "typeString": "literal_string \"Im secret\"" + }, + "value": "Im secret" + }, + "functionReturnParameters": 188, + "id": 190, + "nodeType": "Return", + "src": "724:18:2" + } + ] + }, + "documentation": null, + "id": 192, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "secret", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 185, + "nodeType": "ParameterList", + "parameters": [], + "src": "678:2:2" + }, + "returnParameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 187, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 192, + "src": "703:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 186, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "703:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "702:15:2" + }, + "scope": 193, + "src": "663:84:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 194, + "src": "160:590:2" + } + ], + "src": "0:751:2" + }, + "bytecode": "0x608060405234801561001057600080fd5b506105ab806100206000396000f3fe60806040526004361061006f5760003560e01c8063a9cc47181161004e578063a9cc4718146100e4578063c3b8ef2a146100fb578063cb3a528d1461012a578063e955c9ec146101415761006f565b806218eaa8146100745780630c55699c146100a25780638129fc1c146100cd575b600080fd5b6100a06004803603602081101561008a57600080fd5b810190808035906020019092919050505061016f565b005b3480156100ae57600080fd5b506100b7610276565b6040518082815260200191505060405180910390f35b3480156100d957600080fd5b506100e261027c565b005b3480156100f057600080fd5b506100f9610396565b005b34801561010757600080fd5b5061011061040c565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b5061013f61041f565b005b61016d6004803603602081101561015757600080fd5b8101908080359060200190929190505050610526565b005b600060019054906101000a900460ff168061018e575061018d610530565b5b806101a557506000809054906101000a900460ff16155b6101fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561024a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8160348190555080156102725760008060016101000a81548160ff0219169083151502179055505b5050565b60345481565b600060019054906101000a900460ff168061029b575061029a610530565b5b806102b257506000809054906101000a900460ff16155b610307576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610357576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156103935760008060016101000a81548160ff0219169083151502179055505b50565b600061040a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f496e697469616c697a61626c654d6f636b20666f72636564206661696c75726581525060200191505060405180910390fd5b565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061043e575061043d610530565b5b8061045557506000809054906101000a900460ff16155b6104aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156104fa576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61050261027c565b80156105235760008060016101000a81548160ff0219169083151502179055505b50565b8060348190555050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202c75a44edb298b729a8ab2356eeda51e05310f7bcbba30d2a74c6a8f2fe2615464736f6c63430006020033", + "deployedBytecode": "0x60806040526004361061006f5760003560e01c8063a9cc47181161004e578063a9cc4718146100e4578063c3b8ef2a146100fb578063cb3a528d1461012a578063e955c9ec146101415761006f565b806218eaa8146100745780630c55699c146100a25780638129fc1c146100cd575b600080fd5b6100a06004803603602081101561008a57600080fd5b810190808035906020019092919050505061016f565b005b3480156100ae57600080fd5b506100b7610276565b6040518082815260200191505060405180910390f35b3480156100d957600080fd5b506100e261027c565b005b3480156100f057600080fd5b506100f9610396565b005b34801561010757600080fd5b5061011061040c565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b5061013f61041f565b005b61016d6004803603602081101561015757600080fd5b8101908080359060200190929190505050610526565b005b600060019054906101000a900460ff168061018e575061018d610530565b5b806101a557506000809054906101000a900460ff16155b6101fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561024a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8160348190555080156102725760008060016101000a81548160ff0219169083151502179055505b5050565b60345481565b600060019054906101000a900460ff168061029b575061029a610530565b5b806102b257506000809054906101000a900460ff16155b610307576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610357576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156103935760008060016101000a81548160ff0219169083151502179055505b50565b600061040a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f496e697469616c697a61626c654d6f636b20666f72636564206661696c75726581525060200191505060405180910390fd5b565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061043e575061043d610530565b5b8061045557506000809054906101000a900460ff16155b6104aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610548602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156104fa576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61050261027c565b80156105235760008060016101000a81548160ff0219169083151502179055505b50565b8060348190555050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202c75a44edb298b729a8ab2356eeda51e05310f7bcbba30d2a74c6a8f2fe2615464736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/packages/lib/test/mocks/mock-solc-0.6/build/contracts/Sample.json b/tests/mocks/mock-solc-0.6/build/contracts/Sample.json similarity index 98% rename from packages/lib/test/mocks/mock-solc-0.6/build/contracts/Sample.json rename to tests/mocks/mock-solc-0.6/build/contracts/Sample.json index 5f6e96efb..64fc39683 100644 --- a/packages/lib/test/mocks/mock-solc-0.6/build/contracts/Sample.json +++ b/tests/mocks/mock-solc-0.6/build/contracts/Sample.json @@ -718,11 +718,11 @@ ], "src": "0:462:0" }, - "bytecode": "0x608060405234801561001057600080fd5b506101ef806100206000396000f3fe6080604052600436106100705760003560e01c80635a38719b1161004e5780635a38719b146100c1578063b7a5737514610110578063f77a680e1461013b578063f77df40a1461017657610070565b806310c82ddf146100755780633fa4f2451461008c5780634e45352b146100b7575b600080fd5b34801561008157600080fd5b5061008a610180565b005b34801561009857600080fd5b506100a1610182565b6040518082815260200191505060405180910390f35b6100bf610188565b005b3480156100cd57600080fd5b506100fa600480360360208110156100e457600080fd5b8101908080359060200190929190505050610196565b6040518082815260200191505060405180910390f35b34801561011c57600080fd5b506101256101a0565b6040518082815260200191505060405180910390f35b34801561014757600080fd5b506101746004803603602081101561015e57600080fd5b81019080803590602001909291905050506101a9565b005b61017e6101b7565b005b565b60005481565b600160005401600081905550565b6000819050919050565b60008054905090565b806000540160008190555050565b56fea2646970667358221220dc0b935ba7d7535722913b30f075b2b7a2f169e4f0d3d20033c4ea404d81d63764736f6c63430006000033", - "deployedBytecode": "0x6080604052600436106100705760003560e01c80635a38719b1161004e5780635a38719b146100c1578063b7a5737514610110578063f77a680e1461013b578063f77df40a1461017657610070565b806310c82ddf146100755780633fa4f2451461008c5780634e45352b146100b7575b600080fd5b34801561008157600080fd5b5061008a610180565b005b34801561009857600080fd5b506100a1610182565b6040518082815260200191505060405180910390f35b6100bf610188565b005b3480156100cd57600080fd5b506100fa600480360360208110156100e457600080fd5b8101908080359060200190929190505050610196565b6040518082815260200191505060405180910390f35b34801561011c57600080fd5b506101256101a0565b6040518082815260200191505060405180910390f35b34801561014757600080fd5b506101746004803603602081101561015e57600080fd5b81019080803590602001909291905050506101a9565b005b61017e6101b7565b005b565b60005481565b600160005401600081905550565b6000819050919050565b60008054905090565b806000540160008190555050565b56fea2646970667358221220dc0b935ba7d7535722913b30f075b2b7a2f169e4f0d3d20033c4ea404d81d63764736f6c63430006000033", + "bytecode": "0x608060405234801561001057600080fd5b506101ef806100206000396000f3fe6080604052600436106100705760003560e01c80635a38719b1161004e5780635a38719b146100c1578063b7a5737514610110578063f77a680e1461013b578063f77df40a1461017657610070565b806310c82ddf146100755780633fa4f2451461008c5780634e45352b146100b7575b600080fd5b34801561008157600080fd5b5061008a610180565b005b34801561009857600080fd5b506100a1610182565b6040518082815260200191505060405180910390f35b6100bf610188565b005b3480156100cd57600080fd5b506100fa600480360360208110156100e457600080fd5b8101908080359060200190929190505050610196565b6040518082815260200191505060405180910390f35b34801561011c57600080fd5b506101256101a0565b6040518082815260200191505060405180910390f35b34801561014757600080fd5b506101746004803603602081101561015e57600080fd5b81019080803590602001909291905050506101a9565b005b61017e6101b7565b005b565b60005481565b600160005401600081905550565b6000819050919050565b60008054905090565b806000540160008190555050565b56fea264697066735822122072eaab6c51fc2532ca61ee203cce67660d279746e35f1df4692b5b2f17d9dabb64736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100705760003560e01c80635a38719b1161004e5780635a38719b146100c1578063b7a5737514610110578063f77a680e1461013b578063f77df40a1461017657610070565b806310c82ddf146100755780633fa4f2451461008c5780634e45352b146100b7575b600080fd5b34801561008157600080fd5b5061008a610180565b005b34801561009857600080fd5b506100a1610182565b6040518082815260200191505060405180910390f35b6100bf610188565b005b3480156100cd57600080fd5b506100fa600480360360208110156100e457600080fd5b8101908080359060200190929190505050610196565b6040518082815260200191505060405180910390f35b34801561011c57600080fd5b506101256101a0565b6040518082815260200191505060405180910390f35b34801561014757600080fd5b506101746004803603602081101561015e57600080fd5b81019080803590602001909291905050506101a9565b005b61017e6101b7565b005b565b60005481565b600160005401600081905550565b6000819050919050565b60008054905090565b806000540160008190555050565b56fea264697066735822122072eaab6c51fc2532ca61ee203cce67660d279746e35f1df4692b5b2f17d9dabb64736f6c63430006020033", "compiler": { "name": "solc", - "version": "0.6.0+commit.26b70077.Emscripten.clang", + "version": "0.6.2+commit.bacdbe57.Linux.g++", "optimizer": { "enabled": false, "runs": 200 diff --git a/tests/mocks/mock-solc-0.6/build/contracts/SampleChild.json b/tests/mocks/mock-solc-0.6/build/contracts/SampleChild.json new file mode 100644 index 000000000..5f7d6dbdc --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/SampleChild.json @@ -0,0 +1,1968 @@ +{ + "fileName": "MultipleInheritanceInitializableMocks.sol", + "contractName": "SampleChild", + "source": "pragma solidity ^0.6.0;\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 value) initializer override(SampleGramps, SampleMother) public {\n SampleGramps.initialize(value);\n SampleMother.initialize(value);\n }\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": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "sourceMap": "1507:485:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1507:485:3;;;;;;;", + "deployedSourceMap": "1507:485:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1507:485:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1277:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1577:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;469:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1774:216;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;1774:216:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;493:74;;;:::i;:::-;;1303:146;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1303:146:3;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;700:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;976;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1602:168;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1602:168:3;;;;;;;;;;;;;;;;;:::i;:::-;;1277:21;;;;:::o;1577:20::-;;;;:::o;469:19::-;;;;;;;;;;;;;:::o;1774:216::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1886:32:3::1;1910:7;1886:23;:32::i;:::-;1924:41;1948:7;1957;1924:23;:41::i;:::-;1979:6;1971:5;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1774:216:3;;;;;:::o;493:74::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;558:4:3::1;548:7;;:14;;;;;;;;;;;;;;;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;493:74:3;:::o;1303:146::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1390:32:3::1;1414:7;1390:23;:32::i;:::-;1437:7;1428:6;:16;;;;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1303:146:3;;;:::o;700:21::-;;;;:::o;976:::-;;;;:::o;1602:168::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1699:30:3::1;1723:5;1699:23;:30::i;:::-;1735;1759:5;1735:23;:30::i;:::-;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1602:168:3;;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409:498;:::o;726:117:3:-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;794:24:3::1;:22;:24::i;:::-;833:5;824:6;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;726:117:3;;:::o;1002:::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1070:24:3::1;:22;:24::i;:::-;1109:5;1100:6;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1002:117:3;;:::o", + "abi": [ + { + "inputs": [], + "name": "child", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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": [ + { + "internalType": "uint256", + "name": "_mother", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gramps", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_father", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_child", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [], + "name": "mother", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "ast": { + "absolutePath": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "exportedSymbols": { + "SampleChild": [ + 349 + ], + "SampleFather": [ + 286 + ], + "SampleGramps": [ + 259 + ], + "SampleHuman": [ + 211 + ], + "SampleMother": [ + 235 + ] + }, + "id": 350, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 195, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 196, + "nodeType": "ImportDirective", + "scope": 350, + "sourceUnit": 126, + "src": "25:29:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "451:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "451:13:3" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that is a human", + "fullyImplemented": true, + "id": 211, + "linearizedBaseContracts": [ + 211, + 125 + ], + "name": "SampleHuman", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "4a6c9db6", + "id": 200, + "name": "isHuman", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 211, + "src": "469:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "469:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 209, + "nodeType": "Block", + "src": "542:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 205, + "name": "isHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "548:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "548:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "548:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 210, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 203, + "modifierName": { + "argumentTypes": null, + "id": 202, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "515:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "515:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "512:2:3" + }, + "returnParameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [], + "src": "542:0:3" + }, + "scope": 211, + "src": "493:74:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "427:142:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 212, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "669:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 213, + "nodeType": "InheritanceSpecifier", + "src": "669:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 214, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "684:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 215, + "nodeType": "InheritanceSpecifier", + "src": "684:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field mother", + "fullyImplemented": true, + "id": 235, + "linearizedBaseContracts": [ + 235, + 211, + 125 + ], + "name": "SampleMother", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "ed7dfee3", + "id": 217, + "name": "mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 235, + "src": "700:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "700:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 233, + "nodeType": "Block", + "src": "788:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "794:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "794:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "794:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "824:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 230, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "833:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "824:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 232, + "nodeType": "ExpressionStatement", + "src": "824:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 234, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 222, + "modifierName": { + "argumentTypes": null, + "id": 221, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "761:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "761:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 234, + "src": "746:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "746:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:15:3" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "788:0:3" + }, + "scope": 235, + "src": "726:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "644:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 236, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "945:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 237, + "nodeType": "InheritanceSpecifier", + "src": "945:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "960:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "960:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field gramps", + "fullyImplemented": true, + "id": 259, + "linearizedBaseContracts": [ + 259, + 211, + 125 + ], + "name": "SampleGramps", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "fa39851f", + "id": 241, + "name": "gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 259, + "src": "976:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 257, + "nodeType": "Block", + "src": "1064:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 248, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "1070:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "1070:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "1070:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 253, + "name": "gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 254, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1109:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1100:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "1100:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 246, + "modifierName": { + "argumentTypes": null, + "id": 245, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1037:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1037:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 243, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 258, + "src": "1022:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1021:15:3" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1064:0:3" + }, + "scope": 259, + "src": "1002:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "920:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 260, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1245:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 261, + "nodeType": "InheritanceSpecifier", + "src": "1245:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 262, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1260:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + "id": 263, + "nodeType": "InheritanceSpecifier", + "src": "1260:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 259 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field father and extends from gramps", + "fullyImplemented": true, + "id": 286, + "linearizedBaseContracts": [ + 286, + 259, + 211, + 125 + ], + "name": "SampleFather", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1c8aca3b", + "id": 265, + "name": "father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 286, + "src": "1277:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 284, + "nodeType": "Block", + "src": "1384:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 267, + "src": "1414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 274, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1390:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1390:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1390:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "1390:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 280, + "name": "father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "1428:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 281, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1428:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 283, + "nodeType": "ExpressionStatement", + "src": "1428:16:3" + } + ] + }, + "documentation": null, + "functionSelector": "e4a30116", + "id": 285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 272, + "modifierName": { + "argumentTypes": null, + "id": 271, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1357:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1357:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 267, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1323:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 269, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1340:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1340:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:34:3" + }, + "returnParameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [], + "src": "1384:0:3" + }, + "scope": 286, + "src": "1303:146:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "1220:231:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 287, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1531:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 288, + "nodeType": "InheritanceSpecifier", + "src": "1531:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 289, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + }, + "id": 290, + "nodeType": "InheritanceSpecifier", + "src": "1546:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "SampleFather", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 286, + "src": "1560:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleFather_$286", + "typeString": "contract SampleFather" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "1560:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 235, + 259, + 286 + ], + "contractKind": "contract", + "documentation": "Child extends from mother, father (gramps)", + "fullyImplemented": true, + "id": 349, + "linearizedBaseContracts": [ + 349, + 286, + 259, + 235, + 211, + 125 + ], + "name": "SampleChild", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "237b5e96", + "id": 294, + "name": "child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 349, + "src": "1577:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 234, + 258 + ], + "body": { + "id": 316, + "nodeType": "Block", + "src": "1693:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 307, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1723:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1699:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1699:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1699:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1699:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 313, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1759:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 310, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1735:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1735:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1735:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1735:30:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 317, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 299, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1637:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1637:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 302, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 300, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1658:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + { + "contractScope": null, + "id": 301, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1672:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + } + ], + "src": "1649:36:3" + }, + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 317, + "src": "1622:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1622:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1621:15:3" + }, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1693:0:3" + }, + "scope": 349, + "src": "1602:168:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "1880:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 333, + "name": "_mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "1910:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 330, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1886:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1886:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "1886:32:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 339, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1957:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 336, + "name": "SampleFather", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "1924:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleFather_$286_$", + "typeString": "type(contract SampleFather)" + } + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 285, + "src": "1924:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "ExpressionStatement", + "src": "1924:41:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 343, + "name": "child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1971:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1979:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1971:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "1971:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "60a2da44", + "id": 348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1861:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1861:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "_mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1794:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1794:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 321, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1811:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1811:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1828:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1845:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1845:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1793:67:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:0:3" + }, + "scope": 349, + "src": "1774:216:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 350, + "src": "1507:485:3" + } + ], + "src": "0:1993:3" + }, + "bytecode": "0x608060405234801561001057600080fd5b5061090c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638129fc1c116100665780638129fc1c14610142578063e4a301161461014c578063ed7dfee314610184578063fa39851f146101a2578063fe4b84df146101c057610093565b80631c8aca3b14610098578063237b5e96146100b65780634a6c9db6146100d457806360a2da44146100f6575b600080fd5b6100a06101ee565b6040518082815260200191505060405180910390f35b6100be6101f4565b6040518082815260200191505060405180910390f35b6100dc6101fa565b604051808215151515815260200191505060405180910390f35b6101406004803603608081101561010c57600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919050505061020d565b005b61014a61032a565b005b6101826004803603604081101561016257600080fd5b810190808035906020019092919080359060200190929190505050610444565b005b61018c610555565b6040518082815260200191505060405180910390f35b6101aa61055b565b6040518082815260200191505060405180910390f35b6101ec600480360360208110156101d657600080fd5b8101908080359060200190929190505050610561565b005b60365481565b60375481565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061022c575061022b610673565b5b8061024357506000809054906101000a900460ff16155b610298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102e8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102f18561068a565b6102fb8484610444565b8160378190555080156103235760008060016101000a81548160ff0219169083151502179055505b5050505050565b600060019054906101000a900460ff16806103495750610348610673565b5b8061036057506000809054906101000a900460ff16155b6103b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610405576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156104415760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806104635750610462610673565b5b8061047a57506000809054906101000a900460ff16155b6104cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561051f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61052883610799565b8160368190555080156105505760008060016101000a81548160ff0219169083151502179055505b505050565b60345481565b60355481565b600060019054906101000a900460ff1680610580575061057f610673565b5b8061059757506000809054906101000a900460ff16155b6105ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561063c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61064582610799565b61064e8261068a565b801561066f5760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806106a957506106a8610673565b5b806106c057506000809054906101000a900460ff16155b610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610765576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61076d61032a565b8160348190555080156107955760008060016101000a81548160ff0219169083151502179055505b5050565b600060019054906101000a900460ff16806107b857506107b7610673565b5b806107cf57506000809054906101000a900460ff16155b610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610874576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61087c61032a565b8160358190555080156108a45760008060016101000a81548160ff0219169083151502179055505b505056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220d24da6ac9c87cce616a0ad75f9b020ae68a68dd5a3cb37d41eed8dfc53dccaa064736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638129fc1c116100665780638129fc1c14610142578063e4a301161461014c578063ed7dfee314610184578063fa39851f146101a2578063fe4b84df146101c057610093565b80631c8aca3b14610098578063237b5e96146100b65780634a6c9db6146100d457806360a2da44146100f6575b600080fd5b6100a06101ee565b6040518082815260200191505060405180910390f35b6100be6101f4565b6040518082815260200191505060405180910390f35b6100dc6101fa565b604051808215151515815260200191505060405180910390f35b6101406004803603608081101561010c57600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919050505061020d565b005b61014a61032a565b005b6101826004803603604081101561016257600080fd5b810190808035906020019092919080359060200190929190505050610444565b005b61018c610555565b6040518082815260200191505060405180910390f35b6101aa61055b565b6040518082815260200191505060405180910390f35b6101ec600480360360208110156101d657600080fd5b8101908080359060200190929190505050610561565b005b60365481565b60375481565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061022c575061022b610673565b5b8061024357506000809054906101000a900460ff16155b610298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102e8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102f18561068a565b6102fb8484610444565b8160378190555080156103235760008060016101000a81548160ff0219169083151502179055505b5050505050565b600060019054906101000a900460ff16806103495750610348610673565b5b8061036057506000809054906101000a900460ff16155b6103b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610405576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156104415760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806104635750610462610673565b5b8061047a57506000809054906101000a900460ff16155b6104cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561051f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61052883610799565b8160368190555080156105505760008060016101000a81548160ff0219169083151502179055505b505050565b60345481565b60355481565b600060019054906101000a900460ff1680610580575061057f610673565b5b8061059757506000809054906101000a900460ff16155b6105ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561063c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61064582610799565b61064e8261068a565b801561066f5760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806106a957506106a8610673565b5b806106c057506000809054906101000a900460ff16155b610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610765576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61076d61032a565b8160348190555080156107955760008060016101000a81548160ff0219169083151502179055505b5050565b600060019054906101000a900460ff16806107b857506107b7610673565b5b806107cf57506000809054906101000a900460ff16155b610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108a9602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610874576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61087c61032a565b8160358190555080156108a45760008060016101000a81548160ff0219169083151502179055505b505056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220d24da6ac9c87cce616a0ad75f9b020ae68a68dd5a3cb37d41eed8dfc53dccaa064736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/tests/mocks/mock-solc-0.6/build/contracts/SampleFather.json b/tests/mocks/mock-solc-0.6/build/contracts/SampleFather.json new file mode 100644 index 000000000..9b8653d54 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/SampleFather.json @@ -0,0 +1,1914 @@ +{ + "fileName": "MultipleInheritanceInitializableMocks.sol", + "contractName": "SampleFather", + "source": "pragma solidity ^0.6.0;\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 value) initializer override(SampleGramps, SampleMother) public {\n SampleGramps.initialize(value);\n SampleMother.initialize(value);\n }\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": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "sourceMap": "1220:231:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1220:231:3;;;;;;;", + "deployedSourceMap": "1220:231:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1220:231:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1277:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;469:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;493:74;;;:::i;:::-;;1303:146;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1303:146:3;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;976:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1002:117;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1002:117:3;;;;;;;;;;;;;;;;;:::i;:::-;;1277:21;;;;:::o;469:19::-;;;;;;;;;;;;;:::o;493:74::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;558:4:3::1;548:7;;:14;;;;;;;;;;;;;;;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;493:74:3;:::o;1303:146::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1390:32:3::1;1414:7;1390:23;:32::i;:::-;1437:7;1428:6;:16;;;;1268:14:1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1303:146:3;;;:::o;976:21::-;;;;:::o;1002:117::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1070:24:3::1;:22;:24::i;:::-;1109:5;1100:6;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1002:117:3;;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409: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/initializable/MultipleInheritanceInitializableMocks.sol", + "exportedSymbols": { + "SampleChild": [ + 349 + ], + "SampleFather": [ + 286 + ], + "SampleGramps": [ + 259 + ], + "SampleHuman": [ + 211 + ], + "SampleMother": [ + 235 + ] + }, + "id": 350, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 195, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 196, + "nodeType": "ImportDirective", + "scope": 350, + "sourceUnit": 126, + "src": "25:29:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "451:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "451:13:3" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that is a human", + "fullyImplemented": true, + "id": 211, + "linearizedBaseContracts": [ + 211, + 125 + ], + "name": "SampleHuman", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "4a6c9db6", + "id": 200, + "name": "isHuman", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 211, + "src": "469:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "469:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 209, + "nodeType": "Block", + "src": "542:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 205, + "name": "isHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "548:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "548:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "548:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 210, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 203, + "modifierName": { + "argumentTypes": null, + "id": 202, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "515:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "515:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "512:2:3" + }, + "returnParameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [], + "src": "542:0:3" + }, + "scope": 211, + "src": "493:74:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "427:142:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 212, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "669:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 213, + "nodeType": "InheritanceSpecifier", + "src": "669:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 214, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "684:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 215, + "nodeType": "InheritanceSpecifier", + "src": "684:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field mother", + "fullyImplemented": true, + "id": 235, + "linearizedBaseContracts": [ + 235, + 211, + 125 + ], + "name": "SampleMother", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "ed7dfee3", + "id": 217, + "name": "mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 235, + "src": "700:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "700:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 233, + "nodeType": "Block", + "src": "788:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "794:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "794:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "794:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "824:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 230, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "833:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "824:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 232, + "nodeType": "ExpressionStatement", + "src": "824:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 234, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 222, + "modifierName": { + "argumentTypes": null, + "id": 221, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "761:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "761:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 234, + "src": "746:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "746:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:15:3" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "788:0:3" + }, + "scope": 235, + "src": "726:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "644:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 236, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "945:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 237, + "nodeType": "InheritanceSpecifier", + "src": "945:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "960:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "960:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field gramps", + "fullyImplemented": true, + "id": 259, + "linearizedBaseContracts": [ + 259, + 211, + 125 + ], + "name": "SampleGramps", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "fa39851f", + "id": 241, + "name": "gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 259, + "src": "976:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 257, + "nodeType": "Block", + "src": "1064:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 248, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "1070:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "1070:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "1070:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 253, + "name": "gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 254, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1109:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1100:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "1100:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 246, + "modifierName": { + "argumentTypes": null, + "id": 245, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1037:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1037:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 243, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 258, + "src": "1022:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1021:15:3" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1064:0:3" + }, + "scope": 259, + "src": "1002:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "920:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 260, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1245:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 261, + "nodeType": "InheritanceSpecifier", + "src": "1245:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 262, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1260:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + "id": 263, + "nodeType": "InheritanceSpecifier", + "src": "1260:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 259 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field father and extends from gramps", + "fullyImplemented": true, + "id": 286, + "linearizedBaseContracts": [ + 286, + 259, + 211, + 125 + ], + "name": "SampleFather", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1c8aca3b", + "id": 265, + "name": "father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 286, + "src": "1277:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 284, + "nodeType": "Block", + "src": "1384:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 267, + "src": "1414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 274, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1390:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1390:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1390:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "1390:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 280, + "name": "father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "1428:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 281, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1428:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 283, + "nodeType": "ExpressionStatement", + "src": "1428:16:3" + } + ] + }, + "documentation": null, + "functionSelector": "e4a30116", + "id": 285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 272, + "modifierName": { + "argumentTypes": null, + "id": 271, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1357:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1357:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 267, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1323:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 269, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1340:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1340:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:34:3" + }, + "returnParameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [], + "src": "1384:0:3" + }, + "scope": 286, + "src": "1303:146:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "1220:231:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 287, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1531:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 288, + "nodeType": "InheritanceSpecifier", + "src": "1531:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 289, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + }, + "id": 290, + "nodeType": "InheritanceSpecifier", + "src": "1546:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "SampleFather", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 286, + "src": "1560:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleFather_$286", + "typeString": "contract SampleFather" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "1560:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 235, + 259, + 286 + ], + "contractKind": "contract", + "documentation": "Child extends from mother, father (gramps)", + "fullyImplemented": true, + "id": 349, + "linearizedBaseContracts": [ + 349, + 286, + 259, + 235, + 211, + 125 + ], + "name": "SampleChild", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "237b5e96", + "id": 294, + "name": "child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 349, + "src": "1577:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 234, + 258 + ], + "body": { + "id": 316, + "nodeType": "Block", + "src": "1693:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 307, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1723:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1699:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1699:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1699:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1699:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 313, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1759:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 310, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1735:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1735:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1735:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1735:30:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 317, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 299, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1637:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1637:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 302, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 300, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1658:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + { + "contractScope": null, + "id": 301, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1672:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + } + ], + "src": "1649:36:3" + }, + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 317, + "src": "1622:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1622:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1621:15:3" + }, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1693:0:3" + }, + "scope": 349, + "src": "1602:168:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "1880:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 333, + "name": "_mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "1910:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 330, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1886:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1886:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "1886:32:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 339, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1957:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 336, + "name": "SampleFather", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "1924:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleFather_$286_$", + "typeString": "type(contract SampleFather)" + } + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 285, + "src": "1924:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "ExpressionStatement", + "src": "1924:41:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 343, + "name": "child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1971:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1979:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1971:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "1971:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "60a2da44", + "id": 348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1861:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1861:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "_mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1794:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1794:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 321, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1811:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1811:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1828:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1845:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1845:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1793:67:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:0:3" + }, + "scope": 349, + "src": "1774:216:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 350, + "src": "1507:485:3" + } + ], + "src": "0:1993:3" + }, + "bytecode": "0x608060405234801561001057600080fd5b50610509806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631c8aca3b146100675780634a6c9db6146100855780638129fc1c146100a7578063e4a30116146100b1578063fa39851f146100e9578063fe4b84df14610107575b600080fd5b61006f610135565b6040518082815260200191505060405180910390f35b61008d61013b565b604051808215151515815260200191505060405180910390f35b6100af61014e565b005b6100e7600480360360408110156100c757600080fd5b810190808035906020019092919080359060200190929190505050610268565b005b6100f1610379565b6040518082815260200191505060405180910390f35b6101336004803603602081101561011d57600080fd5b810190808035906020019092919050505061037f565b005b60355481565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061016d575061016c61048e565b5b8061018457506000809054906101000a900460ff16155b6101d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610229576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156102655760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680610287575061028661048e565b5b8061029e57506000809054906101000a900460ff16155b6102f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610343576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61034c8361037f565b8160358190555080156103745760008060016101000a81548160ff0219169083151502179055505b505050565b60345481565b600060019054906101000a900460ff168061039e575061039d61048e565b5b806103b557506000809054906101000a900460ff16155b61040a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561045a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61046261014e565b81603481905550801561048a5760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212207347843eb189f305b2a683e8afe6b496132900b3707b88511a6e775993ec951664736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c80631c8aca3b146100675780634a6c9db6146100855780638129fc1c146100a7578063e4a30116146100b1578063fa39851f146100e9578063fe4b84df14610107575b600080fd5b61006f610135565b6040518082815260200191505060405180910390f35b61008d61013b565b604051808215151515815260200191505060405180910390f35b6100af61014e565b005b6100e7600480360360408110156100c757600080fd5b810190808035906020019092919080359060200190929190505050610268565b005b6100f1610379565b6040518082815260200191505060405180910390f35b6101336004803603602081101561011d57600080fd5b810190808035906020019092919050505061037f565b005b60355481565b603360009054906101000a900460ff1681565b600060019054906101000a900460ff168061016d575061016c61048e565b5b8061018457506000809054906101000a900460ff16155b6101d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610229576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156102655760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680610287575061028661048e565b5b8061029e57506000809054906101000a900460ff16155b6102f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610343576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61034c8361037f565b8160358190555080156103745760008060016101000a81548160ff0219169083151502179055505b505050565b60345481565b600060019054906101000a900460ff168061039e575061039d61048e565b5b806103b557506000809054906101000a900460ff16155b61040a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806104a6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561045a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61046261014e565b81603481905550801561048a5760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212207347843eb189f305b2a683e8afe6b496132900b3707b88511a6e775993ec951664736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/tests/mocks/mock-solc-0.6/build/contracts/SampleGramps.json b/tests/mocks/mock-solc-0.6/build/contracts/SampleGramps.json new file mode 100644 index 000000000..a1e655b8f --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/SampleGramps.json @@ -0,0 +1,1883 @@ +{ + "fileName": "MultipleInheritanceInitializableMocks.sol", + "contractName": "SampleGramps", + "source": "pragma solidity ^0.6.0;\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 value) initializer override(SampleGramps, SampleMother) public {\n SampleGramps.initialize(value);\n SampleMother.initialize(value);\n }\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": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "sourceMap": "920:201:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;920:201:3;;;;;;;", + "deployedSourceMap": "920:201:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;920:201:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;469:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;493:74;;;:::i;:::-;;976:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1002:117;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1002:117:3;;;;;;;;;;;;;;;;;:::i;:::-;;469:19;;;;;;;;;;;;;:::o;493:74::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;558:4:3::1;548:7;;:14;;;;;;;;;;;;;;;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;493:74:3;:::o;976:21::-;;;;:::o;1002:117::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1070:24:3::1;:22;:24::i;:::-;1109:5;1100:6;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1002:117:3;;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409:498;:::o", + "abi": [ + { + "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": "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/initializable/MultipleInheritanceInitializableMocks.sol", + "exportedSymbols": { + "SampleChild": [ + 349 + ], + "SampleFather": [ + 286 + ], + "SampleGramps": [ + 259 + ], + "SampleHuman": [ + 211 + ], + "SampleMother": [ + 235 + ] + }, + "id": 350, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 195, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 196, + "nodeType": "ImportDirective", + "scope": 350, + "sourceUnit": 126, + "src": "25:29:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "451:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "451:13:3" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that is a human", + "fullyImplemented": true, + "id": 211, + "linearizedBaseContracts": [ + 211, + 125 + ], + "name": "SampleHuman", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "4a6c9db6", + "id": 200, + "name": "isHuman", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 211, + "src": "469:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "469:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 209, + "nodeType": "Block", + "src": "542:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 205, + "name": "isHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "548:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "548:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "548:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 210, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 203, + "modifierName": { + "argumentTypes": null, + "id": 202, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "515:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "515:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "512:2:3" + }, + "returnParameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [], + "src": "542:0:3" + }, + "scope": 211, + "src": "493:74:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "427:142:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 212, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "669:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 213, + "nodeType": "InheritanceSpecifier", + "src": "669:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 214, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "684:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 215, + "nodeType": "InheritanceSpecifier", + "src": "684:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field mother", + "fullyImplemented": true, + "id": 235, + "linearizedBaseContracts": [ + 235, + 211, + 125 + ], + "name": "SampleMother", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "ed7dfee3", + "id": 217, + "name": "mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 235, + "src": "700:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "700:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 233, + "nodeType": "Block", + "src": "788:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "794:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "794:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "794:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "824:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 230, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "833:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "824:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 232, + "nodeType": "ExpressionStatement", + "src": "824:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 234, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 222, + "modifierName": { + "argumentTypes": null, + "id": 221, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "761:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "761:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 234, + "src": "746:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "746:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:15:3" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "788:0:3" + }, + "scope": 235, + "src": "726:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "644:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 236, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "945:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 237, + "nodeType": "InheritanceSpecifier", + "src": "945:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "960:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "960:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field gramps", + "fullyImplemented": true, + "id": 259, + "linearizedBaseContracts": [ + 259, + 211, + 125 + ], + "name": "SampleGramps", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "fa39851f", + "id": 241, + "name": "gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 259, + "src": "976:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 257, + "nodeType": "Block", + "src": "1064:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 248, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "1070:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "1070:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "1070:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 253, + "name": "gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 254, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1109:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1100:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "1100:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 246, + "modifierName": { + "argumentTypes": null, + "id": 245, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1037:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1037:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 243, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 258, + "src": "1022:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1021:15:3" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1064:0:3" + }, + "scope": 259, + "src": "1002:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "920:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 260, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1245:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 261, + "nodeType": "InheritanceSpecifier", + "src": "1245:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 262, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1260:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + "id": 263, + "nodeType": "InheritanceSpecifier", + "src": "1260:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 259 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field father and extends from gramps", + "fullyImplemented": true, + "id": 286, + "linearizedBaseContracts": [ + 286, + 259, + 211, + 125 + ], + "name": "SampleFather", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1c8aca3b", + "id": 265, + "name": "father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 286, + "src": "1277:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 284, + "nodeType": "Block", + "src": "1384:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 267, + "src": "1414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 274, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1390:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1390:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1390:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "1390:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 280, + "name": "father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "1428:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 281, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1428:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 283, + "nodeType": "ExpressionStatement", + "src": "1428:16:3" + } + ] + }, + "documentation": null, + "functionSelector": "e4a30116", + "id": 285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 272, + "modifierName": { + "argumentTypes": null, + "id": 271, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1357:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1357:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 267, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1323:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 269, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1340:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1340:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:34:3" + }, + "returnParameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [], + "src": "1384:0:3" + }, + "scope": 286, + "src": "1303:146:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "1220:231:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 287, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1531:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 288, + "nodeType": "InheritanceSpecifier", + "src": "1531:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 289, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + }, + "id": 290, + "nodeType": "InheritanceSpecifier", + "src": "1546:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "SampleFather", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 286, + "src": "1560:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleFather_$286", + "typeString": "contract SampleFather" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "1560:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 235, + 259, + 286 + ], + "contractKind": "contract", + "documentation": "Child extends from mother, father (gramps)", + "fullyImplemented": true, + "id": 349, + "linearizedBaseContracts": [ + 349, + 286, + 259, + 235, + 211, + 125 + ], + "name": "SampleChild", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "237b5e96", + "id": 294, + "name": "child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 349, + "src": "1577:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 234, + 258 + ], + "body": { + "id": 316, + "nodeType": "Block", + "src": "1693:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 307, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1723:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1699:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1699:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1699:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1699:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 313, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1759:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 310, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1735:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1735:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1735:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1735:30:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 317, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 299, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1637:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1637:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 302, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 300, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1658:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + { + "contractScope": null, + "id": 301, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1672:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + } + ], + "src": "1649:36:3" + }, + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 317, + "src": "1622:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1622:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1621:15:3" + }, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1693:0:3" + }, + "scope": 349, + "src": "1602:168:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "1880:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 333, + "name": "_mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "1910:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 330, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1886:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1886:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "1886:32:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 339, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1957:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 336, + "name": "SampleFather", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "1924:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleFather_$286_$", + "typeString": "type(contract SampleFather)" + } + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 285, + "src": "1924:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "ExpressionStatement", + "src": "1924:41:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 343, + "name": "child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1971:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1979:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1971:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "1971:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "60a2da44", + "id": 348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1861:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1861:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "_mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1794:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1794:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 321, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1811:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1811:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1828:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1845:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1845:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1793:67:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:0:3" + }, + "scope": 349, + "src": "1774:216:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 350, + "src": "1507:485:3" + } + ], + "src": "0:1993:3" + }, + "bytecode": "0x608060405234801561001057600080fd5b50610386806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634a6c9db6146100515780638129fc1c14610073578063fa39851f1461007d578063fe4b84df1461009b575b600080fd5b6100596100c9565b604051808215151515815260200191505060405180910390f35b61007b6100dc565b005b6100856101f6565b6040518082815260200191505060405180910390f35b6100c7600480360360208110156100b157600080fd5b81019080803590602001909291905050506101fc565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100fb57506100fa61030b565b5b8061011257506000809054906101000a900460ff16155b610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156101b7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101f35760008060016101000a81548160ff0219169083151502179055505b50565b60345481565b600060019054906101000a900460ff168061021b575061021a61030b565b5b8061023257506000809054906101000a900460ff16155b610287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102d7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102df6100dc565b8160348190555080156103075760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220011e4d99b8f65aabe8846b5cae075ce4f4c4120304259d0aea01fd3788c4d1db64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634a6c9db6146100515780638129fc1c14610073578063fa39851f1461007d578063fe4b84df1461009b575b600080fd5b6100596100c9565b604051808215151515815260200191505060405180910390f35b61007b6100dc565b005b6100856101f6565b6040518082815260200191505060405180910390f35b6100c7600480360360208110156100b157600080fd5b81019080803590602001909291905050506101fc565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100fb57506100fa61030b565b5b8061011257506000809054906101000a900460ff16155b610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156101b7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101f35760008060016101000a81548160ff0219169083151502179055505b50565b60345481565b600060019054906101000a900460ff168061021b575061021a61030b565b5b8061023257506000809054906101000a900460ff16155b610287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102d7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102df6100dc565b8160348190555080156103075760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220011e4d99b8f65aabe8846b5cae075ce4f4c4120304259d0aea01fd3788c4d1db64736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/tests/mocks/mock-solc-0.6/build/contracts/SampleHuman.json b/tests/mocks/mock-solc-0.6/build/contracts/SampleHuman.json new file mode 100644 index 000000000..6e83dc078 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/SampleHuman.json @@ -0,0 +1,1857 @@ +{ + "fileName": "MultipleInheritanceInitializableMocks.sol", + "contractName": "SampleHuman", + "source": "pragma solidity ^0.6.0;\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 value) initializer override(SampleGramps, SampleMother) public {\n SampleGramps.initialize(value);\n SampleMother.initialize(value);\n }\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": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "sourceMap": "427:142:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;427:142:3;;;;;;;", + "deployedSourceMap": "427:142:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;427:142:3;;;;;;;;;;;;;;;;;;;;;;;;469:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;493:74;;;:::i;:::-;;469:19;;;;;;;;;;;;;:::o;493:74::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;558:4:3::1;548:7;;:14;;;;;;;;;;;;;;;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;493:74:3;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409:498;:::o", + "abi": [ + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isHuman", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "ast": { + "absolutePath": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "exportedSymbols": { + "SampleChild": [ + 349 + ], + "SampleFather": [ + 286 + ], + "SampleGramps": [ + 259 + ], + "SampleHuman": [ + 211 + ], + "SampleMother": [ + 235 + ] + }, + "id": 350, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 195, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 196, + "nodeType": "ImportDirective", + "scope": 350, + "sourceUnit": 126, + "src": "25:29:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "451:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "451:13:3" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that is a human", + "fullyImplemented": true, + "id": 211, + "linearizedBaseContracts": [ + 211, + 125 + ], + "name": "SampleHuman", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "4a6c9db6", + "id": 200, + "name": "isHuman", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 211, + "src": "469:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "469:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 209, + "nodeType": "Block", + "src": "542:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 205, + "name": "isHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "548:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "548:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "548:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 210, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 203, + "modifierName": { + "argumentTypes": null, + "id": 202, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "515:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "515:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "512:2:3" + }, + "returnParameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [], + "src": "542:0:3" + }, + "scope": 211, + "src": "493:74:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "427:142:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 212, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "669:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 213, + "nodeType": "InheritanceSpecifier", + "src": "669:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 214, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "684:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 215, + "nodeType": "InheritanceSpecifier", + "src": "684:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field mother", + "fullyImplemented": true, + "id": 235, + "linearizedBaseContracts": [ + 235, + 211, + 125 + ], + "name": "SampleMother", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "ed7dfee3", + "id": 217, + "name": "mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 235, + "src": "700:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "700:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 233, + "nodeType": "Block", + "src": "788:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "794:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "794:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "794:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "824:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 230, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "833:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "824:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 232, + "nodeType": "ExpressionStatement", + "src": "824:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 234, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 222, + "modifierName": { + "argumentTypes": null, + "id": 221, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "761:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "761:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 234, + "src": "746:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "746:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:15:3" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "788:0:3" + }, + "scope": 235, + "src": "726:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "644:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 236, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "945:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 237, + "nodeType": "InheritanceSpecifier", + "src": "945:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "960:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "960:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field gramps", + "fullyImplemented": true, + "id": 259, + "linearizedBaseContracts": [ + 259, + 211, + 125 + ], + "name": "SampleGramps", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "fa39851f", + "id": 241, + "name": "gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 259, + "src": "976:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 257, + "nodeType": "Block", + "src": "1064:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 248, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "1070:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "1070:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "1070:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 253, + "name": "gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 254, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1109:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1100:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "1100:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 246, + "modifierName": { + "argumentTypes": null, + "id": 245, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1037:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1037:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 243, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 258, + "src": "1022:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1021:15:3" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1064:0:3" + }, + "scope": 259, + "src": "1002:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "920:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 260, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1245:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 261, + "nodeType": "InheritanceSpecifier", + "src": "1245:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 262, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1260:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + "id": 263, + "nodeType": "InheritanceSpecifier", + "src": "1260:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 259 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field father and extends from gramps", + "fullyImplemented": true, + "id": 286, + "linearizedBaseContracts": [ + 286, + 259, + 211, + 125 + ], + "name": "SampleFather", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1c8aca3b", + "id": 265, + "name": "father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 286, + "src": "1277:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 284, + "nodeType": "Block", + "src": "1384:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 267, + "src": "1414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 274, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1390:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1390:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1390:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "1390:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 280, + "name": "father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "1428:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 281, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1428:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 283, + "nodeType": "ExpressionStatement", + "src": "1428:16:3" + } + ] + }, + "documentation": null, + "functionSelector": "e4a30116", + "id": 285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 272, + "modifierName": { + "argumentTypes": null, + "id": 271, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1357:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1357:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 267, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1323:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 269, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1340:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1340:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:34:3" + }, + "returnParameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [], + "src": "1384:0:3" + }, + "scope": 286, + "src": "1303:146:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "1220:231:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 287, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1531:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 288, + "nodeType": "InheritanceSpecifier", + "src": "1531:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 289, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + }, + "id": 290, + "nodeType": "InheritanceSpecifier", + "src": "1546:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "SampleFather", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 286, + "src": "1560:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleFather_$286", + "typeString": "contract SampleFather" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "1560:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 235, + 259, + 286 + ], + "contractKind": "contract", + "documentation": "Child extends from mother, father (gramps)", + "fullyImplemented": true, + "id": 349, + "linearizedBaseContracts": [ + 349, + 286, + 259, + 235, + 211, + 125 + ], + "name": "SampleChild", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "237b5e96", + "id": 294, + "name": "child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 349, + "src": "1577:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 234, + 258 + ], + "body": { + "id": 316, + "nodeType": "Block", + "src": "1693:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 307, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1723:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1699:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1699:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1699:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1699:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 313, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1759:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 310, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1735:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1735:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1735:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1735:30:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 317, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 299, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1637:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1637:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 302, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 300, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1658:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + { + "contractScope": null, + "id": 301, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1672:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + } + ], + "src": "1649:36:3" + }, + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 317, + "src": "1622:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1622:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1621:15:3" + }, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1693:0:3" + }, + "scope": 349, + "src": "1602:168:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "1880:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 333, + "name": "_mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "1910:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 330, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1886:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1886:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "1886:32:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 339, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1957:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 336, + "name": "SampleFather", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "1924:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleFather_$286_$", + "typeString": "type(contract SampleFather)" + } + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 285, + "src": "1924:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "ExpressionStatement", + "src": "1924:41:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 343, + "name": "child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1971:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1979:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1971:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "1971:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "60a2da44", + "id": 348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1861:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1861:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "_mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1794:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1794:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 321, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1811:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1811:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1828:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1845:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1845:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1793:67:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:0:3" + }, + "scope": 349, + "src": "1774:216:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 350, + "src": "1507:485:3" + } + ], + "src": "0:1993:3" + }, + "bytecode": "0x608060405234801561001057600080fd5b5061020f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634a6c9db61461003b5780638129fc1c1461005d575b600080fd5b610043610067565b604051808215151515815260200191505060405180910390f35b61006561007a565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100995750610098610194565b5b806100b057506000809054906101000a900460ff16155b610105576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806101ac602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610155576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101915760008060016101000a81548160ff0219169083151502179055505b50565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202abef2e13507c44350ded6e7ca078ea134df8fbacd3ddeaf25e62fd5f342178e64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634a6c9db61461003b5780638129fc1c1461005d575b600080fd5b610043610067565b604051808215151515815260200191505060405180910390f35b61006561007a565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100995750610098610194565b5b806100b057506000809054906101000a900460ff16155b610105576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806101ac602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610155576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101915760008060016101000a81548160ff0219169083151502179055505b50565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202abef2e13507c44350ded6e7ca078ea134df8fbacd3ddeaf25e62fd5f342178e64736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/tests/mocks/mock-solc-0.6/build/contracts/SampleMother.json b/tests/mocks/mock-solc-0.6/build/contracts/SampleMother.json new file mode 100644 index 000000000..7010b4d84 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/build/contracts/SampleMother.json @@ -0,0 +1,1883 @@ +{ + "fileName": "MultipleInheritanceInitializableMocks.sol", + "contractName": "SampleMother", + "source": "pragma solidity ^0.6.0;\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 value) initializer override(SampleGramps, SampleMother) public {\n SampleGramps.initialize(value);\n SampleMother.initialize(value);\n }\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": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "sourceMap": "644:201:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;644:201:3;;;;;;;", + "deployedSourceMap": "644:201:3:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;644:201:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;469:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;493:74;;;:::i;:::-;;700:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;726:117;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;726:117:3;;;;;;;;;;;;;;;;;:::i;:::-;;469:19;;;;;;;;;;;;;:::o;493:74::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;558:4:3::1;548:7;;:14;;;;;;;;;;;;;;;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;493:74:3;:::o;700:21::-;;;;:::o;726:117::-;1024:12:1;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;794:24:3::1;:22;:24::i;:::-;833:5;824:6;:14;;;;1268::1::0;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;726:117:3;;:::o;1409:498:1:-;1456:4;1468:12;1491:4;1468:28;;1831:10;1876:4;1864:17;1858:23;;1901:1;1895:2;:7;1888:14;;;;1409:498;:::o", + "abi": [ + { + "inputs": [], + "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" + }, + { + "inputs": [], + "name": "mother", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "ast": { + "absolutePath": "contracts/initializable/MultipleInheritanceInitializableMocks.sol", + "exportedSymbols": { + "SampleChild": [ + 349 + ], + "SampleFather": [ + 286 + ], + "SampleGramps": [ + 259 + ], + "SampleHuman": [ + 211 + ], + "SampleMother": [ + 235 + ] + }, + "id": 350, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 195, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "contracts/initializable/Initializable.sol", + "file": "./Initializable.sol", + "id": 196, + "nodeType": "ImportDirective", + "scope": 350, + "sourceUnit": 126, + "src": "25:29:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "451:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "451:13:3" + } + ], + "contractDependencies": [ + 125 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that is a human", + "fullyImplemented": true, + "id": 211, + "linearizedBaseContracts": [ + 211, + 125 + ], + "name": "SampleHuman", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "4a6c9db6", + "id": 200, + "name": "isHuman", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 211, + "src": "469:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "469:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 209, + "nodeType": "Block", + "src": "542:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 205, + "name": "isHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "548:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "548:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "548:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "8129fc1c", + "id": 210, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 203, + "modifierName": { + "argumentTypes": null, + "id": 202, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "515:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "515:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [], + "src": "512:2:3" + }, + "returnParameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [], + "src": "542:0:3" + }, + "scope": 211, + "src": "493:74:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "427:142:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 212, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "669:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 213, + "nodeType": "InheritanceSpecifier", + "src": "669:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 214, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "684:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 215, + "nodeType": "InheritanceSpecifier", + "src": "684:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field mother", + "fullyImplemented": true, + "id": 235, + "linearizedBaseContracts": [ + 235, + 211, + 125 + ], + "name": "SampleMother", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "ed7dfee3", + "id": 217, + "name": "mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 235, + "src": "700:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "700:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 233, + "nodeType": "Block", + "src": "788:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "794:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "794:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "794:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "824:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 230, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "833:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "824:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 232, + "nodeType": "ExpressionStatement", + "src": "824:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 234, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 222, + "modifierName": { + "argumentTypes": null, + "id": 221, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "761:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "761:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 234, + "src": "746:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "746:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:15:3" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "788:0:3" + }, + "scope": 235, + "src": "726:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "644:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 236, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "945:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 237, + "nodeType": "InheritanceSpecifier", + "src": "945:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "SampleHuman", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 211, + "src": "960:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleHuman_$211", + "typeString": "contract SampleHuman" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "960:11:3" + } + ], + "contractDependencies": [ + 125, + 211 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field gramps", + "fullyImplemented": true, + "id": 259, + "linearizedBaseContracts": [ + 259, + 211, + 125 + ], + "name": "SampleGramps", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "fa39851f", + "id": 241, + "name": "gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 259, + "src": "976:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 257, + "nodeType": "Block", + "src": "1064:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 248, + "name": "SampleHuman", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "1070:11:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleHuman_$211_$", + "typeString": "type(contract SampleHuman)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 210, + "src": "1070:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "1070:24:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 253, + "name": "gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 254, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1109:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1100:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "1100:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 246, + "modifierName": { + "argumentTypes": null, + "id": 245, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1037:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1037:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 243, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 258, + "src": "1022:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1021:15:3" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1064:0:3" + }, + "scope": 259, + "src": "1002:117:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "920:201:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 260, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1245:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 261, + "nodeType": "InheritanceSpecifier", + "src": "1245:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 262, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1260:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + "id": 263, + "nodeType": "InheritanceSpecifier", + "src": "1260:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 259 + ], + "contractKind": "contract", + "documentation": "Sample base intializable contract that defines a field father and extends from gramps", + "fullyImplemented": true, + "id": 286, + "linearizedBaseContracts": [ + 286, + 259, + 211, + 125 + ], + "name": "SampleFather", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1c8aca3b", + "id": 265, + "name": "father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 286, + "src": "1277:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 284, + "nodeType": "Block", + "src": "1384:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 267, + "src": "1414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 274, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1390:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1390:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1390:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "1390:32:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 280, + "name": "father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "1428:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 281, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "1437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1428:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 283, + "nodeType": "ExpressionStatement", + "src": "1428:16:3" + } + ] + }, + "documentation": null, + "functionSelector": "e4a30116", + "id": 285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 272, + "modifierName": { + "argumentTypes": null, + "id": 271, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1357:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1357:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 267, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1323:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 269, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 285, + "src": "1340:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1340:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:34:3" + }, + "returnParameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [], + "src": "1384:0:3" + }, + "scope": 286, + "src": "1303:146:3", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 350, + "src": "1220:231:3" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 287, + "name": "Initializable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 125, + "src": "1531:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Initializable_$125", + "typeString": "contract Initializable" + } + }, + "id": 288, + "nodeType": "InheritanceSpecifier", + "src": "1531:13:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 289, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + }, + "id": 290, + "nodeType": "InheritanceSpecifier", + "src": "1546:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 291, + "name": "SampleFather", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 286, + "src": "1560:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleFather_$286", + "typeString": "contract SampleFather" + } + }, + "id": 292, + "nodeType": "InheritanceSpecifier", + "src": "1560:12:3" + } + ], + "contractDependencies": [ + 125, + 211, + 235, + 259, + 286 + ], + "contractKind": "contract", + "documentation": "Child extends from mother, father (gramps)", + "fullyImplemented": true, + "id": 349, + "linearizedBaseContracts": [ + 349, + 286, + 259, + 235, + 211, + 125 + ], + "name": "SampleChild", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "237b5e96", + "id": 294, + "name": "child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 349, + "src": "1577:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 234, + 258 + ], + "body": { + "id": 316, + "nodeType": "Block", + "src": "1693:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 307, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1723:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 304, + "name": "SampleGramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "1699:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleGramps_$259_$", + "typeString": "type(contract SampleGramps)" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 258, + "src": "1699:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1699:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1699:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 313, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1759:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 310, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1735:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1735:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1735:30:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1735:30:3" + } + ] + }, + "documentation": null, + "functionSelector": "fe4b84df", + "id": 317, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 299, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1637:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1637:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 302, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 300, + "name": "SampleGramps", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 259, + "src": "1658:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleGramps_$259", + "typeString": "contract SampleGramps" + } + }, + { + "contractScope": null, + "id": 301, + "name": "SampleMother", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 235, + "src": "1672:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SampleMother_$235", + "typeString": "contract SampleMother" + } + } + ], + "src": "1649:36:3" + }, + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 317, + "src": "1622:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1622:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1621:15:3" + }, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1693:0:3" + }, + "scope": 349, + "src": "1602:168:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "1880:110:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 333, + "name": "_mother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "1910:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 330, + "name": "SampleMother", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 235, + "src": "1886:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleMother_$235_$", + "typeString": "type(contract SampleMother)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 234, + "src": "1886:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "1886:32:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 339, + "name": "_gramps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "_father", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1957:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 336, + "name": "SampleFather", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "1924:12:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SampleFather_$286_$", + "typeString": "type(contract SampleFather)" + } + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 285, + "src": "1924:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "ExpressionStatement", + "src": "1924:41:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 343, + "name": "child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1971:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_child", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1979:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1971:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "1971:14:3" + } + ] + }, + "documentation": null, + "functionSelector": "60a2da44", + "id": 348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "initializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 99, + "src": "1861:11:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1861:11:3" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "_mother", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1794:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1794:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 321, + "name": "_gramps", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1811:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1811:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_father", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1828:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_child", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 348, + "src": "1845:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1845:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1793:67:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:0:3" + }, + "scope": 349, + "src": "1774:216:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 350, + "src": "1507:485:3" + } + ], + "src": "0:1993:3" + }, + "bytecode": "0x608060405234801561001057600080fd5b50610386806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634a6c9db6146100515780638129fc1c14610073578063ed7dfee31461007d578063fe4b84df1461009b575b600080fd5b6100596100c9565b604051808215151515815260200191505060405180910390f35b61007b6100dc565b005b6100856101f6565b6040518082815260200191505060405180910390f35b6100c7600480360360208110156100b157600080fd5b81019080803590602001909291905050506101fc565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100fb57506100fa61030b565b5b8061011257506000809054906101000a900460ff16155b610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156101b7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101f35760008060016101000a81548160ff0219169083151502179055505b50565b60345481565b600060019054906101000a900460ff168061021b575061021a61030b565b5b8061023257506000809054906101000a900460ff16155b610287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102d7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102df6100dc565b8160348190555080156103075760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122067693769773a92ad68cf4a4228500e97f573791635c1ac62b46ac6b4424b61bc64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634a6c9db6146100515780638129fc1c14610073578063ed7dfee31461007d578063fe4b84df1461009b575b600080fd5b6100596100c9565b604051808215151515815260200191505060405180910390f35b61007b6100dc565b005b6100856101f6565b6040518082815260200191505060405180910390f35b6100c7600480360360208110156100b157600080fd5b81019080803590602001909291905050506101fc565b005b603360009054906101000a900460ff1681565b600060019054906101000a900460ff16806100fb57506100fa61030b565b5b8061011257506000809054906101000a900460ff16155b610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156101b7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6001603360006101000a81548160ff02191690831515021790555080156101f35760008060016101000a81548160ff0219169083151502179055505b50565b60345481565b600060019054906101000a900460ff168061021b575061021a61030b565b5b8061023257506000809054906101000a900460ff16155b610287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610323602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156102d7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6102df6100dc565b8160348190555080156103075760008060016101000a81548160ff0219169083151502179055505b5050565b6000803090506000813b905060008114925050509056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122067693769773a92ad68cf4a4228500e97f573791635c1ac62b46ac6b4424b61bc64736f6c63430006020033", + "compiler": { + "name": "solc", + "version": "0.6.2+commit.bacdbe57.Linux.g++", + "optimizer": { + "enabled": false, + "runs": 200 + }, + "evmVersion": "petersburg" + } +} diff --git a/packages/lib/test/mocks/mock-solc-0.6/contracts/.gitkeep b/tests/mocks/mock-solc-0.6/contracts/.gitkeep similarity index 100% rename from packages/lib/test/mocks/mock-solc-0.6/contracts/.gitkeep rename to tests/mocks/mock-solc-0.6/contracts/.gitkeep diff --git a/packages/lib/test/mocks/mock-solc-0.6/contracts/Sample.sol b/tests/mocks/mock-solc-0.6/contracts/Sample.sol similarity index 100% rename from packages/lib/test/mocks/mock-solc-0.6/contracts/Sample.sol rename to tests/mocks/mock-solc-0.6/contracts/Sample.sol diff --git a/tests/mocks/mock-solc-0.6/contracts/initializable/Initializable.sol b/tests/mocks/mock-solc-0.6/contracts/initializable/Initializable.sol new file mode 120000 index 000000000..f1ef4aefc --- /dev/null +++ b/tests/mocks/mock-solc-0.6/contracts/initializable/Initializable.sol @@ -0,0 +1 @@ +../../../../../contracts/Initializable.sol \ No newline at end of file diff --git a/tests/mocks/mock-solc-0.6/contracts/initializable/InitializableMock.sol b/tests/mocks/mock-solc-0.6/contracts/initializable/InitializableMock.sol new file mode 100644 index 000000000..b992f0bc8 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/contracts/initializable/InitializableMock.sol @@ -0,0 +1,38 @@ +pragma solidity ^0.6.0; + +import "./Initializable.sol"; + +/** + * @title InitializableMock + * @dev This contract is a mock to test initializable functionality + */ +contract InitializableMock is Initializable { + + bool public initializerRan; + uint256 public x; + + function initialize() public initializer { + initializerRan = true; + } + + function initializeNested() public initializer { + initialize(); + } + + function initializeWithX(uint256 _x) public payable initializer { + x = _x; + } + + function nonInitializable(uint256 _x) public payable { + x = _x; + } + + function fail() public pure { + require(false, "InitializableMock forced failure"); + } + + function secret() private pure returns (string memory) { + return 'Im secret'; + } + +} diff --git a/tests/mocks/mock-solc-0.6/contracts/initializable/MultipleInheritanceInitializableMocks.sol b/tests/mocks/mock-solc-0.6/contracts/initializable/MultipleInheritanceInitializableMocks.sol new file mode 100644 index 000000000..5b883b277 --- /dev/null +++ b/tests/mocks/mock-solc-0.6/contracts/initializable/MultipleInheritanceInitializableMocks.sol @@ -0,0 +1,79 @@ +pragma solidity ^0.6.0; + +import "./Initializable.sol"; + +// Sample contracts showing upgradeability with multiple inheritance. +// Child contract inherits from Father and Mother contracts, and Father extends from Gramps. +// +// Human +// / \ +// | Gramps +// | | +// Mother Father +// | | +// -- Child -- + +/** + * Sample base intializable contract that is a human + */ +contract SampleHuman is Initializable { + bool public isHuman; + + function initialize() initializer virtual public { + isHuman = true; + } +} + +/** + * Sample base intializable contract that defines a field mother + */ +contract SampleMother is Initializable, SampleHuman { + uint256 public mother; + + function initialize(uint256 value) initializer virtual public { + SampleHuman.initialize(); + mother = value; + } +} + +/** + * Sample base intializable contract that defines a field gramps + */ +contract SampleGramps is Initializable, SampleHuman { + uint256 public gramps; + + function initialize(uint256 value) initializer virtual public { + SampleHuman.initialize(); + gramps = value; + } +} + +/** + * Sample base intializable contract that defines a field father and extends from gramps + */ +contract SampleFather is Initializable, SampleGramps { + uint256 public father; + + function initialize(uint256 _gramps, uint256 _father) initializer virtual public { + SampleGramps.initialize(_gramps); + father = _father; + } +} + +/** + * Child extends from mother, father (gramps) + */ +contract SampleChild is Initializable, SampleMother, SampleFather { + uint256 public child; + + function initialize(uint256 value) initializer override(SampleGramps, SampleMother) public { + SampleGramps.initialize(value); + SampleMother.initialize(value); + } + + function initialize(uint256 _mother, uint256 _gramps, uint256 _father, uint256 _child) initializer public { + SampleMother.initialize(_mother); + SampleFather.initialize(_gramps, _father); + child = _child; + } +} diff --git a/packages/lib/test/mocks/mock-solc-0.6/networks.js b/tests/mocks/mock-solc-0.6/networks.js similarity index 100% rename from packages/lib/test/mocks/mock-solc-0.6/networks.js rename to tests/mocks/mock-solc-0.6/networks.js diff --git a/packages/lib/test/mocks/mock-solc-0.6/package.json b/tests/mocks/mock-solc-0.6/package.json similarity index 100% rename from packages/lib/test/mocks/mock-solc-0.6/package.json rename to tests/mocks/mock-solc-0.6/package.json diff --git a/yarn.lock b/yarn.lock index d4bdf5371..fc0143d15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7492,14 +7492,14 @@ mocha@^6.2.2: yargs-parser "13.1.1" yargs-unparser "1.6.0" -"mock-dependency@file:packages/lib/test/mocks/mock-dependency": +"mock-dependency@file:tests/mocks/mock-dependency": version "1.1.0" mock-fs@^4.1.0: version "4.10.2" resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.10.2.tgz#ee11e5a3288b0235fb345efe8b25610f7dd397b8" -"mock-solc-0.6@file:packages/lib/test/mocks/mock-solc-0.6": +"mock-solc-0.6@file:tests/mocks/mock-solc-0.6": version "1.0.0" "mock-stdlib-2@file:./packages/cli/test/mocks/mock-stdlib-2": @@ -7511,7 +7511,7 @@ mock-fs@^4.1.0: "mock-stdlib-libdeps@file:./packages/cli/test/mocks/mock-stdlib-libdeps": version "1.1.0" -"mock-stdlib-root@file:./packages/cli/test/mocks/mock-stdlib", "mock-stdlib@file:./packages/cli/test/mocks/mock-stdlib": +"mock-stdlib-root@file:./packages/cli/test/mocks/mock-stdlib": version "1.1.0" "mock-stdlib-undeployed-2@file:./packages/cli/test/mocks/mock-stdlib-undeployed-2": @@ -7526,6 +7526,9 @@ mock-fs@^4.1.0: "mock-stdlib-unsupported@file:./packages/cli/test/mocks/mock-stdlib-unsupported": version "1.1.0" +"mock-stdlib@file:./packages/cli/test/mocks/mock-stdlib": + version "1.1.0" + "mock-stdlib@file:tests/cli/dependencies/mock-stdlib-1.1.0": version "1.1.0"