Skip to content

Commit

Permalink
Add cosmos hub testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
adairrr committed Oct 7, 2024
1 parent ea1be9a commit fc9095b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
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 🟩
- 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_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](./cosmos.md)
- [Injective](./injective.md)
- [Juno](./juno.md)
- [Kujira](./kujira.md)
Expand Down
23 changes: 23 additions & 0 deletions packages/cw-orch-networks/src/networks/cosmos.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo};

// ANCHOR: cosmos
pub const COSMOS_NETWORK: NetworkInfo = NetworkInfo {
chain_name: "cosmoshub",
pub_address_prefix: "cosmos",
coin_type: 118,
};

pub const COSMOS_TESTNET: ChainInfo = THETA_TESTNET_001;

pub const THETA_TESTNET_001: ChainInfo = ChainInfo {
kind: ChainKind::Testnet,
chain_id: "theta-testnet-001",
gas_denom: "uatom",
gas_price: 0.0025,
grpc_urls: &["https://grpc-t.cosmos.nodestake.top:443"],
network_info: COSMOS_NETWORK,
lcd_url: None,
fcd_url: None,
};

// ANCHOR_END: cosmos

0 comments on commit fc9095b

Please sign in to comment.