From 1fae9a9961b1e497f1654ff80c8777070028cbd7 Mon Sep 17 00:00:00 2001 From: Interchain Adair <32375605+adairrr@users.noreply.github.com> Date: Tue, 8 Oct 2024 03:26:10 -0400 Subject: [PATCH] Add Cosmos Hub testnet (#505) * Add cosmos hub testnet * Cosmos to cosmos hub * Add theta link * Ensure lcd * Update to provider testnet * Added cosmos hub testnet --------- Co-authored-by: Kayanski --- CHANGELOG.md | 1 + README.md | 1 + docs/src/chains/cosmos.md | 17 ++++++++++++ docs/src/chains/index.md | 1 + .../cw-orch-networks/src/networks/cosmos.rs | 26 +++++++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 docs/src/chains/cosmos.md create mode 100644 packages/cw-orch-networks/src/networks/cosmos.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 09e5abe36..cc5ea92c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Update syn to 2.0 - Added cw-plus orchestrator interface to the repo. Pacing the way for more integrations inside this repository in the future - Add easier way to get PublicKey for `cw_orch_daemon::Wallet` +- Added Cosmos hub Testnet ### Breaking diff --git a/README.md b/README.md index 6024b0462..7eca6d946 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ Cw-orchestrator supports the following chains natively: 🟥 LocalNet, 🟦 Testnet, 🟩 Mainnet - Archway 🟦🟩 +- Cosmos Hub 🟩 - Injective 🟦🟩 - Juno 🟥🟦🟩 - Kujira 🟦 diff --git a/docs/src/chains/cosmos.md b/docs/src/chains/cosmos.md new file mode 100644 index 000000000..96b2ccfc8 --- /dev/null +++ b/docs/src/chains/cosmos.md @@ -0,0 +1,17 @@ +# Cosmos Hub + +The Cosmos Hub is the first of thousands of interconnected blockchains that will eventually comprise the Cosmos Network. The primary token of the Cosmos Hub is the ATOM, but the Hub will support many tokens in the future. + +[Cosmos Hub Website](https://cosmos.network/) + +```rust,ignore +{{#include ../../../packages/cw-orch-networks/src/networks/cosmos.rs:cosmos}} +``` + +## Usage + +See how to setup your main function in the [main function](../contracts/scripting.md#main-function) section. Update the network passed into the `Daemon` builder to be `networks::COSMOS_HUB_TESTNET`. +## References + +- [Cosmos Hub Documentation](https://hub.cosmos.network/main) +- [Cosmos Hub Discord](https://discord.gg/interchain) diff --git a/docs/src/chains/index.md b/docs/src/chains/index.md index 5a693384b..9d2d13d8c 100644 --- a/docs/src/chains/index.md +++ b/docs/src/chains/index.md @@ -3,6 +3,7 @@ cw-orchestrator currently explicitly supports the chains in this section: - [Archway](./archway.md) +- [Cosmos Hub](./cosmos.md) - [Injective](./injective.md) - [Juno](./juno.md) - [Kujira](./kujira.md) diff --git a/packages/cw-orch-networks/src/networks/cosmos.rs b/packages/cw-orch-networks/src/networks/cosmos.rs new file mode 100644 index 000000000..500009578 --- /dev/null +++ b/packages/cw-orch-networks/src/networks/cosmos.rs @@ -0,0 +1,26 @@ +use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo}; + +// ANCHOR: cosmos +pub const COSMOS_HUB_NETWORK: NetworkInfo = NetworkInfo { + chain_name: "cosmoshub", + pub_address_prefix: "cosmos", + coin_type: 118, +}; + +pub const COSMOS_HUB_TESTNET: ChainInfo = ICS_TESTNET; + +/// Cosmos Hub Testnet +/// @see https://github.com/cosmos/testnets/blob/master/interchain-security/provider/README.md +/// Use the faucet here: https://faucet.polypore.xyz +pub const ICS_TESTNET: ChainInfo = ChainInfo { + kind: ChainKind::Testnet, + chain_id: "provider", + gas_denom: "uatom", + gas_price: 0.0025, + grpc_urls: &["https://grpc-rs.cosmos.nodestake.top:443"], + network_info: COSMOS_HUB_NETWORK, + lcd_url: Some("https://api-rs.cosmos.nodestake.top:443"), + fcd_url: None, +}; + +// ANCHOR_END: cosmos