Skip to content

Apps can be made un-upgradable#

Low Risk

On the app facets, there is a version number which is a uint8:

    struct App {
        address implementation;
        bytes4 interfaceId;
        bytes4[] selectors;
        uint8 version;
    }

One can upgrade an app by using a superior version number:

require(
            version > _apps[name].version,
            "NiftyKitAppRegistry: Version must be greater than previous"
        );

But if the uint8 maximum value is used (255), it won't be possible to upgrade the app anymore, as new version must be greater than previous.

It could be intended behavior to provide a way to make an app un-upgradable, but in that case it's missing documentation about it.

Recommendation#

Force version incremental values or document the fact that version numbers can be skipped and that a value of 255 will prevent an app from being upgradable.