mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Encode and estimate Rococo/Wococo/Kusama/Polkadot messages (#1322)
* encode and estimate Rococo/Wococo/Kusama/Polkadot messages * allow send-message for non-bundled chains * weight -> dispatch-weight * fmt * fix spelling
This commit is contained in:
committed by
Bastian Köcher
parent
097a28418b
commit
efa3e97210
@@ -17,7 +17,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use bp_messages::MessageNonce;
|
||||
use bp_runtime::Chain;
|
||||
use bp_runtime::{Chain, EncodedOrDecodedCall};
|
||||
use frame_support::{
|
||||
dispatch::Dispatchable,
|
||||
parameter_types,
|
||||
@@ -228,8 +228,12 @@ pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
pub type Balance = u128;
|
||||
|
||||
/// Unchecked Extrinsic type.
|
||||
pub type UncheckedExtrinsic<Call> =
|
||||
generic::UncheckedExtrinsic<AccountAddress, Call, Signature, SignedExtensions<Call>>;
|
||||
pub type UncheckedExtrinsic<Call> = generic::UncheckedExtrinsic<
|
||||
AccountAddress,
|
||||
EncodedOrDecodedCall<Call>,
|
||||
Signature,
|
||||
SignedExtensions<Call>,
|
||||
>;
|
||||
|
||||
/// Account address, used by the Polkadot-like chain.
|
||||
pub type Address = MultiAddress<AccountId, ()>;
|
||||
@@ -336,12 +340,12 @@ where
|
||||
|
||||
fn pre_dispatch(
|
||||
self,
|
||||
who: &Self::AccountId,
|
||||
call: &Self::Call,
|
||||
info: &DispatchInfoOf<Self::Call>,
|
||||
len: usize,
|
||||
_who: &Self::AccountId,
|
||||
_call: &Self::Call,
|
||||
_info: &DispatchInfoOf<Self::Call>,
|
||||
_len: usize,
|
||||
) -> Result<Self::Pre, TransactionValidityError> {
|
||||
Ok(self.validate(who, call, info, len).map(|_| ())?)
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user