编译器
0.8.24+commit.e11b9ed9
文件 1 的 16:Address.sol
pragma solidity ^0.8.20;
library Address {
error AddressInsufficientBalance(address account);
error AddressEmptyCode(address target);
error FailedInnerCall();
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
function _revert(bytes memory returndata) private pure {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}
文件 2 的 16:Diamond.sol
pragma solidity ^0.8.23;
import {IDiamond} from "./IDiamond.sol";
import {Proxy} from "./proxy/Proxy.sol";
import {DiamondCutBase} from "./facets/cut/DiamondCutBase.sol";
import {DiamondLoupeBase} from "./facets/loupe/DiamondLoupeBase.sol";
import {IntrospectionBase} from "./facets/introspection/IntrospectionBase.sol";
import {Initializable} from "./facets/initializable/Initializable.sol";
contract Diamond is
IDiamond,
Proxy,
DiamondCutBase,
DiamondLoupeBase,
IntrospectionBase,
Initializable
{
struct InitParams {
FacetCut[] baseFacets;
address init;
bytes initData;
}
constructor(InitParams memory initDiamondCut) initializer {
_diamondCut(
initDiamondCut.baseFacets,
initDiamondCut.init,
initDiamondCut.initData
);
}
receive() external payable {}
function _getImplementation()
internal
view
virtual
override
returns (address facet)
{
facet = _facetAddress(msg.sig);
if (facet == address(0)) revert Diamond_UnsupportedFunction();
}
}
文件 3 的 16:DiamondCutBase.sol
pragma solidity ^0.8.24;
import {IDiamondCutBase} from "contracts/src/diamond/facets/cut/IDiamondCut.sol";
import {IDiamond} from "contracts/src/diamond/IDiamond.sol";
import {DiamondCutStorage} from "./DiamondCutStorage.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
abstract contract DiamondCutBase is IDiamondCutBase {
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
function _diamondCut(
IDiamond.FacetCut[] memory facetCuts,
address init,
bytes memory initPayload
) internal {
if (facetCuts.length == 0) revert DiamondCut_InvalidFacetCutLength();
for (uint256 i; i < facetCuts.length; i++) {
IDiamond.FacetCut memory facetCut = facetCuts[i];
_validateFacetCut(facetCut);
if (facetCut.action == IDiamond.FacetCutAction.Add) {
_addFacet(facetCut.facetAddress, facetCut.functionSelectors);
} else if (facetCut.action == IDiamond.FacetCutAction.Replace) {
_replaceFacet(facetCut.facetAddress, facetCut.functionSelectors);
} else if (facetCut.action == IDiamond.FacetCutAction.Remove) {
_removeFacet(facetCut.facetAddress, facetCut.functionSelectors);
}
}
emit DiamondCut(facetCuts, init, initPayload);
_initializeDiamondCut(facetCuts, init, initPayload);
}
function _addFacet(address facet, bytes4[] memory selectors) internal {
DiamondCutStorage.Layout storage ds = DiamondCutStorage.layout();
if (!ds.facets.contains(facet)) ds.facets.add(facet);
uint256 selectorCount = selectors.length;
for (uint256 i; i < selectorCount; ) {
bytes4 selector = selectors[i];
if (selector == bytes4(0)) {
revert DiamondCut_InvalidSelector();
}
if (ds.facetBySelector[selector] != address(0)) {
revert DiamondCut_FunctionAlreadyExists(selector);
}
ds.facetBySelector[selector] = facet;
ds.selectorsByFacet[facet].add(selector);
unchecked {
i++;
}
}
}
function _removeFacet(address facet, bytes4[] memory selectors) internal {
DiamondCutStorage.Layout storage ds = DiamondCutStorage.layout();
if (facet == address(this)) revert DiamondCut_ImmutableFacet();
if (!ds.facets.contains(facet)) revert DiamondCut_InvalidFacet(facet);
for (uint256 i; i < selectors.length; i++) {
bytes4 selector = selectors[i];
if (selector == bytes4(0)) {
revert DiamondCut_InvalidSelector();
}
if (ds.facetBySelector[selector] != facet) {
revert DiamondCut_InvalidFacetRemoval(facet, selector);
}
delete ds.facetBySelector[selector];
ds.selectorsByFacet[facet].remove(selector);
}
if (ds.selectorsByFacet[facet].length() == 0) {
ds.facets.remove(facet);
}
}
function _replaceFacet(address facet, bytes4[] memory selectors) internal {
DiamondCutStorage.Layout storage ds = DiamondCutStorage.layout();
if (facet == address(this)) revert DiamondCut_ImmutableFacet();
if (!ds.facets.contains(facet)) ds.facets.add(facet);
uint256 selectorCount = selectors.length;
for (uint256 i; i < selectorCount; ) {
bytes4 selector = selectors[i];
if (selector == bytes4(0)) {
revert DiamondCut_InvalidSelector();
}
address oldFacet = ds.facetBySelector[selector];
if (oldFacet == address(this)) revert DiamondCut_ImmutableFacet();
if (oldFacet == address(0)) {
revert DiamondCut_FunctionDoesNotExist(facet);
}
if (oldFacet == facet) {
revert DiamondCut_FunctionFromSameFacetAlreadyExists(selector);
}
ds.facetBySelector[selector] = facet;
ds.selectorsByFacet[oldFacet].remove(selector);
ds.selectorsByFacet[facet].add(selector);
if (ds.selectorsByFacet[oldFacet].length() == 0) {
ds.facets.remove(oldFacet);
}
unchecked {
i++;
}
}
}
function _validateFacetCut(IDiamond.FacetCut memory facetCut) internal view {
if (facetCut.facetAddress == address(0)) {
revert DiamondCut_InvalidFacet(facetCut.facetAddress);
}
if (
facetCut.facetAddress != address(this) &&
facetCut.facetAddress.code.length == 0
) {
revert DiamondCut_InvalidFacet(facetCut.facetAddress);
}
if (facetCut.functionSelectors.length == 0) {
revert DiamondCut_InvalidFacetSelectors(facetCut.facetAddress);
}
}
function _initializeDiamondCut(
IDiamond.FacetCut[] memory,
address init,
bytes memory initPayload
) internal {
if (init == address(0)) return;
if (init.code.length == 0) {
revert DiamondCut_InvalidContract(init);
}
Address.functionDelegateCall(init, initPayload);
}
}
文件 4 的 16:DiamondCutStorage.sol
pragma solidity ^0.8.23;
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
library DiamondCutStorage {
bytes32 internal constant STORAGE_SLOT =
0xc6b63261e9313602f31108199c5a3f80ebd1f09ec3eaeb70561a2265ce2fc900;
struct Layout {
EnumerableSet.AddressSet facets;
mapping(bytes4 selector => address facet) facetBySelector;
mapping(address => EnumerableSet.Bytes32Set) selectorsByFacet;
}
function layout() internal pure returns (Layout storage ds) {
bytes32 slot = STORAGE_SLOT;
assembly {
ds.slot := slot
}
}
}
文件 5 的 16:DiamondLoupeBase.sol
pragma solidity ^0.8.23;
import {IDiamondLoupeBase} from "./IDiamondLoupe.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {DiamondCutStorage} from "../cut/DiamondCutStorage.sol";
abstract contract DiamondLoupeBase is IDiamondLoupeBase {
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
function _facetSelectors(
address facet
) internal view returns (bytes4[] memory selectors) {
EnumerableSet.Bytes32Set storage facetSelectors_ = DiamondCutStorage
.layout()
.selectorsByFacet[facet];
uint256 selectorCount = facetSelectors_.length();
selectors = new bytes4[](selectorCount);
for (uint256 i; i < selectorCount; ) {
selectors[i] = bytes4(facetSelectors_.at(i));
unchecked {
i++;
}
}
}
function _facetAddresses() internal view returns (address[] memory) {
return DiamondCutStorage.layout().facets.values();
}
function _facetAddress(
bytes4 selector
) internal view returns (address facetAddress) {
return DiamondCutStorage.layout().facetBySelector[selector];
}
function _facets() internal view returns (Facet[] memory facets) {
address[] memory facetAddresses = _facetAddresses();
uint256 facetCount = facetAddresses.length;
facets = new Facet[](facetCount);
for (uint256 i; i < facetCount; ) {
address facetAddress = facetAddresses[i];
bytes4[] memory selectors = _facetSelectors(facetAddress);
facets[i] = Facet({facet: facetAddress, selectors: selectors});
unchecked {
i++;
}
}
}
}
文件 6 的 16:EnumerableSet.sol
pragma solidity ^0.8.20;
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping(bytes32 value => uint256) _positions;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
set._positions[value] = set._values.length;
return true;
} else {
return false;
}
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
uint256 position = set._positions[value];
if (position != 0) {
uint256 valueIndex = position - 1;
uint256 lastIndex = set._values.length - 1;
if (valueIndex != lastIndex) {
bytes32 lastValue = set._values[lastIndex];
set._values[valueIndex] = lastValue;
set._positions[lastValue] = position;
}
set._values.pop();
delete set._positions[value];
return true;
} else {
return false;
}
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._positions[value] != 0;
}
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
struct Bytes32Set {
Set _inner;
}
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
assembly {
result := store
}
return result;
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}
文件 7 的 16:IDiamond.sol
pragma solidity ^0.8.23;
interface IDiamond {
error Diamond_UnsupportedFunction();
enum FacetCutAction {
Add,
Replace,
Remove
}
struct FacetCut {
address facetAddress;
FacetCutAction action;
bytes4[] functionSelectors;
}
}
文件 8 的 16:IDiamondCut.sol
pragma solidity ^0.8.23;
import {IDiamond} from "contracts/src/diamond/IDiamond.sol";
interface IDiamondCutBase {
error DiamondCut_InvalidSelector();
error DiamondCut_InvalidFacetCutLength();
error DiamondCut_FunctionAlreadyExists(bytes4 selector);
error DiamondCut_FunctionFromSameFacetAlreadyExists(bytes4 selector);
error DiamondCut_InvalidFacetRemoval(address facet, bytes4 selector);
error DiamondCut_FunctionDoesNotExist(address facet);
error DiamondCut_InvalidFacetCutAction();
error DiamondCut_InvalidFacet(address facet);
error DiamondCut_InvalidFacetSelectors(address facet);
error DiamondCut_ImmutableFacet();
error DiamondCut_InvalidContract(address init);
event DiamondCut(
IDiamond.FacetCut[] facetCuts,
address init,
bytes initPayload
);
}
interface IDiamondCut is IDiamondCutBase {
function diamondCut(
IDiamond.FacetCut[] calldata facetCuts,
address init,
bytes calldata initPayload
) external;
}
文件 9 的 16:IDiamondLoupe.sol
pragma solidity ^0.8.23;
interface IDiamondLoupeBase {
struct Facet {
address facet;
bytes4[] selectors;
}
}
interface IDiamondLoupe is IDiamondLoupeBase {
function facets() external view returns (Facet[] memory);
function facetFunctionSelectors(
address facet
) external view returns (bytes4[] memory);
function facetAddresses() external view returns (address[] memory);
function facetAddress(bytes4 selector) external view returns (address);
}
文件 10 的 16:IERC165.sol
pragma solidity ^0.8.20;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 11 的 16:IProxy.sol
pragma solidity ^0.8.23;
interface IProxy {
error Proxy__ImplementationIsNotContract();
fallback() external payable;
}
文件 12 的 16:Initializable.sol
pragma solidity >=0.8.23;
import {InitializableStorage} from "./InitializableStorage.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
error Initializable_AlreadyInitialized(uint32 version);
error Initializable_NotInInitializingState();
error Initializable_InInitializingState();
abstract contract Initializable {
event Initialized(uint32 version);
modifier initializer() {
InitializableStorage.Layout storage s = InitializableStorage.layout();
bool isTopLevelCall = !s.initializing;
if (isTopLevelCall ? s.version >= 1 : _isNotConstructor()) {
revert Initializable_AlreadyInitialized(s.version);
}
s.version = 1;
if (isTopLevelCall) {
s.initializing = true;
}
_;
if (isTopLevelCall) {
s.initializing = false;
emit Initialized(1);
}
}
modifier reinitializer(uint32 version) {
InitializableStorage.Layout storage s = InitializableStorage.layout();
if (s.initializing || s.version >= version) {
revert Initializable_AlreadyInitialized(s.version);
}
s.version = version;
s.initializing = true;
_;
s.initializing = false;
emit Initialized(version);
}
modifier onlyInitializing() {
if (!InitializableStorage.layout().initializing)
revert Initializable_NotInInitializingState();
_;
}
function _getInitializedVersion()
internal
view
virtual
returns (uint32 version)
{
version = InitializableStorage.layout().version;
}
function _nextVersion() internal view returns (uint32) {
return InitializableStorage.layout().version + 1;
}
function _disableInitializers() internal {
InitializableStorage.Layout storage s = InitializableStorage.layout();
if (s.initializing) revert Initializable_InInitializingState();
if (s.version < type(uint32).max) {
s.version = type(uint32).max;
emit Initialized(type(uint32).max);
}
}
function _isNotConstructor() private view returns (bool) {
return address(this).code.length != 0;
}
}
文件 13 的 16:InitializableStorage.sol
pragma solidity ^0.8.23;
library InitializableStorage {
bytes32 internal constant STORAGE_SLOT =
0x59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef52000;
struct Layout {
uint32 version;
bool initializing;
}
function layout() internal pure returns (Layout storage s) {
bytes32 slot = STORAGE_SLOT;
assembly {
s.slot := slot
}
}
}
文件 14 的 16:IntrospectionBase.sol
pragma solidity ^0.8.23;
import {IIntrospectionBase} from "./IERC165.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {IntrospectionStorage} from "./IntrospectionStorage.sol";
abstract contract IntrospectionBase is IIntrospectionBase {
function __IntrospectionBase_init() internal {
_addInterface(type(IERC165).interfaceId);
}
function _addInterface(bytes4 interfaceId) internal {
if (!_supportsInterface(interfaceId)) {
IntrospectionStorage.layout().supportedInterfaces[interfaceId] = true;
} else {
revert Introspection_AlreadySupported();
}
emit InterfaceAdded(interfaceId);
}
function _removeInterface(bytes4 interfaceId) internal {
if (_supportsInterface(interfaceId)) {
IntrospectionStorage.layout().supportedInterfaces[interfaceId] = false;
} else {
revert Introspection_NotSupported();
}
emit InterfaceRemoved(interfaceId);
}
function _supportsInterface(bytes4 interfaceId) internal view returns (bool) {
return
IntrospectionStorage.layout().supportedInterfaces[interfaceId] == true;
}
}
文件 15 的 16:IntrospectionStorage.sol
pragma solidity ^0.8.23;
library IntrospectionStorage {
bytes32 internal constant STORAGE_SLOT =
0x81088bbc801e045ea3e7620779ab349988f58afbdfba10dff983df3f33522b00;
struct Layout {
mapping(bytes4 => bool) supportedInterfaces;
}
function layout() internal pure returns (Layout storage ds) {
bytes32 slot = STORAGE_SLOT;
assembly {
ds.slot := slot
}
}
}
文件 16 的 16:Proxy.sol
pragma solidity ^0.8.23;
import {IProxy} from "./IProxy.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
abstract contract Proxy is IProxy {
fallback() external payable {
_fallback();
}
function _fallback() internal {
address facet = _getImplementation();
if (facet.code.length == 0) revert Proxy__ImplementationIsNotContract();
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
function _getImplementation() internal virtual returns (address);
}
{
"compilationTarget": {
"contracts/src/diamond/Diamond.sol": "Diamond"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"appendCBOR": false,
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@openzeppelin/=lib/@openzeppelin/",
":@prb/math/=lib/@prb/math/src/",
":@prb/test/=lib/@prb/test/src/",
":account-abstraction/=lib/account-abstraction/contracts/",
":base64/=lib/base64/",
":ds-test/=lib/ds-test/src/",
":forge-std/=lib/forge-std/src/",
":hardhat-deploy/=lib/hardhat-deploy/"
]
}
[{"inputs":[{"components":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamond.FacetCut[]","name":"baseFacets","type":"tuple[]"},{"internalType":"address","name":"init","type":"address"},{"internalType":"bytes","name":"initData","type":"bytes"}],"internalType":"struct Diamond.InitParams","name":"initDiamondCut","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"DiamondCut_FunctionAlreadyExists","type":"error"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"DiamondCut_FunctionDoesNotExist","type":"error"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"DiamondCut_FunctionFromSameFacetAlreadyExists","type":"error"},{"inputs":[],"name":"DiamondCut_ImmutableFacet","type":"error"},{"inputs":[{"internalType":"address","name":"init","type":"address"}],"name":"DiamondCut_InvalidContract","type":"error"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"DiamondCut_InvalidFacet","type":"error"},{"inputs":[],"name":"DiamondCut_InvalidFacetCutAction","type":"error"},{"inputs":[],"name":"DiamondCut_InvalidFacetCutLength","type":"error"},{"inputs":[{"internalType":"address","name":"facet","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"DiamondCut_InvalidFacetRemoval","type":"error"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"DiamondCut_InvalidFacetSelectors","type":"error"},{"inputs":[],"name":"DiamondCut_InvalidSelector","type":"error"},{"inputs":[],"name":"Diamond_UnsupportedFunction","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint32","name":"version","type":"uint32"}],"name":"Initializable_AlreadyInitialized","type":"error"},{"inputs":[],"name":"Proxy__ImplementationIsNotContract","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamond.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"init","type":"address"},{"indexed":false,"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"version","type":"uint32"}],"name":"Initialized","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]