Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
cargo +nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Sep 12, 2022
1 parent 1d578a3 commit e021194
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
29 changes: 17 additions & 12 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,18 +962,21 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Slots(..) |
RuntimeCall::Auctions(..) // Specifically omitting the entire XCM Pallet
),
ProxyType::Governance => matches!(
c,
RuntimeCall::Democracy(..) |
RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) |
RuntimeCall::PhragmenElection(..) |
RuntimeCall::Treasury(..) | RuntimeCall::Bounties(..) |
RuntimeCall::Tips(..) | RuntimeCall::Utility(..) |
RuntimeCall::ChildBounties(..)
),
ProxyType::Governance =>
matches!(
c,
RuntimeCall::Democracy(..) |
RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) |
RuntimeCall::PhragmenElection(..) |
RuntimeCall::Treasury(..) |
RuntimeCall::Bounties(..) |
RuntimeCall::Tips(..) | RuntimeCall::Utility(..) |
RuntimeCall::ChildBounties(..)
),
ProxyType::IdentityJudgement => matches!(
c,
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | RuntimeCall::Utility(..)
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
RuntimeCall::Utility(..)
),
ProxyType::CancelProxy => {
matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }))
Expand All @@ -983,7 +986,8 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Auctions { .. } |
RuntimeCall::Crowdloan { .. } |
RuntimeCall::Registrar { .. } |
RuntimeCall::Multisig(..) | RuntimeCall::Slots { .. }
RuntimeCall::Multisig(..) |
RuntimeCall::Slots { .. }
),
ProxyType::Society => matches!(c, RuntimeCall::Society(..)),
}
Expand Down Expand Up @@ -1421,7 +1425,8 @@ pub type SignedExtra = (
);

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Expand Down
11 changes: 7 additions & 4 deletions runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//! XCM configuration for Rococo.

use super::{
parachains_origin, AccountId, Balances, RuntimeCall, CouncilCollective, RuntimeEvent, Origin, ParaId,
Runtime, WeightToFee, XcmPallet,
parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime,
RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet,
};
use frame_support::{match_types, parameter_types, traits::Everything};
use runtime_common::{xcm_sender, ToAuthor};
Expand Down Expand Up @@ -153,8 +153,11 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = TrustedTeleporters;
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher =
WeightInfoBounds<crate::weights::xcm::RococoXcmWeight<RuntimeCall>, RuntimeCall, MaxInstructions>;
type Weigher = WeightInfoBounds<
crate::weights::xcm::RococoXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
// The weight trader piggybacks on the existing transaction-fee conversion logic.
type Trader = UsingComponents<WeightToFee, RocLocation, AccountId, Balances, ToAuthor<Runtime>>;
type ResponseHandler = XcmPallet;
Expand Down

0 comments on commit e021194

Please sign in to comment.