Skip to main content

MarketDiamondCutFacet.sol

MarketDiamondCutFacet

onlyFactoryOrDao

modifier onlyFactoryOrDao()

Modifier to restrict access to only the factory or the DAO. Throws an OnlyAccessableByFactoryOrDao error if the caller is nether the chormatic factory contract nor the DAO.

diamondCut

function diamondCut(struct IDiamondCut.FacetCut[] _cut, address _init, bytes _calldata) external

Add/replace/remove any number of functions and optionally execute a function with delegatecall

This function can only be called by the Chromatic factory contract or the DAO.

  • Parameters:

    NameTypeDescription
    _cutstruct IDiamondCut.FacetCut[]Contains the facet addresses and function selectors
    _initaddressThe address of the contract or facet to execute _calldata
    _calldatabytesA function call, including function selector and arguments _calldata is executed with delegatecall on _init