@etherisc/terraguard-poc-contracts
Version:
Etherisc's smart contracts for the terraguard poc
1,309 lines • 56.4 kB
JSON
{
"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"
}
],
"allSourcePaths": {
"0": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
"5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol"
},
"ast": {
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
"exportedSymbols": {
"Context": [
6682
],
"Ownable": [
6795
]
},
"id": 6796,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6684,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "102:23:0"
},
{
"absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
"file": "../utils/Context.sol",
"id": 6685,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 6796,
"sourceUnit": 6683,
"src": "127:30:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 6687,
"name": "Context",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6682,
"src": "683:7:0"
},
"id": 6688,
"nodeType": "InheritanceSpecifier",
"src": "683:7:0"
}
],
"contractDependencies": [
6682
],
"contractKind": "contract",
"documentation": {
"id": 6686,
"nodeType": "StructuredDocumentation",
"src": "159: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": 6795,
"linearizedBaseContracts": [
6795,
6682
],
"name": "Ownable",
"nameLocation": "672:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 6690,
"mutability": "mutable",
"name": "_owner",
"nameLocation": "713:6:0",
"nodeType": "VariableDeclaration",
"scope": 6795,
"src": "697:22:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6689,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "697:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"anonymous": false,
"id": 6696,
"name": "OwnershipTransferred",
"nameLocation": "732:20:0",
"nodeType": "EventDefinition",
"parameters": {
"id": 6695,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6692,
"indexed": true,
"mutability": "mutable",
"name": "previousOwner",
"nameLocation": "769:13:0",
"nodeType": "VariableDeclaration",
"scope": 6696,
"src": "753:29:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6691,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "753:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6694,
"indexed": true,
"mutability": "mutable",
"name": "newOwner",
"nameLocation": "800:8:0",
"nodeType": "VariableDeclaration",
"scope": 6696,
"src": "784:24:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6693,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "784:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "752:57:0"
},
"src": "726:84:0"
},
{
"body": {
"id": 6705,
"nodeType": "Block",
"src": "926:49:0",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 6701,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6672,
"src": "955:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 6702,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "955:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 6700,
"name": "_transferOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6794,
"src": "936:18:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 6703,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "936:32:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6704,
"nodeType": "ExpressionStatement",
"src": "936:32:0"
}
]
},
"documentation": {
"id": 6697,
"nodeType": "StructuredDocumentation",
"src": "816:91:0",
"text": " @dev Initializes the contract setting the deployer as the initial owner."
},
"id": 6706,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6698,
"nodeType": "ParameterList",
"parameters": [],
"src": "923:2:0"
},
"returnParameters": {
"id": 6699,
"nodeType": "ParameterList",
"parameters": [],
"src": "926:0:0"
},
"scope": 6795,
"src": "912:63:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6713,
"nodeType": "Block",
"src": "1084:41:0",
"statements": [
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 6709,
"name": "_checkOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6737,
"src": "1094:11:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$__$",
"typeString": "function () view"
}
},
"id": 6710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1094:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6711,
"nodeType": "ExpressionStatement",
"src": "1094:13:0"
},
{
"id": 6712,
"nodeType": "PlaceholderStatement",
"src": "1117:1:0"
}
]
},
"documentation": {
"id": 6707,
"nodeType": "StructuredDocumentation",
"src": "981:77:0",
"text": " @dev Throws if called by any account other than the owner."
},
"id": 6714,
"name": "onlyOwner",
"nameLocation": "1072:9:0",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 6708,
"nodeType": "ParameterList",
"parameters": [],
"src": "1081:2:0"
},
"src": "1063:62:0",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 6722,
"nodeType": "Block",
"src": "1256:30:0",
"statements": [
{
"expression": {
"id": 6720,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6690,
"src": "1273:6:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 6719,
"id": 6721,
"nodeType": "Return",
"src": "1266:13:0"
}
]
},
"documentation": {
"id": 6715,
"nodeType": "StructuredDocumentation",
"src": "1131:65:0",
"text": " @dev Returns the address of the current owner."
},
"functionSelector": "8da5cb5b",
"id": 6723,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "owner",
"nameLocation": "1210:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6716,
"nodeType": "ParameterList",
"parameters": [],
"src": "1215:2:0"
},
"returnParameters": {
"id": 6719,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6718,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6723,
"src": "1247:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6717,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1247:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1246:9:0"
},
"scope": 6795,
"src": "1201:85:0",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"body": {
"id": 6736,
"nodeType": "Block",
"src": "1404:85:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 6728,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6723,
"src": "1422:5:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 6729,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1422:7:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 6730,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6672,
"src": "1433:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 6731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1433:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1422:23:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
"id": 6733,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1447: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": 6727,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1414:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6734,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1414:68:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6735,
"nodeType": "ExpressionStatement",
"src": "1414:68:0"
}
]
},
"documentation": {
"id": 6724,
"nodeType": "StructuredDocumentation",
"src": "1292:62:0",
"text": " @dev Throws if the sender is not the owner."
},
"id": 6737,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_checkOwner",
"nameLocation": "1368:11:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6725,
"nodeType": "ParameterList",
"parameters": [],
"src": "1379:2:0"
},
"returnParameters": {
"id": 6726,
"nodeType": "ParameterList",
"parameters": [],
"src": "1404:0:0"
},
"scope": 6795,
"src": "1359:130:0",
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
},
{
"body": {
"id": 6750,
"nodeType": "Block",
"src": "1885:47:0",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"hexValue": "30",
"id": 6746,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1922: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": 6745,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1914:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 6744,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1914:7:0",
"typeDescriptions": {}
}
},
"id": 6747,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1914:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 6743,
"name": "_transferOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6794,
"src": "1895:18:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 6748,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1895:30:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6749,
"nodeType": "ExpressionStatement",
"src": "1895:30:0"
}
]
},
"documentation": {
"id": 6738,
"nodeType": "StructuredDocumentation",
"src": "1495: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": 6751,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 6741,
"modifierName": {
"id": 6740,
"name": "onlyOwner",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6714,
"src": "1875:9:0"
},
"nodeType": "ModifierInvocation",
"src": "1875:9:0"
}
],
"name": "renounceOwnership",
"nameLocation": "1840:17:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6739,
"nodeType": "ParameterList",
"parameters": [],
"src": "1857:2:0"
},
"returnParameters": {
"id": 6742,
"nodeType": "ParameterList",
"parameters": [],
"src": "1885:0:0"
},
"scope": 6795,
"src": "1831:101:0",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"body": {
"id": 6773,
"nodeType": "Block",
"src": "2151:128:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6765,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 6760,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6754,
"src": "2169:8:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 6763,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2189: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": 6762,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2181:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 6761,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2181:7:0",
"typeDescriptions": {}
}
},
"id": 6764,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2181:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2169:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
"id": 6766,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2193: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": 6759,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "2161:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6767,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2161:73:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6768,
"nodeType": "ExpressionStatement",
"src": "2161:73:0"
},
{
"expression": {
"arguments": [
{
"id": 6770,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6754,
"src": "2263:8:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 6769,
"name": "_transferOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6794,
"src": "2244:18:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 6771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2244:28:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6772,
"nodeType": "ExpressionStatement",
"src": "2244:28:0"
}
]
},
"documentation": {
"id": 6752,
"nodeType": "StructuredDocumentation",
"src": "1938: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": 6774,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 6757,
"modifierName": {
"id": 6756,
"name": "onlyOwner",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6714,
"src": "2141:9:0"
},
"nodeType": "ModifierInvocation",
"src": "2141:9:0"
}
],
"name": "transferOwnership",
"nameLocation": "2090:17:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6755,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6754,
"mutability": "mutable",
"name": "newOwner",
"nameLocation": "2116:8:0",
"nodeType": "VariableDeclaration",
"scope": 6774,
"src": "2108:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6753,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2108:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2107:18:0"
},
"returnParameters": {
"id": 6758,
"nodeType": "ParameterList",
"parameters": [],
"src": "2151:0:0"
},
"scope": 6795,
"src": "2081:198:0",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"body": {
"id": 6793,
"nodeType": "Block",
"src": "2496:124:0",
"statements": [
{
"assignments": [
6781
],
"declarations": [
{
"constant": false,
"id": 6781,
"mutability": "mutable",
"name": "oldOwner",
"nameLocation": "2514:8:0",
"nodeType": "VariableDeclaration",
"scope": 6793,
"src": "2506:16:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6780,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2506:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 6783,
"initialValue": {
"id": 6782,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6690,
"src": "2525:6:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2506:25:0"
},
{
"expression": {
"id": 6786,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 6784,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6690,
"src": "2541:6:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 6785,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6777,
"src": "2550:8:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2541:17:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 6787,
"nodeType": "ExpressionStatement",
"src": "2541:17:0"
},
{
"eventCall": {
"arguments": [
{
"id": 6789,
"name": "oldOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6781,
"src": "2594:8:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 6790,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6777,
"src": "2604:8:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 6788,
"name": "OwnershipTransferred",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6696,
"src": "2573:20:0",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 6791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2573:40:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6792,
"nodeType": "EmitStatement",
"src": "2568:45:0"
}
]
},
"documentation": {
"id": 6775,
"nodeType": "StructuredDocumentation",
"src": "2285:143:0",
"text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction."
},
"id": 6794,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_transferOwnership",
"nameLocation": "2442:18:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6778,
"nodeType": "ParameterList",
"pa