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

fix: bridging functionality for testnet #524

Merged
merged 16 commits into from
Jan 30, 2024

Conversation

dib542
Copy link
Collaborator

@dib542 dib542 commented Jan 29, 2024

This PR fixes the Bridging functionality on the Bridge page of the tesnet app (https://app.testnet.duality.xyz/bridge)

Previously this was disabled, now it is enabled to Cosmos IBC enabled chains that have a direct connection listed in teh chain-registry IBC connections list, i.e. https://github.com/cosmos/chain-registry/tree/8e26c4b8fefc59a243e5239dceaed29b88519baa/testnets/_IBC

This PR also cleans up no longer used hooks after this fix (previous hooks used to fetch all connections/channels/clientStates have been removed as they generated many requests on some testnets).

The Bridging page also checks for:

  • account denom balances on each side of transaction (already existing code)
  • chain client status (now shown to the user before the transaction)
  • account address existing on RPC endpoint that transaction will be sent

To test

  1. have Keplr wallet extension installed: https://www.keplr.app/download
  2. use https://faucet.testnet.osmosis.zone/ to get some uosmo testnet funds
  3. with the same keplr account: bridge uosmo to neutrontestnet using the deploy preview Bridge page
  4. you might have to increase the gas amount to complete the bridging action

Current state

Expired channel/client:
localhost_5173_bridge(4_3) (1)

Active channel/client:
localhost_5173_bridge(4_3) (3)

Active channel/client mid-request:
localhost_5173_bridge(4_3) (5)

dib542 added 16 commits January 27, 2024 19:15
    - the requests can generate 404 Not Found responses if there is no
      chain-registry IBC data between these chains
    - the previous logic queried every connection, channel, and client
      of an IBC chain, this was a lot of data for some real chains
    - the new logic queries only the client state as the best check of
      liveliness
    - the previous check (now a suggested default check) did not
      prevent error of a validator having incorrect account sequencing
    - the error was: Error: Account '[account_number]' does not exist
      on chain. Send some tokens there before trying to query sequence
@dib542 dib542 linked an issue Jan 30, 2024 that may be closed by this pull request
@dib542 dib542 force-pushed the 523-fix-bridging-functionality-for-testnet branch from 0a23836 to 60afa2f Compare January 30, 2024 13:23
@dib542 dib542 merged commit 1bb9f7b into main Jan 30, 2024
6 of 7 checks passed
@dib542 dib542 deleted the 523-fix-bridging-functionality-for-testnet branch January 30, 2024 13:24
dib542 pushed a commit that referenced this pull request Jan 30, 2024
## [2.0.1](v2.0.0...v2.0.1) (2024-01-30)

### Fixes

* bridging functionality for testnet ([#524](#524)) ([1bb9f7b](1bb9f7b))
@dib542
Copy link
Collaborator Author

dib542 commented Jan 30, 2024

🎉 This PR is included in version 2.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Fix Bridging functionality for testnet
1 participant