Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Namada #3705

Open
wants to merge 114 commits into
base: master
Choose a base branch
from

Conversation

yito88
Copy link
Contributor

@yito88 yito88 commented Nov 21, 2023

Closes: #XXX

Description

To transfer tokens between Namada and Cosmos-base chains.

  • Add Namada to ChainConfig
  • Reuse CosmosSdkConfig for generating Tendermint light clients
  • Add NamadaChain as ChainEndpoint implementation
    • See crates/relayer/src/chain/namada.rs and files under crates/relayer/src/chain/namada
    • To submit Namada transactions and query
  • Store Namada key to KeyRing

PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@yito88 yito88 marked this pull request as ready for review November 21, 2023 16:05
@romac romac changed the title Add Namada ChainEndpoint Add support for Namada Jan 18, 2024
Copy link
Contributor

@ljoss17 ljoss17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small nits for error upstreaming

.latest_block_time
.to_string()
.parse()
.unwrap())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error should be upstreamed instead of calling unwrap()

if key.to_string().ends_with("clientState") {
let client_id =
storage::client_id(&key).map_err(|e| Error::query(e.to_string()))?;
let client_id = ClientId::from_str(&client_id.to_string()).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error should be upstreamed instead of calling unwrap()

let PrefixValue { key, value: _ } = prefix_value;
match storage::consensus_height(&key) {
Ok(h) => {
let height = ICSHeight::new(h.revision_number(), h.revision_height()).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error should be upstreamed instead of calling unwrap()

Comment on lines 854 to 855
let port_id = port_id.as_ref().parse().unwrap();
let channel_id = channel_id.as_ref().parse().unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors should be upstreamed instead of calling unwrap()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants