@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,256 lines (1,255 loc) • 183 kB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "BeaconUpgraded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
}
],
"allSourcePaths": {
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/beacon/IBeacon.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Address.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/StorageSlot.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/interfaces/draft-IERC1822.sol",
"9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/ERC1967/ERC1967Upgrade.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/ERC1967/ERC1967Upgrade.sol",
"exportedSymbols": {
"Address": [
17676
],
"ERC1967Upgrade": [
18030
],
"IBeacon": [
18386
],
"IERC1822Proxiable": [
18376
],
"StorageSlot": [
18446
]
},
"id": 18031,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17714,
"literals": [
"solidity",
"^",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "116:23:9"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/beacon/IBeacon.sol",
"file": "../beacon/IBeacon.sol",
"id": 17715,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18031,
"sourceUnit": 18387,
"src": "141:31:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/interfaces/draft-IERC1822.sol",
"file": "../../interfaces/draft-IERC1822.sol",
"id": 17716,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18031,
"sourceUnit": 18377,
"src": "173:45:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Address.sol",
"file": "../../utils/Address.sol",
"id": 17717,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18031,
"sourceUnit": 17677,
"src": "219:33:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/StorageSlot.sol",
"file": "../../utils/StorageSlot.sol",
"id": 17718,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18031,
"sourceUnit": 18447,
"src": "253:37:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [],
"canonicalName": "ERC1967Upgrade",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 17719,
"nodeType": "StructuredDocumentation",
"src": "292:236:9",
"text": " @dev This abstract contract provides getters and event emitting update functions for\n https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n _Available since v4.1._\n @custom:oz-upgrades-unsafe-allow delegatecall"
},
"fullyImplemented": true,
"id": 18030,
"linearizedBaseContracts": [
18030
],
"name": "ERC1967Upgrade",
"nameLocation": "547:14:9",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 17722,
"mutability": "constant",
"name": "_ROLLBACK_SLOT",
"nameLocation": "672:14:9",
"nodeType": "VariableDeclaration",
"scope": 18030,
"src": "647:108:9",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17720,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "647:7:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "307834393130666466613136666564333236306564306537313437663763633664613131613630323038623562393430366431326136333536313466666439313433",
"id": 17721,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "689:66:9",
"typeDescriptions": {
"typeIdentifier": "t_rational_33048860383849004559742813297059419343339852917517107368639918720169455489347_by_1",
"typeString": "int_const 3304...(69 digits omitted)...9347"
},
"value": "0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143"
},
"visibility": "private"
},
{
"constant": true,
"documentation": {
"id": 17723,
"nodeType": "StructuredDocumentation",
"src": "762:214:9",
"text": " @dev Storage slot with the address of the current implementation.\n This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n validated in the constructor."
},
"id": 17726,
"mutability": "constant",
"name": "_IMPLEMENTATION_SLOT",
"nameLocation": "1007:20:9",
"nodeType": "VariableDeclaration",
"scope": 18030,
"src": "981:115:9",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17724,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "981:7:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "307833363038393461313362613161333231303636376338323834393264623938646361336532303736636333373335613932306133636135303564333832626263",
"id": 17725,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1030:66:9",
"typeDescriptions": {
"typeIdentifier": "t_rational_24440054405305269366569402256811496959409073762505157381672968839269610695612_by_1",
"typeString": "int_const 2444...(69 digits omitted)...5612"
},
"value": "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
},
"visibility": "internal"
},
{
"anonymous": false,
"documentation": {
"id": 17727,
"nodeType": "StructuredDocumentation",
"src": "1103:68:9",
"text": " @dev Emitted when the implementation is upgraded."
},
"eventSelector": "bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
"id": 17731,
"name": "Upgraded",
"nameLocation": "1182:8:9",
"nodeType": "EventDefinition",
"parameters": {
"id": 17730,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17729,
"indexed": true,
"mutability": "mutable",
"name": "implementation",
"nameLocation": "1207:14:9",
"nodeType": "VariableDeclaration",
"scope": 17731,
"src": "1191:30:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17728,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1191:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1190:32:9"
},
"src": "1176:47:9"
},
{
"body": {
"id": 17743,
"nodeType": "Block",
"src": "1363:78:9",
"statements": [
{
"expression": {
"expression": {
"arguments": [
{
"id": 17739,
"name": "_IMPLEMENTATION_SLOT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17726,
"src": "1407:20:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"id": 17737,
"name": "StorageSlot",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18446,
"src": "1380:11:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_StorageSlot_$18446_$",
"typeString": "type(library StorageSlot)"
}
},
"id": 17738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1392:14:9",
"memberName": "getAddressSlot",
"nodeType": "MemberAccess",
"referencedDeclaration": 18412,
"src": "1380:26:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_AddressSlot_$18392_storage_ptr_$",
"typeString": "function (bytes32) pure returns (struct StorageSlot.AddressSlot storage pointer)"
}
},
"id": 17740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1380:48:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_AddressSlot_$18392_storage_ptr",
"typeString": "struct StorageSlot.AddressSlot storage pointer"
}
},
"id": 17741,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1429:5:9",
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": 18391,
"src": "1380:54:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 17736,
"id": 17742,
"nodeType": "Return",
"src": "1373:61:9"
}
]
},
"documentation": {
"id": 17732,
"nodeType": "StructuredDocumentation",
"src": "1229:67:9",
"text": " @dev Returns the current implementation address."
},
"id": 17744,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_getImplementation",
"nameLocation": "1310:18:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17733,
"nodeType": "ParameterList",
"parameters": [],
"src": "1328:2:9"
},
"returnParameters": {
"id": 17736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17735,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 17744,
"src": "1354:7:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17734,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1354:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1353:9:9"
},
"scope": 18030,
"src": "1301:140:9",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 17767,
"nodeType": "Block",
"src": "1595:196:9",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 17753,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17747,
"src": "1632:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 17751,
"name": "Address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17676,
"src": "1613:7:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Address_$17676_$",
"typeString": "type(library Address)"
}
},
"id": 17752,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1621:10:9",
"memberName": "isContract",
"nodeType": "MemberAccess",
"referencedDeclaration": 17364,
"src": "1613:18:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 17754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1613:37:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "455243313936373a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374",
"id": 17755,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1652:47:9",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_972b7028e8de0bff0d553b3264eba2312ec98a552add05e58853b313f9f4ac65",
"typeString": "literal_string \"ERC1967: new implementation is not a contract\""
},
"value": "ERC1967: new implementation is not a contract"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_972b7028e8de0bff0d553b3264eba2312ec98a552add05e58853b313f9f4ac65",
"typeString": "literal_string \"ERC1967: new implementation is not a contract\""
}
],
"id": 17750,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1605:7:9",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 17756,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1605:95:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17757,
"nodeType": "ExpressionStatement",
"src": "1605:95:9"
},
{
"expression": {
"id": 17765,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"arguments": [
{
"id": 17761,
"name": "_IMPLEMENTATION_SLOT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17726,
"src": "1737:20:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"id": 17758,
"name": "StorageSlot",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18446,
"src": "1710:11:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_StorageSlot_$18446_$",
"typeString": "type(library StorageSlot)"
}
},
"id": 17760,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1722:14:9",
"memberName": "getAddressSlot",
"nodeType": "MemberAccess",
"referencedDeclaration": 18412,
"src": "1710:26:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_AddressSlot_$18392_storage_ptr_$",
"typeString": "function (bytes32) pure returns (struct StorageSlot.AddressSlot storage pointer)"
}
},
"id": 17762,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1710:48:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_AddressSlot_$18392_storage_ptr",
"typeString": "struct StorageSlot.AddressSlot storage pointer"
}
},
"id": 17763,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "1759:5:9",
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": 18391,
"src": "1710:54:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 17764,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17747,
"src": "1767:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1710:74:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 17766,
"nodeType": "ExpressionStatement",
"src": "1710:74:9"
}
]
},
"documentation": {
"id": 17745,
"nodeType": "StructuredDocumentation",
"src": "1447:80:9",
"text": " @dev Stores a new address in the EIP1967 implementation slot."
},
"id": 17768,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_setImplementation",
"nameLocation": "1541:18:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17748,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17747,
"mutability": "mutable",
"name": "newImplementation",
"nameLocation": "1568:17:9",
"nodeType": "VariableDeclaration",
"scope": 17768,
"src": "1560:25:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17746,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1560:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1559:27:9"
},
"returnParameters": {
"id": 17749,
"nodeType": "ParameterList",
"parameters": [],
"src": "1595:0:9"
},
"scope": 18030,
"src": "1532:259:9",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 17782,
"nodeType": "Block",
"src": "1953:96:9",
"statements": [
{
"expression": {
"arguments": [
{
"id": 17775,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17771,
"src": "1982:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 17774,
"name": "_setImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17768,
"src": "1963:18:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 17776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1963:37:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17777,
"nodeType": "ExpressionStatement",
"src": "1963:37:9"
},
{
"eventCall": {
"arguments": [
{
"id": 17779,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17771,
"src": "2024:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 17778,
"name": "Upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17731,
"src": "2015:8:9",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 17780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2015:27:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17781,
"nodeType": "EmitStatement",
"src": "2010:32:9"
}
]
},
"documentation": {
"id": 17769,
"nodeType": "StructuredDocumentation",
"src": "1797:95:9",
"text": " @dev Perform implementation upgrade\n Emits an {Upgraded} event."
},
"id": 17783,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_upgradeTo",
"nameLocation": "1906:10:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17772,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17771,
"mutability": "mutable",
"name": "newImplementation",
"nameLocation": "1925:17:9",
"nodeType": "VariableDeclaration",
"scope": 17783,
"src": "1917:25:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17770,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1917:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1916:27:9"
},
"returnParameters": {
"id": 17773,
"nodeType": "ParameterList",
"parameters": [],
"src": "1953:0:9"
},
"scope": 18030,
"src": "1897:152:9",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 17812,
"nodeType": "Block",
"src": "2311:167:9",
"statements": [
{
"expression": {
"arguments": [
{
"id": 17794,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17786,
"src": "2332:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 17793,
"name": "_upgradeTo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17783,
"src": "2321:10:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 17795,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2321:29:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17796,
"nodeType": "ExpressionStatement",
"src": "2321:29:9"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 17802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 17800,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 17797,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17788,
"src": "2364:4:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 17798,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2369:6:9",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "2364:11:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 17799,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2378:1:9",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2364:15:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"id": 17801,
"name": "forceCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17790,
"src": "2383:9:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2364:28:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17811,
"nodeType": "IfStatement",
"src": "2360:112:9",
"trueBody": {
"id": 17810,
"nodeType": "Block",
"src": "2394:78:9",
"statements": [
{
"expression": {
"arguments": [
{
"id": 17806,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17786,
"src": "2437:17:9",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 17807,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17788,
"src": "2456:4:9",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 17803,
"name": "Address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17676,
"src": "2408:7:9",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Address_$17676_$",
"typeString": "type(library Address)"
}
},
"id": 17805,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2416:20:9",
"memberName": "functionDelegateCall",
"nodeType": "MemberAccess",
"referencedDeclaration": 17563,
"src": "2408:28:9",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (address,bytes memory) returns (bytes memory)"
}
},
"id": 17808,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2408:53:9",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 17809,
"nodeType": "ExpressionStatement",
"src": "2408:53:9"
}
]
}
}
]
},
"documentation": {
"id": 17784,
"nodeType": "StructuredDocumentation",
"src": "2055:123:9",
"text": " @dev Perform implementation upgrade with additional setup call.\n Emits an {Upgraded} event."
},
"id": 17813,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_upgradeToAndCall",
"nameLocation": "2192:17:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17791,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17786,
"mutability": "mutable",
"name": "newImplementation",
"nameLocation": "2227:17:9",
"nodeType": "VariableDeclaration",
"scope": 17813,
"src": "2219:25:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17785,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2219:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 17788,
"mutability": "mutable",
"name": "data",
"nameLocation": "2267:4:9",
"nodeType": "VariableDeclaration",
"scope": 17813,
"src": "2254:17:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 17787,