UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

599 lines 23.1 kB
{ "contractName": "Proxiable", "abi": [ { "inputs": [], "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"prague\",\"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\\guidiaz\\witnet-solidity-bridge\\contracts\\patterns\\Proxiable.sol", "ast": { "absolutePath": "project:/contracts/patterns/Proxiable.sol", "exportedSymbols": { "Proxiable": [ 45810 ] }, "id": 45811, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 45768, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:133" }, { "abstract": true, "baseContracts": [], "canonicalName": "Proxiable", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": false, "id": 45810, "linearizedBaseContracts": [ 45810 ], "name": "Proxiable", "nameLocation": "88:9:133", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 45769, "nodeType": "StructuredDocumentation", "src": "105:136:133", "text": "@dev Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)\n @dev See https://eips.ethereum.org/EIPS/eip-1822." }, "functionSelector": "52d1902d", "id": 45774, "implemented": false, "kind": "function", "modifiers": [], "name": "proxiableUUID", "nameLocation": "256:13:133", "nodeType": "FunctionDefinition", "parameters": { "id": 45770, "nodeType": "ParameterList", "parameters": [], "src": "269:2:133" }, "returnParameters": { "id": 45773, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45772, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 45774, "src": "303:7:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 45771, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "303:7:133", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "302:9:133" }, "scope": 45810, "src": "247:65:133", "stateMutability": "view", "virtual": true, "visibility": "external" }, { "canonicalName": "Proxiable.ProxiableSlot", "id": 45781, "members": [ { "constant": false, "id": 45776, "mutability": "mutable", "name": "implementation", "nameLocation": "360:14:133", "nodeType": "VariableDeclaration", "scope": 45781, "src": "352:22:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45775, "name": "address", "nodeType": "ElementaryTypeName", "src": "352:7:133", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45778, "mutability": "mutable", "name": "proxy", "nameLocation": "393:5:133", "nodeType": "VariableDeclaration", "scope": 45781, "src": "385:13:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45777, "name": "address", "nodeType": "ElementaryTypeName", "src": "385:7:133", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45780, "mutability": "mutable", "name": "codehash", "nameLocation": "417:8:133", "nodeType": "VariableDeclaration", "scope": 45781, "src": "409:16:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 45779, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "409:7:133", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "name": "ProxiableSlot", "nameLocation": "327:13:133", "nodeType": "StructDefinition", "scope": 45810, "src": "320:113:133", "visibility": "public" }, { "body": { "id": 45790, "nodeType": "Block", "src": "501:54:133", "statements": [ { "expression": { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 45786, "name": "__proxiable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45809, "src": "519:11:133", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$45781_storage_ptr_$", "typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)" } }, "id": 45787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "519:13:133", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_ProxiableSlot_$45781_storage_ptr", "typeString": "struct Proxiable.ProxiableSlot storage pointer" } }, "id": 45788, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "533:14:133", "memberName": "implementation", "nodeType": "MemberAccess", "referencedDeclaration": 45776, "src": "519:28:133", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 45785, "id": 45789, "nodeType": "Return", "src": "512:35:133" } ] }, "id": 45791, "implemented": true, "kind": "function", "modifiers": [], "name": "__implementation", "nameLocation": "450:16:133", "nodeType": "FunctionDefinition", "parameters": { "id": 45782, "nodeType": "ParameterList", "parameters": [], "src": "466:2:133" }, "returnParameters": { "id": 45785, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45784, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 45791, "src": "492:7:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45783, "name": "address", "nodeType": "ElementaryTypeName", "src": "492:7:133", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "491:9:133" }, "scope": 45810, "src": "441:114:133", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 45800, "nodeType": "Block", "src": "614:45:133", "statements": [ { "expression": { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 45796, "name": "__proxiable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45809, "src": "632:11:133", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$45781_storage_ptr_$", "typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)" } }, "id": 45797, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "632:13:133", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_ProxiableSlot_$45781_storage_ptr", "typeString": "struct Proxiable.ProxiableSlot storage pointer" } }, "id": 45798, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "646:5:133", "memberName": "proxy", "nodeType": "MemberAccess", "referencedDeclaration": 45778, "src": "632:19:133", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 45795, "id": 45799, "nodeType": "Return", "src": "625:26:133" } ] }, "id": 45801, "implemented": true, "kind": "function", "modifiers": [], "name": "__proxy", "nameLocation": "572:7:133", "nodeType": "FunctionDefinition", "parameters": { "id": 45792, "nodeType": "ParameterList", "parameters": [], "src": "579:2:133" }, "returnParameters": { "id": 45795, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45794, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 45801, "src": "605:7:133", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45793, "name": "address", "nodeType": "ElementaryTypeName", "src": "605:7:133", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "604:9:133" }, "scope": 45810, "src": "563:96:133", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 45808, "nodeType": "Block", "src": "746:217:133", "statements": [ { "AST": { "nativeSrc": "766:190:133", "nodeType": "YulBlock", "src": "766:190:133", "statements": [ { "nativeSrc": "861:84:133", "nodeType": "YulAssignment", "src": "861:84:133", "value": { "kind": "number", "nativeSrc": "879:66:133", "nodeType": "YulLiteral", "src": "879:66:133", "type": "", "value": "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" }, "variableNames": [ { "name": "proxiable.slot", "nativeSrc": "861:14:133", "nodeType": "YulIdentifier", "src": "861:14:133" } ] } ] }, "evmVersion": "prague", "externalReferences": [ { "declaration": 45805, "isOffset": false, "isSlot": true, "src": "861:14:133", "suffix": "slot", "valueSize": 1 } ], "id": 45807, "nodeType": "InlineAssembly", "src": "757:199:133" } ] }, "id": 45809, "implemented": true, "kind": "function", "modifiers": [], "name": "__proxiable", "nameLocation": "676:11:133", "nodeType": "FunctionDefinition", "parameters": { "id": 45802, "nodeType": "ParameterList", "parameters": [], "src": "687:2:133" }, "returnParameters": { "id": 45806, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45805, "mutability": "mutable", "name": "proxiable", "nameLocation": "735:9:133", "nodeType": "VariableDeclaration", "scope": 45809, "src": "713:31:133", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_ProxiableSlot_$45781_storage_ptr", "typeString": "struct Proxiable.ProxiableSlot" }, "typeName": { "id": 45804, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 45803, "name": "ProxiableSlot", "nameLocations": [ "713:13:133" ], "nodeType": "IdentifierPath", "referencedDeclaration": 45781, "src": "713:13:133" }, "referencedDeclaration": 45781, "src": "713:13:133", "typeDescriptions": { "typeIdentifier": "t_struct$_ProxiableSlot_$45781_storage_ptr", "typeString": "struct Proxiable.ProxiableSlot" } }, "visibility": "internal" } ], "src": "712:33:133" }, "scope": 45810, "src": "667:296:133", "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "scope": 45811, "src": "70:896:133", "usedErrors": [], "usedEvents": [] } ], "src": "35:933:133" }, "compiler": { "name": "solc", "version": "0.8.30+commit.73712a01.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.16", "updatedAt": "2025-10-15T14:34:46.052Z", "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 } }