core integration into subxt, except for examples

This commit is contained in:
Tadeo hepperle
2024-02-02 16:12:15 +01:00
parent 14b21ab0df
commit 4e2d3fd9cf
38 changed files with 173 additions and 2013 deletions
+10 -1
View File
@@ -8,7 +8,7 @@ use crate::{config::Config, metadata::Metadata};
/// - metadata
#[derive(Derivative)]
#[derivative(Debug(bound = ""))]
#[derivative(Debug(bound = ""), Clone(bound = ""))]
pub struct ClientBase<C: Config> {
pub genesis_hash: C::Hash,
pub runtime_version: RuntimeVersion,
@@ -17,6 +17,15 @@ pub struct ClientBase<C: Config> {
}
impl<C: Config> ClientBase<C> {
pub fn new(genesis_hash: C::Hash, runtime_version: RuntimeVersion, metadata: Metadata) -> Self {
Self {
genesis_hash,
runtime_version,
metadata,
marker: core::marker::PhantomData,
}
}
pub fn metadata(&self) -> Metadata {
self.metadata.clone()
}