Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
arunjot12 committed Jan 10, 2023
1 parent c71e872 commit 96da108
Show file tree
Hide file tree
Showing 9 changed files with 4,171 additions and 4 deletions.
210 changes: 210 additions & 0 deletions customSpec.json

Large diffs are not rendered by default.

210 changes: 210 additions & 0 deletions customSpec2.json

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions customSpecRaw.json

Large diffs are not rendered by default.

3,568 changes: 3,568 additions & 0 deletions node_01.log

Large diffs are not rendered by default.

Empty file added plain-parachain-chainspec.json
Empty file.
17 changes: 16 additions & 1 deletion runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

//! XCM configuration for Rococo.

use crate::validator_manager::_GeneratedPrefixForStorageValidatorsToAdd;

use super::{
parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall,
RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet,
Expand Down Expand Up @@ -99,11 +101,15 @@ pub type XcmRouter = (
xcm_sender::ChildParachainRouter<Runtime, XcmPallet>,
);



parameter_types! {
pub const Rococo: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(RocLocation::get()) });
pub const Statemine: MultiLocation = Parachain(1000).into();
pub const Contracts: MultiLocation = Parachain(1002).into();
pub const Encointer: MultiLocation = Parachain(1003).into();
pub const OurChain: MultiLocation = Parachain(2000).into();
pub const OurChain2: MultiLocation = Parachain(2001).into();
pub const Tick: MultiLocation = Parachain(100).into();
pub const Trick: MultiLocation = Parachain(110).into();
pub const Track: MultiLocation = Parachain(120).into();
Expand All @@ -113,6 +119,8 @@ parameter_types! {
pub const RococoForStatemine: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Statemine::get());
pub const RococoForContracts: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Contracts::get());
pub const RococoForEncointer: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Encointer::get());
pub const RococoForOurChain: (MultiAssetFilter, MultiLocation) = (Rococo::get(), OurChain::get());
pub const RococoForOurChain2: (MultiAssetFilter, MultiLocation) = (Rococo::get(), OurChain2::get());
}
pub type TrustedTeleporters = (
xcm_builder::Case<RococoForTick>,
Expand All @@ -121,12 +129,19 @@ pub type TrustedTeleporters = (
xcm_builder::Case<RococoForStatemine>,
xcm_builder::Case<RococoForContracts>,
xcm_builder::Case<RococoForEncointer>,
xcm_builder::Case<RococoForOurChain>,
xcm_builder::Case<RococoForOurChain2>,
xcm_builder::NativeAsset,
);

match_types! {
pub type OnlyParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(_)) }
};
pub type MyParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(2000)) } |
MultiLocation { parents: 0, interior: X1(Parachain(2001)) }
};
}

/// The barriers one of which must be passed for an XCM message to be executed.
Expand All @@ -136,7 +151,7 @@ pub type Barrier = (
// If the message is one that immediately attemps to pay for execution, then allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Messages coming from system parachains need not pay for execution.
AllowUnpaidExecutionFrom<IsChildSystemParachain<ParaId>>,
AllowUnpaidExecutionFrom<Everything>,
// Expected responses are OK.
AllowKnownQueryResponses<XcmPallet>,
// Subscriptions for version tracking are OK.
Expand Down
3 changes: 1 addition & 2 deletions xcm/pallet-xcm-benchmarks/src/fungible/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ parameter_types! {
));
pub const TeleConcreteFung: (MultiAssetFilter, MultiLocation) =
(Wild(AllOf { fun: WildFungible, id: Concrete(Here.into()) }), ChildTeleporter::get());
pub const RsrvConcreteFung: (MultiAssetFilter, MultiLocation) =
(Wild(AllOf { fun: WildFungible, id: Concrete(Here.into()) }), ChildTeleporter::get());
pub const RsrvConcreteFung: (MultiAssetFilter, MultiLocation) =(Wild(AllOf { fun: WildFungible, id: Concrete(Here.into()) }), ChildTeleporter::get());
}

impl xcm_balances_benchmark::Config for Test {
Expand Down
4 changes: 4 additions & 0 deletions xcm/src/v1/multilocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ impl Default for MultiLocation {
fn default() -> Self {
Self { parents: 0, interior: Junctions::Here }
}

}




/// A relative location which is constrained to be an interior location of the context.
///
/// See also `MultiLocation`.
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-builder/src/filter_asset_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use xcm::latest::{AssetId::Concrete, MultiAsset, MultiAssetFilter, MultiLocation
use xcm_executor::traits::FilterAssetLocation;

/// Accepts an asset iff it is a native asset.
pub struct NativeAsset;
pub struct NativeAsset;
impl FilterAssetLocation for NativeAsset {
fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool {
log::trace!(target: "xcm::filter_asset_location", "NativeAsset asset: {:?}, origin: {:?}", asset, origin);
Expand Down

0 comments on commit 96da108

Please sign in to comment.