Upgradable Proxy Pattern

Looking for variations of the upgradable proxy pattern.


Apply with the Grit CLI
grit apply UpgradableProxyPattern

Simple class extending UUPSUpgradeable

BEFORE
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.13 and less than 0.9.0
pragma solidity ^0.8.9;

contract HelloWorld is UUPSUpgradeable, Another {
    string public greet = "Hello World!";

    function foo(string memory _greet) public {
        greet = foo(bar);
    }
}
AFTER
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.13 and less than 0.9.0
pragma solidity ^0.8.9;

contract HelloWorld is UUPSUpgradeable, Another {
    string public greet = "Hello World!";

    function foo(string memory _greet) public {
        greet = foo(bar);
    }
}