Skip to content

Commit

Permalink
Add query test for neutrond client impl
Browse files Browse the repository at this point in the history
  • Loading branch information
hu55a1n1 committed Oct 2, 2024
1 parent b1618d1 commit cc9a3e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions crates/utils/cw-client/data/admin.sk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1ac06551c79dd78dc32cc49695cb7ef919788d621a6188daf1328cc6f5f7ac9a
15 changes: 9 additions & 6 deletions crates/utils/cw-client/src/neutrond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,17 @@ mod tests {
use crate::{CwClient, NeutrondClient};

#[tokio::test]
#[ignore]
async fn test_query() -> Result<(), Box<dyn Error>> {
let cw_client =
NeutrondClient::new("../data/admin.sk".parse()?, "tcp://127.0.0.1:9090".parse()?);
let sk_file = "../data/admin.sk".parse().unwrap();
let url = "https://grpc-falcron.pion-1.ntrn.tech:80".parse().unwrap();
let contract = "neutron15ruzx9wvrupt9cffzsp6868uad2svhfym2nsgxm2skpeqr3qrd4q4uwk83"
.parse()
.unwrap();

let cw_client = NeutrondClient::new(sk_file, url);
let resp: Vec<Request> = cw_client
.query_smart(
&"wasm14fw7dghf7kvahm8qsweeqmdr3dnhz88v0cctq4hn07jffdpd9pfskmmn38".parse()?,
json!(GetRequests {}),
)
.query_smart(&contract, json!(GetRequests {}))
.await?;
println!("{resp:?}");
Ok(())
Expand Down

0 comments on commit cc9a3e0

Please sign in to comment.