Appearance
Solidity API
DiamondCutFacet
Implements diamond cut functionality for upgrading diamond contracts
Inherits from IDiamondCut and ERC2771Context
constructor
solidity
constructor() publicInitializes the contract with a trusted forwarder address
Sets the trusted forwarder to address(0)
diamondCut
solidity
function diamondCut(struct IDiamondCut.FacetCut[] _diamondCut, struct IPropsInitCall.InitCall[] _initCalls) externalPerforms a diamond cut operation
Only the contract owner can call this function
Parameters
| Name | Type | Description |
|---|---|---|
| _diamondCut | struct IDiamondCut.FacetCut[] | An array of FacetCut structs containing the facet addresses and function selectors |
| _initCalls | struct IPropsInitCall.InitCall[] | An array of initialization calls to be executed after the cut |
_msgSender
solidity
function _msgSender() internal view virtual returns (address sender)Returns the sender of the current message
Overrides the ERC2771Context implementation
Return Values
| Name | Type | Description |
|---|---|---|
| sender | address | The address of the message sender |
_msgData
solidity
function _msgData() internal view virtual returns (bytes)Returns the calldata of the current message
Overrides the ERC2771Context implementation
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bytes | The calldata of the message |