From 7c45fa5c83fcecf202860a3ee3ddbcea1d306c8d Mon Sep 17 00:00:00 2001 From: stubbsta Date: Wed, 13 Aug 2025 11:59:43 +0200 Subject: [PATCH] Add Token Proxy Contract Owner as init input --- script/DeployTokenWithProxy.s.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/DeployTokenWithProxy.s.sol b/script/DeployTokenWithProxy.s.sol index 51d9848..0ade85e 100644 --- a/script/DeployTokenWithProxy.s.sol +++ b/script/DeployTokenWithProxy.s.sol @@ -17,11 +17,11 @@ contract DeployTokenWithProxy is BaseScript { // Deploy proxy admin admin = address(new ProxyAdmin()); - // Deploy the proxy with empty initialization data - proxy = address(new TransparentUpgradeableProxy(implementation, admin, "")); + // Encode the transferOwnership call as initialization data + bytes memory initData = abi.encodeWithSignature("transferOwnership(address)", broadcaster); - // Transfer ownership to the broadcaster (deployer) - TestStableToken(proxy).transferOwnership(broadcaster); + // Deploy the proxy with initialization data to set ownership + proxy = address(new TransparentUpgradeableProxy(implementation, admin, initData)); return (proxy, implementation, admin); }