Skip to content

Commit

Permalink
chore: remove commented code and update communities example
Browse files Browse the repository at this point in the history
  • Loading branch information
S0c5 committed May 24, 2024
1 parent b7e97a5 commit d216f62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 6 additions & 3 deletions sube/examples/pallet_communities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ use sube::{sube, ExtrinsicBody, Response, Result, SubeBuilder};
async fn main() -> Result<()> {
env_logger::init();

log::info!("getting all the keys part of the subset");
let response = sube!("ws://127.0.0.1:12281/communityMemberships/collection").await?;

// let response = sube!("ws://127.0.0.1:12281/communityMemberships/collection").await?;
if let Response::ValueSet(value) = result {
let data = serde_json::to_value(&value).expect("to be serializable");
println!("Collection {}", serde_json::to_string_pretty(&data).expect("it must return an str"));
}

let result = sube!("ws://127.0.0.1:12281/system/account/0x12840f0626ac847d41089c4e05cf0719c5698af1e3bb87b66542de70b2de4b2b").await?;
// log::info!("response {:?}", &result);

if let Response::Value(value) = result {
let data = serde_json::to_value(&value).expect("to be serializable");
println!("Account info: {}", serde_json::to_string_pretty(&data).expect("it must return an str"));
Expand Down
5 changes: 1 addition & 4 deletions sube/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,4 @@ impl<R: Rpc> Backend for R {
.expect("Block hash is not 32 bytes"),
})
}
}
// blake_128(concat)
// hash:encocoded
// hash:?
}

0 comments on commit d216f62

Please sign in to comment.