Merge branch 'tadeohepperle/subxt-metadata-no-std' into tadeohepperle/subxt-core-2

This commit is contained in:
Tadeo hepperle
2024-02-02 09:16:06 +01:00
35 changed files with 4017 additions and 1232 deletions
File diff suppressed because one or more lines are too long
@@ -258,5 +258,5 @@ async fn build_light_client<T: Config>(proc: &SubstrateNode) -> Result<LightClie
.bootnodes([bootnode.as_str()])
.build_from_url(ws_url.as_str())
.await
.map_err(|e| format!("Failed to construct light client {}", e.to_string()))
.map_err(|e| format!("Failed to construct light client {}", e))
}
-1
View File
@@ -709,7 +709,6 @@ dependencies = [
name = "subxt-metadata"
version = "0.34.0"
dependencies = [
"cfg-if",
"derive_more",
"frame-metadata 16.0.0",
"hashbrown",
+14 -2
View File
@@ -21,7 +21,7 @@ pub struct SubstrateNodeBuilder {
impl Default for SubstrateNodeBuilder {
fn default() -> Self {
Self::new()
SubstrateNodeBuilder::new()
}
}
@@ -29,11 +29,23 @@ impl SubstrateNodeBuilder {
/// Configure a new Substrate node.
pub fn new() -> Self {
SubstrateNodeBuilder {
binary_paths: vec!["substrate-node".into(), "substrate".into()],
binary_paths: vec![],
custom_flags: Default::default(),
}
}
/// Provide "substrate-node" and "substrate" as binary paths
pub fn substrate(&mut self) -> &mut Self {
self.binary_paths = vec!["substrate-node".into(), "substrate".into()];
self
}
/// Provide "polkadot" as binary path.
pub fn polkadot(&mut self) -> &mut Self {
self.binary_paths = vec!["polkadot".into()];
self
}
/// Set the path to the `substrate` binary; defaults to "substrate-node"
/// or "substrate".
pub fn binary_paths<Paths, S>(&mut self, paths: Paths) -> &mut Self