@@ -4,13 +4,15 @@ pragma solidity 0.8.24;
44import {Script, console} from "forge-std/Script.sol " ;
55import {HelperUtils} from "./utils/HelperUtils.s.sol " ; // Utility functions for JSON parsing and chain info
66import {HelperConfig} from "./HelperConfig.s.sol " ; // Network configuration helper
7+ import {ChainNameResolver} from "./utils/ChainNameResolver.s.sol " ; // Chain name resolution utility
78import {TokenPool} from "@chainlink/contracts-ccip/contracts/pools/TokenPool.sol " ;
89import {RateLimiter} from "@chainlink/contracts-ccip/contracts/libraries/RateLimiter.sol " ;
910
1011contract ApplyChainUpdates is Script {
1112 function run () external {
13+ ChainNameResolver resolver = new ChainNameResolver ();
1214 // Get the current chain name based on the chain ID
13- string memory chainName = getChain (block .chainid ).chainAlias ;
15+ string memory chainName = resolver. getChainNameSafe (block .chainid );
1416
1517 // Construct paths to the configuration and local pool JSON files
1618 string memory root = vm.projectRoot ();
@@ -23,7 +25,7 @@ contract ApplyChainUpdates is Script {
2325 );
2426
2527 // Get the remote chain name based on the remoteChainId
26- string memory remoteChainName = getChain (remoteChainId).chainAlias ;
28+ string memory remoteChainName = resolver. getChainNameSafe (remoteChainId);
2729 string memory remotePoolPath =
2830 string .concat (root, "/script/output/deployedTokenPool_ " , remoteChainName, ".json " );
2931 string memory remoteTokenPath = string .concat (root, "/script/output/deployedToken_ " , remoteChainName, ".json " );
0 commit comments