UNPKG

@daostack/upgrades

Version:
179 lines (178 loc) 5.93 kB
{ "fileName": "ImplementationProvider.sol", "contractName": "ImplementationProvider", "source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\n/**\n * @title ImplementationProvider\n * @dev Abstract contract for providing implementation addresses for other contracts by name.\n */\nabstract contract ImplementationProvider {\n /**\n * @dev Abstract function to return the implementation address of a contract.\n * @param contractName Name of the contract.\n * @return Implementation address of the contract.\n */\n function getImplementation(string memory contractName) public view virtual returns (address);\n}\n", "sourcePath": "contracts/application/ImplementationProvider.sol", "sourceMap": "", "deployedSourceMap": "", "abi": [ { "inputs": [ { "internalType": "string", "name": "contractName", "type": "string" } ], "name": "getImplementation", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "ast": { "absolutePath": "contracts/application/ImplementationProvider.sol", "exportedSymbols": { "ImplementationProvider": [ 496 ] }, "id": 497, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 486, "literals": [ "solidity", "^", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:3" }, { "abstract": true, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 487, "nodeType": "StructuredDocumentation", "src": "57:134:3", "text": " @title ImplementationProvider\n @dev Abstract contract for providing implementation addresses for other contracts by name." }, "fullyImplemented": false, "id": 496, "linearizedBaseContracts": [ 496 ], "name": "ImplementationProvider", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": { "id": 488, "nodeType": "StructuredDocumentation", "src": "237:189:3", "text": " @dev Abstract function to return the implementation address of a contract.\n @param contractName Name of the contract.\n @return Implementation address of the contract." }, "functionSelector": "6b683896", "id": 495, "implemented": false, "kind": "function", "modifiers": [], "name": "getImplementation", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 491, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 490, "mutability": "mutable", "name": "contractName", "nodeType": "VariableDeclaration", "overrides": null, "scope": 495, "src": "456:26:3", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 489, "name": "string", "nodeType": "ElementaryTypeName", "src": "456:6:3", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "455:28:3" }, "returnParameters": { "id": 494, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 493, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 495, "src": "513:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 492, "name": "address", "nodeType": "ElementaryTypeName", "src": "513:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "512:9:3" }, "scope": 496, "src": "429:93:3", "stateMutability": "view", "virtual": true, "visibility": "public" } ], "scope": 497, "src": "192:332:3" } ], "src": "0:525:3" }, "bytecode": "0x", "deployedBytecode": "0x", "compiler": { "name": "solc", "version": "0.6.10+commit.00c0fcaf.Emscripten.clang", "optimizer": {}, "evmVersion": "constantinople" } }