diff --git a/README.md b/README.md index 6024b0462..026d82ebd 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ Cw-orchestrator supports the following chains natively: 🟥 LocalNet, 🟦 Testnet, 🟩 Mainnet - Archway 🟦🟩 +- Cosmos 🟩 - Injective 🟦🟩 - Juno 🟥🟦🟩 - Kujira 🟦 diff --git a/docs/src/chains/cosmos.md b/docs/src/chains/cosmos.md new file mode 100644 index 000000000..1cb07ae7a --- /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_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..dba00716a 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](./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..d9ed21da4 --- /dev/null +++ b/packages/cw-orch-networks/src/networks/cosmos.rs @@ -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