Skip to content

Commit

Permalink
Add Cosmos Hub testnet (#505)
Browse files Browse the repository at this point in the history
* 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 <kowalski.kowalskin@gmail.com>
  • Loading branch information
adairrr and Kayanski authored Oct 8, 2024
1 parent ea1be9a commit 1fae9a9
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ Cw-orchestrator supports the following chains natively:
🟥 LocalNet, 🟦 Testnet, 🟩 Mainnet

- Archway 🟦🟩
- Cosmos Hub 🟩
- Injective 🟦🟩
- Juno 🟥🟦🟩
- Kujira 🟦
Expand Down
17 changes: 17 additions & 0 deletions docs/src/chains/cosmos.md
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions docs/src/chains/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
26 changes: 26 additions & 0 deletions packages/cw-orch-networks/src/networks/cosmos.rs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1fae9a9

Please sign in to comment.