UNPKG

@etherisc/gif-contracts

Version:

This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.

1,261 lines 179 kB
{ "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": { "21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol", "23": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/StorageSlot.sol", "5": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/interfaces/draft-IERC1822.sol", "7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/ERC1967/ERC1967Upgrade.sol", "9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/beacon/IBeacon.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/ERC1967/ERC1967Upgrade.sol", "exportedSymbols": { "Address": [ 26374 ], "ERC1967Upgrade": [ 27521 ], "IBeacon": [ 28646 ], "IERC1822Proxiable": [ 28636 ], "StorageSlot": [ 28706 ] }, "id": 27522, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 27205, "literals": [ "solidity", "^", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "116:23:7" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/beacon/IBeacon.sol", "file": "../beacon/IBeacon.sol", "id": 27206, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 27522, "sourceUnit": 28647, "src": "141:31:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/interfaces/draft-IERC1822.sol", "file": "../../interfaces/draft-IERC1822.sol", "id": 27207, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 27522, "sourceUnit": 28637, "src": "173:45:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol", "file": "../../utils/Address.sol", "id": 27208, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 27522, "sourceUnit": 26375, "src": "219:33:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/StorageSlot.sol", "file": "../../utils/StorageSlot.sol", "id": 27209, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 27522, "sourceUnit": 28707, "src": "253:37:7", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 27210, "nodeType": "StructuredDocumentation", "src": "292:236:7", "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": 27521, "linearizedBaseContracts": [ 27521 ], "name": "ERC1967Upgrade", "nameLocation": "547:14:7", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 27213, "mutability": "constant", "name": "_ROLLBACK_SLOT", "nameLocation": "672:14:7", "nodeType": "VariableDeclaration", "scope": 27521, "src": "647:108:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 27211, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "647:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "hexValue": "307834393130666466613136666564333236306564306537313437663763633664613131613630323038623562393430366431326136333536313466666439313433", "id": 27212, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "689:66:7", "typeDescriptions": { "typeIdentifier": "t_rational_33048860383849004559742813297059419343339852917517107368639918720169455489347_by_1", "typeString": "int_const 3304...(69 digits omitted)...9347" }, "value": "0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143" }, "visibility": "private" }, { "constant": true, "documentation": { "id": 27214, "nodeType": "StructuredDocumentation", "src": "762:214:7", "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": 27217, "mutability": "constant", "name": "_IMPLEMENTATION_SLOT", "nameLocation": "1007:20:7", "nodeType": "VariableDeclaration", "scope": 27521, "src": "981:115:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 27215, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "981:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "hexValue": "307833363038393461313362613161333231303636376338323834393264623938646361336532303736636333373335613932306133636135303564333832626263", "id": 27216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1030:66:7", "typeDescriptions": { "typeIdentifier": "t_rational_24440054405305269366569402256811496959409073762505157381672968839269610695612_by_1", "typeString": "int_const 2444...(69 digits omitted)...5612" }, "value": "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" }, "visibility": "internal" }, { "anonymous": false, "documentation": { "id": 27218, "nodeType": "StructuredDocumentation", "src": "1103:68:7", "text": " @dev Emitted when the implementation is upgraded." }, "id": 27222, "name": "Upgraded", "nameLocation": "1182:8:7", "nodeType": "EventDefinition", "parameters": { "id": 27221, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27220, "indexed": true, "mutability": "mutable", "name": "implementation", "nameLocation": "1207:14:7", "nodeType": "VariableDeclaration", "scope": 27222, "src": "1191:30:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 27219, "name": "address", "nodeType": "ElementaryTypeName", "src": "1191:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1190:32:7" }, "src": "1176:47:7" }, { "body": { "id": 27234, "nodeType": "Block", "src": "1363:78:7", "statements": [ { "expression": { "expression": { "arguments": [ { "id": 27230, "name": "_IMPLEMENTATION_SLOT", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27217, "src": "1407:20:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "expression": { "id": 27228, "name": "StorageSlot", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28706, "src": "1380:11:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_StorageSlot_$28706_$", "typeString": "type(library StorageSlot)" } }, "id": 27229, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getAddressSlot", "nodeType": "MemberAccess", "referencedDeclaration": 28672, "src": "1380:26:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_AddressSlot_$28652_storage_ptr_$", "typeString": "function (bytes32) pure returns (struct StorageSlot.AddressSlot storage pointer)" } }, "id": 27231, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1380:48:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSlot_$28652_storage_ptr", "typeString": "struct StorageSlot.AddressSlot storage pointer" } }, "id": 27232, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": 28651, "src": "1380:54:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 27227, "id": 27233, "nodeType": "Return", "src": "1373:61:7" } ] }, "documentation": { "id": 27223, "nodeType": "StructuredDocumentation", "src": "1229:67:7", "text": " @dev Returns the current implementation address." }, "id": 27235, "implemented": true, "kind": "function", "modifiers": [], "name": "_getImplementation", "nameLocation": "1310:18:7", "nodeType": "FunctionDefinition", "parameters": { "id": 27224, "nodeType": "ParameterList", "parameters": [], "src": "1328:2:7" }, "returnParameters": { "id": 27227, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27226, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 27235, "src": "1354:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 27225, "name": "address", "nodeType": "ElementaryTypeName", "src": "1354:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1353:9:7" }, "scope": 27521, "src": "1301:140:7", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 27258, "nodeType": "Block", "src": "1595:196:7", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "id": 27244, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27238, "src": "1632:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 27242, "name": "Address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26374, "src": "1613:7:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Address_$26374_$", "typeString": "type(library Address)" } }, "id": 27243, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isContract", "nodeType": "MemberAccess", "referencedDeclaration": 26097, "src": "1613:18:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", "typeString": "function (address) view returns (bool)" } }, "id": 27245, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1613:37:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "455243313936373a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", "id": 27246, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1652:47:7", "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": 27241, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1605:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 27247, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1605:95:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 27248, "nodeType": "ExpressionStatement", "src": "1605:95:7" }, { "expression": { "id": 27256, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "arguments": [ { "id": 27252, "name": "_IMPLEMENTATION_SLOT", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27217, "src": "1737:20:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "expression": { "id": 27249, "name": "StorageSlot", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28706, "src": "1710:11:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_StorageSlot_$28706_$", "typeString": "type(library StorageSlot)" } }, "id": 27251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getAddressSlot", "nodeType": "MemberAccess", "referencedDeclaration": 28672, "src": "1710:26:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_AddressSlot_$28652_storage_ptr_$", "typeString": "function (bytes32) pure returns (struct StorageSlot.AddressSlot storage pointer)" } }, "id": 27253, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1710:48:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSlot_$28652_storage_ptr", "typeString": "struct StorageSlot.AddressSlot storage pointer" } }, "id": 27254, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": 28651, "src": "1710:54:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 27255, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27238, "src": "1767:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1710:74:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 27257, "nodeType": "ExpressionStatement", "src": "1710:74:7" } ] }, "documentation": { "id": 27236, "nodeType": "StructuredDocumentation", "src": "1447:80:7", "text": " @dev Stores a new address in the EIP1967 implementation slot." }, "id": 27259, "implemented": true, "kind": "function", "modifiers": [], "name": "_setImplementation", "nameLocation": "1541:18:7", "nodeType": "FunctionDefinition", "parameters": { "id": 27239, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27238, "mutability": "mutable", "name": "newImplementation", "nameLocation": "1568:17:7", "nodeType": "VariableDeclaration", "scope": 27259, "src": "1560:25:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 27237, "name": "address", "nodeType": "ElementaryTypeName", "src": "1560:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1559:27:7" }, "returnParameters": { "id": 27240, "nodeType": "ParameterList", "parameters": [], "src": "1595:0:7" }, "scope": 27521, "src": "1532:259:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "private" }, { "body": { "id": 27273, "nodeType": "Block", "src": "1953:96:7", "statements": [ { "expression": { "arguments": [ { "id": 27266, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27262, "src": "1982:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 27265, "name": "_setImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27259, "src": "1963:18:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 27267, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1963:37:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 27268, "nodeType": "ExpressionStatement", "src": "1963:37:7" }, { "eventCall": { "arguments": [ { "id": 27270, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27262, "src": "2024:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 27269, "name": "Upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27222, "src": "2015:8:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 27271, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2015:27:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 27272, "nodeType": "EmitStatement", "src": "2010:32:7" } ] }, "documentation": { "id": 27260, "nodeType": "StructuredDocumentation", "src": "1797:95:7", "text": " @dev Perform implementation upgrade\n Emits an {Upgraded} event." }, "id": 27274, "implemented": true, "kind": "function", "modifiers": [], "name": "_upgradeTo", "nameLocation": "1906:10:7", "nodeType": "FunctionDefinition", "parameters": { "id": 27263, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27262, "mutability": "mutable", "name": "newImplementation", "nameLocation": "1925:17:7", "nodeType": "VariableDeclaration", "scope": 27274, "src": "1917:25:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 27261, "name": "address", "nodeType": "ElementaryTypeName", "src": "1917:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1916:27:7" }, "returnParameters": { "id": 27264, "nodeType": "ParameterList", "parameters": [], "src": "1953:0:7" }, "scope": 27521, "src": "1897:152:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 27303, "nodeType": "Block", "src": "2311:167:7", "statements": [ { "expression": { "arguments": [ { "id": 27285, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27277, "src": "2332:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 27284, "name": "_upgradeTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27274, "src": "2321:10:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 27286, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2321:29:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 27287, "nodeType": "ExpressionStatement", "src": "2321:29:7" }, { "condition": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 27293, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 27291, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 27288, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27279, "src": "2364:4:7", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 27289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "src": "2364:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 27290, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2378:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2364:15:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "id": 27292, "name": "forceCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27281, "src": "2383:9:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "2364:28:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 27302, "nodeType": "IfStatement", "src": "2360:112:7", "trueBody": { "id": 27301, "nodeType": "Block", "src": "2394:78:7", "statements": [ { "expression": { "arguments": [ { "id": 27297, "name": "newImplementation", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27277, "src": "2437:17:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 27298, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27279, "src": "2456:4:7", "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": 27294, "name": "Address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26374, "src": "2408:7:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Address_$26374_$", "typeString": "type(library Address)" } }, "id": 27296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "functionDelegateCall", "nodeType": "MemberAccess", "referencedDeclaration": 26307, "src": "2408:28:7", "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": 27299, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2408:53:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 27300, "nodeType": "ExpressionStatement", "src": "2408:53:7" } ] } } ] }, "documentation": { "id": 27275, "nodeType": "StructuredDocumentation", "src": "2055:123:7", "text": " @dev Perform implementation upgrade with additional setup call.\n Emits an {Upgraded} event." }, "id": 27304, "implemented": true, "kind": "function", "modifiers": [], "name": "_upgradeToAndCall", "nameLocation": "2192:17:7", "nodeType": "FunctionDefinition", "parameters": { "id": 27282, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27277, "mutability": "mutable", "name": "newImplementation", "nameLocation": "2227:17:7", "nodeType": "VariableDeclaration", "scope": 27304, "src": "2219:25:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 27276, "name": "address", "nodeType": "ElementaryTypeName", "src": "2219:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 27279, "mutability": "mutable", "name": "data", "nameLocation": "2267:4:7", "nodeType": "VariableDeclaration", "scope": 27304, "src": "2254:17:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 27278, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2254:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" }, { "constant": false, "id": 27281, "mutability": "mutable", "name": "forceCall", "nameLocation": "2286:9:7", "nodeType": "VariableDeclaration", "scope": 27304, "src": "2281:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifi