UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,326 lines (1,325 loc) 65.9 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "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": "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" } ], "allSourcePaths": { "0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/access/OwnableUpgradeable.sol", "1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/proxy/utils/Initializable.sol", "3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/ContextUpgradeable.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/access/OwnableUpgradeable.sol", "exportedSymbols": { "AddressUpgradeable": [ 18366 ], "ContextUpgradeable": [ 17126 ], "Initializable": [ 17084 ], "OwnableUpgradeable": [ 13768 ] }, "id": 13769, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 13638, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "102:23:0" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/ContextUpgradeable.sol", "file": "../utils/ContextUpgradeable.sol", "id": 13639, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 13769, "sourceUnit": 17127, "src": "127:41:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/proxy/utils/Initializable.sol", "file": "../proxy/utils/Initializable.sol", "id": 13640, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 13769, "sourceUnit": 17085, "src": "169:42:0", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 13642, "name": "Initializable", "nameLocations": [ "748:13:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 17084, "src": "748:13:0" }, "id": 13643, "nodeType": "InheritanceSpecifier", "src": "748:13:0" }, { "baseName": { "id": 13644, "name": "ContextUpgradeable", "nameLocations": [ "763:18:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 17126, "src": "763:18:0" }, "id": 13645, "nodeType": "InheritanceSpecifier", "src": "763:18:0" } ], "canonicalName": "OwnableUpgradeable", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 13641, "nodeType": "StructuredDocumentation", "src": "213:494:0", "text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n By default, the owner account will be the one that deploys the contract. This\n can later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner." }, "fullyImplemented": true, "id": 13768, "linearizedBaseContracts": [ 13768, 17126, 17084 ], "name": "OwnableUpgradeable", "nameLocation": "726:18:0", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 13647, "mutability": "mutable", "name": "_owner", "nameLocation": "804:6:0", "nodeType": "VariableDeclaration", "scope": 13768, "src": "788:22:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13646, "name": "address", "nodeType": "ElementaryTypeName", "src": "788:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "private" }, { "anonymous": false, "eventSelector": "8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "id": 13653, "name": "OwnershipTransferred", "nameLocation": "823:20:0", "nodeType": "EventDefinition", "parameters": { "id": 13652, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 13649, "indexed": true, "mutability": "mutable", "name": "previousOwner", "nameLocation": "860:13:0", "nodeType": "VariableDeclaration", "scope": 13653, "src": "844:29:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13648, "name": "address", "nodeType": "ElementaryTypeName", "src": "844:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 13651, "indexed": true, "mutability": "mutable", "name": "newOwner", "nameLocation": "891:8:0", "nodeType": "VariableDeclaration", "scope": 13653, "src": "875:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13650, "name": "address", "nodeType": "ElementaryTypeName", "src": "875:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "843:57:0" }, "src": "817:84:0" }, { "body": { "id": 13662, "nodeType": "Block", "src": "1055:43:0", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 13659, "name": "__Ownable_init_unchained", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13674, "src": "1065:24:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, "id": 13660, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1065:26:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13661, "nodeType": "ExpressionStatement", "src": "1065:26:0" } ] }, "documentation": { "id": 13654, "nodeType": "StructuredDocumentation", "src": "907:91:0", "text": " @dev Initializes the contract setting the deployer as the initial owner." }, "id": 13663, "implemented": true, "kind": "function", "modifiers": [ { "id": 13657, "kind": "modifierInvocation", "modifierName": { "id": 13656, "name": "onlyInitializing", "nameLocations": [ "1038:16:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 17029, "src": "1038:16:0" }, "nodeType": "ModifierInvocation", "src": "1038:16:0" } ], "name": "__Ownable_init", "nameLocation": "1012:14:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13655, "nodeType": "ParameterList", "parameters": [], "src": "1026:2:0" }, "returnParameters": { "id": 13658, "nodeType": "ParameterList", "parameters": [], "src": "1055:0:0" }, "scope": 13768, "src": "1003:95:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 13673, "nodeType": "Block", "src": "1166:49:0", "statements": [ { "expression": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 13669, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17111, "src": "1195:10:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 13670, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1195:12:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 13668, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13762, "src": "1176:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 13671, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1176:32:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13672, "nodeType": "ExpressionStatement", "src": "1176:32:0" } ] }, "id": 13674, "implemented": true, "kind": "function", "modifiers": [ { "id": 13666, "kind": "modifierInvocation", "modifierName": { "id": 13665, "name": "onlyInitializing", "nameLocations": [ "1149:16:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 17029, "src": "1149:16:0" }, "nodeType": "ModifierInvocation", "src": "1149:16:0" } ], "name": "__Ownable_init_unchained", "nameLocation": "1113:24:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13664, "nodeType": "ParameterList", "parameters": [], "src": "1137:2:0" }, "returnParameters": { "id": 13667, "nodeType": "ParameterList", "parameters": [], "src": "1166:0:0" }, "scope": 13768, "src": "1104:111:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 13681, "nodeType": "Block", "src": "1324:41:0", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 13677, "name": "_checkOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13705, "src": "1334:11:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$__$", "typeString": "function () view" } }, "id": 13678, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1334:13:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13679, "nodeType": "ExpressionStatement", "src": "1334:13:0" }, { "id": 13680, "nodeType": "PlaceholderStatement", "src": "1357:1:0" } ] }, "documentation": { "id": 13675, "nodeType": "StructuredDocumentation", "src": "1221:77:0", "text": " @dev Throws if called by any account other than the owner." }, "id": 13682, "name": "onlyOwner", "nameLocation": "1312:9:0", "nodeType": "ModifierDefinition", "parameters": { "id": 13676, "nodeType": "ParameterList", "parameters": [], "src": "1321:2:0" }, "src": "1303:62:0", "virtual": false, "visibility": "internal" }, { "body": { "id": 13690, "nodeType": "Block", "src": "1496:30:0", "statements": [ { "expression": { "id": 13688, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13647, "src": "1513:6:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 13687, "id": 13689, "nodeType": "Return", "src": "1506:13:0" } ] }, "documentation": { "id": 13683, "nodeType": "StructuredDocumentation", "src": "1371:65:0", "text": " @dev Returns the address of the current owner." }, "functionSelector": "8da5cb5b", "id": 13691, "implemented": true, "kind": "function", "modifiers": [], "name": "owner", "nameLocation": "1450:5:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13684, "nodeType": "ParameterList", "parameters": [], "src": "1455:2:0" }, "returnParameters": { "id": 13687, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 13686, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 13691, "src": "1487:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13685, "name": "address", "nodeType": "ElementaryTypeName", "src": "1487:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1486:9:0" }, "scope": 13768, "src": "1441:85:0", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "body": { "id": 13704, "nodeType": "Block", "src": "1644:85:0", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 13700, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 13696, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13691, "src": "1662:5:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 13697, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1662:7:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 13698, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17111, "src": "1673:10:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 13699, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1673:12:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1662:23:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", "id": 13701, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1687:34:0", "typeDescriptions": { "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", "typeString": "literal_string \"Ownable: caller is not the owner\"" }, "value": "Ownable: caller is not the owner" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", "typeString": "literal_string \"Ownable: caller is not the owner\"" } ], "id": 13695, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1654:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 13702, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1654:68:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13703, "nodeType": "ExpressionStatement", "src": "1654:68:0" } ] }, "documentation": { "id": 13692, "nodeType": "StructuredDocumentation", "src": "1532:62:0", "text": " @dev Throws if the sender is not the owner." }, "id": 13705, "implemented": true, "kind": "function", "modifiers": [], "name": "_checkOwner", "nameLocation": "1608:11:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13693, "nodeType": "ParameterList", "parameters": [], "src": "1619:2:0" }, "returnParameters": { "id": 13694, "nodeType": "ParameterList", "parameters": [], "src": "1644:0:0" }, "scope": 13768, "src": "1599:130:0", "stateMutability": "view", "virtual": true, "visibility": "internal" }, { "body": { "id": 13718, "nodeType": "Block", "src": "2125:47:0", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "hexValue": "30", "id": 13714, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2162:1:0", "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": 13713, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2154:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 13712, "name": "address", "nodeType": "ElementaryTypeName", "src": "2154:7:0", "typeDescriptions": {} } }, "id": 13715, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2154:10:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 13711, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13762, "src": "2135:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 13716, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2135:30:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13717, "nodeType": "ExpressionStatement", "src": "2135:30:0" } ] }, "documentation": { "id": 13706, "nodeType": "StructuredDocumentation", "src": "1735:331:0", "text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions anymore. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby removing any functionality that is only available to the owner." }, "functionSelector": "715018a6", "id": 13719, "implemented": true, "kind": "function", "modifiers": [ { "id": 13709, "kind": "modifierInvocation", "modifierName": { "id": 13708, "name": "onlyOwner", "nameLocations": [ "2115:9:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 13682, "src": "2115:9:0" }, "nodeType": "ModifierInvocation", "src": "2115:9:0" } ], "name": "renounceOwnership", "nameLocation": "2080:17:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13707, "nodeType": "ParameterList", "parameters": [], "src": "2097:2:0" }, "returnParameters": { "id": 13710, "nodeType": "ParameterList", "parameters": [], "src": "2125:0:0" }, "scope": 13768, "src": "2071:101:0", "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "body": { "id": 13741, "nodeType": "Block", "src": "2391:128:0", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 13733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 13728, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13722, "src": "2409:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 13731, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2429:1:0", "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": 13730, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2421:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 13729, "name": "address", "nodeType": "ElementaryTypeName", "src": "2421:7:0", "typeDescriptions": {} } }, "id": 13732, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2421:10:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "2409:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "id": 13734, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2433:40:0", "typeDescriptions": { "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", "typeString": "literal_string \"Ownable: new owner is the zero address\"" }, "value": "Ownable: new owner is the zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", "typeString": "literal_string \"Ownable: new owner is the zero address\"" } ], "id": 13727, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2401:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 13735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2401:73:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13736, "nodeType": "ExpressionStatement", "src": "2401:73:0" }, { "expression": { "arguments": [ { "id": 13738, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13722, "src": "2503:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 13737, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13762, "src": "2484:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 13739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2484:28:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 13740, "nodeType": "ExpressionStatement", "src": "2484:28:0" } ] }, "documentation": { "id": 13720, "nodeType": "StructuredDocumentation", "src": "2178:138:0", "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner." }, "functionSelector": "f2fde38b", "id": 13742, "implemented": true, "kind": "function", "modifiers": [ { "id": 13725, "kind": "modifierInvocation", "modifierName": { "id": 13724, "name": "onlyOwner", "nameLocations": [ "2381:9:0" ], "nodeType": "IdentifierPath", "referencedDeclaration": 13682, "src": "2381:9:0" }, "nodeType": "ModifierInvocation", "src": "2381:9:0" } ], "name": "transferOwnership", "nameLocation": "2330:17:0", "nodeType": "FunctionDefinition", "parameters": { "id": 13723, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 13722, "mutability": "mutable", "name": "newOwner", "nameLocation": "2356:8:0", "nodeType": "VariableDeclaration", "scope": 13742, "src": "2348:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13721, "name": "address", "nodeType": "ElementaryTypeName", "src": "2348:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2347:18:0" }, "returnParameters": { "id": 13726, "nodeType": "ParameterList", "parameters": [], "src": "2391:0:0" }, "scope": 13768, "src": "2321:198:0", "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "body": { "id": 13761, "nodeType": "Block", "src": "2736:124:0", "statements": [ { "assignments": [ 13749 ], "declarations": [ { "constant": false, "id": 13749, "mutability": "mutable", "name": "oldOwner", "nameLocation": "2754:8:0", "nodeType": "VariableDeclaration", "scope": 13761, "src": "2746:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13748, "name": "address", "nodeType": "ElementaryTypeName",