Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bitsong Network #419

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/src/chains/bitsong.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Bitsong

BitSong is a multifunctional blockchain-based ecosystem built to empower the music industry. It unites artists, fans, distributors in an environment where music, merchandise, and fan loyalty are assets of value. BitSong’s decentralized ecosystem of services provides the global music community with a trustless marketplace for music streaming, Fan Tokens, and NFTs, powered by the BTSG token.

[Bitsongs Website](https://bitsong.io/)

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

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

- [Bitsong Documentation](https://docs.bitsong.io/)
- [Bitsong Discord](https://discord.gg/M2fJKfMHAw)
42 changes: 42 additions & 0 deletions packages/cw-orch-networks/src/networks/bitsong.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo};

// ANCHOR: bitsong
pub const BITSONG_NETWORK: NetworkInfo = NetworkInfo {
chain_name: "bitsong",
pub_address_prefix: "bitsong",
coin_type: 639u32,
};

pub const BITSONG_1: ChainInfo = ChainInfo {
kind: ChainKind::Mainnet,
chain_id: "bitsong-1",
gas_denom: "ubtsg",
gas_price: 0.025,
grpc_urls: &["http://grpc-bitsong-ia.cosmosia.notional.ventures:443"],
network_info: BITSONG_NETWORK,
lcd_url: None,
fcd_url: None,
};

pub const BOBNET: ChainInfo = ChainInfo {
kind: ChainKind::Testnet,
chain_id: "bobnet",
gas_denom: "ubtsg",
gas_price: 0.025,
grpc_urls: &["http://grpc-testnet.explorebitsong.com:443"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not available, do you have a working endpoint ?

network_info: BITSONG_NETWORK,
lcd_url: None,
fcd_url: None,
};

pub const LOCAL_BITSONG: ChainInfo = ChainInfo {
kind: ChainKind::Local,
chain_id: "localbitsong",
gas_denom: "ubtsg",
gas_price: 0.0026,
grpc_urls: &["tcp://localhost:9094"],
network_info: BITSONG_NETWORK,
lcd_url: None,
fcd_url: None,
};
// ANCHOR_END: bitsong
3 changes: 3 additions & 0 deletions packages/cw-orch-networks/src/networks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! Contains information and helpers for different blockchain networks
//! See [parse_network] to easily retrieve this static network information
pub mod archway;
pub mod bitsong;
pub mod doravota;
pub mod injective;
pub mod juno;
Expand All @@ -17,6 +18,7 @@ pub mod terra;
pub mod xion;

pub use archway::{ARCHWAY_1, CONSTANTINE_3};
pub use bitsong::{BITSONG_1, BOBNET};
pub use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo};
pub use doravota::{VOTA_ASH, VOTA_TESTNET};
pub use injective::{INJECTIVE_1, INJECTIVE_888};
Expand Down Expand Up @@ -49,6 +51,7 @@ pub fn parse_network(net_id: &str) -> Result<ChainInfo, String> {
}

pub const SUPPORTED_NETWORKS: &[ChainInfo] = &[
BOBNET,
UNI_6,
JUNO_1,
LOCAL_JUNO,
Expand Down