union icon indicating copy to clipboard operation
union copied to clipboard

refactor: merge cosmos-sdk and cosmos-sdk-union state modules into unified module

Open DeVikingMark opened this issue 7 months ago • 3 comments

Summary

Consolidates two separate state modules (cosmos-sdk and cosmos-sdk-union) into a single unified module that supports both IBC Classic and IBC Union specifications.

Changes

  • Merged modules: Combined voyager/modules/state/cosmos-sdk and voyager/modules/state/cosmos-sdk-union into single module
  • Added specification switching: Automatic detection between IBC Classic/Union based on ibc_spec_id
  • Unified configuration: Single config supporting both specs with optional ibc_host_contract_address for Union
  • Removed duplication: Eliminated duplicate code and simplified architecture
  • Updated dependencies: Combined Cargo.toml with dependencies for both specifications

Technical Details

  • SupportedIbcSpec enum handles specification switching
  • Runtime detection from StateModuleInfo.ibc_spec_id
  • Backward compatible configuration
  • Single binary replaces two separate modules

Files Changed

  • voyager/modules/state/cosmos-sdk/src/main.rs - unified implementation
  • voyager/modules/state/cosmos-sdk/Cargo.toml - merged dependencies
  • Cargo.toml - removed cosmos-sdk-union from workspace
  • Deleted: voyager/modules/state/cosmos-sdk-union/ directory

Fixes #3526

DeVikingMark avatar Jun 14 '25 19:06 DeVikingMark

@DeVikingMark is attempting to deploy a commit to the unionbuild Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 14 '25 19:06 vercel[bot]

Thanks for contributing! Can you please make the CI checks pass?

cor avatar Jun 14 '25 22:06 cor

@cor made some changes, I guess all the other ci's aren't related to my pr, isn't it?

DeVikingMark avatar Jun 15 '25 18:06 DeVikingMark

this fundamentally does not work. the referenced issue is old has been made irrelevant due to several refactors in the voyager design.

benluelo avatar Jul 01 '25 17:07 benluelo