mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Westend Mock Runtime and Client (#874)
* Copy-Pasta Call code from mock Rococo to mock Westend runtime * Update Westend client to include signing and call related code * Add missing part of license header * Move `account_info_storage_key` to `polkadot-core` crate
This commit is contained in:
committed by
Bastian Köcher
parent
c6ae74725b
commit
81d4eb9ea6
@@ -29,6 +29,8 @@ pub use bp_polkadot_core::*;
|
||||
/// Westend Chain
|
||||
pub type Westend = PolkadotLike;
|
||||
|
||||
pub type UncheckedExtrinsic = bp_polkadot_core::UncheckedExtrinsic<Call>;
|
||||
|
||||
/// Runtime version.
|
||||
pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: sp_version::create_runtime_str!("westend"),
|
||||
@@ -40,6 +42,22 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
transaction_version: 5,
|
||||
};
|
||||
|
||||
#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug, PartialEq, Eq, Clone)]
|
||||
pub enum Call {
|
||||
MockModule,
|
||||
}
|
||||
|
||||
impl sp_runtime::traits::Dispatchable for Call {
|
||||
type Origin = ();
|
||||
type Config = ();
|
||||
type Info = ();
|
||||
type PostInfo = ();
|
||||
|
||||
fn dispatch(self, _origin: Self::Origin) -> sp_runtime::DispatchResultWithInfo<Self::PostInfo> {
|
||||
unimplemented!("The Call is not expected to be dispatched.")
|
||||
}
|
||||
}
|
||||
|
||||
// We use this to get the account on Westend (target) which is derived from Rococo's (source)
|
||||
// account.
|
||||
pub fn derive_account_from_rococo_id(id: bp_runtime::SourceAccount<AccountId>) -> AccountId {
|
||||
|
||||
Reference in New Issue
Block a user