witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
599 lines • 23 kB
JSON
{
"contractName": "Proxiable",
"abi": [
{
"inputs": [],
"name": "proxiableUUID",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"proxiableUUID()\":{\"details\":\"Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)See https://eips.ethereum.org/EIPS/eip-1822.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/patterns/Proxiable.sol\":\"Proxiable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.6.0 <0.9.0;\r\n\r\nabstract contract Proxiable {\r\n /// @dev Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)\r\n /// @dev See https://eips.ethereum.org/EIPS/eip-1822.\r\n function proxiableUUID() virtual external view returns (bytes32);\r\n\r\n struct ProxiableSlot {\r\n address implementation;\r\n address proxy;\r\n bytes32 codehash;\r\n }\r\n\r\n function __implementation() internal view returns (address) {\r\n return __proxiable().implementation;\r\n }\r\n\r\n function __proxy() internal view returns (address) {\r\n return __proxiable().proxy;\r\n }\r\n\r\n function __proxiable() internal pure returns (ProxiableSlot storage proxiable) {\r\n assembly {\r\n // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\r\n proxiable.slot := 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\r\n }\r\n }\r\n}\r\n",
"sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\patterns\\Proxiable.sol",
"ast": {
"absolutePath": "project:/contracts/patterns/Proxiable.sol",
"exportedSymbols": {
"Proxiable": [
24189
]
},
"id": 24190,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 24147,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "35:31:81"
},
{
"abstract": true,
"baseContracts": [],
"canonicalName": "Proxiable",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": false,
"id": 24189,
"linearizedBaseContracts": [
24189
],
"name": "Proxiable",
"nameLocation": "88:9:81",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 24148,
"nodeType": "StructuredDocumentation",
"src": "105:136:81",
"text": "@dev Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)\n @dev See https://eips.ethereum.org/EIPS/eip-1822."
},
"functionSelector": "52d1902d",
"id": 24153,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "proxiableUUID",
"nameLocation": "256:13:81",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24149,
"nodeType": "ParameterList",
"parameters": [],
"src": "269:2:81"
},
"returnParameters": {
"id": 24152,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24151,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24153,
"src": "303:7:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 24150,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "303:7:81",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "302:9:81"
},
"scope": 24189,
"src": "247:65:81",
"stateMutability": "view",
"virtual": true,
"visibility": "external"
},
{
"canonicalName": "Proxiable.ProxiableSlot",
"id": 24160,
"members": [
{
"constant": false,
"id": 24155,
"mutability": "mutable",
"name": "implementation",
"nameLocation": "360:14:81",
"nodeType": "VariableDeclaration",
"scope": 24160,
"src": "352:22:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24154,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "352:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 24157,
"mutability": "mutable",
"name": "proxy",
"nameLocation": "393:5:81",
"nodeType": "VariableDeclaration",
"scope": 24160,
"src": "385:13:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24156,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "385:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 24159,
"mutability": "mutable",
"name": "codehash",
"nameLocation": "417:8:81",
"nodeType": "VariableDeclaration",
"scope": 24160,
"src": "409:16:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 24158,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "409:7:81",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"name": "ProxiableSlot",
"nameLocation": "327:13:81",
"nodeType": "StructDefinition",
"scope": 24189,
"src": "320:113:81",
"visibility": "public"
},
{
"body": {
"id": 24169,
"nodeType": "Block",
"src": "501:54:81",
"statements": [
{
"expression": {
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 24165,
"name": "__proxiable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24188,
"src": "519:11:81",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$24160_storage_ptr_$",
"typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)"
}
},
"id": 24166,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "519:13:81",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_ProxiableSlot_$24160_storage_ptr",
"typeString": "struct Proxiable.ProxiableSlot storage pointer"
}
},
"id": 24167,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "533:14:81",
"memberName": "implementation",
"nodeType": "MemberAccess",
"referencedDeclaration": 24155,
"src": "519:28:81",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 24164,
"id": 24168,
"nodeType": "Return",
"src": "512:35:81"
}
]
},
"id": 24170,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "__implementation",
"nameLocation": "450:16:81",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24161,
"nodeType": "ParameterList",
"parameters": [],
"src": "466:2:81"
},
"returnParameters": {
"id": 24164,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24163,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24170,
"src": "492:7:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24162,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "492:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "491:9:81"
},
"scope": 24189,
"src": "441:114:81",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 24179,
"nodeType": "Block",
"src": "614:45:81",
"statements": [
{
"expression": {
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 24175,
"name": "__proxiable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24188,
"src": "632:11:81",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$24160_storage_ptr_$",
"typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)"
}
},
"id": 24176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "632:13:81",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_ProxiableSlot_$24160_storage_ptr",
"typeString": "struct Proxiable.ProxiableSlot storage pointer"
}
},
"id": 24177,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "646:5:81",
"memberName": "proxy",
"nodeType": "MemberAccess",
"referencedDeclaration": 24157,
"src": "632:19:81",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 24174,
"id": 24178,
"nodeType": "Return",
"src": "625:26:81"
}
]
},
"id": 24180,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "__proxy",
"nameLocation": "572:7:81",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24171,
"nodeType": "ParameterList",
"parameters": [],
"src": "579:2:81"
},
"returnParameters": {
"id": 24174,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24173,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24180,
"src": "605:7:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 24172,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "605:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "604:9:81"
},
"scope": 24189,
"src": "563:96:81",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 24187,
"nodeType": "Block",
"src": "746:217:81",
"statements": [
{
"AST": {
"nativeSrc": "766:190:81",
"nodeType": "YulBlock",
"src": "766:190:81",
"statements": [
{
"nativeSrc": "861:84:81",
"nodeType": "YulAssignment",
"src": "861:84:81",
"value": {
"kind": "number",
"nativeSrc": "879:66:81",
"nodeType": "YulLiteral",
"src": "879:66:81",
"type": "",
"value": "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
},
"variableNames": [
{
"name": "proxiable.slot",
"nativeSrc": "861:14:81",
"nodeType": "YulIdentifier",
"src": "861:14:81"
}
]
}
]
},
"evmVersion": "paris",
"externalReferences": [
{
"declaration": 24184,
"isOffset": false,
"isSlot": true,
"src": "861:14:81",
"suffix": "slot",
"valueSize": 1
}
],
"id": 24186,
"nodeType": "InlineAssembly",
"src": "757:199:81"
}
]
},
"id": 24188,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "__proxiable",
"nameLocation": "676:11:81",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24181,
"nodeType": "ParameterList",
"parameters": [],
"src": "687:2:81"
},
"returnParameters": {
"id": 24185,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24184,
"mutability": "mutable",
"name": "proxiable",
"nameLocation": "735:9:81",
"nodeType": "VariableDeclaration",
"scope": 24188,
"src": "713:31:81",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ProxiableSlot_$24160_storage_ptr",
"typeString": "struct Proxiable.ProxiableSlot"
},
"typeName": {
"id": 24183,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 24182,
"name": "ProxiableSlot",
"nameLocations": [
"713:13:81"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 24160,
"src": "713:13:81"
},
"referencedDeclaration": 24160,
"src": "713:13:81",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ProxiableSlot_$24160_storage_ptr",
"typeString": "struct Proxiable.ProxiableSlot"
}
},
"visibility": "internal"
}
],
"src": "712:33:81"
},
"scope": 24189,
"src": "667:296:81",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 24190,
"src": "70:896:81",
"usedErrors": [],
"usedEvents": []
}
],
"src": "35:933:81"
},
"compiler": {
"name": "solc",
"version": "0.8.25+commit.b61c2a91.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.16",
"updatedAt": "2024-12-05T09:36:04.714Z",
"devdoc": {
"kind": "dev",
"methods": {
"proxiableUUID()": {
"details": "Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)See https://eips.ethereum.org/EIPS/eip-1822."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}