Skip to content

BaseFacet version is not used#

Informational

The BaseFacet has a version number and can be upgraded.

    function setBase(
        address implementation,
        bytes4[] calldata interfaceIds,
        bytes4[] calldata selectors,
        uint8 version
    ) external onlyOwner {
        _base = Base({
            implementation: implementation,
            interfaceIds: interfaceIds,
            selectors: selectors,
            version: version
        });
    }

But the version is only used to be stored in the DiamondCollection layout:

        layout._baseVersion = base.version;

So any version can be set, a new BaseFacet could have same version as previous or a lower number, for example.

Recommendation#

Make sure that an upgrade of BaseFacet has a superior version (as done for app facets).