UNPKG

@newos/upgrades

Version:
891 lines (890 loc) 277 kB
{ "fileName": "DeprecatedApp.sol", "contractName": "DeprecatedApp", "source": "pragma solidity ^0.5.0;\n\nimport \"../application/ImplementationProvider.sol\";\nimport \"../application/Package.sol\";\nimport { DeprecatedAdminUpgradeabilityProxy as AdminUpgradeabilityProxy } from \"../mocks/DeprecatedAdminUpgradeabilityProxy.sol\";\nimport \"../ownership/Ownable.sol\";\n\n/**\n * @title App\n * @dev Contract for upgradeable applications.\n * It handles the creation and upgrading of proxies.\n */\ncontract DeprecatedApp is OpenZeppelinUpgradesOwnable {\n /**\n * @dev Emitted when a new proxy is created.\n * @param proxy Address of the created proxy.\n */\n event ProxyCreated(address proxy);\n\n /**\n * @dev Emitted when a package dependency is changed in the application.\n * @param providerName Name of the package that changed.\n * @param package Address of the package associated to the name.\n * @param version Version of the package in use.\n */\n event PackageChanged(string providerName, address package, uint64[3] version);\n\n /**\n * @dev Tracks a package in a particular version, used for retrieving implementations\n */\n struct ProviderInfo {\n Package package;\n uint64[3] version;\n }\n\n /**\n * @dev Maps from dependency name to a tuple of package and version\n */\n mapping(string => ProviderInfo) internal providers;\n\n /**\n * @dev Constructor function.\n */\n constructor() public { }\n\n /**\n * @dev Returns the provider for a given package name, or zero if not set.\n * @param packageName Name of the package to be retrieved.\n * @return The provider.\n */\n function getProvider(string memory packageName) public view returns (ImplementationProvider provider) {\n ProviderInfo storage info = providers[packageName];\n if (address(info.package) == address(0)) return ImplementationProvider(0);\n return ImplementationProvider(info.package.getContract(info.version));\n }\n\n /**\n * @dev Returns information on a package given its name.\n * @param packageName Name of the package to be queried.\n * @return A tuple with the package address and pinned version given a package name, or zero if not set\n */\n function getPackage(string memory packageName) public view returns (Package, uint64[3] memory) {\n ProviderInfo storage info = providers[packageName];\n return (info.package, info.version);\n }\n\n /**\n * @dev Sets a package in a specific version as a dependency for this application.\n * Requires the version to be present in the package.\n * @param packageName Name of the package to set or overwrite.\n * @param package Address of the package to register.\n * @param version Version of the package to use in this application.\n */\n function setPackage(string memory packageName, Package package, uint64[3] memory version) public onlyOwner {\n require(package.hasVersion(version), \"The requested version must be registered in the given package\");\n providers[packageName] = ProviderInfo(package, version);\n emit PackageChanged(packageName, address(package), version);\n }\n\n /**\n * @dev Unsets a package given its name.\n * Reverts if the package is not set in the application.\n * @param packageName Name of the package to remove.\n */\n function unsetPackage(string memory packageName) public onlyOwner {\n require(address(providers[packageName].package) != address(0), \"Package to unset not found\");\n delete providers[packageName];\n emit PackageChanged(packageName, address(0), [uint64(0), uint64(0), uint64(0)]);\n }\n\n /**\n * @dev Returns the implementation address for a given contract name, provided by the `ImplementationProvider`.\n * @param packageName Name of the package where the contract is contained.\n * @param contractName Name of the contract.\n * @return Address where the contract is implemented.\n */\n function getImplementation(string memory packageName, string memory contractName) public view returns (address) {\n ImplementationProvider provider = getProvider(packageName);\n if (address(provider) == address(0)) return address(0);\n return provider.getImplementation(contractName);\n }\n\n /**\n * @dev Returns the current implementation of a proxy.\n * This is needed because only the proxy admin can query it.\n * @return The address of the current implementation of the proxy.\n */\n function getProxyImplementation(AdminUpgradeabilityProxy proxy) public returns (address) {\n return proxy.implementation();\n }\n\n /**\n * @dev Returns the admin of a proxy. Only the admin can query it.\n * @return The address of the current admin of the proxy.\n */\n function getProxyAdmin(AdminUpgradeabilityProxy proxy) public view returns (address) {\n return proxy.admin();\n }\n\n /**\n * @dev Changes the admin of a proxy.\n * @param proxy Proxy to change admin.\n * @param newAdmin Address to transfer proxy administration to.\n */\n function changeProxyAdmin(AdminUpgradeabilityProxy proxy, address newAdmin) public onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Creates a new proxy for the given contract and forwards a function call to it.\n * This is useful to initialize the proxied contract.\n * @param packageName Name of the package where the contract is contained.\n * @param contractName Name of the contract.\n * @param data Data to send as msg.data to the corresponding implementation to initialize the proxied contract.\n * It should include the signature and the parameters of the function to be called, as described in\n * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\n * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\n * @return Address of the new proxy.\n */\n function create(string memory packageName, string memory contractName, bytes memory data) payable public returns (AdminUpgradeabilityProxy) {\n address implementation = getImplementation(packageName, contractName);\n AdminUpgradeabilityProxy proxy = (new AdminUpgradeabilityProxy).value(msg.value)(implementation, data);\n emit ProxyCreated(address(proxy));\n return proxy;\n }\n\n /**\n * @dev Upgrades a proxy to the newest implementation of a contract.\n * @param proxy Proxy to be upgraded.\n * @param packageName Name of the package where the contract is contained.\n * @param contractName Name of the contract.\n */\n function upgrade(AdminUpgradeabilityProxy proxy, string memory packageName, string memory contractName) public onlyOwner {\n address implementation = getImplementation(packageName, contractName);\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades a proxy to the newest implementation of a contract and forwards a function call to it.\n * This is useful to initialize the proxied contract.\n * @param proxy Proxy to be upgraded.\n * @param packageName Name of the package where the contract is contained.\n * @param contractName Name of the contract.\n * @param data Data to send as msg.data in the low level call.\n * It should include the signature and the parameters of the function to be called, as described in\n * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\n */\n function upgradeAndCall(AdminUpgradeabilityProxy proxy, string memory packageName, string memory contractName, bytes memory data) payable public onlyOwner {\n address implementation = getImplementation(packageName, contractName);\n proxy.upgradeToAndCall.value(msg.value)(implementation, data);\n }\n}\n", "sourcePath": "contracts/mocks/DeprecatedApp.sol", "sourceMap": "402:7062:8:-;;;1305:24;8:9:-1;5:2;;;30:1;27;20:12;5:2;1305:24:8;989:10:33;980:6;;:19;;;;;;;;;;;;;;;;;;1047:6;;;;;;;;;;;1014:40;;1043:1;1014:40;;;;;;;;;;;;402:7062:8;;;;;;", "deployedSourceMap": "402:7062:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4229:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4229:129:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4229:129:8;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3730:294;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3730:294:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3730:294:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;3730:294:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3730:294:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3730:294:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;3730:294:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;3730:294:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3730:294:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3730:294:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;3730:294:8;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;5671:388;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5671:388:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;5671:388:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5671:388:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5671:388:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;5671:388:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;5671:388:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5671:388:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5671:388:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;5671:388:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;5671:388:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5671:388:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5671:388:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;5671:388:8;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1510:317;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1510:317:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1510:317:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1510:317:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1510:317:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1510:317:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1510:317:8;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1812:137:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1812:137:33;;;:::i;:::-;;2613:345:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2613:345:8;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2613:345:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;2613:345:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2613:345:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2613:345:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;2613:345:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;2613:345:8;;;;;;;;;;;;;;:::i;:::-;;4782:131;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4782:131:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4782:131:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6310:238;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6310:238:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6310:238:8;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;6310:238:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6310:238:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6310:238:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;6310:238:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;6310:238:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6310:238:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6310:238:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;6310:238:8;;;;;;;;;;;;;;;:::i;:::-;;2067:197;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2067:197:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2067:197:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;2067:197:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2067:197:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2067:197:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;2067:197:8;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2067:197:8;;;;;;;;;;;;;;;;;1124:77:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1124:77:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1444:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1444:90:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3131:289:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3131:289:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3131:289:8;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;3131:289:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3131:289:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3131:289:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;3131:289:8;;;;;;;;;;;;;;;:::i;:::-;;7160:302;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;7160:302:8;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;7160:302:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;7160:302:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;7160:302:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;7160:302:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;7160:302:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;7160:302:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;7160:302:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;7160:302:8;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;7160:302:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;7160:302:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;7160:302:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;7160:302:8;;;;;;;;;;;;;;;:::i;:::-;;2120:107:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2120:107:33;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2120:107:33;;;;;;;;;;;;;;;;;;;:::i;:::-;;4503:116:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4503:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4503:116:8;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4229:129;4309:7;4331:5;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4331:22:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4331:22:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4331:22:8;;;;;;;;;;;;;;;;4324:29;;4229:129;;;:::o;3730:294::-;3833:7;3848:31;3882:24;3894:11;3882;:24::i;:::-;3848:58;;3945:1;3916:31;;3924:8;3916:31;;;3912:54;;;3964:1;3949:17;;;;;3912:54;3979:8;:26;;;4006:12;3979:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3979:40:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3979:40:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3979:40:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3979:40:8;;;;;;;;;;;;;;;;3972:47;;;3730:294;;;;;:::o;5671:388::-;5785:24;5817:22;5842:44;5860:11;5873:12;5842:17;:44::i;:::-;5817:69;;5893:30;5963:9;5974:14;5990:4;5926:69;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5926:69:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5926:69:8;;;5893:102;;6007:28;6028:5;6007:28;;;;;;;;;;;;;;;;;;;;;;6049:5;6042:12;;;;5671:388;;;;;:::o;1510:317::-;1579:31;1618:25;1646:9;1656:11;1646: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;;;1646:22:8;;;;;;;;;;;;;;;;;;;;;1618:50;;1711:1;1678:35;;1686:4;:12;;;;;;;;;;;;1678:35;;;1674:73;;;1745:1;1715:32;;;;;1674:73;1783:4;:12;;;;;;;;;;;;:24;;;1808:4;:12;;1783:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1783:38:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1783:38:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1783:38:8;;;;;;;;;;;;;;;;1753:69;;;1510:317;;;;:::o;1812:137:33:-;1328:9;:7;:9::i;:::-;1320:18;;;;;;;;1910:1;1873:40;;1894:6;;;;;;;;;;;1873:40;;;;;;;;;;;;1940:1;1923:6;;:19;;;;;;;;;;;;;;;;;;1812:137::o;2613:345:8:-;1328:9:33;:7;:9::i;:::-;1320:18;;;;;;;;2734:7:8;:18;;;2753:7;2734:27;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2734:27:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2734:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2734:27:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2734:27:8;;;;;;;;;;;;;;;;2726:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2858:30;;;;;;;;;2871:7;2858:30;;;;;;2880:7;2858:30;;;2833:9;2843:11;2833: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;;;2833:22:8;;;;;;;;;;;;;;;;;;;;;:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;2899:54;2914:11;2935:7;2945;2899:54;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2899:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2899:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2613:345;;;:::o;4782:131::-;1328:9:33;:7;:9::i;:::-;1320:18;;;;;;;;4881:5:8;:17;;;4899:8;4881:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4881:27:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4881:27:8;;;;4782:131;;:::o;6310:238::-;1328:9:33;:7;:9::i;:::-;1320:18;;;;;;;;6437:22:8;6462:44;6480:11;6493:12;6462:17;:44::i;:::-;6437:69;;6512:5;:15;;;6528:14;6512:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6512:31:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6512:31:8;;;;1348:1:33;6310:238:8;;;:::o;2067:197::-;2135:7;2144:16;;:::i;:::-;2168:25;2196:9;2206:11;2196: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;;;2196:22:8;;;;;;;;;;;;;;;;;;;;;2168:50;;2232:4;:12;;;;;;;;;;;;2246:4;:12;;2224:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2067:197;;;:::o;1124:77:33:-;1162:7;1188:6;;;;;;;;;;;1181:13;;1124:77;:::o;1444:90::-;1484:4;1521:6;;;;;;;;;;;1507:20;;:10;:20;;;1500:27;;1444:90;:::o;3131:289:8:-;1328:9:33;:7;:9::i;:::-;1320:18;;;;;;;;3262:1:8;3211:53;;3219:9;3229:11;3219: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;;;3219:22:8;;;;;;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;3211:53;;;;3203:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3308:9;3318:11;3308: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;;;3308:22:8;;;;;;;;;;;;;;;;;;;;;;3301:29;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;3341:74;3356:11;3377:1;3341:74;;;;;;;;;3389:1;3341:74;;;;;;;;3400:1;3341:74;;;;;;;;3411:1;3341:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3341:74:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3341:74:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3131:289;:::o;7160:302::-;1328:9:33;:7;:9::i;:::-;1320:18;;;;;;;;7321:22:8;7346:44;7364:11;7377:12;7346:17;:44::i;:::-;7321:69;;7396:5;:22;;;7425:9;7436:14;7452:4;7396:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;7396:61:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7396:61:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7396:61:8;;;;;1348:1:33;7160:302:8;;;;:::o;2120:107:33:-;1328:9;:7;:9::i;:::-;1320:18;;;;;;;;2192:28;2211:8;2192:18;:28::i;:::-;2120:107;:::o;4503:116:8:-;4579:7;4601:5;:11;;;:13;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4601:13:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4601:13:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4601:13:8;;;;;;;;;;;;;;;;4594:20;;4503:116;;;:::o;2371:183:33:-;2464:1;2444:22;;:8;:22;;;;2436:31;;;;;;;;2511:8;2482:38;;2503:6;;;;;;;;;;;2482:38;;;;;;;;;;;;2539:8;2530:6;;:17;;;;;;;;;;;;;;;;;;2371:183;:::o;402:7062:8:-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;402:7062:8;;;;:::o;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", "abi": [ { "constant": false, "inputs": [ { "name": "proxy", "type": "address" } ], "name": "getProxyImplementation", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "packageName", "type": "string" }, { "name": "contractName", "type": "string" } ], "name": "getImplementation", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "packageName", "type": "string" }, { "name": "contractName", "type": "string" }, { "name": "data", "type": "bytes" } ], "name": "create", "outputs": [ { "name": "", "type": "address" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": true, "inputs": [ { "name": "packageName", "type": "string" } ], "name": "getProvider", "outputs": [ { "name": "provider", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "packageName", "type": "string" }, { "name": "package", "type": "address" }, { "name": "version", "type": "uint64[3]" } ], "name": "setPackage", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "proxy", "type": "address" }, { "name": "newAdmin", "type": "address" } ], "name": "changeProxyAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "proxy", "type": "address" }, { "name": "packageName", "type": "string" }, { "name": "contractName", "type": "string" } ], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "packageName", "type": "string" } ], "name": "getPackage", "outputs": [ { "name": "", "type": "address" }, { "name": "", "type": "uint64[3]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "packageName", "type": "string" } ], "name": "unsetPackage", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "proxy", "type": "address" }, { "name": "packageName", "type": "string" }, { "name": "contractName", "type": "string" }, { "name": "data", "type": "bytes" } ], "name": "upgradeAndCall", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "proxy", "type": "address" } ], "name": "getProxyAdmin", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "proxy", "type": "address" } ], "name": "ProxyCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "providerName", "type": "string" }, { "indexed": false, "name": "package", "type": "address" }, { "indexed": false, "name": "version", "type": "uint64[3]" } ], "name": "PackageChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" } ], "ast": { "absolutePath": "contracts/mocks/DeprecatedApp.sol", "exportedSymbols": { "DeprecatedApp": [ 1425 ] }, "id": 1426, "nodeType": "SourceUnit", "nodes": [ { "id": 1074, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:8" }, { "absolutePath": "contracts/application/ImplementationProvider.sol", "file": "../application/ImplementationProvider.sol", "id": 1075, "nodeType": "ImportDirective", "scope": 1426, "sourceUnit": 453, "src": "25:51:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/application/Package.sol", "file": "../application/Package.sol", "id": 1076, "nodeType": "ImportDirective", "scope": 1426, "sourceUnit": 794, "src": "77:36:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/mocks/DeprecatedAdminUpgradeabilityProxy.sol", "file": "../mocks/DeprecatedAdminUpgradeabilityProxy.sol", "id": 1078, "nodeType": "ImportDirective", "scope": 1426, "sourceUnit": 1073, "src": "114:129:8", "symbolAliases": [ { "foreign": 1077, "local": "AdminUpgradeabilityProxy" } ], "unitAlias": "" }, { "absolutePath": "contracts/ownership/Ownable.sol", "file": "../ownership/Ownable.sol", "id": 1079, "nodeType": "ImportDirective", "scope": 1426, "sourceUnit": 5494, "src": "244:34:8", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1080, "name": "OpenZeppelinUpgradesOwnable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5493, "src": "428:27:8", "typeDescriptions": { "typeIdentifier": "t_contract$_OpenZeppelinUpgradesOwnable_$5493", "typeString": "contract OpenZeppelinUpgradesOwnable" } }, "id": 1081, "nodeType": "InheritanceSpecifier", "src": "428:27:8" } ], "contractDependencies": [ 1072, 5493 ], "contractKind": "contract", "documentation": "@title App\n@dev Contract for upgradeable applications.\nIt handles the creation and upgrading of proxies.", "fullyImplemented": true, "id": 1425, "linearizedBaseContracts": [ 1425, 5493 ], "name": "DeprecatedApp", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": "@dev Emitted when a new proxy is created.\n@param proxy Address of the created proxy.", "id": 1085, "name": "ProxyCreated", "nodeType": "EventDefinition", "parameters": { "id": 1084, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1083, "indexed": false, "name": "proxy", "nodeType": "VariableDeclaration", "scope": 1085, "src": "586:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1082, "name": "address", "nodeType": "ElementaryTypeName", "src": "586:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "585:15:8" }, "src": "567:34:8" }, { "anonymous": false, "documentation": "@dev Emitted when a package dependency is changed in the application.\n@param providerName Name of the package that changed.\n@param package Address of the package associated to the name.\n@param version Version of the package in use.", "id": 1095, "name": "PackageChanged", "nodeType": "EventDefinition", "parameters": { "id": 1094, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1087, "indexed": false, "name": "providerName", "nodeType": "VariableDeclaration", "scope": 1095, "src": "890:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1086, "name": "string", "nodeType": "ElementaryTypeName", "src": "890:6:8", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1089, "indexed": false, "name": "package", "nodeType": "VariableDeclaration", "scope": 1095, "src": "911:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1088, "name": "address", "nodeType": "ElementaryTypeName", "src": "911:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1093, "indexed": false, "name": "version", "nodeType": "VariableDeclaration", "scope": 1095, "src": "928:17:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint64_$3_memory_ptr", "typeString": "uint64[3]" }, "typeName": { "baseType": { "id": 1090, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "928:6:8", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 1092, "length": { "argumentTypes": null, "hexValue": "33", "id": 1091, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "935:1:8", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, "value": "3" }, "nodeType": "ArrayTypeName", "src": "928:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint64_$3_storage_ptr", "typeString": "uint64[3]" } }, "value": null, "visibility": "internal" } ], "src": "889:57:8" }, "src": "869:78:8" }, { "canonicalName": "DeprecatedApp.ProviderInfo", "id": 1102, "members": [ { "constant": false, "id": 1097, "name": "package", "nodeType": "VariableDeclaration", "scope": 1102, "src": "1077:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Package_$793", "typeString": "contract Package" }, "typeName": { "contractScope": null, "id": 1096, "name": "Package", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 793, "src": "1077:7:8", "typeDescriptions": { "typeIdentifier": "t_contract$_Package_$793", "typeString": "contract Package" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1101, "name": "version", "nodeType": "VariableDeclaration", "scope": 1102, "src": "1098:17:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint64_$3_storage_ptr", "typeString": "uint64[3]" }, "typeName": { "baseType": { "id": 1098, "name": "uint64", "nodeType": "ElementaryTypeName", "src": "1098:6:8", "typeDescriptions": { "typeIdentifier": "t_uint64", "typeString": "uint64" } }, "id": 1100, "length": { "argumentTypes": null, "hexValue": "33", "id": 1099, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1105:1:8", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, "value": "3" }, "nodeType": "ArrayTypeName", "src": "1098:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint64_$3_storage_ptr", "typeString": "uint64[3]" } }, "value": null, "visibility": "internal" } ], "name": "ProviderInfo", "nodeType": "StructDefinition", "scope": 1425, "src": "1051:69:8", "visibility": "public" }, { "constant": false, "id": 1106, "name": "providers", "nodeType": "VariableDeclaration", "scope": 1425, "src": "1206:50:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_struct$_ProviderInfo_$1102_storage_$", "typeString": "mapping(string => struct DeprecatedApp.ProviderInfo)" }, "typeName": { "id": 1105, "keyType": { "id": 1103, "name": "string", "nodeType": "ElementaryTypeName", "src": "1214:6:8", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "1206:31:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_struct$_ProviderInfo_$1102_storage_$", "typeString": "mapping(string => struct DeprecatedApp.ProviderInfo)" }, "valueType": { "contractScope": null, "id": 1104, "name": "ProviderInfo", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1102, "src": "1224:12:8", "typeDescriptions": { "typeIdentifier": "t_struct$_ProviderInfo_$1102_storage_ptr", "typeString": "struct DeprecatedApp.ProviderInfo" } } }, "value": null, "visibility": "internal" }, { "body": { "id": 1109, "nodeType": "Block", "src": "1326:3:8", "statements": [] }, "documentation": "@dev Constructor function.", "id": 1110, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1107, "nodeType": "ParameterList", "parameters": [], "src": "1316:2:8" }, "returnParameters": { "id": 1108, "nodeType": "ParameterList", "parameters": [], "src": "1326:0:8" }, "scope": 1425, "src": "1305:24:8", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1145, "nodeType": "Block", "src": "1612:215:8", "statements": [ { "assignments": [ 1118 ], "declarations": [ { "constant": false, "id": 1118, "name": "info", "nodeType": "VariableDeclaration", "scope": 1145, "src": "1618:25:8", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_ProviderInfo_$1102_storage_ptr", "typeString": "struct DeprecatedApp.ProviderInfo" }, "typeName": { "contractScope": null, "id": 1117, "name": "ProviderInfo", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1102, "src": "1618:12:8", "typeDescriptions": { "typeIdentifier": "t_struct$_ProviderInfo_$1102_storage_ptr", "typeString": "struct DeprecatedApp.ProviderInfo" } }, "value": null, "visibility": "internal" } ], "id": 1122, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1119, "name": "providers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1106, "src": "1646:9:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_struct$_ProviderInfo_$1102_storage_$", "typeString": "mapping(string memory => struct DeprecatedApp.ProviderInfo storage ref)" } }, "id": 1121, "indexExpression": { "argumentTypes": null, "id": 1120, "name": "packageName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1112, "src": "1656:11:8", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1646:22:8", "typeDescriptions": { "typeIdentifier": "t_struct$_ProviderInfo_$1102_storage", "typeString": "struct DeprecatedApp.ProviderInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "1618:50:8" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1130, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {