Skip to content

Commit

Permalink
allow finschia-sdk in Hermes (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 authored Feb 15, 2024
1 parent 8a8f1eb commit 0477eb9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/relayer/src/chain/cosmos/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use ibc_proto::cosmos::base::tendermint::v1beta1::VersionInfo;
/// sum: "h1:yaD4PyOx0LnyfiWasC5egg1U76lT83GRxjJjupPo7Gk=",
/// },
/// ```
const SDK_MODULE_NAME: &str = "cosmos/cosmos-sdk";
const SDK_MODULE_NAMES: [&'static str; 2] = ["cosmos/cosmos-sdk", "Finschia/finschia-sdk"];
const IBC_GO_MODULE_NAME: &str = "cosmos/ibc-go";
const TENDERMINT_MODULE_NAME: &str = "tendermint/tendermint";
const COMET_MODULE_NAME: &str = "cometbft/cometbft";
Expand Down Expand Up @@ -141,9 +141,13 @@ fn parse_sdk_version(version_info: &VersionInfo) -> Result<semver::Version, Erro
let module = version_info
.build_deps
.iter()
.find(|&m| m.path.contains(SDK_MODULE_NAME))
.find(|&m| -> bool {
SDK_MODULE_NAMES
.iter()
.any(|sdk_module| m.path.contains(sdk_module))
})
.ok_or_else(|| {
Error::sdk_module_not_found(SDK_MODULE_NAME.to_string(), AppInfo::from(version_info))
Error::sdk_module_not_found(SDK_MODULE_NAMES.join(" OR "), AppInfo::from(version_info))
})?;

// The raw version number has a leading 'v', trim it out;
Expand Down
6 changes: 6 additions & 0 deletions scripts/remote-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

git clone https://github.com/Finschia/hermes.git
cd hermes
git checkout v1.8.0-fnsa
cargo install --bin hermes --locked --path ./crates/relayer-cli --force

0 comments on commit 0477eb9

Please sign in to comment.