fix: reduce loop test igpconfig (#4005)
### Description Refactor `testIgpConfig` in `testUtils.ts` for Enhanced Readability and Maintainability by reduce loop <!-- What's included in this PR? --> ### Drive-by changes 1. **Constant Usage:** Introduced `OVERHEAD_COST` as a constant to replace the magic number `60000`, making the purpose of this value clearer and the code easier to update. 2. **Improved Readability:** By using descriptive names and constants, the function is now easier to understand at a glance, which is particularly beneficial for new contributors or during code reviews. 3. **Dynamic Configuration Logic:** Ensured that the configuration for `overhead` and `oracleConfig` is dynamically generated for each chain, excluding the current chain to simulate realistic test scenarios. <!-- Are there any minor or drive-by changes also included? --> These changes do not alter the logic but make the codebase cleaner and more maintainable. ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests --> --------- Co-authored-by: tiendn <tiendn.works@gmail.com>pull/4016/head
parent
f9bbdde764
commit
683a96257e
@ -0,0 +1,5 @@ |
|||||||
|
--- |
||||||
|
'@hyperlane-xyz/sdk': major |
||||||
|
--- |
||||||
|
|
||||||
|
Refactor testIgpConfig function for clarity and maintainability |
Loading…
Reference in new issue