Skip to content

Commit

Permalink
".git/.scripts/commands/fmt/fmt.sh"
Browse files Browse the repository at this point in the history
  • Loading branch information
command-bot committed Aug 30, 2023
1 parent c5a9c06 commit fac6f8d
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,22 @@ pub use frame_support::{
};
pub use integration_tests_common::{
constants::{
asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED,
kusama::ED as KUSAMA_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, PROOF_SIZE_THRESHOLD,
REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, AssetHubKusama,
Kusama, PenpalKusamaA, AssetHubKusamaReceiver, KusamaPallet, AssetHubKusamaPallet,
AssetHubKusamaSender, PenpalKusamaAReceiver, KusamaReceiver, KusamaSender,
PenpalKusamaAPallet, PenpalKusamaASender
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, Kusama,
KusamaPallet, KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet,
PenpalKusamaAReceiver, PenpalKusamaASender,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
prelude::{AccountId32 as AccountId32Junction, *},
v3::{Error, NetworkId::Kusama as KusamaId},
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,22 @@ pub use frame_support::{
};
pub use integration_tests_common::{
constants::{
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
polkadot::ED as POLKADOT_ED,
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubPolkadot, Polkadot, PolkadotPallet, PenpalPolkadotA, AssetHubPolkadotPallet,
AssetHubPolkadotReceiver, PolkadotSender, PolkadotReceiver, AssetHubPolkadotSender,
PenpalPolkadotAReceiver
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender,
PenpalPolkadotA, PenpalPolkadotAReceiver, Polkadot, PolkadotPallet, PolkadotReceiver,
PolkadotSender,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
prelude::{AccountId32 as AccountId32Junction, *},
v3::{Error, NetworkId::Polkadot as PolkadotId},
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,22 @@ pub use frame_support::{
};
pub use integration_tests_common::{
constants::{
asset_hub_westend::ED as ASSET_HUB_WESTEND_ED,
westend::ED as WESTEND_ED,
asset_hub_westend::ED as ASSET_HUB_WESTEND_ED, westend::ED as WESTEND_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubWestend, Westend, PenpalWestendA, AssetHubWestendReceiver,
AssetHubWestendPallet, WestendPallet, WestendSender, WestendReceiver,
AssetHubWestendSender, PenpalWestendAReceiver, PenpalWestendASender,
PenpalWestendAPallet,
AssetHubWestend, AssetHubWestendPallet, AssetHubWestendReceiver, AssetHubWestendSender,
PenpalWestendA, PenpalWestendAPallet, PenpalWestendAReceiver, PenpalWestendASender, Westend,
WestendPallet, WestendReceiver, WestendSender,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
prelude::{AccountId32 as AccountId32Junction, *},
v3::{Error, NetworkId::Westend as WestendId},
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,24 @@ pub use bp_messages::LaneId;
pub use frame_support::assert_ok;
pub use integration_tests_common::{
constants::{
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED,
kusama::ED as ROCOCO_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED, kusama::ED as ROCOCO_ED, PROOF_SIZE_THRESHOLD,
REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
Rococo, BridgeHubRococo, AssetHubWococo, RococoPallet, BridgeHubWococo,
AssetHubRococo, PenpalRococoA, AssetHubRococoReceiver,
AssetHubRococo, AssetHubRococoReceiver, AssetHubWococo, BridgeHubRococo, BridgeHubWococo,
PenpalRococoA, Rococo, RococoPallet,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
prelude::{AccountId32 as AccountId32Junction, *},
v3::{
Error,
NetworkId::{Rococo as RococoId, Wococo as WococoId},
},
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,24 @@
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

pub use codec::Encode;
pub use frame_support::{
assert_ok, sp_runtime::AccountId32,
};
pub use frame_support::{assert_ok, sp_runtime::AccountId32};
pub use integration_tests_common::{
constants::{
accounts::ALICE,
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
polkadot::ED as POLKADOT_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
accounts::ALICE, asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
polkadot::ED as POLKADOT_ED, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubPolkadot, Polkadot, AssetHubPolkadotReceiver, PenpalPolkadotA,
AssetHubPolkadotPallet, Collectives,
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, Collectives,
PenpalPolkadotA, Polkadot,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
prelude::{AccountId32 as AccountId32Junction, *},
v3::{Error, NetworkId::Polkadot as PolkadotId},
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
assert_expected_events, bx, helpers::weight_within_threshold, Chain, ParaId, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt, TestExternalities,
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

// Substrate
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_core::{sr25519, storage::Storage, Pair, Public};
use sp_runtime::{
traits::{IdentifyAccount, Verify},
BuildStorage, MultiSignature, Perbill,
};
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;

// Cumulus
use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
Expand Down
28 changes: 13 additions & 15 deletions cumulus/parachains/integration-tests/emulated/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,41 @@ pub use crate::{
};

// Substrate
use sp_core::Get;
pub use frame_support::{traits::fungibles::Inspect, assert_ok};
pub use frame_support::{assert_ok, traits::fungibles::Inspect};
pub use pallet_assets;
pub use pallet_message_queue;
use sp_core::Get;

// Cumulus
use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
LaneId, MessageKey, OutboundLaneData,
};
use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult;
pub use cumulus_pallet_dmp_queue;
pub use cumulus_pallet_parachain_system;
pub use cumulus_pallet_xcmp_queue;
pub use cumulus_primitives_core::{
relay_chain::HrmpChannelId, DmpMessageHandler, ParaId, XcmpMessageHandler,
};
use pallet_bridge_messages::{Config, Instance1, Instance2, OutboundLanes, Pallet};
pub use cumulus_primitives_core::{relay_chain::HrmpChannelId, DmpMessageHandler, ParaId, XcmpMessageHandler};
pub use parachains_common::{AccountId, Balance};
pub use xcm_emulator::{
assert_expected_events, bx,
helpers::weight_within_threshold, BridgeMessageHandler, Chain,
BridgeMessage, BridgeMessageDispatchError, TestExt, Parachain, RelayChain,
assert_expected_events, bx, helpers::weight_within_threshold, BridgeMessage,
BridgeMessageDispatchError, BridgeMessageHandler, Chain, Parachain, RelayChain, TestExt,
};
pub use cumulus_pallet_parachain_system;
pub use cumulus_pallet_dmp_queue;
pub use cumulus_pallet_xcmp_queue;

// Polkadot
pub use pallet_xcm;
pub use polkadot_runtime_parachains::{
dmp,
hrmp,
dmp, hrmp,
inclusion::{AggregateMessageOrigin, UmpQueueId},
};
pub use xcm::{
prelude::{
OriginKind, Outcome, VersionedXcm, Weight,
},
prelude::{OriginKind, Outcome, VersionedXcm, Weight},
v3::Error,
DoubleEncoded,
};
pub use pallet_xcm;

pub struct BridgeHubMessageHandler<S, T, I> {
_marker: std::marker::PhantomData<(S, T, I)>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ use frame_support::traits::OnInitialize;

// Cumulus
use xcm_emulator::{
decl_test_bridges, decl_test_networks, decl_test_parachains,
decl_test_relay_chains, decl_test_sender_receiver_accounts_parameter_types,
DefaultMessageProcessor,
decl_test_bridges, decl_test_networks, decl_test_parachains, decl_test_relay_chains,
decl_test_sender_receiver_accounts_parameter_types, DefaultMessageProcessor,
};

decl_test_relay_chains! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use parachains_common::AccountId;
use xcm::{
prelude::{
AccountId32, All, BuyExecution, DepositAsset, MultiAsset, MultiAssets, MultiLocation,
OriginKind, RefundSurplus, Transact, UnpaidExecution, VersionedXcm, Weight,
WeightLimit, WithdrawAsset, Xcm, X1,
OriginKind, RefundSurplus, Transact, UnpaidExecution, VersionedXcm, Weight, WeightLimit,
WithdrawAsset, Xcm, X1,
},
DoubleEncoded,
};
Expand Down
21 changes: 7 additions & 14 deletions cumulus/xcm/xcm-emulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,28 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

pub use codec::{Decode, Encode};
pub use lazy_static::lazy_static;
pub use log;
pub use paste;
pub use std::{
any::type_name,
collections::HashMap,
error::Error,
fmt,
marker::PhantomData,
ops::Deref,
any::type_name, collections::HashMap, error::Error, fmt, marker::PhantomData, ops::Deref,
sync::Mutex,
};
pub use codec::{Encode, Decode};

// Substrate
pub use frame_support::{
assert_ok,
sp_runtime::{traits::Header as HeaderT, AccountId32, DispatchResult},
traits::{
EnqueueMessage, Get, Hooks, OriginTrait, ProcessMessage,
ProcessMessageError, ServiceQueues,
EnqueueMessage, Get, Hooks, OriginTrait, ProcessMessage, ProcessMessageError, ServiceQueues,
},
weights::{Weight, WeightMeter},
};
pub use frame_system::{Config as SystemConfig, Pallet as SystemPallet};
pub use pallet_balances::AccountData;
pub use sp_arithmetic::traits::Bounded;
pub use sp_core::{parameter_types, sr25519, blake2_256, storage::Storage, Pair};
pub use sp_core::{blake2_256, parameter_types, sr25519, storage::Storage, Pair};
pub use sp_io::TestExternalities;
pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, fmt::Debug};
pub use sp_tracing;
Expand All @@ -54,17 +48,16 @@ pub use cumulus_primitives_core::{
};
pub use cumulus_primitives_parachain_inherent::ParachainInherentData;
pub use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
pub use pallet_message_queue::{
Config as MessageQueueConfig, Pallet as MessageQueuePallet,
};
pub use pallet_message_queue::{Config as MessageQueueConfig, Pallet as MessageQueuePallet};
pub use parachains_common::{AccountId, Balance, BlockNumber};
pub use polkadot_primitives;
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};

// Polkadot
pub use polkadot_parachain::primitives::RelayChainBlockNumber;
pub use xcm::v3::prelude::{
Ancestor, MultiAssets, MultiLocation, Parent, Parachain as ParachainJunction, WeightLimit, XcmHash, X1
Ancestor, MultiAssets, MultiLocation, Parachain as ParachainJunction, Parent, WeightLimit,
XcmHash, X1,
};
pub use xcm_executor::traits::ConvertLocation;

Expand Down

0 comments on commit fac6f8d

Please sign in to comment.