Add ChainNameResolver #131
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Below is a summarization created by an LLM (gpt-4-turbo-2024-04-09). Be mindful of hallucinations and verify accuracy.
Why
The introduction of the
ChainNameResolverutility aims to enhance the robustness and maintainability of chain name retrieval across various scripts in the project. This change addresses the need for a consistent and error-resistant method to fetch chain names based on chain IDs, which is crucial for dynamic network configurations and reduces the risk of runtime errors due to missing or incorrect chain data.What
This PR integrates the new
ChainNameResolverutility across multiple scripts to standardize the process of obtaining chain names, ensuring more reliable and maintainable code.New Utility Integration:
ChainNameResolverutility for safe chain name resolution.ChainNameResolverin scripts to replace direct chain name fetches.Scripts Updated:
AcceptAdminRole.s.sol: UtilizeChainNameResolverfor fetching chain names.ApplyChainUpdates.s.sol: Replaced direct chain name access withChainNameResolver.ClaimAdmin.s.sol: Updated to useChainNameResolverfor chain name retrieval.DeployBurnMintTokenPool.s.sol: Chain name fetching now throughChainNameResolver.DeployLockReleaseTokenPool.s.sol: IntegratedChainNameResolverfor chain name access.DeployToken.s.sol: Modified to useChainNameResolverfor obtaining chain names.MintTokens.s.sol: Updated script to fetch chain names viaChainNameResolver.SetPool.s.sol: Chain name retrieval now done throughChainNameResolver.TransferTokens.s.sol: Updated to useChainNameResolverfor chain name fetching.New File:
ChainNameResolver.s.sol: Contains the implementation of the chain name resolution logic with safe fallback.