{ "contractName": "Migratable", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "name": "contractName", "type": "string" }, { "indexed": false, "name": "migrationId", "type": "string" } ], "name": "Migrated", "type": "event" }, { "constant": true, "inputs": [ { "name": "contractName", "type": "string" }, { "name": "migrationId", "type": "string" } ], "name": "isMigrated", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50610224806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c0bac1a814610046575b600080fd5b34801561005257600080fd5b506100f3600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061010d565b604051808215151515815260200191505060405180910390f35b600080836040518082805190602001908083835b6020831015156101465780518252602082019150602081019050602083039250610121565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156101af578051825260208201915060208101905060208303925061018a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff169050929150505600a165627a7a7230582077f2f48091fb3910a281bc12bb316e100f6989025744f91271df808db057cd900029", "deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c0bac1a814610046575b600080fd5b34801561005257600080fd5b506100f3600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061010d565b604051808215151515815260200191505060405180910390f35b600080836040518082805190602001908083835b6020831015156101465780518252602082019150602081019050602083039250610121565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156101af578051825260208201915060208101905060208303925061018a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff169050929150505600a165627a7a7230582077f2f48091fb3910a281bc12bb316e100f6989025744f91271df808db057cd900029", "sourceMap": "396:1696:52:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;396:1696:52;;;;;;;", "deployedSourceMap": "396:1696:52:-;;;;;;;;;;;;;;;;;;;;;;;;1950:140;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2031:4;2050:8;2059:12;2050:22;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:22:52;;;;;;;;;;;;;;;;;;;;;2073:11;2050:35;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2050:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o", "source": "pragma solidity ^0.4.21;\n\n\n/**\n * @title Migratable\n *\n * @dev Helper contract to support migration schemes between different\n * @dev implementations of a contract in the context of upgradeability.\n *\n * @dev Beware! It is the developer's responsibility to ensure migrations are\n * @dev run in a correct order, or that they are run at all.\n *\n * @dev See Initializable for a simpler version.\n */\ncontract Migratable {\n /**\n * @dev Emitted when the contract performs a migration\n * @param contractName Contract name\n * @param migrationId migration id applied\n */\n event Migrated(string contractName, string migrationId);\n\n /**\n * @dev Stores which migrations have been applied already. \n * @dev (contractName => (migrationId => bool))\n */\n mapping (string => mapping (string => bool)) internal migrated;\n\n\n /**\n * @dev used to decorate the initialization function of a contract version\n * @param contractName Contract name\n * @param migrationId migration id to be applied\n */\n modifier isInitializer(string contractName, string migrationId) {\n require(!isMigrated(contractName, migrationId));\n _;\n emit Migrated(contractName, migrationId);\n migrated[contractName][migrationId] = true;\n }\n\n /**\n * @dev used to decorate a migration function of a contract\n * @param contractName Contract name\n * @param requiredMigrationId previous migration required to run new one\n * @param newMigrationId new migration id to be applied\n */\n modifier isMigration(string contractName, string requiredMigrationId, string newMigrationId) {\n require(isMigrated(contractName, requiredMigrationId) && !isMigrated(contractName, newMigrationId));\n _;\n emit Migrated(contractName, newMigrationId);\n migrated[contractName][newMigrationId] = true;\n }\n\n /**\n * @param contractName Contract name\n * @param migrationId migration id\n * @return if the contract was already migrated with given migration\n */\n function isMigrated(string contractName, string migrationId) public view returns(bool) {\n return migrated[contractName][migrationId];\n }\n}\n", "sourcePath": "zos-lib/contracts/migrations/Migratable.sol", "ast": { "absolutePath": "zos-lib/contracts/migrations/Migratable.sol", "exportedSymbols": { "Migratable": [ 4769 ] }, "id": 4770, "nodeType": "SourceUnit", "nodes": [ { "id": 4675, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:52" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Migratable\n * @dev Helper contract to support migration schemes between different\n@dev implementations of a contract in the context of upgradeability.\n * @dev Beware! It is the developer's responsibility to ensure migrations are\n@dev run in a correct order, or that they are run at all.\n * @dev See Initializable for a simpler version.", "fullyImplemented": true, "id": 4769, "linearizedBaseContracts": [ 4769 ], "name": "Migratable", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": "@dev Emitted when the contract performs a migration\n@param contractName Contract name\n@param migrationId migration id applied", "id": 4681, "name": "Migrated", "nodeType": "EventDefinition", "parameters": { "id": 4680, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4677, "indexed": false, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4681, "src": "588:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4676, "name": "string", "nodeType": "ElementaryTypeName", "src": "588:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4679, "indexed": false, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4681, "src": "609:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4678, "name": "string", "nodeType": "ElementaryTypeName", "src": "609:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "587:41:52" }, "src": "573:56:52" }, { "constant": false, "id": 4687, "name": "migrated", "nodeType": "VariableDeclaration", "scope": 4769, "src": "757:62:52", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string => mapping(string => bool))" }, "typeName": { "id": 4686, "keyType": { "id": 4682, "name": "string", "nodeType": "ElementaryTypeName", "src": "766:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "757:44:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string => mapping(string => bool))" }, "valueType": { "id": 4685, "keyType": { "id": 4683, "name": "string", "nodeType": "ElementaryTypeName", "src": "785:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "776:24:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string => bool)" }, "valueType": { "id": 4684, "name": "bool", "nodeType": "ElementaryTypeName", "src": "795:4:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } } }, "value": null, "visibility": "internal" }, { "body": { "id": 4715, "nodeType": "Block", "src": "1068:159:52", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4698, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1082:38:52", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4695, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1094:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4696, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1108:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4694, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1083:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4697, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1083:37:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 4693, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1074:7:52", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 4699, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1074:47:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4700, "nodeType": "ExpressionStatement", "src": "1074:47:52" }, { "id": 4701, "nodeType": "PlaceholderStatement", "src": "1127:1:52" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4703, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1148:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4704, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1162:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4702, "name": "Migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4681, "src": "1139:8:52", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory,string memory)" } }, "id": 4705, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1139:35:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4706, "nodeType": "EmitStatement", "src": "1134:40:52" }, { "expression": { "argumentTypes": null, "id": 4713, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4707, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "1180:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4710, "indexExpression": { "argumentTypes": null, "id": 4708, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1189:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1180:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4711, "indexExpression": { "argumentTypes": null, "id": 4709, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1203:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1180:35:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4712, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1218:4:52", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1180:42:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4714, "nodeType": "ExpressionStatement", "src": "1180:42:52" } ] }, "documentation": "@dev used to decorate the initialization function of a contract version\n@param contractName Contract name\n@param migrationId migration id to be applied", "id": 4716, "name": "isInitializer", "nodeType": "ModifierDefinition", "parameters": { "id": 4692, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4689, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4716, "src": "1027:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4688, "name": "string", "nodeType": "ElementaryTypeName", "src": "1027:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4691, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4716, "src": "1048:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4690, "name": "string", "nodeType": "ElementaryTypeName", "src": "1048:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1026:41:52" }, "src": "1004:223:52", "visibility": "internal" }, { "body": { "id": 4751, "nodeType": "Block", "src": "1570:217:52", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4734, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4726, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1595:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4727, "name": "requiredMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4720, "src": "1609:19:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4725, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1584:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4728, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1584:45:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "id": 4733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1633:41:52", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4730, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1645:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4731, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1659:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4729, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1634:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1634:40:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1584:90:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 4724, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1576:7:52", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 4735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1576:99:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4736, "nodeType": "ExpressionStatement", "src": "1576:99:52" }, { "id": 4737, "nodeType": "PlaceholderStatement", "src": "1681:1:52" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4739, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1702:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4740, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1716:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4738, "name": "Migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4681, "src": "1693:8:52", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory,string memory)" } }, "id": 4741, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1693:38:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4742, "nodeType": "EmitStatement", "src": "1688:43:52" }, { "expression": { "argumentTypes": null, "id": 4749, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4743, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "1737:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4746, "indexExpression": { "argumentTypes": null, "id": 4744, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1746:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1737:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4747, "indexExpression": { "argumentTypes": null, "id": 4745, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1760:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1737:38:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4748, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1778:4:52", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1737:45:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4750, "nodeType": "ExpressionStatement", "src": "1737:45:52" } ] }, "documentation": "@dev used to decorate a migration function of a contract\n@param contractName Contract name\n@param requiredMigrationId previous migration required to run new one\n@param newMigrationId new migration id to be applied", "id": 4752, "name": "isMigration", "nodeType": "ModifierDefinition", "parameters": { "id": 4723, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4718, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1498:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4717, "name": "string", "nodeType": "ElementaryTypeName", "src": "1498:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4720, "name": "requiredMigrationId", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1519:26:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4719, "name": "string", "nodeType": "ElementaryTypeName", "src": "1519:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4722, "name": "newMigrationId", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1547:21:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4721, "name": "string", "nodeType": "ElementaryTypeName", "src": "1547:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1497:72:52" }, "src": "1477:310:52", "visibility": "internal" }, { "body": { "id": 4767, "nodeType": "Block", "src": "2037:53:52", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4761, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "2050:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4763, "indexExpression": { "argumentTypes": null, "id": 4762, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4754, "src": "2059:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2050:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4765, "indexExpression": { "argumentTypes": null, "id": 4764, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4756, "src": "2073:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2050:35:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 4760, "id": 4766, "nodeType": "Return", "src": "2043:42:52" } ] }, "documentation": "@param contractName Contract name\n@param migrationId migration id\n@return if the contract was already migrated with given migration", "id": 4768, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isMigrated", "nodeType": "FunctionDefinition", "parameters": { "id": 4757, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4754, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4768, "src": "1970:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4753, "name": "string", "nodeType": "ElementaryTypeName", "src": "1970:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4756, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4768, "src": "1991:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4755, "name": "string", "nodeType": "ElementaryTypeName", "src": "1991:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1969:41:52" }, "payable": false, "returnParameters": { "id": 4760, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4759, "name": "", "nodeType": "VariableDeclaration", "scope": 4768, "src": "2031:4:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4758, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2031:4:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2030:6:52" }, "scope": 4769, "src": "1950:140:52", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 4770, "src": "396:1696:52" } ], "src": "0:2093:52" }, "legacyAST": { "absolutePath": "zos-lib/contracts/migrations/Migratable.sol", "exportedSymbols": { "Migratable": [ 4769 ] }, "id": 4770, "nodeType": "SourceUnit", "nodes": [ { "id": 4675, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:52" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Migratable\n * @dev Helper contract to support migration schemes between different\n@dev implementations of a contract in the context of upgradeability.\n * @dev Beware! It is the developer's responsibility to ensure migrations are\n@dev run in a correct order, or that they are run at all.\n * @dev See Initializable for a simpler version.", "fullyImplemented": true, "id": 4769, "linearizedBaseContracts": [ 4769 ], "name": "Migratable", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": "@dev Emitted when the contract performs a migration\n@param contractName Contract name\n@param migrationId migration id applied", "id": 4681, "name": "Migrated", "nodeType": "EventDefinition", "parameters": { "id": 4680, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4677, "indexed": false, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4681, "src": "588:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4676, "name": "string", "nodeType": "ElementaryTypeName", "src": "588:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4679, "indexed": false, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4681, "src": "609:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4678, "name": "string", "nodeType": "ElementaryTypeName", "src": "609:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "587:41:52" }, "src": "573:56:52" }, { "constant": false, "id": 4687, "name": "migrated", "nodeType": "VariableDeclaration", "scope": 4769, "src": "757:62:52", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string => mapping(string => bool))" }, "typeName": { "id": 4686, "keyType": { "id": 4682, "name": "string", "nodeType": "ElementaryTypeName", "src": "766:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "757:44:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string => mapping(string => bool))" }, "valueType": { "id": 4685, "keyType": { "id": 4683, "name": "string", "nodeType": "ElementaryTypeName", "src": "785:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "776:24:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string => bool)" }, "valueType": { "id": 4684, "name": "bool", "nodeType": "ElementaryTypeName", "src": "795:4:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } } }, "value": null, "visibility": "internal" }, { "body": { "id": 4715, "nodeType": "Block", "src": "1068:159:52", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4698, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1082:38:52", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4695, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1094:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4696, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1108:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4694, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1083:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4697, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1083:37:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 4693, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1074:7:52", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 4699, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1074:47:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4700, "nodeType": "ExpressionStatement", "src": "1074:47:52" }, { "id": 4701, "nodeType": "PlaceholderStatement", "src": "1127:1:52" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4703, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1148:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4704, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1162:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4702, "name": "Migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4681, "src": "1139:8:52", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory,string memory)" } }, "id": 4705, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1139:35:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4706, "nodeType": "EmitStatement", "src": "1134:40:52" }, { "expression": { "argumentTypes": null, "id": 4713, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4707, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "1180:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4710, "indexExpression": { "argumentTypes": null, "id": 4708, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4689, "src": "1189:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1180:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4711, "indexExpression": { "argumentTypes": null, "id": 4709, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4691, "src": "1203:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1180:35:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4712, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1218:4:52", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1180:42:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4714, "nodeType": "ExpressionStatement", "src": "1180:42:52" } ] }, "documentation": "@dev used to decorate the initialization function of a contract version\n@param contractName Contract name\n@param migrationId migration id to be applied", "id": 4716, "name": "isInitializer", "nodeType": "ModifierDefinition", "parameters": { "id": 4692, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4689, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4716, "src": "1027:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4688, "name": "string", "nodeType": "ElementaryTypeName", "src": "1027:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4691, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4716, "src": "1048:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4690, "name": "string", "nodeType": "ElementaryTypeName", "src": "1048:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1026:41:52" }, "src": "1004:223:52", "visibility": "internal" }, { "body": { "id": 4751, "nodeType": "Block", "src": "1570:217:52", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4734, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4726, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1595:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4727, "name": "requiredMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4720, "src": "1609:19:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4725, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1584:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4728, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1584:45:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "id": 4733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1633:41:52", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4730, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1645:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4731, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1659:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4729, "name": "isMigrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4768, "src": "1634:10:52", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_bool_$", "typeString": "function (string memory,string memory) view returns (bool)" } }, "id": 4732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1634:40:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1584:90:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 4724, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1576:7:52", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 4735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1576:99:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4736, "nodeType": "ExpressionStatement", "src": "1576:99:52" }, { "id": 4737, "nodeType": "PlaceholderStatement", "src": "1681:1:52" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4739, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1702:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 4740, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1716:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 4738, "name": "Migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4681, "src": "1693:8:52", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory,string memory)" } }, "id": 4741, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1693:38:52", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4742, "nodeType": "EmitStatement", "src": "1688:43:52" }, { "expression": { "argumentTypes": null, "id": 4749, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4743, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "1737:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4746, "indexExpression": { "argumentTypes": null, "id": 4744, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4718, "src": "1746:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1737:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4747, "indexExpression": { "argumentTypes": null, "id": 4745, "name": "newMigrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4722, "src": "1760:14:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1737:38:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4748, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1778:4:52", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1737:45:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4750, "nodeType": "ExpressionStatement", "src": "1737:45:52" } ] }, "documentation": "@dev used to decorate a migration function of a contract\n@param contractName Contract name\n@param requiredMigrationId previous migration required to run new one\n@param newMigrationId new migration id to be applied", "id": 4752, "name": "isMigration", "nodeType": "ModifierDefinition", "parameters": { "id": 4723, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4718, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1498:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4717, "name": "string", "nodeType": "ElementaryTypeName", "src": "1498:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4720, "name": "requiredMigrationId", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1519:26:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4719, "name": "string", "nodeType": "ElementaryTypeName", "src": "1519:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4722, "name": "newMigrationId", "nodeType": "VariableDeclaration", "scope": 4752, "src": "1547:21:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4721, "name": "string", "nodeType": "ElementaryTypeName", "src": "1547:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1497:72:52" }, "src": "1477:310:52", "visibility": "internal" }, { "body": { "id": 4767, "nodeType": "Block", "src": "2037:53:52", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4761, "name": "migrated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4687, "src": "2050:8:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_string_memory_$_t_bool_$_$", "typeString": "mapping(string memory => mapping(string memory => bool))" } }, "id": 4763, "indexExpression": { "argumentTypes": null, "id": 4762, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4754, "src": "2059:12:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2050:22:52", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_bool_$", "typeString": "mapping(string memory => bool)" } }, "id": 4765, "indexExpression": { "argumentTypes": null, "id": 4764, "name": "migrationId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4756, "src": "2073:11:52", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2050:35:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 4760, "id": 4766, "nodeType": "Return", "src": "2043:42:52" } ] }, "documentation": "@param contractName Contract name\n@param migrationId migration id\n@return if the contract was already migrated with given migration", "id": 4768, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isMigrated", "nodeType": "FunctionDefinition", "parameters": { "id": 4757, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4754, "name": "contractName", "nodeType": "VariableDeclaration", "scope": 4768, "src": "1970:19:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4753, "name": "string", "nodeType": "ElementaryTypeName", "src": "1970:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4756, "name": "migrationId", "nodeType": "VariableDeclaration", "scope": 4768, "src": "1991:18:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4755, "name": "string", "nodeType": "ElementaryTypeName", "src": "1991:6:52", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "1969:41:52" }, "payable": false, "returnParameters": { "id": 4760, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4759, "name": "", "nodeType": "VariableDeclaration", "scope": 4768, "src": "2031:4:52", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4758, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2031:4:52", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2030:6:52" }, "scope": 4769, "src": "1950:140:52", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 4770, "src": "396:1696:52" } ], "src": "0:2093:52" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-08-23T14:35:50.656Z" }