UNPKG

@daostack/upgrades

Version:
270 lines (269 loc) 10.1 kB
{ "fileName": "ClashingImplementation.sol", "contractName": "ClashingImplementation", "source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\n\n/**\n * @dev Implementation contract with an admin() function made to clash with\n * @dev AdminUpgradeabilityProxy's to test correct functioning of the\n * @dev Transparent Proxy feature.\n */\ncontract ClashingImplementation {\n\n function admin() external pure returns (address) {\n return 0x0000000000000000000000000000000011111142;\n }\n\n function delegatedFunction() external pure returns (bool) {\n return true;\n }\n}\n", "sourcePath": "contracts/mocks/ClashingImplementation.sol", "sourceMap": "247:232:6:-:0;;;;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "247:232:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;397:80;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;284:109;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;397:80;449:4;468;461:11;;;;397:80;;:::o;284:109::-;324:7;346:42;339:49;;;;284:109;;:::o", "abi": [ { "inputs": [], "name": "admin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "delegatedFunction", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" } ], "ast": { "absolutePath": "contracts/mocks/ClashingImplementation.sol", "exportedSymbols": { "ClashingImplementation": [ 957 ] }, "id": 958, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 939, "literals": [ "solidity", "^", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:6" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 940, "nodeType": "StructuredDocumentation", "src": "58:188:6", "text": " @dev Implementation contract with an admin() function made to clash with\n @dev AdminUpgradeabilityProxy's to test correct functioning of the\n @dev Transparent Proxy feature." }, "fullyImplemented": true, "id": 957, "linearizedBaseContracts": [ 957 ], "name": "ClashingImplementation", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 947, "nodeType": "Block", "src": "333:60:6", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "307830303030303030303030303030303030303030303030303030303030303030303131313131313432", "id": 945, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "346:42:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, "value": "0x0000000000000000000000000000000011111142" }, "functionReturnParameters": 944, "id": 946, "nodeType": "Return", "src": "339:49:6" } ] }, "documentation": null, "functionSelector": "f851a440", "id": 948, "implemented": true, "kind": "function", "modifiers": [], "name": "admin", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 941, "nodeType": "ParameterList", "parameters": [], "src": "298:2:6" }, "returnParameters": { "id": 944, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 943, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 948, "src": "324:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 942, "name": "address", "nodeType": "ElementaryTypeName", "src": "324:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "323:9:6" }, "scope": 957, "src": "284:109:6", "stateMutability": "pure", "virtual": false, "visibility": "external" }, { "body": { "id": 955, "nodeType": "Block", "src": "455:22:6", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 953, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "468:4:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 952, "id": 954, "nodeType": "Return", "src": "461:11:6" } ] }, "documentation": null, "functionSelector": "abf8e0e7", "id": 956, "implemented": true, "kind": "function", "modifiers": [], "name": "delegatedFunction", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 949, "nodeType": "ParameterList", "parameters": [], "src": "423:2:6" }, "returnParameters": { "id": 952, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 951, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 956, "src": "449:4:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 950, "name": "bool", "nodeType": "ElementaryTypeName", "src": "449:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "448:6:6" }, "scope": 957, "src": "397:80:6", "stateMutability": "pure", "virtual": false, "visibility": "external" } ], "scope": 958, "src": "247:232:6" } ], "src": "0:480:6" }, "bytecode": "0x60806040523480156100115760006000fd5b50610017565b60f7806100256000396000f3fe608060405234801560105760006000fd5b506004361060365760003560e01c8063abf8e0e714603c578063f851a44014605c576036565b60006000fd5b604260a4565b604051808215151515815260200191505060405180910390f35b606260b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006001905060ae565b90565b60006311111142905060be565b9056fea26469706673582212202ac7a99f9aefa0aa376325fc2f86978220ae27a0e79181c2bd607853c6f7fad264736f6c634300060a0033", "deployedBytecode": "0x608060405234801560105760006000fd5b506004361060365760003560e01c8063abf8e0e714603c578063f851a44014605c576036565b60006000fd5b604260a4565b604051808215151515815260200191505060405180910390f35b606260b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006001905060ae565b90565b60006311111142905060be565b9056fea26469706673582212202ac7a99f9aefa0aa376325fc2f86978220ae27a0e79181c2bd607853c6f7fad264736f6c634300060a0033", "compiler": { "name": "solc", "version": "0.6.10+commit.00c0fcaf.Emscripten.clang", "optimizer": {}, "evmVersion": "constantinople" } }