fallback
receive
diamondCut
Parameters
| Name | Type | Description |
|---|---|---|
| _faceCut | IDiamondStorage.FacetCut[] | |
| _init | address | The address of the contract or facet to execute _calldata |
| _calldata | bytes | A function call, including function selector and arguments _calldata is executed with delegatecall on _init |
_diamondCut
_addFunctions
Parameters
| Name | Type | Description |
|---|---|---|
| _facetAddress | address | address of the facet contract |
| _functionSelectors | bytes4[] | array of function selectors |
_replaceFunctions
Parameters
| Name | Type | Description |
|---|---|---|
| _facetAddress | address | address of the facet contract |
| _functionSelectors | bytes4[] | array of function selectors |
_removeFunctions
Parameters
| Name | Type | Description |
|---|---|---|
| _facetAddress | address | address of the facet contract |
| _functionSelectors | bytes4[] | array of function selectors |
_addFacet
Parameters
| Name | Type | Description |
|---|---|---|
| s | IDiamondStorage.DiamondStorage | diamond storage pointer |
| _facetAddress | address | address of the new facet contract |
_addFunction
Parameters
| Name | Type | Description |
|---|---|---|
| s | IDiamondStorage.DiamondStorage | diamond storage pointer |
| _selector | bytes4 | function selector |
| _selectorPosition | uint96 | position of the function selector in the facet selectors array |
| _facetAddress | address | address of the facet contract |
_removeFunction
Parameters
| Name | Type | Description |
|---|---|---|
| s | IDiamondStorage.DiamondStorage | diamond storage pointer |
| _facetAddress | address | address of the facet contract |
| _selector | bytes4 | function selector |
_initializeDiamondCut
Parameters
| Name | Type | Description |
|---|---|---|
| _init | address | address of the contract to execute _calldata |
| _calldata | bytes | function call (selector and arguments) |
_enforceHasContractCode
Parameters
| Name | Type | Description |
|---|---|---|
| _contract | address | address to check |
