diff --git a/script/DeployTokenWithProxy.s.sol b/script/DeployTokenWithProxy.s.sol index 35920b1..c5c94da 100644 --- a/script/DeployTokenWithProxy.s.sol +++ b/script/DeployTokenWithProxy.s.sol @@ -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; } } \ No newline at end of file