Problem. ChainProvider and CowApi take chain_id: u64, losing the type safety and display/known-chain conveniences a dedicated chain type provides.
Proposed. Adopt alloy_chains::Chain (or its ChainId alias where a plain id is genuinely wanted) across the seam traits and outward through the config/pool layer where it reduces conversions. Check whether alloy-chains is already in the dependency graph via alloy before adding it as a direct dependency.
Notes. Applies to both component/chain.rs and component/cow.rs. Raised in review feedback on the component-seam PR: #99 (comment) and #99 (comment)
Problem.
ChainProviderandCowApitakechain_id: u64, losing the type safety and display/known-chain conveniences a dedicated chain type provides.Proposed. Adopt
alloy_chains::Chain(or itsChainIdalias where a plain id is genuinely wanted) across the seam traits and outward through the config/pool layer where it reduces conversions. Check whetheralloy-chainsis already in the dependency graph via alloy before adding it as a direct dependency.Notes. Applies to both
component/chain.rsandcomponent/cow.rs. Raised in review feedback on the component-seam PR: #99 (comment) and #99 (comment)