improve deps for xcm-emulator (#2925)

* improve deps for xcm-emulator

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
This commit is contained in:
Xiliang Chen
2023-07-26 01:52:55 +12:00
committed by GitHub
parent d57965464b
commit 688aa88570
3 changed files with 16 additions and 4 deletions
+14 -2
View File
@@ -28,7 +28,7 @@ pub use frame_support::{
pub use frame_system::AccountInfo;
pub use pallet_balances::AccountData;
pub use sp_arithmetic::traits::Bounded;
pub use sp_core::{storage::Storage, H256};
pub use sp_core::{storage::Storage, Pair, H256};
pub use sp_io;
pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, fmt::Debug};
pub use sp_trie::StorageProof;
@@ -43,7 +43,6 @@ pub use cumulus_primitives_core::{
};
pub use cumulus_primitives_parachain_inherent::ParachainInherentData;
pub use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
pub use cumulus_test_service::get_account_id_from_seed;
pub use pallet_message_queue;
pub use parachain_info;
pub use parachains_common::{AccountId, BlockNumber};
@@ -251,6 +250,19 @@ impl fmt::Display for BridgeMessageDispatchError {
}
}
/// Helper function to generate an account ID from seed.
pub fn get_account_id_from_seed<TPublic: sp_core::Public>(seed: &str) -> AccountId
where
sp_runtime::MultiSigner:
From<<<TPublic as sp_runtime::CryptoType>::Pair as sp_core::Pair>::Public>,
{
use sp_runtime::traits::IdentifyAccount;
let pubkey = TPublic::Pair::from_string(&format!("//{}", seed), None)
.expect("static values are valid; qed")
.public();
sp_runtime::MultiSigner::from(pubkey).into_account()
}
// Relay Chain Implementation
#[macro_export]
macro_rules! decl_test_relay_chains {