@@ -12,21 +12,13 @@ import {Utils} from "./Utils.sol";
1212contract DeployAlignedToken is Script {
1313 function run (string memory config ) public {
1414 string memory root = vm.projectRoot ();
15- string memory path = string .concat (
16- root,
17- "/script-config/config. " ,
18- config,
19- ".json "
20- );
15+ string memory path = string .concat (root, "/script-config/config. " , config, ".json " );
2116 string memory config_json = vm.readFile (path);
2217
2318 bytes32 _salt = stdJson.readBytes32 (config_json, ".salt " );
2419 address _deployer = stdJson.readAddress (config_json, ".deployer " );
2520 address _foundation = stdJson.readAddress (config_json, ".foundation " );
26- address _claimSupplier = stdJson.readAddress (
27- config_json,
28- ".claimSupplier "
29- );
21+ address _claimSupplier = stdJson.readAddress (config_json, ".claimSupplier " );
3022
3123 TransparentUpgradeableProxy _tokenProxy = deployAlignedTokenProxy (
3224 _foundation,
@@ -46,6 +38,22 @@ contract DeployAlignedToken is Script {
4638 vm.toString (_foundation)
4739 )
4840 );
41+
42+ string memory deployedAddressesJson = "deployedAddressesJson " ;
43+ string memory finalJson = vm.serializeAddress (deployedAddressesJson, "tokenProxy " , address (_tokenProxy));
44+
45+ vm.writeJson (finalJson, _getOutputPath ("deployed_token_addresses.json " ));
46+ }
47+
48+ function _getOutputPath (string memory fileName ) internal returns (string memory ) {
49+ string memory outputDir = "script-out/ " ;
50+
51+ // Create output directory if it doesn't exist
52+ if (! vm.exists (outputDir)) {
53+ vm.createDir (outputDir, true );
54+ }
55+
56+ return string .concat (outputDir, fileName);
4957 }
5058
5159 function deployAlignedTokenProxy (
0 commit comments