Skip to content

Commit

Permalink
Add XION netork (#383)
Browse files Browse the repository at this point in the history
* Add XION netork

* Add xion to list

* Update xion.md

---------

Co-authored-by: Kayanski <44806566+Kayanski@users.noreply.github.com>
  • Loading branch information
adairrr and Kayanski authored Apr 29, 2024
1 parent 647c096 commit e7f9875
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ Cw-orchestrator supports the following chains natively:
- Osmosis 🟥🟦🟩
- Sei 🟥🟦🟩
- Terra 🟥🟦🟩
- Rollkit 🟥
- Rollkit 🟥🟦
- Xion 🟦

Additional chains can easily be integrated by creating a new [`ChainInfo`](./packages/cw-orch-networks/src/chain_info.rs) structure. This can be done in your script directly. If you have additional time, don't hesitate to open a PR on this repository.

Expand Down
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- [Sei](./chains/sei.md)
- [Terra](./chains/terra.md)
- [Rollkit](./chains/rollkit.md)
- [XION](./chains/xion.md)

# Extras

Expand Down
20 changes: 20 additions & 0 deletions docs/src/chains/xion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# XION

XION empowers developers and brands to create frictionless Web3 experiences, with a Generalized Abstraction layer that removes technical barriers for all users.



[Visit XION's Website](https://xion.burnt.com/)

```rust,ignore
{{#include ../../../packages/cw-orch-networks/src/networks/xion.rs:xion}}
```

## 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::XION_TESTNET_1`.

## References

- [XION Documentation](https://docs.burnt.com/xion)
- [XION Discord](https://discord.com/invite/burnt)
6 changes: 5 additions & 1 deletion packages/cw-orch-networks/src/networks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod osmosis;
pub mod rollkit;
pub mod sei;
pub mod terra;
pub mod xion;

pub use archway::{ARCHWAY_1, CONSTANTINE_3};
pub use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo};
Expand All @@ -25,9 +26,10 @@ pub use migaloo::{LOCAL_MIGALOO, MIGALOO_1, NARWHAL_1};
pub use neutron::{LOCAL_NEUTRON, NEUTRON_1, PION_1};
pub use nibiru::NIBIRU_ITN_2;
pub use osmosis::{LOCAL_OSMO, OSMOSIS_1, OSMO_5};
pub use rollkit::LOCAL_ROLLKIT;
pub use rollkit::{LOCAL_ROLLKIT, ROLLKIT_TESTNET};
pub use sei::{ATLANTIC_2, LOCAL_SEI, PACIFIC_1, SEI_DEVNET_3};
pub use terra::{LOCAL_TERRA, PHOENIX_1, PISCO_1};
pub use xion::XION_TESTNET_1;
/// A helper function to retrieve a [`ChainInfo`] struct for a given chain-id.
///
/// ## Example
Expand Down Expand Up @@ -71,4 +73,6 @@ pub const SUPPORTED_NETWORKS: &[ChainInfo] = &[
SEI_DEVNET_3,
ATLANTIC_2,
PACIFIC_1,
XION_TESTNET_1,
ROLLKIT_TESTNET,
];
11 changes: 11 additions & 0 deletions packages/cw-orch-networks/src/networks/rollkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@ pub const LOCAL_ROLLKIT: ChainInfo = ChainInfo {
lcd_url: None,
fcd_url: None,
};

pub const ROLLKIT_TESTNET: ChainInfo = ChainInfo {
kind: ChainKind::Local,
chain_id: "rosm",
gas_denom: "urosm",
gas_price: 0.025,
grpc_urls: &["http://grpc.rosm.rollkit.dev:9290"],
network_info: ROLLKIT_NETWORK,
lcd_url: None,
fcd_url: None,
};
// ANCHOR_END: rollkit
21 changes: 21 additions & 0 deletions packages/cw-orch-networks/src/networks/xion.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo};

// ANCHOR: xion
pub const XION_NETWORK: NetworkInfo = NetworkInfo {
id: "xion",
pub_address_prefix: "xion",
coin_type: 118u32,
};

pub const XION_TESTNET_1: ChainInfo = ChainInfo {
kind: ChainKind::Testnet,
chain_id: "xion-testnet-1",
gas_denom: "uxion",
gas_price: 0.025,
grpc_urls: &["http://xion-testnet-grpc.polkachu.com:22390"],
network_info: XION_NETWORK,
lcd_url: None,
fcd_url: None,
};

// ANCHOR_END: xion

0 comments on commit e7f9875

Please sign in to comment.