You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.11+commit.d7f03943\"},\"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\":true,\"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": [
|
|
1543
|
|
],
|
|
"Ownable": [
|
|
104
|
|
]
|
|
},
|
|
"id": 105,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "87:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
|
|
"file": "../utils/Context.sol",
|
|
"id": 2,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 105,
|
|
"sourceUnit": 1544,
|
|
"src": "112:30:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 4,
|
|
"name": "Context",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 1543,
|
|
"src": "668:7:0"
|
|
},
|
|
"id": 5,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "668:7:0"
|
|
}
|
|
],
|
|
"canonicalName": "Ownable",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 3,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "144:494:0",
|
|
"text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n By default, the owner account will be the one that deploys the contract. This\n can later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 104,
|
|
"linearizedBaseContracts": [
|
|
104,
|
|
1543
|
|
],
|
|
"name": "Ownable",
|
|
"nameLocation": "657:7:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 7,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nameLocation": "698:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 104,
|
|
"src": "682:22:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "682:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"id": 13,
|
|
"name": "OwnershipTransferred",
|
|
"nameLocation": "717:20:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 12,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "previousOwner",
|
|
"nameLocation": "754:13:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 13,
|
|
"src": "738:29:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 8,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "738:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 11,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "785:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 13,
|
|
"src": "769:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 10,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "769:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "737:57:0"
|
|
},
|
|
"src": "711:84:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 22,
|
|
"nodeType": "Block",
|
|
"src": "911:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 18,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "940:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 19,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "940:12:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 17,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "921:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 20,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:32:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "921:32:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 14,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "801:91:0",
|
|
"text": " @dev Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"id": 23,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "908:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 16,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "911:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "897:63:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 31,
|
|
"nodeType": "Block",
|
|
"src": "1091:30:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 29,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1108:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28,
|
|
"id": 30,
|
|
"nodeType": "Return",
|
|
"src": "1101:13:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 24,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "966:65:0",
|
|
"text": " @dev Returns the address of the current owner."
|
|
},
|
|
"functionSelector": "8da5cb5b",
|
|
"id": 32,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nameLocation": "1045:5:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 25,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 32,
|
|
"src": "1082:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 26,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1082:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1081:9:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1036:85:0",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 45,
|
|
"nodeType": "Block",
|
|
"src": "1230:96:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 40,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 36,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 32,
|
|
"src": "1248:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 37,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1248:7:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 38,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "1259:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 39,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1259:12:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1248:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 41,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1273:34:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
},
|
|
"value": "Ownable: caller is not the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
}
|
|
],
|
|
"id": 35,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1240:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 42,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1240:68:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 43,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1240:68:0"
|
|
},
|
|
{
|
|
"id": 44,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1318:1:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 33,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1127:77:0",
|
|
"text": " @dev Throws if called by any account other than the owner."
|
|
},
|
|
"id": 46,
|
|
"name": "onlyOwner",
|
|
"nameLocation": "1218:9:0",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 34,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1227:2:0"
|
|
},
|
|
"src": "1209:117:0",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 59,
|
|
"nodeType": "Block",
|
|
"src": "1722:47:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 55,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1759:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 54,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1751:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 53,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1751:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 56,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1751:10:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 52,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "1732:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 57,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1732:30:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 58,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1732:30:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 47,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1332:331:0",
|
|
"text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions anymore. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby removing any functionality that is only available to the owner."
|
|
},
|
|
"functionSelector": "715018a6",
|
|
"id": 60,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 50,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 49,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 46,
|
|
"src": "1712:9:0"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1712:9:0"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nameLocation": "1677:17:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 48,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1694:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 51,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1722:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1668:101:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 82,
|
|
"nodeType": "Block",
|
|
"src": "1988:128:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 74,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 69,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 63,
|
|
"src": "2006:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 72,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2026:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 71,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2018:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 70,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2018:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 73,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2018:10:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2006:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 75,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2030:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
},
|
|
"value": "Ownable: new owner is the zero address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
}
|
|
],
|
|
"id": 68,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1998:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1998:73:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 77,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1998:73:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 79,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 63,
|
|
"src": "2100:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 78,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "2081:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 80,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2081:28:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 81,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2081:28:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 61,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1775:138:0",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner."
|
|
},
|
|
"functionSelector": "f2fde38b",
|
|
"id": 83,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 66,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 65,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 46,
|
|
"src": "1978:9:0"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1978:9:0"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nameLocation": "1927:17:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 64,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 63,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "1953:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 83,
|
|
"src": "1945:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 62,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1945:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1944:18:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 67,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1988:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1918:198:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 102,
|
|
"nodeType": "Block",
|
|
"src": "2333:124:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
90
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 90,
|
|
"mutability": "mutable",
|
|
"name": "oldOwner",
|
|
"nameLocation": "2351:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 102,
|
|
"src": "2343:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 89,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2343:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 92,
|
|
"initialValue": {
|
|
"id": 91,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2362:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2343:25:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 95,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 93,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2378:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 94,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 86,
|
|
"src": "2387:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2378:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 96,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2378:17:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 98,
|
|
"name": "oldOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 90,
|
|
"src": "2431:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 99,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 86,
|
|
"src": "2441:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 97,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13,
|
|
"src": "2410:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 100,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2410:40:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 101,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2405:45:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 84,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2122:143:0",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction."
|
|
},
|
|
"id": 103,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nameLocation": "2279:18:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 87,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 86,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "2306:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 103,
|
|
"src": "2298:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 85,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2298:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2297:18:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 88,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2333:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "2270:187:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 105,
|
|
"src": "639:1820:0",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "87:2373:0"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "@openzeppelin/contracts/access/Ownable.sol",
|
|
"exportedSymbols": {
|
|
"Context": [
|
|
1543
|
|
],
|
|
"Ownable": [
|
|
104
|
|
]
|
|
},
|
|
"id": 105,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "87:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/Context.sol",
|
|
"file": "../utils/Context.sol",
|
|
"id": 2,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 105,
|
|
"sourceUnit": 1544,
|
|
"src": "112:30:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 4,
|
|
"name": "Context",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 1543,
|
|
"src": "668:7:0"
|
|
},
|
|
"id": 5,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "668:7:0"
|
|
}
|
|
],
|
|
"canonicalName": "Ownable",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 3,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "144:494:0",
|
|
"text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n By default, the owner account will be the one that deploys the contract. This\n can later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 104,
|
|
"linearizedBaseContracts": [
|
|
104,
|
|
1543
|
|
],
|
|
"name": "Ownable",
|
|
"nameLocation": "657:7:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 7,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nameLocation": "698:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 104,
|
|
"src": "682:22:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "682:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"id": 13,
|
|
"name": "OwnershipTransferred",
|
|
"nameLocation": "717:20:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 12,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "previousOwner",
|
|
"nameLocation": "754:13:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 13,
|
|
"src": "738:29:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 8,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "738:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 11,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "785:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 13,
|
|
"src": "769:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 10,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "769:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "737:57:0"
|
|
},
|
|
"src": "711:84:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 22,
|
|
"nodeType": "Block",
|
|
"src": "911:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 18,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "940:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 19,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "940:12:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 17,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "921:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 20,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:32:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "921:32:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 14,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "801:91:0",
|
|
"text": " @dev Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"id": 23,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "908:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 16,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "911:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "897:63:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 31,
|
|
"nodeType": "Block",
|
|
"src": "1091:30:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 29,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1108:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 28,
|
|
"id": 30,
|
|
"nodeType": "Return",
|
|
"src": "1101:13:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 24,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "966:65:0",
|
|
"text": " @dev Returns the address of the current owner."
|
|
},
|
|
"functionSelector": "8da5cb5b",
|
|
"id": 32,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nameLocation": "1045:5:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 25,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1050:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 28,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 32,
|
|
"src": "1082:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 26,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1082:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1081:9:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1036:85:0",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 45,
|
|
"nodeType": "Block",
|
|
"src": "1230:96:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 40,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 36,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 32,
|
|
"src": "1248:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 37,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1248:7:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 38,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "1259:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
|
|
"typeString": "function () view returns (address)"
|
|
}
|
|
},
|
|
"id": 39,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1259:12:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1248:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 41,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1273:34:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
},
|
|
"value": "Ownable: caller is not the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
}
|
|
],
|
|
"id": 35,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1240:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 42,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1240:68:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 43,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1240:68:0"
|
|
},
|
|
{
|
|
"id": 44,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1318:1:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 33,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1127:77:0",
|
|
"text": " @dev Throws if called by any account other than the owner."
|
|
},
|
|
"id": 46,
|
|
"name": "onlyOwner",
|
|
"nameLocation": "1218:9:0",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 34,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1227:2:0"
|
|
},
|
|
"src": "1209:117:0",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 59,
|
|
"nodeType": "Block",
|
|
"src": "1722:47:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 55,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1759:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 54,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1751:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 53,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1751:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 56,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1751:10:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 52,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "1732:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 57,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1732:30:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 58,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1732:30:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 47,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1332:331:0",
|
|
"text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions anymore. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby removing any functionality that is only available to the owner."
|
|
},
|
|
"functionSelector": "715018a6",
|
|
"id": 60,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 50,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 49,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 46,
|
|
"src": "1712:9:0"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1712:9:0"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nameLocation": "1677:17:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 48,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1694:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 51,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1722:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1668:101:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 82,
|
|
"nodeType": "Block",
|
|
"src": "1988:128:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 74,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 69,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 63,
|
|
"src": "2006:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 72,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2026:1:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 71,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2018:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 70,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2018:7:0",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 73,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2018:10:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2006:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 75,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2030:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
},
|
|
"value": "Ownable: new owner is the zero address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
}
|
|
],
|
|
"id": 68,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1998:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1998:73:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 77,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1998:73:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 79,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 63,
|
|
"src": "2100:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 78,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 103,
|
|
"src": "2081:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 80,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2081:28:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 81,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2081:28:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 61,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1775:138:0",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner."
|
|
},
|
|
"functionSelector": "f2fde38b",
|
|
"id": 83,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 66,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 65,
|
|
"name": "onlyOwner",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 46,
|
|
"src": "1978:9:0"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1978:9:0"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nameLocation": "1927:17:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 64,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 63,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "1953:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 83,
|
|
"src": "1945:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 62,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1945:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1944:18:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 67,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1988:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "1918:198:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 102,
|
|
"nodeType": "Block",
|
|
"src": "2333:124:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
90
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 90,
|
|
"mutability": "mutable",
|
|
"name": "oldOwner",
|
|
"nameLocation": "2351:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 102,
|
|
"src": "2343:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 89,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2343:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 92,
|
|
"initialValue": {
|
|
"id": 91,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2362:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2343:25:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 95,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 93,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2378:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 94,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 86,
|
|
"src": "2387:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2378:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 96,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2378:17:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 98,
|
|
"name": "oldOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 90,
|
|
"src": "2431:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 99,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 86,
|
|
"src": "2441:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 97,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13,
|
|
"src": "2410:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 100,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2410:40:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 101,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2405:45:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 84,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2122:143:0",
|
|
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction."
|
|
},
|
|
"id": 103,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nameLocation": "2279:18:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 87,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 86,
|
|
"mutability": "mutable",
|
|
"name": "newOwner",
|
|
"nameLocation": "2306:8:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 103,
|
|
"src": "2298:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 85,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2298:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2297:18:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 88,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2333:0:0"
|
|
},
|
|
"scope": 104,
|
|
"src": "2270:187:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 105,
|
|
"src": "639:1820:0",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "87:2373:0"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.11+commit.d7f03943.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.4",
|
|
"updatedAt": "2021-12-29T22:14:28.586Z",
|
|
"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
|
|
}
|
|
} |