@@ -9,7 +9,7 @@ import {RLCAdapter} from "../src/RLCAdapter.sol";
99import {EnvUtils} from "./UpdateEnvUtils.sol " ;
1010
1111contract Deploy is Script {
12- function run () external {
12+ function run () external returns ( address ) {
1313 vm.startBroadcast ();
1414
1515 address rlcToken = vm.envAddress ("RLC_SEPOLIA_ADDRESS " ); // RLC token address on sepolia testnet
@@ -21,15 +21,17 @@ contract Deploy is Script {
2121 console.log ("RLCAdapter implementation deployed at: " , address (rlcAdapterImplementation));
2222
2323 // Deploy the proxy contract
24- ERC1967Proxy rlcAdapterProxy = new ERC1967Proxy (
25- address (rlcAdapterImplementation),
26- abi.encodeWithSelector (rlcAdapterImplementation.initialize.selector , ownerAddress)
24+ address rlcAdapterProxy = address (
25+ new ERC1967Proxy (
26+ address (rlcAdapterImplementation),
27+ abi.encodeWithSelector (rlcAdapterImplementation.initialize.selector , ownerAddress)
28+ )
2729 );
28- console.log ("RLCAdapter proxy deployed at: " , address (rlcAdapterProxy));
29-
30+ console.log ("RLCAdapter proxy deployed at: " , rlcAdapterProxy);
3031 vm.stopBroadcast ();
3132
32- EnvUtils.updateEnvVariable ("RLC_SEPOLIA_ADAPTER_ADDRESS " , address (rlcAdapterProxy));
33+ EnvUtils.updateEnvVariable ("RLC_SEPOLIA_ADAPTER_ADDRESS " , rlcAdapterProxy);
34+ return rlcAdapterProxy;
3335 }
3436}
3537
0 commit comments