mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
refactor TrustedBridgedNetworks
This commit is contained in:
@@ -153,12 +153,6 @@ match_types! {
|
||||
MultiLocation { parents: 1, interior: Here } |
|
||||
MultiLocation { parents: 1, interior: X1(Plurality { .. }) }
|
||||
};
|
||||
|
||||
// TODO:check-parameter - add new pallet and persist/manage this via governance?
|
||||
// Means, that we accept some `GlobalConsensus` from some `MultiLocation` (which is supposed to be our bridge-hub)
|
||||
pub type TrustedBridgedNetworks: impl Contains<(MultiLocation, Junction)> = {
|
||||
(MultiLocation { parents: 1, interior: X1(Parachain(1014)) }, GlobalConsensus(NetworkId::Rococo))
|
||||
};
|
||||
}
|
||||
|
||||
pub type Barrier = DenyThenTry<
|
||||
@@ -312,6 +306,20 @@ impl EnsureOriginWithArg<RuntimeOrigin, MultiLocation> for ForeignCreators {
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// TODO:check-parameter - add new pallet and persist/manage this via governance?
|
||||
// Means, that we accept some `GlobalConsensus` from some `MultiLocation` (which is supposed to be our bridge-hub)
|
||||
pub TrustedBridgedNetworks: sp_std::vec::Vec<(MultiLocation, Junction)> = sp_std::vec![
|
||||
(MultiLocation { parents: 1, interior: X1(Parachain(1014)) }, GlobalConsensus(NetworkId::Rococo))
|
||||
];
|
||||
}
|
||||
|
||||
impl Contains<(MultiLocation, Junction)> for TrustedBridgedNetworks {
|
||||
fn contains(t: &(MultiLocation, Junction)) -> bool {
|
||||
Self::get().contains(t)
|
||||
}
|
||||
}
|
||||
|
||||
pub type BridgedCallsBarrier = (
|
||||
// TODO:check-parameter - verify, if we need for production (usefull at least for testing connection in production)
|
||||
AllowExecutionForTrapFrom<Everything>,
|
||||
|
||||
Reference in New Issue
Block a user