cic-stack/apps/cic-eth/tests/testdata/bancor/Owned.json

2531 lines
102 KiB
JSON
Raw Normal View History

2021-02-01 18:12:51 +01:00
{
"contractName": "Owned",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_prevOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "OwnerUpdate",
"type": "event"
},
{
"inputs": [],
"name": "newOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides support and utilities for contract ownership\",\"events\":{\"OwnerUpdate(address,address)\":{\"details\":\"triggered when the owner is updated\",\"params\":{\"_newOwner\":\"new owner\",\"_prevOwner\":\"previous owner\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new Owned instance\"},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":\"Owned\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561028b806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806379ba5097146100515780638da5cb5b1461005b578063d4ee1d901461007f578063f2fde38b14610087575b600080fd5b6100596100ad565b005b610063610164565b604080516001600160a01b039092168252519081900360200190f35b610063610173565b6100596004803603602081101561009d57600080fd5b50356001600160a01b0316610182565b6001546001600160a01b03163314610100576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61018a610200565b6000546001600160a01b03828116911614156101de576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610253576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b56fea2646970667358221220521452bed7ced4c169f956cdad6e781be48d8a9dafb057e42b768da09fda7b5764736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806379ba5097146100515780638da5cb5b1461005b578063d4ee1d901461007f578063f2fde38b14610087575b600080fd5b6100596100ad565b005b610063610164565b604080516001600160a01b039092168252519081900360200190f35b610063610173565b6100596004803603602081101561009d57600080fd5b50356001600160a01b0316610182565b6001546001600160a01b03163314610100576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61018a610200565b6000546001600160a01b03828116911614156101de576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610253576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b56fea2646970667358221220521452bed7ced4c169f956cdad6e781be48d8a9dafb057e42b768da09fda7b5764736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "187:1455:57:-:0;;;587:58;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;187:1455;;;;;;",
"deployedSourceMap": "187:1455:57:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1422:217;;;:::i;:::-;;219:29;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;255:23;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1422:217::-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;255:23::-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IOwned.sol\";\r\n\r\n/**\r\n * @dev Provides support and utilities for contract ownership\r\n*/\r\ncontract Owned is IOwned {\r\n address public override owner;\r\n address public newOwner;\r\n\r\n /**\r\n * @dev triggered when the owner is updated\r\n *\r\n * @param _prevOwner previous owner\r\n * @param _newOwner new owner\r\n */\r\n event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner);\r\n\r\n /**\r\n * @dev initializes a new Owned instance\r\n */\r\n constructor() public {\r\n owner = msg.sender;\r\n }\r\n\r\n // allows execution by the owner only\r\n modifier ownerOnly {\r\n _ownerOnly();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _ownerOnly() internal view {\r\n require(msg.sender == owner, \"ERR_ACCESS_DENIED\");\r\n }\r\n\r\n /**\r\n * @dev allows transferring the contract ownership\r\n * the new owner still needs to accept the transfer\r\n * can only be called by the contract owner\r\n *\r\n * @param _newOwner new contract owner\r\n */\r\n function transferOwnership(address _newOwner) public override ownerOnly {\r\n require(_newOwner != owner, \"ERR_SAME_OWNER\");\r\n newOwner = _newOwner;\r\n }\r\n\r\n /**\r\n * @dev used by a new owner to accept an ownership transfer\r\n */\r\n function acceptOwnership() override public {\r\n require(msg.sender == newOwner, \"ERR_ACCESS_DENIED\");\r\n emit OwnerUpdate(owner, newOwner);\r\n owner = newOwner;\r\n newOwner = address(0);\r\n }\r\n}\r\n",
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"exportedSymbols": {
"Owned": [
21818
]
},
"id": 21819,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 21721,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:57"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
"file": "./interfaces/IOwned.sol",
"id": 21722,
"nodeType": "ImportDirective",
"scope": 21819,
"sourceUnit": 22848,
"src": "77:33:57",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 21724,
"name": "IOwned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22847,
"src": "205:6:57",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IOwned_$22847",
"typeString": "contract IOwned"
}
},
"id": 21725,
"nodeType": "InheritanceSpecifier",
"src": "205:6:57"
}
],
"contractDependencies": [
22847
],
"contractKind": "contract",
"documentation": {
"id": 21723,
"nodeType": "StructuredDocumentation",
"src": "114:71:57",
"text": " @dev Provides support and utilities for contract ownership"
},
"fullyImplemented": true,
"id": 21818,
"linearizedBaseContracts": [
21818,
22847
],
"name": "Owned",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
22838
],
"constant": false,
"functionSelector": "8da5cb5b",
"id": 21728,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 21727,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "234:8:57"
},
"scope": 21818,
"src": "219:29:57",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21726,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "219:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "d4ee1d90",
"id": 21730,
"mutability": "mutable",
"name": "newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21818,
"src": "255:23:57",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21729,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "255:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 21731,
"nodeType": "StructuredDocumentation",
"src": "287:149:57",
"text": " @dev triggered when the owner is updated\n @param _prevOwner previous owner\n @param _newOwner new owner"
},
"id": 21737,
"name": "OwnerUpdate",
"nodeType": "EventDefinition",
"parameters": {
"id": 21736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21733,
"indexed": true,
"mutability": "mutable",
"name": "_prevOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21737,
"src": "460:26:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "460:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 21735,
"indexed": true,
"mutability": "mutable",
"name": "_newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21737,
"src": "488:25:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21734,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "459:55:57"
},
"src": "442:73:57"
},
{
"body": {
"id": 21746,
"nodeType": "Block",
"src": "608:37:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 21744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21741,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "619:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21742,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "627:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "627:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "619:18:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21745,
"nodeType": "ExpressionStatement",
"src": "619:18:57"
}
]
},
"documentation": {
"id": 21738,
"nodeType": "StructuredDocumentation",
"src": "523:58:57",
"text": " @dev initializes a new Owned instance"
},
"id": 21747,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 21739,
"nodeType": "ParameterList",
"parameters": [],
"src": "598:2:57"
},
"returnParameters": {
"id": 21740,
"nodeType": "ParameterList",
"parameters": [],
"src": "608:0:57"
},
"scope": 21818,
"src": "587:58:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 21753,
"nodeType": "Block",
"src": "715:43:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 21749,
"name": "_ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21766,
"src": "726:10:57",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$__$",
"typeString": "function () view"
}
},
"id": 21750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "726:12:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21751,
"nodeType": "ExpressionStatement",
"src": "726:12:57"
},
{
"id": 21752,
"nodeType": "PlaceholderStatement",
"src": "749:1:57"
}
]
},
"documentation": null,
"id": 21754,
"name": "ownerOnly",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 21748,
"nodeType": "ParameterList",
"parameters": [],
"src": "715:0:57"
},
"src": "696:62:57",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 21765,
"nodeType": "Block",
"src": "849:68:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21761,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21758,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "868:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21759,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "868:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 21760,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "882:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "868:19:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4143434553535f44454e494544",
"id": 21762,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "889:19:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
},
"value": "ERR_ACCESS_DENIED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
}
],
"id": 21757,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "860:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21763,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "860:49:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21764,
"nodeType": "ExpressionStatement",
"src": "860:49:57"
}
]
},
"documentation": null,
"id": 21766,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_ownerOnly",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 21755,
"nodeType": "ParameterList",
"parameters": [],
"src": "832:2:57"
},
"returnParameters": {
"id": 21756,
"nodeType": "ParameterList",
"parameters": [],
"src": "849:0:57"
},
"scope": 21818,
"src": "813:104:57",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"baseFunctions": [
22843
],
"body": {
"id": 21786,
"nodeType": "Block",
"src": "1236:95:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 21776,
"name": "_newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21769,
"src": "1255:9:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 21777,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1268:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1255:18:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f53414d455f4f574e4552",
"id": 21779,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1275:16:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133",
"typeString": "literal_string \"ERR_SAME_OWNER\""
},
"value": "ERR_SAME_OWNER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133",
"typeString": "literal_string \"ERR_SAME_OWNER\""
}
],
"id": 21775,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1247:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1247:45:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21781,
"nodeType": "ExpressionStatement",
"src": "1247:45:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21784,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21782,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1303:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 21783,
"name": "_newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21769,
"src": "1314:9:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1303:20:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21785,
"nodeType": "ExpressionStatement",
"src": "1303:20:57"
}
]
},
"documentation": {
"id": 21767,
"nodeType": "StructuredDocumentation",
"src": "925:233:57",
"text": " @dev allows transferring the contract ownership\n the new owner still needs to accept the transfer\n can only be called by the contract owner\n @param _newOwner new contract owner"
},
"functionSelector": "f2fde38b",
"id": 21787,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 21773,
"modifierName": {
"argumentTypes": null,
"id": 21772,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1226:9:57",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1226:9:57"
}
],
"name": "transferOwnership",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 21771,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1217:8:57"
},
"parameters": {
"id": 21770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21769,
"mutability": "mutable",
"name": "_newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21787,
"src": "1191:17:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21768,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1191:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1190:19:57"
},
"returnParameters": {
"id": 21774,
"nodeType": "ParameterList",
"parameters": [],
"src": "1236:0:57"
},
"scope": 21818,
"src": "1164:167:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
22846
],
"body": {
"id": 21816,
"nodeType": "Block",
"src": "1465:174:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21793,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1484:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1484:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 21795,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1498:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1484:22:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4143434553535f44454e494544",
"id": 21797,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1508:19:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
},
"value": "ERR_ACCESS_DENIED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
}
],
"id": 21792,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1476:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21798,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1476:52:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21799,
"nodeType": "ExpressionStatement",
"src": "1476:52:57"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 21801,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1556:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 21802,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1563:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 21800,
"name": "OwnerUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21737,
"src": "1544:11:57",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 21803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1544:28:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21804,
"nodeType": "EmitStatement",
"src": "1539:33:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21805,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1583:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 21806,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1591:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1583:16:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21808,
"nodeType": "ExpressionStatement",
"src": "1583:16:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21814,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21809,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1610:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 21812,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1629:1:57",
"subdenomination": null,
"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": 21811,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1621:7:57",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 21810,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1621:7:57",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 21813,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1621:10:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "1610:21:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21815,
"nodeType": "ExpressionStatement",
"src": "1610:21:57"
}
]
},
"documentation": {
"id": 21788,
"nodeType": "StructuredDocumentation",
"src": "1339:77:57",
"text": " @dev used by a new owner to accept an ownership transfer"
},
"functionSelector": "79ba5097",
"id": 21817,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "acceptOwnership",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 21790,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1449:8:57"
},
"parameters": {
"id": 21789,
"nodeType": "ParameterList",
"parameters": [],
"src": "1446:2:57"
},
"returnParameters": {
"id": 21791,
"nodeType": "ParameterList",
"parameters": [],
"src": "1465:0:57"
},
"scope": 21818,
"src": "1422:217:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 21819,
"src": "187:1455:57"
}
],
"src": "52:1592:57"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"exportedSymbols": {
"Owned": [
21818
]
},
"id": 21819,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 21721,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:57"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
"file": "./interfaces/IOwned.sol",
"id": 21722,
"nodeType": "ImportDirective",
"scope": 21819,
"sourceUnit": 22848,
"src": "77:33:57",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 21724,
"name": "IOwned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22847,
"src": "205:6:57",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IOwned_$22847",
"typeString": "contract IOwned"
}
},
"id": 21725,
"nodeType": "InheritanceSpecifier",
"src": "205:6:57"
}
],
"contractDependencies": [
22847
],
"contractKind": "contract",
"documentation": {
"id": 21723,
"nodeType": "StructuredDocumentation",
"src": "114:71:57",
"text": " @dev Provides support and utilities for contract ownership"
},
"fullyImplemented": true,
"id": 21818,
"linearizedBaseContracts": [
21818,
22847
],
"name": "Owned",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
22838
],
"constant": false,
"functionSelector": "8da5cb5b",
"id": 21728,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 21727,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "234:8:57"
},
"scope": 21818,
"src": "219:29:57",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21726,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "219:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "d4ee1d90",
"id": 21730,
"mutability": "mutable",
"name": "newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21818,
"src": "255:23:57",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21729,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "255:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 21731,
"nodeType": "StructuredDocumentation",
"src": "287:149:57",
"text": " @dev triggered when the owner is updated\n @param _prevOwner previous owner\n @param _newOwner new owner"
},
"id": 21737,
"name": "OwnerUpdate",
"nodeType": "EventDefinition",
"parameters": {
"id": 21736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21733,
"indexed": true,
"mutability": "mutable",
"name": "_prevOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21737,
"src": "460:26:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "460:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 21735,
"indexed": true,
"mutability": "mutable",
"name": "_newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21737,
"src": "488:25:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21734,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "459:55:57"
},
"src": "442:73:57"
},
{
"body": {
"id": 21746,
"nodeType": "Block",
"src": "608:37:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 21744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21741,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "619:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21742,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "627:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "627:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "619:18:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21745,
"nodeType": "ExpressionStatement",
"src": "619:18:57"
}
]
},
"documentation": {
"id": 21738,
"nodeType": "StructuredDocumentation",
"src": "523:58:57",
"text": " @dev initializes a new Owned instance"
},
"id": 21747,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 21739,
"nodeType": "ParameterList",
"parameters": [],
"src": "598:2:57"
},
"returnParameters": {
"id": 21740,
"nodeType": "ParameterList",
"parameters": [],
"src": "608:0:57"
},
"scope": 21818,
"src": "587:58:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 21753,
"nodeType": "Block",
"src": "715:43:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 21749,
"name": "_ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21766,
"src": "726:10:57",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$__$",
"typeString": "function () view"
}
},
"id": 21750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "726:12:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21751,
"nodeType": "ExpressionStatement",
"src": "726:12:57"
},
{
"id": 21752,
"nodeType": "PlaceholderStatement",
"src": "749:1:57"
}
]
},
"documentation": null,
"id": 21754,
"name": "ownerOnly",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 21748,
"nodeType": "ParameterList",
"parameters": [],
"src": "715:0:57"
},
"src": "696:62:57",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 21765,
"nodeType": "Block",
"src": "849:68:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21761,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21758,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "868:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21759,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "868:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 21760,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "882:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "868:19:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4143434553535f44454e494544",
"id": 21762,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "889:19:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
},
"value": "ERR_ACCESS_DENIED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
}
],
"id": 21757,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "860:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21763,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "860:49:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21764,
"nodeType": "ExpressionStatement",
"src": "860:49:57"
}
]
},
"documentation": null,
"id": 21766,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_ownerOnly",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 21755,
"nodeType": "ParameterList",
"parameters": [],
"src": "832:2:57"
},
"returnParameters": {
"id": 21756,
"nodeType": "ParameterList",
"parameters": [],
"src": "849:0:57"
},
"scope": 21818,
"src": "813:104:57",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"baseFunctions": [
22843
],
"body": {
"id": 21786,
"nodeType": "Block",
"src": "1236:95:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 21776,
"name": "_newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21769,
"src": "1255:9:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"id": 21777,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1268:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1255:18:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f53414d455f4f574e4552",
"id": 21779,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1275:16:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133",
"typeString": "literal_string \"ERR_SAME_OWNER\""
},
"value": "ERR_SAME_OWNER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133",
"typeString": "literal_string \"ERR_SAME_OWNER\""
}
],
"id": 21775,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1247:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1247:45:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21781,
"nodeType": "ExpressionStatement",
"src": "1247:45:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21784,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21782,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1303:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 21783,
"name": "_newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21769,
"src": "1314:9:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1303:20:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21785,
"nodeType": "ExpressionStatement",
"src": "1303:20:57"
}
]
},
"documentation": {
"id": 21767,
"nodeType": "StructuredDocumentation",
"src": "925:233:57",
"text": " @dev allows transferring the contract ownership\n the new owner still needs to accept the transfer\n can only be called by the contract owner\n @param _newOwner new contract owner"
},
"functionSelector": "f2fde38b",
"id": 21787,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 21773,
"modifierName": {
"argumentTypes": null,
"id": 21772,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1226:9:57",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1226:9:57"
}
],
"name": "transferOwnership",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 21771,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1217:8:57"
},
"parameters": {
"id": 21770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21769,
"mutability": "mutable",
"name": "_newOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 21787,
"src": "1191:17:57",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21768,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1191:7:57",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1190:19:57"
},
"returnParameters": {
"id": 21774,
"nodeType": "ParameterList",
"parameters": [],
"src": "1236:0:57"
},
"scope": 21818,
"src": "1164:167:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
22846
],
"body": {
"id": 21816,
"nodeType": "Block",
"src": "1465:174:57",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 21796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 21793,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1484:3:57",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 21794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1484:10:57",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 21795,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1498:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1484:22:57",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4143434553535f44454e494544",
"id": 21797,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1508:19:57",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
},
"value": "ERR_ACCESS_DENIED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666",
"typeString": "literal_string \"ERR_ACCESS_DENIED\""
}
],
"id": 21792,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1476:7:57",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 21798,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1476:52:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21799,
"nodeType": "ExpressionStatement",
"src": "1476:52:57"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 21801,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1556:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 21802,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1563:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 21800,
"name": "OwnerUpdate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21737,
"src": "1544:11:57",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 21803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1544:28:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 21804,
"nodeType": "EmitStatement",
"src": "1539:33:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21805,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21728,
"src": "1583:5:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 21806,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1591:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1583:16:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21808,
"nodeType": "ExpressionStatement",
"src": "1583:16:57"
},
{
"expression": {
"argumentTypes": null,
"id": 21814,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 21809,
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21730,
"src": "1610:8:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 21812,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1629:1:57",
"subdenomination": null,
"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": 21811,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1621:7:57",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 21810,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1621:7:57",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 21813,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1621:10:57",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "1610:21:57",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21815,
"nodeType": "ExpressionStatement",
"src": "1610:21:57"
}
]
},
"documentation": {
"id": 21788,
"nodeType": "StructuredDocumentation",
"src": "1339:77:57",
"text": " @dev used by a new owner to accept an ownership transfer"
},
"functionSelector": "79ba5097",
"id": 21817,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "acceptOwnership",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 21790,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1449:8:57"
},
"parameters": {
"id": 21789,
"nodeType": "ParameterList",
"parameters": [],
"src": "1446:2:57"
},
"returnParameters": {
"id": 21791,
"nodeType": "ParameterList",
"parameters": [],
"src": "1465:0:57"
},
"scope": 21818,
"src": "1422:217:57",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 21819,
"src": "187:1455:57"
}
],
"src": "52:1592:57"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-10-20T08:24:47.841Z",
"devdoc": {
"details": "Provides support and utilities for contract ownership",
"events": {
"OwnerUpdate(address,address)": {
"details": "triggered when the owner is updated",
"params": {
"_newOwner": "new owner",
"_prevOwner": "previous owner"
}
}
},
"kind": "dev",
"methods": {
"acceptOwnership()": {
"details": "used by a new owner to accept an ownership transfer"
},
"constructor": {
"details": "initializes a new Owned instance"
},
"transferOwnership(address)": {
"details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner",
"params": {
"_newOwner": "new contract owner"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}