witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
1,176 lines (1,175 loc) • 65.7 kB
JSON
{
"contractName": "Upgradeable",
"abi": [
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"name": "version",
"type": "uint64"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "baseAddr",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "baseCodehash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string",
"name": "versionTag",
"type": "string"
}
],
"name": "Upgraded",
"type": "event"
},
{
"inputs": [],
"name": "proxiableUUID",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "base",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "codehash",
"outputs": [
{
"internalType": "bytes32",
"name": "_codehash",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isUpgradable",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
}
],
"name": "isUpgradableFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baseAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"baseCodehash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"versionTag\",\"type\":\"string\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"base\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"codehash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_codehash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isUpgradable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"isUpgradableFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address,address,bytes32,string)\":{\"params\":{\"baseAddr\":\"The address of the new implementation contract.\",\"baseCodehash\":\"The EVM-codehash of the new implementation contract.\",\"from\":\"The address who ordered the upgrading. Namely, the WRB operator in \\\"trustable\\\" implementations.\",\"versionTag\":\"Ascii-encoded version literal with which the implementation deployer decided to tag it.\"}}},\"kind\":\"dev\",\"methods\":{\"base()\":{\"details\":\"Retrieves base contract. Differs from address(this) when called via delegate-proxy pattern.\"},\"codehash()\":{\"details\":\"Retrieves the immutable codehash of this contract, even if invoked as delegatecall.\"},\"initialize(bytes)\":{\"details\":\"Must fail when trying to upgrade to same logic contract more than once.\"},\"isUpgradable()\":{\"details\":\"Determines whether the logic of this contract is potentially upgradable.\"},\"isUpgradableFrom(address)\":{\"details\":\"Tells whether provided address could eventually upgrade the contract.\"},\"proxiableUUID()\":{\"details\":\"Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)See https://eips.ethereum.org/EIPS/eip-1822.\"},\"version()\":{\"details\":\"Retrieves human-redable named version of current implementation.\"}},\"version\":1},\"userdoc\":{\"events\":{\"Upgraded(address,address,bytes32,string)\":{\"notice\":\"Emitted every time the contract gets upgraded.\"}},\"kind\":\"user\",\"methods\":{\"initialize(bytes)\":{\"notice\":\"Re-initialize contract's storage context upon a new upgrade from a proxy. \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/patterns/Upgradeable.sol\":\"Upgradeable\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0xdb4d24ee2c087c391d587cd17adfe5b3f9d93b3110b1388c2ab6c7c0ad1dcd05\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab7b6d5b9e2b88176312967fe0f0e78f3d9a1422fa5e4b64e2440c35869b5d08\",\"dweb:/ipfs/QmXKYWWyzcLg1B2k7Sb1qkEXgLCYfXecR9wYW5obRzWP1Q\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x2d9dc2fe26180f74c11c13663647d38e259e45f95eb88f57b61d2160b0109d3e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://81233d1f98060113d9922180bb0f14f8335856fe9f339134b09335e9f678c377\",\"dweb:/ipfs/QmWh6R35SarhAn4z2wH8SU456jJSYL2FgucfTFgbHJJN4E\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]},\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]},\"project:/contracts/patterns/Upgradeable.sol\":{\"keccak256\":\"0x49d1a83abc7a9b39d224677dde65ead4b7f1104332a94c9e619854b2a6b3a89e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e6a798a953af921a5b4e24e3f78bebae97819a85c90deb12ec505952faa42814\",\"dweb:/ipfs/QmVJhv4x3MXf4aDbMC5Q259K8kZNvxSXzmy8anoow7nS7k\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\r\n\r\n/* solhint-disable var-name-mixedcase */\r\n\r\npragma solidity >=0.6.0 <0.9.0;\r\n\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\r\n\r\nimport \"./Initializable.sol\";\r\nimport \"./Proxiable.sol\";\r\n\r\nabstract contract Upgradeable is Initializable, Proxiable {\r\n\r\n address internal immutable _BASE;\r\n bytes32 internal immutable _CODEHASH;\r\n bool internal immutable _UPGRADABLE;\r\n\r\n modifier onlyDelegateCalls virtual {\r\n require(\r\n address(this) != _BASE,\r\n \"Upgradeable: not a delegate call\"\r\n );\r\n _;\r\n }\r\n\r\n /// Emitted every time the contract gets upgraded.\r\n /// @param from The address who ordered the upgrading. Namely, the WRB operator in \"trustable\" implementations.\r\n /// @param baseAddr The address of the new implementation contract.\r\n /// @param baseCodehash The EVM-codehash of the new implementation contract.\r\n /// @param versionTag Ascii-encoded version literal with which the implementation deployer decided to tag it.\r\n event Upgraded(\r\n address indexed from,\r\n address indexed baseAddr,\r\n bytes32 indexed baseCodehash,\r\n string versionTag\r\n );\r\n\r\n constructor (bool _isUpgradable) {\r\n address _base = address(this);\r\n _BASE = _base;\r\n _UPGRADABLE = _isUpgradable;\r\n }\r\n\r\n /// @dev Retrieves base contract. Differs from address(this) when called via delegate-proxy pattern.\r\n function base() virtual public view returns (address) {\r\n return _BASE;\r\n }\r\n\r\n /// @dev Retrieves the immutable codehash of this contract, even if invoked as delegatecall.\r\n function codehash() public view returns (bytes32 _codehash) {\r\n address _base = _BASE;\r\n assembly {\r\n _codehash := extcodehash(_base)\r\n }\r\n }\r\n\r\n /// @dev Determines whether the logic of this contract is potentially upgradable.\r\n function isUpgradable() public view returns (bool) {\r\n return _UPGRADABLE;\r\n }\r\n\r\n /// @dev Tells whether provided address could eventually upgrade the contract.\r\n function isUpgradableFrom(address from) virtual external view returns (bool);\r\n\r\n /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. \r\n /// @dev Must fail when trying to upgrade to same logic contract more than once.\r\n function initialize(bytes memory) virtual external;\r\n function __initializeUpgradableData(bytes memory _initData) virtual internal;\r\n\r\n /// @dev Retrieves human-redable named version of current implementation.\r\n function version() virtual public view returns (string memory); \r\n}",
"sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\patterns\\Upgradeable.sol",
"ast": {
"absolutePath": "project:/contracts/patterns/Upgradeable.sol",
"exportedSymbols": {
"ERC165": [
616
],
"IERC165": [
628
],
"Initializable": [
267
],
"Proxiable": [
45810
],
"Upgradeable": [
45930
]
},
"id": 45931,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 45815,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "79:31:135"
},
{
"absolutePath": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
"file": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
"id": 45816,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 45931,
"sourceUnit": 617,
"src": "114:64:135",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "project:/contracts/patterns/Initializable.sol",
"file": "./Initializable.sol",
"id": 45817,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 45931,
"sourceUnit": 45622,
"src": "182:29:135",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "project:/contracts/patterns/Proxiable.sol",
"file": "./Proxiable.sol",
"id": 45818,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 45931,
"sourceUnit": 45811,
"src": "213:25:135",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 45819,
"name": "Initializable",
"nameLocations": [
"275:13:135"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 267,
"src": "275:13:135"
},
"id": 45820,
"nodeType": "InheritanceSpecifier",
"src": "275:13:135"
},
{
"baseName": {
"id": 45821,
"name": "Proxiable",
"nameLocations": [
"290:9:135"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 45810,
"src": "290:9:135"
},
"id": 45822,
"nodeType": "InheritanceSpecifier",
"src": "290:9:135"
}
],
"canonicalName": "Upgradeable",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": false,
"id": 45930,
"linearizedBaseContracts": [
45930,
45810,
267
],
"name": "Upgradeable",
"nameLocation": "260:11:135",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 45824,
"mutability": "immutable",
"name": "_BASE",
"nameLocation": "336:5:135",
"nodeType": "VariableDeclaration",
"scope": 45930,
"src": "309:32:135",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45823,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "309:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45826,
"mutability": "immutable",
"name": "_CODEHASH",
"nameLocation": "375:9:135",
"nodeType": "VariableDeclaration",
"scope": 45930,
"src": "348:36:135",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 45825,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "348:7:135",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45828,
"mutability": "immutable",
"name": "_UPGRADABLE",
"nameLocation": "415:11:135",
"nodeType": "VariableDeclaration",
"scope": 45930,
"src": "391:35:135",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 45827,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "391:4:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"body": {
"id": 45841,
"nodeType": "Block",
"src": "470:135:135",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 45836,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 45833,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "511:4:135",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Upgradeable_$45930",
"typeString": "contract Upgradeable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Upgradeable_$45930",
"typeString": "contract Upgradeable"
}
],
"id": 45832,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "503:7:135",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 45831,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "503:7:135",
"typeDescriptions": {}
}
},
"id": 45834,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "503:13:135",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"id": 45835,
"name": "_BASE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45824,
"src": "520:5:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "503:22:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5570677261646561626c653a206e6f7420612064656c65676174652063616c6c",
"id": 45837,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "540:34:135",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_90e095d6d6ca6b07be08fb15eec2b1209d1399dee84122827df7649f8a4c27cb",
"typeString": "literal_string \"Upgradeable: not a delegate call\""
},
"value": "Upgradeable: not a delegate call"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_90e095d6d6ca6b07be08fb15eec2b1209d1399dee84122827df7649f8a4c27cb",
"typeString": "literal_string \"Upgradeable: not a delegate call\""
}
],
"id": 45830,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "481:7:135",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 45838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "481:104:135",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 45839,
"nodeType": "ExpressionStatement",
"src": "481:104:135"
},
{
"id": 45840,
"nodeType": "PlaceholderStatement",
"src": "596:1:135"
}
]
},
"id": 45842,
"name": "onlyDelegateCalls",
"nameLocation": "444:17:135",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 45829,
"nodeType": "ParameterList",
"parameters": [],
"src": "462:0:135"
},
"src": "435:170:135",
"virtual": true,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": {
"id": 45843,
"nodeType": "StructuredDocumentation",
"src": "613:437:135",
"text": "Emitted every time the contract gets upgraded.\n @param from The address who ordered the upgrading. Namely, the WRB operator in \"trustable\" implementations.\n @param baseAddr The address of the new implementation contract.\n @param baseCodehash The EVM-codehash of the new implementation contract.\n @param versionTag Ascii-encoded version literal with which the implementation deployer decided to tag it."
},
"eventSelector": "e73e754121f0bad1327816970101955bfffdf53d270ac509d777c25be070d7f6",
"id": 45853,
"name": "Upgraded",
"nameLocation": "1062:8:135",
"nodeType": "EventDefinition",
"parameters": {
"id": 45852,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45845,
"indexed": true,
"mutability": "mutable",
"name": "from",
"nameLocation": "1097:4:135",
"nodeType": "VariableDeclaration",
"scope": 45853,
"src": "1081:20:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45844,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1081:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45847,
"indexed": true,
"mutability": "mutable",
"name": "baseAddr",
"nameLocation": "1128:8:135",
"nodeType": "VariableDeclaration",
"scope": 45853,
"src": "1112:24:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45846,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1112:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45849,
"indexed": true,
"mutability": "mutable",
"name": "baseCodehash",
"nameLocation": "1163:12:135",
"nodeType": "VariableDeclaration",
"scope": 45853,
"src": "1147:28:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 45848,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1147:7:135",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45851,
"indexed": false,
"mutability": "mutable",
"name": "versionTag",
"nameLocation": "1194:10:135",
"nodeType": "VariableDeclaration",
"scope": 45853,
"src": "1186:18:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 45850,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1186:6:135",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1070:141:135"
},
"src": "1056:156:135"
},
{
"body": {
"id": 45873,
"nodeType": "Block",
"src": "1253:110:135",
"statements": [
{
"assignments": [
45859
],
"declarations": [
{
"constant": false,
"id": 45859,
"mutability": "mutable",
"name": "_base",
"nameLocation": "1272:5:135",
"nodeType": "VariableDeclaration",
"scope": 45873,
"src": "1264:13:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45858,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1264:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 45864,
"initialValue": {
"arguments": [
{
"id": 45862,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "1288:4:135",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Upgradeable_$45930",
"typeString": "contract Upgradeable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Upgradeable_$45930",
"typeString": "contract Upgradeable"
}
],
"id": 45861,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1280:7:135",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 45860,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1280:7:135",
"typeDescriptions": {}
}
},
"id": 45863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1280:13:135",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1264:29:135"
},
{
"expression": {
"id": 45867,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 45865,
"name": "_BASE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45824,
"src": "1304:5:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 45866,
"name": "_base",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45859,
"src": "1312:5:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1304:13:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 45868,
"nodeType": "ExpressionStatement",
"src": "1304:13:135"
},
{
"expression": {
"id": 45871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 45869,
"name": "_UPGRADABLE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45828,
"src": "1328:11:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 45870,
"name": "_isUpgradable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45855,
"src": "1342:13:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1328:27:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 45872,
"nodeType": "ExpressionStatement",
"src": "1328:27:135"
}
]
},
"id": 45874,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 45856,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45855,
"mutability": "mutable",
"name": "_isUpgradable",
"nameLocation": "1238:13:135",
"nodeType": "VariableDeclaration",
"scope": 45874,
"src": "1233:18:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 45854,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1233:4:135",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1232:20:135"
},
"returnParameters": {
"id": 45857,
"nodeType": "ParameterList",
"parameters": [],
"src": "1253:0:135"
},
"scope": 45930,
"src": "1220:143:135",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 45882,
"nodeType": "Block",
"src": "1531:31:135",
"statements": [
{
"expression": {
"id": 45880,
"name": "_BASE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45824,
"src": "1549:5:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 45879,
"id": 45881,
"nodeType": "Return",
"src": "1542:12:135"
}
]
},
"documentation": {
"id": 45875,
"nodeType": "StructuredDocumentation",
"src": "1371:100:135",
"text": "@dev Retrieves base contract. Differs from address(this) when called via delegate-proxy pattern."
},
"functionSelector": "5001f3b5",
"id": 45883,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "base",
"nameLocation": "1486:4:135",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 45876,
"nodeType": "ParameterList",
"parameters": [],
"src": "1490:2:135"
},
"returnParameters": {
"id": 45879,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45878,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 45883,
"src": "1522:7:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45877,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1522:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1521:9:135"
},
"scope": 45930,
"src": "1477:85:135",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"body": {
"id": 45894,
"nodeType": "Block",
"src": "1728:116:135",
"statements": [
{
"assignments": [
45890
],
"declarations": [
{
"constant": false,
"id": 45890,
"mutability": "mutable",
"name": "_base",
"nameLocation": "1747:5:135",
"nodeType": "VariableDeclaration",
"scope": 45894,
"src": "1739:13:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45889,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1739:7:135",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 45892,
"initialValue": {
"id": 45891,
"name": "_BASE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45824,
"src": "1755:5:135",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1739:21:135"
},
{
"AST": {
"nativeSrc": "1780:57:135",
"nodeType": "YulBlock",
"src": "1780:57:135",
"statements": [
{
"nativeSrc": "1795:31:135",
"nodeType": "YulAssignment",
"src": "1795:31:135",
"value": {
"arguments": [
{
"name": "_base",
"nativeSrc": "1820:5:135",
"nodeType": "YulIdentifier",
"src": "1820:5:135"
}
],
"functionName": {
"name": "extcodehash",
"nativeSrc": "1808:11:135",
"nodeType": "YulIdentifier",
"src": "1808:11:135"
},
"nativeSrc": "1808:18:135",
"nodeType": "YulFunctionCall",
"src": "1808:18:135"
},
"variableNames": [
{
"name": "_codehash",
"nativeSrc": "1795:9:135",
"nodeType": "YulIdentifier",
"src": "1795:9:135"
}
]
}
]
},
"evmVersion": "prague",
"externalReferences": [
{
"declaration": 45890,
"isOffset": false,
"isSlot": false,
"src": "1820:5:135",
"valueSize": 1
},
{
"declaration": 45887,
"isOffset": false,
"isSlot": false,
"src": "1795:9:135",
"valueSize": 1
}
],
"id": 45893,
"nodeType": "InlineAssembly",
"src": "1771:66:135"
}
]
},
"documentation": {
"id": 45884,
"nodeType": "StructuredDocumentation",
"src": "1570:92:135",
"text": "@dev Retrieves the immutable codehash of this contract, even if invoked as delegatecall."
},
"functionSelector": "a9e954b9",
"id": 45895,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "codehash",
"nameLocation": "1677:8:135",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 45885,
"nodeType": "ParameterList",
"parameters": [],
"src": "1685:2:135"
},
"returnParameters": {
"id": 45888,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45887,
"mutability": "mutable",
"name": "_codehash",
"nameLocation": "1717:9:135",
"nodeType": "VariableDeclaration",
"scope": 45895,
"src": "1709:17:135",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 45886,
"name": "bytes32",
"nodeType": "ElementaryTypeName",