mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
feat: Mortal extrinsic construction
This commit is contained in:
@@ -64,6 +64,7 @@ pub fn call(s: Structure) -> TokenStream {
|
||||
fn #call<'a>(
|
||||
&'a self,
|
||||
signer: &'a (dyn #subxt::Signer<T> + Send + Sync),
|
||||
opts: #subxt::SignedOptions,
|
||||
#args
|
||||
) -> core::pin::Pin<Box<dyn core::future::Future<Output = Result<T::Hash, #subxt::Error>> + Send + 'a>>;
|
||||
|
||||
@@ -71,6 +72,7 @@ pub fn call(s: Structure) -> TokenStream {
|
||||
fn #call_and_watch<'a>(
|
||||
&'a self,
|
||||
signer: &'a (dyn #subxt::Signer<T> + Send + Sync),
|
||||
opts: #subxt::SignedOptions,
|
||||
#args
|
||||
) -> core::pin::Pin<Box<dyn core::future::Future<Output = Result<#subxt::ExtrinsicSuccess<T>, #subxt::Error>> + Send + 'a>>;
|
||||
}
|
||||
@@ -82,19 +84,21 @@ pub fn call(s: Structure) -> TokenStream {
|
||||
fn #call<'a>(
|
||||
&'a self,
|
||||
signer: &'a (dyn #subxt::Signer<T> + Send + Sync),
|
||||
opts: #subxt::SignedOptions,
|
||||
#args
|
||||
) -> core::pin::Pin<Box<dyn core::future::Future<Output = Result<T::Hash, #subxt::Error>> + Send + 'a>> {
|
||||
let #marker = core::marker::PhantomData::<T>;
|
||||
Box::pin(self.submit(#build_struct, signer))
|
||||
Box::pin(self.submit(#build_struct, signer, opts))
|
||||
}
|
||||
|
||||
fn #call_and_watch<'a>(
|
||||
&'a self,
|
||||
signer: &'a (dyn #subxt::Signer<T> + Send + Sync),
|
||||
opts: #subxt::SignedOptions,
|
||||
#args
|
||||
) -> core::pin::Pin<Box<dyn core::future::Future<Output = Result<#subxt::ExtrinsicSuccess<T>, #subxt::Error>> + Send + 'a>> {
|
||||
let #marker = core::marker::PhantomData::<T>;
|
||||
Box::pin(self.watch(#build_struct, signer))
|
||||
Box::pin(self.watch(#build_struct, signer, opts))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user