witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
1,162 lines • 48.9 kB
JSON
{
"contractName": "Ownable2Step",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferStarted",
"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": [],
"name": "pendingOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"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\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"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\"}],\"devdoc\":{\"details\":\"Contract module which provides access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is specified at deployment time in the constructor for `Ownable`. This can later be changed with {transferOwnership} and {acceptOwnership}. This module is used through inheritance. It will make available all functions from parent (Ownable).\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/patterns/Ownable2Step.sol\":\"Ownable2Step\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"project:/contracts/patterns/Ownable.sol\":{\"keccak256\":\"0x494bda32f9a218d9c33ea82112129c0933ab52f57eabfbf0d14a8742a3370800\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c4cf04ebb052fed9d15cf93ff4523955ee311aa4425ee85f0e80b4489c94e76\",\"dweb:/ipfs/QmfMf4WD7woTaQSTbJxxoan2aXSeY7ovY5NoipSBw5rMPK\"]},\"project:/contracts/patterns/Ownable2Step.sol\":{\"keccak256\":\"0x7033d8133957a291cf9b8be30bfc4b95e6414a20995911d1b5df8ea149580604\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e20a079adc224113306392d27e0cf202c6c4a7678c4705fd3bbbca99c1e9b816\",\"dweb:/ipfs/QmWrFv2SbSokhrWhwL94sW5x1HyT7rX5f4Scowe4bWHHqu\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./Ownable.sol\";\r\n\r\n/**\r\n * @dev Contract module which provides access control mechanism, where\r\n * there is an account (an owner) that can be granted exclusive access to\r\n * specific functions.\r\n *\r\n * The initial owner is specified at deployment time in the constructor for `Ownable`. This\r\n * can later be changed with {transferOwnership} and {acceptOwnership}.\r\n *\r\n * This module is used through inheritance. It will make available all functions\r\n * from parent (Ownable).\r\n */\r\nabstract contract Ownable2Step is Ownable {\r\n address private _pendingOwner;\r\n\r\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\r\n\r\n /**\r\n * @dev Returns the address of the pending owner.\r\n */\r\n function pendingOwner() public view virtual returns (address) {\r\n return _pendingOwner;\r\n }\r\n\r\n /**\r\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\r\n * Can only be called by the current owner.\r\n */\r\n function transferOwnership(address newOwner) public virtual override onlyOwner {\r\n _pendingOwner = newOwner;\r\n emit OwnershipTransferStarted(owner(), newOwner);\r\n }\r\n\r\n /**\r\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\r\n * Internal function without access restriction.\r\n */\r\n function _transferOwnership(address newOwner) internal virtual override {\r\n delete _pendingOwner;\r\n super._transferOwnership(newOwner);\r\n }\r\n\r\n /**\r\n * @dev The new owner accepts the ownership transfer.\r\n */\r\n function acceptOwnership() public virtual {\r\n address sender = _msgSender();\r\n if (pendingOwner() != sender) {\r\n revert(\"Ownable2Step: caller is not the new owner\");\r\n }\r\n _transferOwnership(sender);\r\n }\r\n}\r\n",
"sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\patterns\\Ownable2Step.sol",
"ast": {
"absolutePath": "project:/contracts/patterns/Ownable2Step.sol",
"exportedSymbols": {
"Context": [
509
],
"Ownable": [
401
],
"Ownable2Step": [
24094
]
},
"id": 24095,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 24011,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:23:79"
},
{
"absolutePath": "project:/contracts/patterns/Ownable.sol",
"file": "./Ownable.sol",
"id": 24012,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24095,
"sourceUnit": 24010,
"src": "60:23:79",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 24014,
"name": "Ownable",
"nameLocations": [
"585:7:79"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 401,
"src": "585:7:79"
},
"id": 24015,
"nodeType": "InheritanceSpecifier",
"src": "585:7:79"
}
],
"canonicalName": "Ownable2Step",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 24013,
"nodeType": "StructuredDocumentation",
"src": "87:462:79",
"text": " @dev Contract module which provides access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n The initial owner is specified at deployment time in the constructor for `Ownable`. This\n can later be changed with {transferOwnership} and {acceptOwnership}.\n This module is used through inheritance. It will make available all functions\n from parent (Ownable)."
},
"fullyImplemented": true,
"id": 24094,
"linearizedBaseContracts": [
24094,
401,
509
],
"name": "Ownable2Step",
"nameLocation": "569:12:79",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 24017,
"mutability": "mutable",
"name": "_pendingOwner",
"nameLocation": "616:13:79",
"nodeType": "VariableDeclaration",
"scope": 24094,
"src": "600:29:79",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24016,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "600:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"anonymous": false,
"eventSelector": "38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700",
"id": 24023,
"name": "OwnershipTransferStarted",
"nameLocation": "644:24:79",
"nodeType": "EventDefinition",
"parameters": {
"id": 24022,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24019,
"indexed": true,
"mutability": "mutable",
"name": "previousOwner",
"nameLocation": "685:13:79",
"nodeType": "VariableDeclaration",
"scope": 24023,
"src": "669:29:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24018,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "669:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 24021,
"indexed": true,
"mutability": "mutable",
"name": "newOwner",
"nameLocation": "716:8:79",
"nodeType": "VariableDeclaration",
"scope": 24023,
"src": "700:24:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24020,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "700:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "668:57:79"
},
"src": "638:88:79"
},
{
"body": {
"id": 24031,
"nodeType": "Block",
"src": "869:39:79",
"statements": [
{
"expression": {
"id": 24029,
"name": "_pendingOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24017,
"src": "887:13:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 24028,
"id": 24030,
"nodeType": "Return",
"src": "880:20:79"
}
]
},
"documentation": {
"id": 24024,
"nodeType": "StructuredDocumentation",
"src": "734:67:79",
"text": " @dev Returns the address of the pending owner."
},
"functionSelector": "e30c3978",
"id": 24032,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "pendingOwner",
"nameLocation": "816:12:79",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24025,
"nodeType": "ParameterList",
"parameters": [],
"src": "828:2:79"
},
"returnParameters": {
"id": 24028,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24027,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24032,
"src": "860:7:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24026,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "860:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "859:9:79"
},
"scope": 24094,
"src": "807:101:79",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
380
],
"body": {
"id": 24051,
"nodeType": "Block",
"src": "1186:102:79",
"statements": [
{
"expression": {
"id": 24043,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 24041,
"name": "_pendingOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24017,
"src": "1197:13:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 24042,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24035,
"src": "1213:8:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1197:24:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 24044,
"nodeType": "ExpressionStatement",
"src": "1197:24:79"
},
{
"eventCall": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 24046,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 321,
"src": "1262:5:79",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 24047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1262:7:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 24048,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24035,
"src": "1271:8:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 24045,
"name": "OwnershipTransferStarted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24023,
"src": "1237:24:79",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 24049,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1237:43:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24050,
"nodeType": "EmitStatement",
"src": "1232:48:79"
}
]
},
"documentation": {
"id": 24033,
"nodeType": "StructuredDocumentation",
"src": "916:185:79",
"text": " @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n Can only be called by the current owner."
},
"functionSelector": "f2fde38b",
"id": 24052,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 24039,
"kind": "modifierInvocation",
"modifierName": {
"id": 24038,
"name": "onlyOwner",
"nameLocations": [
"1176:9:79"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 312,
"src": "1176:9:79"
},
"nodeType": "ModifierInvocation",
"src": "1176:9:79"
}
],
"name": "transferOwnership",
"nameLocation": "1116:17:79",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 24037,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1167:8:79"
},
"parameters": {
"id": 24036,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24035,
"mutability": "mutable",
"name": "newOwner",
"nameLocation": "1142:8:79",
"nodeType": "VariableDeclaration",
"scope": 24052,
"src": "1134:16:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24034,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1134:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1133:18:79"
},
"returnParameters": {
"id": 24040,
"nodeType": "ParameterList",
"parameters": [],
"src": "1186:0:79"
},
"scope": 24094,
"src": "1107:181:79",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
400
],
"body": {
"id": 24068,
"nodeType": "Block",
"src": "1550:84:79",
"statements": [
{
"expression": {
"id": 24060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "delete",
"prefix": true,
"src": "1561:20:79",
"subExpression": {
"id": 24059,
"name": "_pendingOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24017,
"src": "1568:13:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24061,
"nodeType": "ExpressionStatement",
"src": "1561:20:79"
},
{
"expression": {
"arguments": [
{
"id": 24065,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24055,
"src": "1617:8:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 24062,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967271,
"src": "1592:5:79",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_super$_Ownable2Step_$24094_$",
"typeString": "type(contract super Ownable2Step)"
}
},
"id": 24064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1598:18:79",
"memberName": "_transferOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 400,
"src": "1592:24:79",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 24066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1592:34:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24067,
"nodeType": "ExpressionStatement",
"src": "1592:34:79"
}
]
},
"documentation": {
"id": 24053,
"nodeType": "StructuredDocumentation",
"src": "1296:176:79",
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n Internal function without access restriction."
},
"id": 24069,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_transferOwnership",
"nameLocation": "1487:18:79",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 24057,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1541:8:79"
},
"parameters": {
"id": 24056,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24055,
"mutability": "mutable",
"name": "newOwner",
"nameLocation": "1514:8:79",
"nodeType": "VariableDeclaration",
"scope": 24069,
"src": "1506:16:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24054,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1506:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1505:18:79"
},
"returnParameters": {
"id": 24058,
"nodeType": "ParameterList",
"parameters": [],
"src": "1550:0:79"
},
"scope": 24094,
"src": "1478:156:79",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "internal"
},
{
"body": {
"id": 24092,
"nodeType": "Block",
"src": "1761:203:79",
"statements": [
{
"assignments": [
24074
],
"declarations": [
{
"constant": false,
"id": 24074,
"mutability": "mutable",
"name": "sender",
"nameLocation": "1780:6:79",
"nodeType": "VariableDeclaration",
"scope": 24092,
"src": "1772:14:79",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24073,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1772:7:79",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 24077,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 24075,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 491,
"src": "1789:10:79",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 24076,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1789:12:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1772:29:79"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 24081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 24078,
"name": "pendingOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24032,
"src": "1816:12:79",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 24079,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1816:14:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 24080,
"name": "sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24074,
"src": "1834:6:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1816:24:79",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 24087,
"nodeType": "IfStatement",
"src": "1812:108:79",
"trueBody": {
"id": 24086,
"nodeType": "Block",
"src": "1842:78:79",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e6572",
"id": 24083,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1864:43:79",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_225559eb8402045bea7ff07c35d0ad8c0547830223ac1c21d44fb948d6896ebc",
"typeString": "literal_string \"Ownable2Step: caller is not the new owner\""
},
"value": "Ownable2Step: caller is not the new owner"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_225559eb8402045bea7ff07c35d0ad8c0547830223ac1c21d44fb948d6896ebc",
"typeString": "literal_string \"Ownable2Step: caller is not the new owner\""
}
],
"id": 24082,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967277,
4294967277
],
"referencedDeclaration": 4294967277,
"src": "1857:6:79",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 24084,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1857:51:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24085,
"nodeType": "ExpressionStatement",
"src": "1857:51:79"
}
]
}
},
{
"expression": {
"arguments": [
{
"id": 24089,
"name": "sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24074,
"src": "1949:6:79",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 24088,
"name": "_transferOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [
24069
],
"referencedDeclaration": 24069,
"src": "1930:18:79",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 24090,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1930:26:79",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 24091,
"nodeType": "ExpressionStatement",
"src": "1930:26:79"
}
]
},
"documentation": {
"id": 24070,
"nodeType": "StructuredDocumentation",
"src": "1642:71:79",
"text": " @dev The new owner accepts the ownership transfer."
},
"functionSelector": "79ba5097",
"id": 24093,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "acceptOwnership",
"nameLocation": "1728:15:79",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24071,
"nodeType": "ParameterList",
"parameters": [],
"src": "1743:2:79"
},
"returnParameters": {
"id": 24072,
"nodeType": "ParameterList",
"parameters": [],
"src": "1761:0:79"
},
"scope": 24094,
"src": "1719:245:79",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 24095,
"src": "551:1416:79",
"usedErrors": [
267,
272
],
"usedEvents": [
278,
24023
]
}
],
"src": "33:1936:79"
},
"compiler": {
"name": "solc",
"version": "0.8.25+commit.b61c2a91.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.16",
"updatedAt": "2024-12-05T09:36:04.711Z",
"devdoc": {
"details": "Contract module which provides access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is specified at deployment time in the constructor for `Ownable`. This can later be changed with {transferOwnership} and {acceptOwnership}. This module is used through inheritance. It will make available all functions from parent (Ownable).",
"errors": {
"OwnableInvalidOwner(address)": [
{
"details": "The owner is not a valid owner account. (eg. `address(0)`)"
}
],
"OwnableUnauthorizedAccount(address)": [
{
"details": "The caller account is not authorized to perform an operation."
}
]
},
"kind": "dev",
"methods": {
"acceptOwnership()": {
"details": "The new owner accepts the ownership transfer."
},
"owner()": {
"details": "Returns the address of the current owner."
},
"pendingOwner()": {
"details": "Returns the address of the pending owner."
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
},
"transferOwnership(address)": {
"details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}