Fix token proxy update function to use provided new TST address

This commit is contained in:
stubbsta 2025-08-13 11:13:12 +02:00
parent f58a2c349f
commit fe71bed76e
No known key found for this signature in database

View File

@ -25,17 +25,12 @@ contract DeployTokenWithProxy is BaseScript {
}
contract UpdateTokenImplementation is BaseScript {
function run(address proxyAddress, address proxyAdminAddress) public broadcast returns (address newImplementation) {
// Deploy new implementation
newImplementation = address(new TestStableToken());
// Upgrade via ProxyAdmin
function run(address proxyAddress, address proxyAdminAddress, address newImplementation) public broadcast {
// Upgrade via ProxyAdmin using the provided implementation address
ProxyAdmin(proxyAdminAddress).upgradeAndCall(
ITransparentUpgradeableProxy(proxyAddress),
newImplementation,
""
);
return newImplementation;
}
}