UNPKG

@gnosis.pm/util-contracts

Version:
1,202 lines 75 kB
{ "contractName": "Proxied", "abi": [ { "inputs": [], "name": "masterCopy", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alan Lu - <alan@gnosis.pm>\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/Proxy.sol\":\"Proxied\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x6ff1c0fdd8b1160fcbcef19b406896dee8479f2227413bdc17489a8f4b2bf894\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://0ddd4792b88aa34a1eebdb9eb8474660ac8d9718a247601962e91f9a297e8a24\",\"dweb:/ipfs/QmZxSNpNZmfYEWbTu3mqmxQobGXsWqTunM3j73MquYC77c\"]}},\"version\":1}", "bytecode": "0x6080604052348015600f57600080fd5b5060948061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033604f565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea2646970667358221220f53968a81a8936cd185a1ae1aaf1b7feea221872e97ad383b009b2150afaf74964736f6c63430007050033", "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033604f565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea2646970667358221220f53968a81a8936cd185a1ae1aaf1b7feea221872e97ad383b009b2150afaf74964736f6c63430007050033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "215:51:5:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "215:51:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:25;;;:::i;:::-;;;;-1:-1:-1;;;;;238:25:5;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;238:25:5;;:::o", "source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.7.0;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - <alan@gnosis.pm>\ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy) {\n require(_masterCopy != address(0), \"The master copy is required\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function _fallback() internal {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Fallback function that delegates calls to the masterCopy. \n * Runs when no other function in the contract matches the call data.\n */\n fallback () external payable {\n _fallback();\n }\n\n /**\n * @dev Fallback function that receives ether and delegates calls to masterCopy. \n * Runs when call data is empty.\n */\n receive () external payable {\n _fallback();\n }\n}\n", "sourcePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/Proxy.sol", "ast": { "absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/Proxy.sol", "exportedSymbols": { "Proxied": [ 1616 ], "Proxy": [ 1667 ] }, "id": 1668, "license": "LGPL-3.0-only", "nodeType": "SourceUnit", "nodes": [ { "id": 1612, "literals": [ "solidity", "^", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "42:23:5" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 1613, "nodeType": "StructuredDocumentation", "src": "67:148:5", "text": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - <alan@gnosis.pm>" }, "fullyImplemented": true, "id": 1616, "linearizedBaseContracts": [ 1616 ], "name": "Proxied", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "a619486e", "id": 1615, "mutability": "mutable", "name": "masterCopy", "nodeType": "VariableDeclaration", "scope": 1616, "src": "238:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1614, "name": "address", "nodeType": "ElementaryTypeName", "src": "238:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "public" } ], "scope": 1668, "src": "215:51:5" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 1618, "name": "Proxied", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1616, "src": "450:7:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Proxied_$1616", "typeString": "contract Proxied" } }, "id": 1619, "nodeType": "InheritanceSpecifier", "src": "450:7:5" } ], "contractDependencies": [ 1616 ], "contractKind": "contract", "documentation": { "id": 1617, "nodeType": "StructuredDocumentation", "src": "268:164:5", "text": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>" }, "fullyImplemented": true, "id": 1667, "linearizedBaseContracts": [ 1667, 1616 ], "name": "Proxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1639, "nodeType": "Block", "src": "617:116:5", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 1626, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1622, "src": "635:11:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 1629, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "658:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 1628, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "650:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 1627, "name": "address", "nodeType": "ElementaryTypeName", "src": "650:7:5", "typeDescriptions": {} } }, "id": 1630, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "650:10:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "635:25:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "546865206d617374657220636f7079206973207265717569726564", "id": 1632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "662:29:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", "typeString": "literal_string \"The master copy is required\"" }, "value": "The master copy is required" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", "typeString": "literal_string \"The master copy is required\"" } ], "id": 1625, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "627:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1633, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "627:65:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1634, "nodeType": "ExpressionStatement", "src": "627:65:5" }, { "expression": { "id": 1637, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 1635, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1615, "src": "702:10:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 1636, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1622, "src": "715:11:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "702:24:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1638, "nodeType": "ExpressionStatement", "src": "702:24:5" } ] }, "documentation": { "id": 1620, "nodeType": "StructuredDocumentation", "src": "464:115:5", "text": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address." }, "id": 1640, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1623, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1622, "mutability": "mutable", "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 1640, "src": "596:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1621, "name": "address", "nodeType": "ElementaryTypeName", "src": "596:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "595:21:5" }, "returnParameters": { "id": 1624, "nodeType": "ParameterList", "parameters": [], "src": "617:0:5" }, "scope": 1667, "src": "584:149:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 1649, "nodeType": "Block", "src": "864:472:5", "statements": [ { "assignments": [ 1645 ], "declarations": [ { "constant": false, "id": 1645, "mutability": "mutable", "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 1649, "src": "874:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1644, "name": "address", "nodeType": "ElementaryTypeName", "src": "874:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 1647, "initialValue": { "id": 1646, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1615, "src": "896:10:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "874:32:5" }, { "AST": { "nodeType": "YulBlock", "src": "925:405:5", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "952:1:5", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "955:1:5", "type": "", "value": "0" }, { "arguments": [], "functionName": { "name": "calldatasize", "nodeType": "YulIdentifier", "src": "958:12:5" }, "nodeType": "YulFunctionCall", "src": "958:14:5" } ], "functionName": { "name": "calldatacopy", "nodeType": "YulIdentifier", "src": "939:12:5" }, "nodeType": "YulFunctionCall", "src": "939:34:5" }, "nodeType": "YulExpressionStatement", "src": "939:34:5" }, { "nodeType": "YulVariableDeclaration", "src": "986:73:5", "value": { "arguments": [ { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "1018:1:5", "type": "", "value": "0" } ], "functionName": { "name": "not", "nodeType": "YulIdentifier", "src": "1014:3:5" }, "nodeType": "YulFunctionCall", "src": "1014:6:5" }, { "name": "_masterCopy", "nodeType": "YulIdentifier", "src": "1022:11:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1035:1:5", "type": "", "value": "0" }, { "arguments": [], "functionName": { "name": "calldatasize", "nodeType": "YulIdentifier", "src": "1038:12:5" }, "nodeType": "YulFunctionCall", "src": "1038:14:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1054:1:5", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1057:1:5", "type": "", "value": "0" } ], "functionName": { "name": "delegatecall", "nodeType": "YulIdentifier", "src": "1001:12:5" }, "nodeType": "YulFunctionCall", "src": "1001:58:5" }, "variables": [ { "name": "success", "nodeType": "YulTypedName", "src": "990:7:5", "type": "" } ] }, { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "1087:1:5", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1090:1:5", "type": "", "value": "0" }, { "arguments": [], "functionName": { "name": "returndatasize", "nodeType": "YulIdentifier", "src": "1093:14:5" }, "nodeType": "YulFunctionCall", "src": "1093:16:5" } ], "functionName": { "name": "returndatacopy", "nodeType": "YulIdentifier", "src": "1072:14:5" }, "nodeType": "YulFunctionCall", "src": "1072:38:5" }, "nodeType": "YulExpressionStatement", "src": "1072:38:5" }, { "cases": [ { "body": { "nodeType": "YulBlock", "src": "1161:67:5", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "1190:1:5", "type": "", "value": "0" }, { "arguments": [], "functionName": { "name": "returndatasize", "nodeType": "YulIdentifier", "src": "1193:14:5" }, "nodeType": "YulFunctionCall", "src": "1193:16:5" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "1183:6:5" }, "nodeType": "YulFunctionCall", "src": "1183:27:5" }, "nodeType": "YulExpressionStatement", "src": "1183:27:5" } ] }, "nodeType": "YulCase", "src": "1154:74:5", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1159:1:5", "type": "", "value": "0" } }, { "body": { "nodeType": "YulBlock", "src": "1253:67:5", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "1282:1:5", "type": "", "value": "0" }, { "arguments": [], "functionName": { "name": "returndatasize", "nodeType": "YulIdentifier", "src": "1285:14:5" }, "nodeType": "YulFunctionCall", "src": "1285:16:5" } ], "functionName": { "name": "return", "nodeType": "YulIdentifier", "src": "1275:6:5" }, "nodeType": "YulFunctionCall", "src": "1275:27:5" }, "nodeType": "YulExpressionStatement", "src": "1275:27:5" } ] }, "nodeType": "YulCase", "src": "1245:75:5", "value": "default" } ], "expression": { "name": "success", "nodeType": "YulIdentifier", "src": "1130:7:5" }, "nodeType": "YulSwitch", "src": "1123:197:5" } ] }, "evmVersion": "istanbul", "externalReferences": [ { "declaration": 1645, "isOffset": false, "isSlot": false, "src": "1022:11:5", "valueSize": 1 } ], "id": 1648, "nodeType": "InlineAssembly", "src": "916:414:5" } ] }, "documentation": { "id": 1641, "nodeType": "StructuredDocumentation", "src": "739:90:5", "text": "@dev Fallback function forwards all transactions and returns all received return data." }, "id": 1650, "implemented": true, "kind": "function", "modifiers": [], "name": "_fallback", "nodeType": "FunctionDefinition", "parameters": { "id": 1642, "nodeType": "ParameterList", "parameters": [], "src": "852:2:5" }, "returnParameters": { "id": 1643, "nodeType": "ParameterList", "parameters": [], "src": "864:0:5" }, "scope": 1667, "src": "834:502:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 1657, "nodeType": "Block", "src": "1532:28:5", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 1654, "name": "_fallback", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1650, "src": "1542:9:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, "id": 1655, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1542:11:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1656, "nodeType": "ExpressionStatement", "src": "1542:11:5" } ] }, "documentation": { "id": 1651, "nodeType": "StructuredDocumentation", "src": "1342:156:5", "text": " @dev Fallback function that delegates calls to the masterCopy. \n Runs when no other function in the contract matches the call data." }, "id": 1658, "implemented": true, "kind": "fallback", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1652, "nodeType": "ParameterList", "parameters": [], "src": "1512:2:5" }, "returnParameters": { "id": 1653, "nodeType": "ParameterList", "parameters": [], "src": "1532:0:5" }, "scope": 1667, "src": "1503:57:5", "stateMutability": "payable", "virtual": false, "visibility": "external" }, { "body": { "id": 1665, "nodeType": "Block", "src": "1733:28:5", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 1662, "name": "_fallback", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1650, "src": "1743:9:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, "id": 1663, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1743:11:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1664, "nodeType": "ExpressionStatement", "src": "1743:11:5" } ] }, "documentation": { "id": 1659, "nodeType": "StructuredDocumentation", "src": "1566:134:5", "text": " @dev Fallback function that receives ether and delegates calls to masterCopy. \n Runs when call data is empty." }, "id": 1666, "implemented": true, "kind": "receive", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1660, "nodeType": "ParameterList", "parameters": [], "src": "1713:2:5" }, "returnParameters": { "id": 1661, "nodeType": "ParameterList", "parameters": [], "src": "1733:0:5" }, "scope": 1667, "src": "1705:56:5", "stateMutability": "payable", "virtual": false, "visibility": "external" } ], "scope": 1668, "src": "432:1331:5" } ], "src": "42:1722:5" }, "legacyAST": { "absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/Proxy.sol", "exportedSymbols": { "Proxied": [ 1616 ], "Proxy": [ 1667 ] }, "id": 1668, "license": "LGPL-3.0-only", "nodeType": "SourceUnit", "nodes": [ { "id": 1612, "literals": [ "solidity", "^", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "42:23:5" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 1613, "nodeType": "StructuredDocumentation", "src": "67:148:5", "text": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - <alan@gnosis.pm>" }, "fullyImplemented": true, "id": 1616, "linearizedBaseContracts": [ 1616 ], "name": "Proxied", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "a619486e", "id": 1615, "mutability": "mutable", "name": "masterCopy", "nodeType": "VariableDeclaration", "scope": 1616, "src": "238:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1614, "name": "address", "nodeType": "ElementaryTypeName", "src": "238:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "public" } ], "scope": 1668, "src": "215:51:5" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 1618, "name": "Proxied", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1616, "src": "450:7:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Proxied_$1616", "typeString": "contract Proxied" } }, "id": 1619, "nodeType": "InheritanceSpecifier", "src": "450:7:5" } ], "contractDependencies": [ 1616 ], "contractKind": "contract", "documentation": { "id": 1617, "nodeType": "StructuredDocumentation", "src": "268:164:5", "text": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>" }, "fullyImplemented": true, "id": 1667, "linearizedBaseContracts": [ 1667, 1616 ], "name": "Proxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1639, "nodeType": "Block", "src": "617:116:5", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 1626, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1622, "src": "635:11:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 1629, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "658:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 1628, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "650:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 1627, "name": "address", "nodeType": "ElementaryTypeName", "src": "650:7:5", "typeDescriptions": {} } }, "id": 1630, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "650:10:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "635:25:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "546865206d617374657220636f7079206973207265717569726564", "id": 1632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "662:29:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", "typeString": "literal_string \"The master copy is required\"" }, "value": "The master copy is required" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", "typeString": "literal_string \"The master copy is required\"" } ], "id": 1625, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "627:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1633, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "627:65:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1634, "nodeType": "ExpressionStatement", "src": "627:65:5" }, { "expression": { "id": 163