Skip to content

Commit

Permalink
Bitsong works
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayanski committed Jan 27, 2025
1 parent 6a44ca9 commit 835318d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cw-orch/examples/queries/bank_query.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use anyhow::Result as AnyResult;
use cosmwasm_std::Addr;
use cw_orch::daemon::Daemon;
use cw_orch::prelude::BankQuerier;
use cw_orch::prelude::QuerierGetter;
use cw_orch::prelude::TxHandler;
use cw_orch_daemon::queriers::Bank;
pub fn main() {
dotenv::dotenv().unwrap();
env_logger::init();
// We can now create a daemon. This daemon will be used to interact with the chain.
let daemon = Daemon::builder(cw_orch::daemon::networks::LOCAL_JUNO) // chain parameter
.build()
Expand All @@ -17,7 +19,7 @@ pub fn test_queries(daemon: &Daemon) -> AnyResult<()> {
// ANCHOR: daemon_balance_query
let bank_query_client: Bank = daemon.querier();

let sender = Addr::unchecked("valid_sender_addr");
let sender = daemon.sender_addr();
let balance_result = bank_query_client.balance(&sender, None)?;
println!("Balance of {} : {:?}", sender, balance_result);

Expand Down
7 changes: 5 additions & 2 deletions packages/cw-orch-networks/src/networks/bitsong.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ pub const BITSONG_NETWORK: NetworkInfo = NetworkInfo {

pub const BITSONG_2B: ChainInfo = ChainInfo {
kind: ChainKind::Mainnet,
chain_id: "bitsong-1",
chain_id: "bitsong-2b",
gas_denom: "ubtsg",
gas_price: 0.025,
grpc_urls: &["http://bitsong-grpc.polkachu.com:16090", "http://grpc.explorebitsong.com:443"],
grpc_urls: &[
"http://bitsong-grpc.polkachu.com:16090",
"http://grpc.explorebitsong.com:443",
],
network_info: BITSONG_NETWORK,
lcd_url: None,
fcd_url: None,
Expand Down

0 comments on commit 835318d

Please sign in to comment.