@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,339 lines (1,338 loc) • 226 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_logic",
"type": "address"
},
{
"internalType": "address",
"name": "admin_",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"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"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "admin_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "changeAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
"outputs": [
{
"internalType": "address",
"name": "implementation_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newImplementation",
"type": "address"
}
],
"name": "upgradeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newImplementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"allSourcePaths": {
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/Proxy.sol",
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/transparent/TransparentUpgradeableProxy.sol",
"8": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/ERC1967/ERC1967Proxy.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/transparent/TransparentUpgradeableProxy.sol",
"exportedSymbols": {
"Address": [
17676
],
"ERC1967Proxy": [
16915
],
"ERC1967Upgrade": [
18030
],
"IBeacon": [
18386
],
"IERC1822Proxiable": [
18376
],
"Proxy": [
18082
],
"StorageSlot": [
18446
],
"TransparentUpgradeableProxy": [
12771
]
},
"id": 12772,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 12625,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "133:23:12"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/proxy/ERC1967/ERC1967Proxy.sol",
"file": "../ERC1967/ERC1967Proxy.sol",
"id": 12626,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12772,
"sourceUnit": 16916,
"src": "158:37:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 12628,
"name": "ERC1967Proxy",
"nameLocations": [
"1689:12:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 16915,
"src": "1689:12:12"
},
"id": 12629,
"nodeType": "InheritanceSpecifier",
"src": "1689:12:12"
}
],
"canonicalName": "TransparentUpgradeableProxy",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 12627,
"nodeType": "StructuredDocumentation",
"src": "197:1451:12",
"text": " @dev This contract implements a proxy that is upgradeable by an admin.\n To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n clashing], which can potentially be used in an attack, this contract uses the\n https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n things that go hand in hand:\n 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n that call matches one of the admin functions exposed by the proxy itself.\n 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n \"admin cannot fallback to proxy target\".\n These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n to sudden errors when trying to call a function from the proxy implementation.\n Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy."
},
"fullyImplemented": true,
"id": 12771,
"linearizedBaseContracts": [
12771,
16915,
18030,
18082
],
"name": "TransparentUpgradeableProxy",
"nameLocation": "1658:27:12",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 12647,
"nodeType": "Block",
"src": "2053:37:12",
"statements": [
{
"expression": {
"arguments": [
{
"id": 12644,
"name": "admin_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12634,
"src": "2076:6:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12643,
"name": "_changeAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17933,
"src": "2063:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 12645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2063:20:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12646,
"nodeType": "ExpressionStatement",
"src": "2063:20:12"
}
]
},
"documentation": {
"id": 12630,
"nodeType": "StructuredDocumentation",
"src": "1708:210:12",
"text": " @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}."
},
"id": 12648,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"id": 12639,
"name": "_logic",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12632,
"src": "2038:6:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 12640,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12636,
"src": "2046:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"id": 12641,
"kind": "baseConstructorSpecifier",
"modifierName": {
"id": 12638,
"name": "ERC1967Proxy",
"nameLocations": [
"2025:12:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 16915,
"src": "2025:12:12"
},
"nodeType": "ModifierInvocation",
"src": "2025:27:12"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 12637,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12632,
"mutability": "mutable",
"name": "_logic",
"nameLocation": "1952:6:12",
"nodeType": "VariableDeclaration",
"scope": 12648,
"src": "1944:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12631,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1944:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 12634,
"mutability": "mutable",
"name": "admin_",
"nameLocation": "1976:6:12",
"nodeType": "VariableDeclaration",
"scope": 12648,
"src": "1968:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12633,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1968:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 12636,
"mutability": "mutable",
"name": "_data",
"nameLocation": "2005:5:12",
"nodeType": "VariableDeclaration",
"scope": 12648,
"src": "1992:18:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 12635,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1992:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1934:82:12"
},
"returnParameters": {
"id": 12642,
"nodeType": "ParameterList",
"parameters": [],
"src": "2053:0:12"
},
"scope": 12771,
"src": "1923:167:12",
"stateMutability": "payable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 12663,
"nodeType": "Block",
"src": "2250:115:12",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 12655,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 12651,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2264:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 12652,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2268:6:12",
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "2264:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 12653,
"name": "_getAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17890,
"src": "2278:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 12654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2278:11:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2264:25:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 12661,
"nodeType": "Block",
"src": "2323:36:12",
"statements": [
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 12658,
"name": "_fallback",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18060,
"src": "2337:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 12659,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2337:11:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12660,
"nodeType": "ExpressionStatement",
"src": "2337:11:12"
}
]
},
"id": 12662,
"nodeType": "IfStatement",
"src": "2260:99:12",
"trueBody": {
"id": 12657,
"nodeType": "Block",
"src": "2291:26:12",
"statements": [
{
"id": 12656,
"nodeType": "PlaceholderStatement",
"src": "2305:1:12"
}
]
}
}
]
},
"documentation": {
"id": 12649,
"nodeType": "StructuredDocumentation",
"src": "2096:130:12",
"text": " @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin."
},
"id": 12664,
"name": "ifAdmin",
"nameLocation": "2240:7:12",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 12650,
"nodeType": "ParameterList",
"parameters": [],
"src": "2247:2:12"
},
"src": "2231:134:12",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 12677,
"nodeType": "Block",
"src": "2866:37:12",
"statements": [
{
"expression": {
"id": 12675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 12672,
"name": "admin_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12670,
"src": "2876:6:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 12673,
"name": "_getAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17890,
"src": "2885:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 12674,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2885:11:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2876:20:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 12676,
"nodeType": "ExpressionStatement",
"src": "2876:20:12"
}
]
},
"documentation": {
"id": 12665,
"nodeType": "StructuredDocumentation",
"src": "2371:431:12",
"text": " @dev Returns the current admin.\n NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`"
},
"functionSelector": "f851a440",
"id": 12678,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 12668,
"kind": "modifierInvocation",
"modifierName": {
"id": 12667,
"name": "ifAdmin",
"nameLocations": [
"2833:7:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12664,
"src": "2833:7:12"
},
"nodeType": "ModifierInvocation",
"src": "2833:7:12"
}
],
"name": "admin",
"nameLocation": "2816:5:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 12666,
"nodeType": "ParameterList",
"parameters": [],
"src": "2821:2:12"
},
"returnParameters": {
"id": 12671,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12670,
"mutability": "mutable",
"name": "admin_",
"nameLocation": "2858:6:12",
"nodeType": "VariableDeclaration",
"scope": 12678,
"src": "2850:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12669,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2850:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2849:16:12"
},
"scope": 12771,
"src": "2807:96:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 12691,
"nodeType": "Block",
"src": "3440:52:12",
"statements": [
{
"expression": {
"id": 12689,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 12686,
"name": "implementation_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12684,
"src": "3450:15:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 12687,
"name": "_implementation",
"nodeType": "Identifier",
"overloadedDeclarations": [
16914
],
"referencedDeclaration": 16914,
"src": "3468:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 12688,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3468:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "3450:35:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 12690,
"nodeType": "ExpressionStatement",
"src": "3450:35:12"
}
]
},
"documentation": {
"id": 12679,
"nodeType": "StructuredDocumentation",
"src": "2909:449:12",
"text": " @dev Returns the current implementation.\n NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`"
},
"functionSelector": "5c60da1b",
"id": 12692,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 12682,
"kind": "modifierInvocation",
"modifierName": {
"id": 12681,
"name": "ifAdmin",
"nameLocations": [
"3398:7:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12664,
"src": "3398:7:12"
},
"nodeType": "ModifierInvocation",
"src": "3398:7:12"
}
],
"name": "implementation",
"nameLocation": "3372:14:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 12680,
"nodeType": "ParameterList",
"parameters": [],
"src": "3386:2:12"
},
"returnParameters": {
"id": 12685,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12684,
"mutability": "mutable",
"name": "implementation_",
"nameLocation": "3423:15:12",
"nodeType": "VariableDeclaration",
"scope": 12692,
"src": "3415:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12683,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3415:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "3414:25:12"
},
"scope": 12771,
"src": "3363:129:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 12704,
"nodeType": "Block",
"src": "3761:39:12",
"statements": [
{
"expression": {
"arguments": [
{
"id": 12701,
"name": "newAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12695,
"src": "3784:8:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12700,
"name": "_changeAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17933,
"src": "3771:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 12702,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "3771:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12703,
"nodeType": "ExpressionStatement",
"src": "3771:22:12"
}
]
},
"documentation": {
"id": 12693,
"nodeType": "StructuredDocumentation",
"src": "3498:194:12",
"text": " @dev Changes the admin of the proxy.\n Emits an {AdminChanged} event.\n NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}."
},
"functionSelector": "8f283970",
"id": 12705,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 12698,
"kind": "modifierInvocation",
"modifierName": {
"id": 12697,
"name": "ifAdmin",
"nameLocations": [
"3753:7:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12664,
"src": "3753:7:12"
},
"nodeType": "ModifierInvocation",
"src": "3753:7:12"
}
],
"name": "changeAdmin",
"nameLocation": "3706:11:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 12696,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12695,
"mutability": "mutable",
"name": "newAdmin",
"nameLocation": "3726:8:12",
"nodeType": "VariableDeclaration",
"scope": 12705,
"src": "3718:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12694,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3718:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "3717:18:12"
},
"returnParameters": {
"id": 12699,
"nodeType": "ParameterList",
"parameters": [],
"src": "3761:0:12"
},
"scope": 12771,
"src": "3697:103:12",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "external"
},
{
"body": {
"id": 12722,
"nodeType": "Block",
"src": "4023:71:12",
"statements": [
{
"expression": {
"arguments": [
{
"id": 12714,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12708,
"src": "4051:17:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"arguments": [
{
"hexValue": "",
"id": 12717,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4076:2:12",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
}
],
"id": 12716,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4070:5:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 12715,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4070:5:12",
"typeDescriptions": {}
}
},
"id": 12718,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4070:9:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"hexValue": "66616c7365",
"id": 12719,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4081:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 12713,
"name": "_upgradeToAndCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17813,
"src": "4033:17:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_bool_$returns$__$",
"typeString": "function (address,bytes memory,bool)"
}
},
"id": 12720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4033:54:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12721,
"nodeType": "ExpressionStatement",
"src": "4033:54:12"
}
]
},
"documentation": {
"id": 12706,
"nodeType": "StructuredDocumentation",
"src": "3806:149:12",
"text": " @dev Upgrade the implementation of the proxy.\n NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}."
},
"functionSelector": "3659cfe6",
"id": 12723,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 12711,
"kind": "modifierInvocation",
"modifierName": {
"id": 12710,
"name": "ifAdmin",
"nameLocations": [
"4015:7:12"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12664,
"src": "4015:7:12"
},
"nodeType": "ModifierInvocation",
"src": "4015:7:12"
}
],
"name": "upgradeTo",
"nameLocation": "3969:9:12",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 12709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12708,
"mutability": "mutable",
"name": "newImplementation",
"nameLocation": "3987:17:12",
"nodeType": "VariableDeclaration",
"scope": 12723,
"src": "3979:25:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12707,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3979:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "3978:27:12"
},
"returnParameters": {
"id": 12712,
"nodeType": "ParameterList",
"parameters": [],
"src": "4023:0:12"
},
"scope": 12771,
"src": "3960:134:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 12739,
"nodeType": "Block",
"src": "4569:65:12",
"statements": [
{
"expression": {
"arguments": [
{
"id": 12734,
"name": "newImplementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12726,
"src": "4597:17:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 12735,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12728,
"src": "4616:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
{
"hexValue": "74727565",
"id": 12736,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4622:4:12",