2554 lines
101 KiB
JSON
2554 lines
101 KiB
JSON
{
|
|
"contractName": "Ownable",
|
|
"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": "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"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"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\":\"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\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981\",\"dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"generatedSources": [],
|
|
"deployedGeneratedSources": [],
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @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 *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\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.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual 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(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @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 *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n",
|
|
"sourcePath": "@openzeppelin/contracts/access/Ownable.sol",
|
|
"ast": {
|
|
"absolutePath": "@openzeppelin/contracts/access/Ownable.sol",
|
|
"exportedSymbols": {
|
|
"Context": [
|
|
5377
|
|
],
|
|
"Ownable": [
|
|
486
|
|
]
|
|
},
|
|
"id": 487,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 383,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "87:23:2"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
|
|
"file": "../utils/Context.sol",
|
|
"id": 384,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 487,
|
|
"sourceUnit": 5378,
|
|
"src": "112:30:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 386,
|
|
"name": "Context",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 5377,
|
|
"src": "668:7:2"
|
|
},
|
|
"id": 387,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "668:7:2"
|
|
}
|
|
],
|
|
"canonicalName": "Ownable",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 385,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "144:494:2",
|
|
"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": 486,
|
|
"linearizedBaseContracts": [
|
|
486,
|
|
5377
|
|
],
|
|
"name": "Ownable",
|
|
"nameLocation": "657:7:2",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 389,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nameLocation": "698:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "682:22:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 388,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "682:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"id": 395,
|
|
"name": "OwnershipTransferred",
|
|
"nameLocation": "717:20:2",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 394,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 391,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "previousOwner",
|
|
"nameLocation": "754:13:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 395,
|
|
"src": "738:29:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 390,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "738:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 393,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "785:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 395,
|
|
"src": "769:24:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 392,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "769:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "737:57:2"
|
|
},
|
|
"src": "711:84:2"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 404,
|
|
"nodeType": "Block",
|
|
"src": "911:49:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 400,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5367,
|
|
"src": "940:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 401,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "940:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 399,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "921:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 402,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:32:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 403,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "921:32:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 396,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "801:91:2",
|
|
"text": " @dev Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"id": 405,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 397,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "908:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 398,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "911:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "897:63:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 413,
|
|
"nodeType": "Block",
|
|
"src": "1091:30:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 411,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "1108:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 410,
|
|
"id": 412,
|
|
"nodeType": "Return",
|
|
"src": "1101:13:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 406,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "966:65:2",
|
|
"text": " @dev Returns the address of the current owner."
|
|
},
|
|
"functionSelector": "8da5cb5b",
|
|
"id": 414,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nameLocation": "1045:5:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 407,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 410,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 409,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 414,
|
|
"src": "1082:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 408,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1082:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1081:9:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1036:85:2",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 427,
|
|
"nodeType": "Block",
|
|
"src": "1230:96:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 422,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 418,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 414,
|
|
"src": "1248:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1248:7:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 420,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5367,
|
|
"src": "1259:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1259:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1248:23:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 423,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1273:34:2",
|
|
"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": 417,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1240:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 424,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1240:68:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 425,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1240:68:2"
|
|
},
|
|
{
|
|
"id": 426,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1318:1:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 415,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1127:77:2",
|
|
"text": " @dev Throws if called by any account other than the owner."
|
|
},
|
|
"id": 428,
|
|
"name": "onlyOwner",
|
|
"nameLocation": "1218:9:2",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 416,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1227:2:2"
|
|
},
|
|
"src": "1209:117:2",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 441,
|
|
"nodeType": "Block",
|
|
"src": "1722:47:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 437,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1759:1:2",
|
|
"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": 436,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1751:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 435,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1751:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 438,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1751:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 434,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "1732:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 439,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1732:30:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 440,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1732:30:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 429,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1332:331:2",
|
|
"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": 442,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 432,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 431,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 428,
|
|
"src": "1712:9:2"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1712:9:2"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nameLocation": "1677:17:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 430,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1694:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 433,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1722:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1668:101:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 464,
|
|
"nodeType": "Block",
|
|
"src": "1988:128:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 456,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 451,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 445,
|
|
"src": "2006:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 454,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2026:1:2",
|
|
"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": 453,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2018:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 452,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2018:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 455,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2018:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2006:22:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 457,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2030:40:2",
|
|
"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": 450,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1998:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 458,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1998:73:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 459,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1998:73:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 461,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 445,
|
|
"src": "2100:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 460,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "2081:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 462,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2081:28:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 463,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2081:28:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 443,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1775:138:2",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner."
|
|
},
|
|
"functionSelector": "f2fde38b",
|
|
"id": 465,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 448,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 447,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 428,
|
|
"src": "1978:9:2"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1978:9:2"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nameLocation": "1927:17:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 446,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 445,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "1953:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 465,
|
|
"src": "1945:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 444,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1945:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1944:18:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 449,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1988:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1918:198:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 484,
|
|
"nodeType": "Block",
|
|
"src": "2333:124:2",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
472
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 472,
|
|
"mutability": "mutable",
|
|
"name": "oldOwner",
|
|
"nameLocation": "2351:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 484,
|
|
"src": "2343:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 471,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2343:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 474,
|
|
"initialValue": {
|
|
"id": 473,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "2362:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2343:25:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 475,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "2378:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 476,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 468,
|
|
"src": "2387:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2378:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 478,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2378:17:2"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 480,
|
|
"name": "oldOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 472,
|
|
"src": "2431:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 481,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 468,
|
|
"src": "2441:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 479,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 395,
|
|
"src": "2410:20:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 482,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2410:40:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 483,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2405:45:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 466,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2122:143:2",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction."
|
|
},
|
|
"id": 485,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nameLocation": "2279:18:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 469,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 468,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "2306:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "2298:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 467,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2298:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2297:18:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 470,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2333:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "2270:187:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 487,
|
|
"src": "639:1820:2",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "87:2373:2"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "@openzeppelin/contracts/access/Ownable.sol",
|
|
"exportedSymbols": {
|
|
"Context": [
|
|
5377
|
|
],
|
|
"Ownable": [
|
|
486
|
|
]
|
|
},
|
|
"id": 487,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 383,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "87:23:2"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
|
|
"file": "../utils/Context.sol",
|
|
"id": 384,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 487,
|
|
"sourceUnit": 5378,
|
|
"src": "112:30:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 386,
|
|
"name": "Context",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 5377,
|
|
"src": "668:7:2"
|
|
},
|
|
"id": 387,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "668:7:2"
|
|
}
|
|
],
|
|
"canonicalName": "Ownable",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 385,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "144:494:2",
|
|
"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": 486,
|
|
"linearizedBaseContracts": [
|
|
486,
|
|
5377
|
|
],
|
|
"name": "Ownable",
|
|
"nameLocation": "657:7:2",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 389,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nameLocation": "698:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "682:22:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 388,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "682:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"id": 395,
|
|
"name": "OwnershipTransferred",
|
|
"nameLocation": "717:20:2",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 394,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 391,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "previousOwner",
|
|
"nameLocation": "754:13:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 395,
|
|
"src": "738:29:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 390,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "738:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 393,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "785:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 395,
|
|
"src": "769:24:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 392,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "769:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "737:57:2"
|
|
},
|
|
"src": "711:84:2"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 404,
|
|
"nodeType": "Block",
|
|
"src": "911:49:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 400,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5367,
|
|
"src": "940:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 401,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "940:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 399,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "921:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 402,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:32:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 403,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "921:32:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 396,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "801:91:2",
|
|
"text": " @dev Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"id": 405,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 397,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "908:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 398,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "911:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "897:63:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 413,
|
|
"nodeType": "Block",
|
|
"src": "1091:30:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 411,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "1108:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 410,
|
|
"id": 412,
|
|
"nodeType": "Return",
|
|
"src": "1101:13:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 406,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "966:65:2",
|
|
"text": " @dev Returns the address of the current owner."
|
|
},
|
|
"functionSelector": "8da5cb5b",
|
|
"id": 414,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nameLocation": "1045:5:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 407,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 410,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 409,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 414,
|
|
"src": "1082:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 408,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1082:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1081:9:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1036:85:2",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 427,
|
|
"nodeType": "Block",
|
|
"src": "1230:96:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 422,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 418,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 414,
|
|
"src": "1248:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1248:7:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 420,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 5367,
|
|
"src": "1259:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1259:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1248:23:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 423,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1273:34:2",
|
|
"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": 417,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1240:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 424,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1240:68:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 425,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1240:68:2"
|
|
},
|
|
{
|
|
"id": 426,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1318:1:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 415,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1127:77:2",
|
|
"text": " @dev Throws if called by any account other than the owner."
|
|
},
|
|
"id": 428,
|
|
"name": "onlyOwner",
|
|
"nameLocation": "1218:9:2",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 416,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1227:2:2"
|
|
},
|
|
"src": "1209:117:2",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 441,
|
|
"nodeType": "Block",
|
|
"src": "1722:47:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 437,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1759:1:2",
|
|
"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": 436,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1751:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 435,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1751:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 438,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1751:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 434,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "1732:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 439,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1732:30:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 440,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1732:30:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 429,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1332:331:2",
|
|
"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": 442,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 432,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 431,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 428,
|
|
"src": "1712:9:2"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1712:9:2"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nameLocation": "1677:17:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 430,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1694:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 433,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1722:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1668:101:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 464,
|
|
"nodeType": "Block",
|
|
"src": "1988:128:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 456,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 451,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 445,
|
|
"src": "2006:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 454,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2026:1:2",
|
|
"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": 453,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2018:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 452,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2018:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 455,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2018:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2006:22:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 457,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2030:40:2",
|
|
"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": 450,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1998:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 458,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1998:73:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 459,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1998:73:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 461,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 445,
|
|
"src": "2100:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 460,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "2081:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 462,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2081:28:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 463,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2081:28:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 443,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1775:138:2",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner."
|
|
},
|
|
"functionSelector": "f2fde38b",
|
|
"id": 465,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 448,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 447,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 428,
|
|
"src": "1978:9:2"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1978:9:2"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nameLocation": "1927:17:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 446,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 445,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "1953:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 465,
|
|
"src": "1945:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 444,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1945:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1944:18:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 449,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1988:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "1918:198:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 484,
|
|
"nodeType": "Block",
|
|
"src": "2333:124:2",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
472
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 472,
|
|
"mutability": "mutable",
|
|
"name": "oldOwner",
|
|
"nameLocation": "2351:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 484,
|
|
"src": "2343:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 471,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2343:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 474,
|
|
"initialValue": {
|
|
"id": 473,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "2362:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2343:25:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 475,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "2378:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 476,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 468,
|
|
"src": "2387:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2378:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 478,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2378:17:2"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 480,
|
|
"name": "oldOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 472,
|
|
"src": "2431:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 481,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 468,
|
|
"src": "2441:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 479,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 395,
|
|
"src": "2410:20:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 482,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2410:40:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 483,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2405:45:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 466,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2122:143:2",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction."
|
|
},
|
|
"id": 485,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nameLocation": "2279:18:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 469,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 468,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "2306:8:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "2298:16:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 467,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2298:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2297:18:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 470,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2333:0:2"
|
|
},
|
|
"scope": 486,
|
|
"src": "2270:187:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 487,
|
|
"src": "639:1820:2",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "87:2373:2"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.10+commit.fc410830.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.4",
|
|
"updatedAt": "2022-08-17T06:09:48.050Z",
|
|
"devdoc": {
|
|
"details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"constructor": {
|
|
"details": "Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"owner()": {
|
|
"details": "Returns the address of the current owner."
|
|
},
|
|
"renounceOwnership()": {
|
|
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
|
|
},
|
|
"transferOwnership(address)": {
|
|
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |