UNPKG

@daostack/upgrades

Version:
1,261 lines (1,260 loc) 61.5 kB
{ "fileName": "Ownable.sol", "contractName": "OpenZeppelinUpgradesOwnable", "source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n *\n * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/ownership/Ownable.sol\n * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts\n * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the\n * build/artifacts folder) as well as the vanilla Ownable implementation from an openzeppelin version.\n */\ncontract OpenZeppelinUpgradesOwnable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n constructor () internal {\n _owner = msg.sender;\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @return the address of the owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner());\n _;\n }\n\n /**\n * @return true if `msg.sender` is the owner of the contract.\n */\n function isOwner() public view returns (bool) {\n return msg.sender == _owner;\n }\n\n /**\n * @dev Allows the current owner to relinquish control of the contract.\n * @notice Renouncing to ownership will leave the contract without an owner.\n * It will not be possible to call the functions with the `onlyOwner`\n * modifier anymore.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0));\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n", "sourcePath": "contracts/ownership/Ownable.sol", "sourceMap": "", "deployedSourceMap": "", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "ast": { "absolutePath": "contracts/ownership/Ownable.sol", "exportedSymbols": { "OpenZeppelinUpgradesOwnable": [ 5784 ] }, "id": 5785, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 5665, "literals": [ "solidity", "^", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:33" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 5666, "nodeType": "StructuredDocumentation", "src": "57:634:33", "text": " @title Ownable\n @dev The Ownable contract has an owner address, and provides basic authorization control\n functions, this simplifies the implementation of \"user permissions\".\n Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/ownership/Ownable.sol\n This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts\n when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the\n build/artifacts folder) as well as the vanilla Ownable implementation from an openzeppelin version." }, "fullyImplemented": true, "id": 5784, "linearizedBaseContracts": [ 5784 ], "name": "OpenZeppelinUpgradesOwnable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 5668, "mutability": "mutable", "name": "_owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5784, "src": "735:22:33", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5667, "name": "address", "nodeType": "ElementaryTypeName", "src": "735:7:33", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "anonymous": false, "documentation": null, "id": 5674, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { "id": 5673, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5670, "indexed": true, "mutability": "mutable", "name": "previousOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5674, "src": "791:29:33", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5669, "name": "address", "nodeType": "ElementaryTypeName", "src": "791:7:33", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5672, "indexed": true, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5674, "src": "822:24:33", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5671, "name": "address", "nodeType": "ElementaryTypeName", "src": "822:7:33", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "790:57:33" }, "src": "764:84:33" }, { "body": { "id": 5691, "nodeType": "Block", "src": "1002:91:33", "statements": [ { "expression": { "argumentTypes": null, "id": 5681, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5678, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1012:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5679, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1021:3:33", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5680, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1021:10:33", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1012:19:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5682, "nodeType": "ExpressionStatement", "src": "1012:19:33" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5686, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1075:1:33", "subdenomination": null, "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": 5685, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1067:7:33", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 5684, "name": "address", "nodeType": "ElementaryTypeName", "src": "1067:7:33", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 5687, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1067:10:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 5688, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1079:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5683, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "1046:20:33", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5689, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1046:40:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5690, "nodeType": "EmitStatement", "src": "1041:45:33" } ] }, "documentation": { "id": 5675, "nodeType": "StructuredDocumentation", "src": "854:119:33", "text": " @dev The Ownable constructor sets the original `owner` of the contract to the sender\n account." }, "id": 5692, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 5676, "nodeType": "ParameterList", "parameters": [], "src": "990:2:33" }, "returnParameters": { "id": 5677, "nodeType": "ParameterList", "parameters": [], "src": "1002:0:33" }, "scope": 5784, "src": "978:115:33", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 5700, "nodeType": "Block", "src": "1203:30:33", "statements": [ { "expression": { "argumentTypes": null, "id": 5698, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1220:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 5697, "id": 5699, "nodeType": "Return", "src": "1213:13:33" } ] }, "documentation": { "id": 5693, "nodeType": "StructuredDocumentation", "src": "1099:52:33", "text": " @return the address of the owner." }, "functionSelector": "8da5cb5b", "id": 5701, "implemented": true, "kind": "function", "modifiers": [], "name": "owner", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 5694, "nodeType": "ParameterList", "parameters": [], "src": "1170:2:33" }, "returnParameters": { "id": 5697, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5696, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5701, "src": "1194:7:33", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5695, "name": "address", "nodeType": "ElementaryTypeName", "src": "1194:7:33", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1193:9:33" }, "scope": 5784, "src": "1156:77:33", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 5710, "nodeType": "Block", "src": "1342:46:33", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 5705, "name": "isOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5723, "src": "1360:7:33", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", "typeString": "function () view returns (bool)" } }, "id": 5706, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1360:9:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 5704, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1352:7:33", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 5707, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1352:18:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5708, "nodeType": "ExpressionStatement", "src": "1352:18:33" }, { "id": 5709, "nodeType": "PlaceholderStatement", "src": "1380:1:33" } ] }, "documentation": { "id": 5702, "nodeType": "StructuredDocumentation", "src": "1239:77:33", "text": " @dev Throws if called by any account other than the owner." }, "id": 5711, "name": "onlyOwner", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 5703, "nodeType": "ParameterList", "parameters": [], "src": "1339:2:33" }, "src": "1321:67:33", "virtual": false, "visibility": "internal" }, { "body": { "id": 5722, "nodeType": "Block", "src": "1522:44:33", "statements": [ { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5720, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5717, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1539:3:33", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1539:10:33", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5719, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1553:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1539:20:33", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5716, "id": 5721, "nodeType": "Return", "src": "1532:27:33" } ] }, "documentation": { "id": 5712, "nodeType": "StructuredDocumentation", "src": "1394:77:33", "text": " @return true if `msg.sender` is the owner of the contract." }, "functionSelector": "8f32d59b", "id": 5723, "implemented": true, "kind": "function", "modifiers": [], "name": "isOwner", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 5713, "nodeType": "ParameterList", "parameters": [], "src": "1492:2:33" }, "returnParameters": { "id": 5716, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5715, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5723, "src": "1516:4:33", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5714, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1516:4:33", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1515:6:33" }, "scope": 5784, "src": "1476:90:33", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 5744, "nodeType": "Block", "src": "1890:91:33", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5730, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1926:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5733, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1942:1:33", "subdenomination": null, "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": 5732, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1934:7:33", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 5731, "name": "address", "nodeType": "ElementaryTypeName", "src": "1934:7:33", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 5734, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1934:10:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 5729, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "1905:20:33", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1905:40:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5736, "nodeType": "EmitStatement", "src": "1900:45:33" }, { "expression": { "argumentTypes": null, "id": 5742, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5737, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5668, "src": "1955:6:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5740, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1972:1:33", "subdenomination": null, "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": 5739, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1964:7:33", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 5738, "name": "address", "nodeType": "ElementaryTypeName", "src": "1964:7:33", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 5741, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1964:10:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1955:19:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5743, "nodeType": "ExpressionStatement", "src": "1955:19:33" } ] }, "documentation": { "id": 5724, "nodeType": "StructuredDocumentation", "src": "1572:267:33", "text": " @dev Allows the current owner to relinquish control of the contract.\n @notice Renouncing to ownership will leave the contract without an owner.\n It will not be possible to call the functions with the `onlyOwner`\n modifier anymore." }, "functionSelector": "715018a6", "id": 5745, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5727, "modifierName": { "argumentTypes": null, "id": 5726, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5711, "src": "1880:9:33", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1880:9:33" } ], "name": "renounceOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 5725, "nodeType": "ParameterList", "parameters": [], "src": "1870:2:33" }, "returnParameters": { "id": 5728, "nodeType": "ParameterList", "parameters": [], "src": "1890:0:33" }, "scope": 5784, "src": "1844:137:33", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 5757, "nodeType": "Block", "src": "2214:45:33", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5754, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5748, "src": "2243:8:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5753, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5783, "src": "2224:18:33", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 5755, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2224:28:33", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5756, "nodeType": "ExpressionStatement", "src": "2224:28:33" } ] }, "documentation": { "id": 5746, "nodeType": "StructuredDocumentation", "src": "1987:160:33", "text": " @dev Allows the current owner to transfer control of the contract to a newOwner.\n @param newOwner The address to transfer ownership to." }, "functionSelector": "f2fde38b", "id": 5758, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5751, "modifierName": { "argumentTypes": null, "id": 5750, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5711, "src": "2204:9:33", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2204:9:33" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 5749, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5748, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 5758, "src": "2179:16:33", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5747, "name": "address", "nodeType": "ElementaryTypeName", "src": "2179:7:33", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2178:18:33" }, "returnParameters": { "id": 5752, "nodeType": "ParameterList", "parameters": [], "src": "2214:0:33" }, "scope": 5784, "src": "2152:107:33", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 5782, "nodeType": "Block", "src": "2458:128:33", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5770, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5765, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5761, "src": "2476:8:33", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5768, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2496:1:33", "subdenomination": null, "typeDescriptions": {