mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 16:08:00 +00:00
Configurable Config and Extra types (#373)
* WIP config * WIP separate default config * Separate trait impls on client * WIP introduce new ApiConfig (to be renamed) trait * Update generated polkadot codegen * Allow configuring Config and Extra types independently * Add extra default configuration * Revert ir parsing of config attr * Add default-features = false to substrate deps * Revert "Add default-features = false to substrate deps" This reverts commit 099d20cd4cbf8000ff938d1dc090ecbc28a5e788.
This commit is contained in:
@@ -68,7 +68,7 @@ pub fn generate_calls(
|
||||
pub fn #fn_name(
|
||||
&self,
|
||||
#( #call_fn_args, )*
|
||||
) -> ::subxt::SubmittableExtrinsic<'a, T, #call_struct_name> {
|
||||
) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, #call_struct_name> {
|
||||
let call = #call_struct_name { #( #call_args, )* };
|
||||
::subxt::SubmittableExtrinsic::new(self.client, call)
|
||||
}
|
||||
@@ -82,16 +82,19 @@ pub fn generate_calls(
|
||||
use super::#types_mod_ident;
|
||||
#( #call_structs )*
|
||||
|
||||
pub struct TransactionApi<'a, T: ::subxt::Config + ::subxt::ExtrinsicExtraData<T>> {
|
||||
pub struct TransactionApi<'a, T: ::subxt::Config, E, A> {
|
||||
client: &'a ::subxt::Client<T>,
|
||||
marker: ::core::marker::PhantomData<(E, A)>,
|
||||
}
|
||||
|
||||
impl<'a, T: ::subxt::Config> TransactionApi<'a, T>
|
||||
impl<'a, T, E, A> TransactionApi<'a, T, E, A>
|
||||
where
|
||||
T: ::subxt::Config + ::subxt::ExtrinsicExtraData<T>,
|
||||
T: ::subxt::Config,
|
||||
E: ::subxt::SignedExtra<T>,
|
||||
A: ::subxt::AccountData<T>,
|
||||
{
|
||||
pub fn new(client: &'a ::subxt::Client<T>) -> Self {
|
||||
Self { client }
|
||||
Self { client, marker: ::core::marker::PhantomData }
|
||||
}
|
||||
|
||||
#( #call_fns )*
|
||||
|
||||
Reference in New Issue
Block a user