From fe71bed76e808a241868c5bb40e124e79be0ad6d Mon Sep 17 00:00:00 2001 From: stubbsta Date: Wed, 13 Aug 2025 11:13:12 +0200 Subject: [PATCH] Fix token proxy update function to use provided new TST address --- script/DeployTokenWithProxy.s.sol | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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