UNPKG

@alice-network/zos-lib

Version:

JavaScript library for the ZeppelinOS smart contract platform

1,346 lines (1,345 loc) 75.8 kB
{ "contractName": "MigratableMockV1", "abi": [ { "constant": true, "inputs": [], "name": "x", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "value", "type": "uint256" } ], "name": "initialize", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5061021c806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630c55699c14610051578063fe4b84df1461007c575b600080fd5b34801561005d57600080fd5b5061006661009c565b6040518082815260200191505060405180910390f35b61009a600480360381019080803590602001909291905050506100a2565b005b60335481565b60008060019054906101000a900460ff16806100c257506100c16101df565b5b806100d957506000809054906101000a900460ff16155b1515610173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055508160338190555080600060016101000a81548160ff0219169083151502179055505050565b600080303b905060008114915050905600a165627a7a723058203074f79b85a3deb91fbdcbc8e626483b2ceef65e9eb1bc6678f3d7162576901e0029", "deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630c55699c14610051578063fe4b84df1461007c575b600080fd5b34801561005d57600080fd5b5061006661009c565b6040518082815260200191505060405180910390f35b61009a600480360381019080803590602001909291905050506100a2565b005b60335481565b60008060019054906101000a900460ff16806100c257506100c16101df565b5b806100d957506000809054906101000a900460ff16155b1515610173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055508160338190555080600060016101000a81548160ff0219169083151502179055505050565b600080303b905060008114915050905600a165627a7a723058203074f79b85a3deb91fbdcbc8e626483b2ceef65e9eb1bc6678f3d7162576901e0029", "sourceMap": "180:152:15:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;180:152:15;;;;;;;", "deployedSourceMap": "180:152:15:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;227:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;227:16:15;;;;;;;;;;;;;;;;;;;;;;;248:82;;;;;;;;;;;;;;;;;;;;;;;;;;227:16;;;;:::o;248:82::-;1129:20:0;1024:12;;;;;;;;;;;:31;;;;1040:15;:13;:15::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1152:12;;;;;;;;;;;1129:35;;1185:4;1170:12;;:19;;;;;;;;;;;;;;;;;;1209:4;1195:11;;:18;;;;;;;;;;;;;;;;;;320:5:15;316:1;:9;;;;1243:15:0;1228:12;;:30;;;;;;;;;;;;;;;;;;248:82:15;;:::o;1349:467:0:-;1396:4;1737:10;1782:7;1770:20;1764:26;;1810:1;1804:2;:7;1797:14;;1349:467;;:::o", "source": "pragma solidity ^0.4.24;\n\nimport '../Initializable.sol';\n\n/**\n * @title MigratableMockV1\n * @dev This contract is a mock to test initializable functionality through migrations\n */\ncontract MigratableMockV1 is Initializable {\n uint256 public x;\n\n function initialize(uint256 value) initializer public payable {\n x = value;\n }\n}\n\n/**\n * @title MigratableMockV2\n * @dev This contract is a mock to test migratable functionality with params\n */\ncontract MigratableMockV2 is MigratableMockV1 {\n bool migratedV2;\n uint256 public y;\n\n function migrate(uint256 value, uint256 anotherValue) public payable {\n require(!migratedV2);\n x = value;\n y = anotherValue;\n migratedV2 = true;\n }\n}\n\n/**\n * @title MigratableMockV3\n * @dev This contract is a mock to test migratable functionality without params\n */\ncontract MigratableMockV3 is MigratableMockV2 {\n bool migratedV3;\n\n function migrate() public payable {\n require(!migratedV3);\n uint256 oldX = x;\n x = y;\n y = oldX;\n migratedV3 = true;\n }\n}\n", "sourcePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/SingleInheritanceInitializableMocks.sol", "ast": { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/SingleInheritanceInitializableMocks.sol", "exportedSymbols": { "MigratableMockV1": [ 2035 ], "MigratableMockV2": [ 2067 ], "MigratableMockV3": [ 2097 ] }, "id": 2098, "nodeType": "SourceUnit", "nodes": [ { "id": 2017, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:15" }, { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/Initializable.sol", "file": "../Initializable.sol", "id": 2018, "nodeType": "ImportDirective", "scope": 2098, "sourceUnit": 56, "src": "26:30:15", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2019, "name": "Initializable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 55, "src": "209:13:15", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$55", "typeString": "contract Initializable" } }, "id": 2020, "nodeType": "InheritanceSpecifier", "src": "209:13:15" } ], "contractDependencies": [ 55 ], "contractKind": "contract", "documentation": "@title MigratableMockV1\n@dev This contract is a mock to test initializable functionality through migrations", "fullyImplemented": true, "id": 2035, "linearizedBaseContracts": [ 2035, 55 ], "name": "MigratableMockV1", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2022, "name": "x", "nodeType": "VariableDeclaration", "scope": 2035, "src": "227:16:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2021, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "227:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 2033, "nodeType": "Block", "src": "310:20:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2029, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2022, "src": "316:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2030, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2024, "src": "320:5:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "316:9:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2032, "nodeType": "ExpressionStatement", "src": "316:9:15" } ] }, "documentation": null, "id": 2034, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 2027, "modifierName": { "argumentTypes": null, "id": 2026, "name": "initializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36, "src": "283:11:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "283:11:15" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 2025, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2024, "name": "value", "nodeType": "VariableDeclaration", "scope": 2034, "src": "268:13:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2023, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "268:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "267:15:15" }, "payable": true, "returnParameters": { "id": 2028, "nodeType": "ParameterList", "parameters": [], "src": "310:0:15" }, "scope": 2035, "src": "248:82:15", "stateMutability": "payable", "superFunction": null, "visibility": "public" } ], "scope": 2098, "src": "180:152:15" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2036, "name": "MigratableMockV1", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2035, "src": "475:16:15", "typeDescriptions": { "typeIdentifier": "t_contract$_MigratableMockV1_$2035", "typeString": "contract MigratableMockV1" } }, "id": 2037, "nodeType": "InheritanceSpecifier", "src": "475:16:15" } ], "contractDependencies": [ 55, 2035 ], "contractKind": "contract", "documentation": "@title MigratableMockV2\n@dev This contract is a mock to test migratable functionality with params", "fullyImplemented": true, "id": 2067, "linearizedBaseContracts": [ 2067, 2035, 55 ], "name": "MigratableMockV2", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2039, "name": "migratedV2", "nodeType": "VariableDeclaration", "scope": 2067, "src": "496:15:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2038, "name": "bool", "nodeType": "ElementaryTypeName", "src": "496:4:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2041, "name": "y", "nodeType": "VariableDeclaration", "scope": 2067, "src": "515:16:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2040, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "515:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 2065, "nodeType": "Block", "src": "605:91:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "619:11:15", "subExpression": { "argumentTypes": null, "id": 2049, "name": "migratedV2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "620:10:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2048, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "611:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2051, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "611:20:15", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2052, "nodeType": "ExpressionStatement", "src": "611:20:15" }, { "expression": { "argumentTypes": null, "id": 2055, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2053, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2022, "src": "637:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2054, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2043, "src": "641:5:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "637:9:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2056, "nodeType": "ExpressionStatement", "src": "637:9:15" }, { "expression": { "argumentTypes": null, "id": 2059, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2057, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2041, "src": "652:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2058, "name": "anotherValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2045, "src": "656:12:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "652:16:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2060, "nodeType": "ExpressionStatement", "src": "652:16:15" }, { "expression": { "argumentTypes": null, "id": 2063, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2061, "name": "migratedV2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "674:10:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 2062, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "687:4:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "674:17:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 2064, "nodeType": "ExpressionStatement", "src": "674:17:15" } ] }, "documentation": null, "id": 2066, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "migrate", "nodeType": "FunctionDefinition", "parameters": { "id": 2046, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2043, "name": "value", "nodeType": "VariableDeclaration", "scope": 2066, "src": "553:13:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2042, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "553:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2045, "name": "anotherValue", "nodeType": "VariableDeclaration", "scope": 2066, "src": "568:20:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2044, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "568:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "552:37:15" }, "payable": true, "returnParameters": { "id": 2047, "nodeType": "ParameterList", "parameters": [], "src": "605:0:15" }, "scope": 2067, "src": "536:160:15", "stateMutability": "payable", "superFunction": null, "visibility": "public" } ], "scope": 2098, "src": "446:252:15" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2068, "name": "MigratableMockV2", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2067, "src": "844:16:15", "typeDescriptions": { "typeIdentifier": "t_contract$_MigratableMockV2_$2067", "typeString": "contract MigratableMockV2" } }, "id": 2069, "nodeType": "InheritanceSpecifier", "src": "844:16:15" } ], "contractDependencies": [ 55, 2035, 2067 ], "contractKind": "contract", "documentation": "@title MigratableMockV3\n@dev This contract is a mock to test migratable functionality without params", "fullyImplemented": true, "id": 2097, "linearizedBaseContracts": [ 2097, 2067, 2035, 55 ], "name": "MigratableMockV3", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2071, "name": "migratedV3", "nodeType": "VariableDeclaration", "scope": 2097, "src": "865:15:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2070, "name": "bool", "nodeType": "ElementaryTypeName", "src": "865:4:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "body": { "id": 2095, "nodeType": "Block", "src": "919:101:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "933:11:15", "subExpression": { "argumentTypes": null, "id": 2075, "name": "migratedV3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "934:10:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2074, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "925:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2077, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "925:20:15", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2078, "nodeType": "ExpressionStatement", "src": "925:20:15" }, { "assignments": [ 2080 ], "declarations": [ { "constant": false, "id": 2080, "name": "oldX", "nodeType": "VariableDeclaration", "scope": 2096, "src": "951:12:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2079, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "951:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2082, "initialValue": { "argumentTypes": null, "id": 2081, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2022, "src": "966:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "951:16:15" }, { "expression": { "argumentTypes": null, "id": 2085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2083, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2022, "src": "973:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2084, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2041, "src": "977:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "973:5:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2086, "nodeType": "ExpressionStatement", "src": "973:5:15" }, { "expression": { "argumentTypes": null, "id": 2089, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2087, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2041, "src": "984:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2088, "name": "oldX", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2080, "src": "988:4:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "984:8:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2090, "nodeType": "ExpressionStatement", "src": "984:8:15" }, { "expression": { "argumentTypes": null, "id": 2093, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2091, "name": "migratedV3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "998:10:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 2092, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1011:4:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "998:17:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 2094, "nodeType": "ExpressionStatement", "src": "998:17:15" } ] }, "documentation": null, "id": 2096, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "migrate", "nodeType": "FunctionDefinition", "parameters": { "id": 2072, "nodeType": "ParameterList", "parameters": [], "src": "901:2:15" }, "payable": true, "returnParameters": { "id": 2073, "nodeType": "ParameterList", "parameters": [], "src": "919:0:15" }, "scope": 2097, "src": "885:135:15", "stateMutability": "payable", "superFunction": null, "visibility": "public" } ], "scope": 2098, "src": "815:207:15" } ], "src": "0:1023:15" }, "legacyAST": { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/SingleInheritanceInitializableMocks.sol", "exportedSymbols": { "MigratableMockV1": [ 2035 ], "MigratableMockV2": [ 2067 ], "MigratableMockV3": [ 2097 ] }, "id": 2098, "nodeType": "SourceUnit", "nodes": [ { "id": 2017, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:15" }, { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/Initializable.sol", "file": "../Initializable.sol", "id": 2018, "nodeType": "ImportDirective", "scope": 2098, "sourceUnit": 56, "src": "26:30:15", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2019, "name": "Initializable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 55, "src": "209:13:15", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$55", "typeString": "contract Initializable" } }, "id": 2020, "nodeType": "InheritanceSpecifier", "src": "209:13:15" } ], "contractDependencies": [ 55 ], "contractKind": "contract", "documentation": "@title MigratableMockV1\n@dev This contract is a mock to test initializable functionality through migrations", "fullyImplemented": true, "id": 2035, "linearizedBaseContracts": [ 2035, 55 ], "name": "MigratableMockV1", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2022, "name": "x", "nodeType": "VariableDeclaration", "scope": 2035, "src": "227:16:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2021, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "227:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 2033, "nodeType": "Block", "src": "310:20:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2029, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2022, "src": "316:1:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2030, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2024, "src": "320:5:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "316:9:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2032, "nodeType": "ExpressionStatement", "src": "316:9:15" } ] }, "documentation": null, "id": 2034, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 2027, "modifierName": { "argumentTypes": null, "id": 2026, "name": "initializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36, "src": "283:11:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "283:11:15" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 2025, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2024, "name": "value", "nodeType": "VariableDeclaration", "scope": 2034, "src": "268:13:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2023, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "268:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "267:15:15" }, "payable": true, "returnParameters": { "id": 2028, "nodeType": "ParameterList", "parameters": [], "src": "310:0:15" }, "scope": 2035, "src": "248:82:15", "stateMutability": "payable", "superFunction": null, "visibility": "public" } ], "scope": 2098, "src": "180:152:15" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2036, "name": "MigratableMockV1", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2035, "src": "475:16:15", "typeDescriptions": { "typeIdentifier": "t_contract$_MigratableMockV1_$2035", "typeString": "contract MigratableMockV1" } }, "id": 2037, "nodeType": "InheritanceSpecifier", "src": "475:16:15" } ], "contractDependencies": [ 55, 2035 ], "contractKind": "contract", "documentation": "@title MigratableMockV2\n@dev This contract is a mock to test migratable functionality with params", "fullyImplemented": true, "id": 2067, "linearizedBaseContracts": [ 2067, 2035, 55 ], "name": "MigratableMockV2", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2039, "name": "migratedV2", "nodeType": "VariableDeclaration", "scope": 2067, "src": "496:15:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2038, "name": "bool", "nodeType": "ElementaryTypeName", "src": "496:4:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2041, "name": "y", "nodeType": "VariableDeclaration", "scope": 2067, "src": "515:16:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" },