chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -61,7 +61,8 @@ where
|
||||
/// Fungible implementation of `OnUnbalanced` that deals with the fees by combining tip and fee and
|
||||
/// passing the result on to `ToStakingPot`.
|
||||
pub struct DealWithFees<R>(PhantomData<R>);
|
||||
impl<R> OnUnbalanced<fungible::Credit<R::AccountId, pezpallet_balances::Pezpallet<R>>> for DealWithFees<R>
|
||||
impl<R> OnUnbalanced<fungible::Credit<R::AccountId, pezpallet_balances::Pezpallet<R>>>
|
||||
for DealWithFees<R>
|
||||
where
|
||||
R: pezpallet_balances::Config + pezpallet_collator_selection::Config,
|
||||
AccountIdOf<R>: From<pezkuwi_primitives::AccountId> + Into<pezkuwi_primitives::AccountId>,
|
||||
@@ -76,7 +77,9 @@ where
|
||||
if let Some(tips) = fees_then_tips.next() {
|
||||
tips.merge_into(&mut fees);
|
||||
}
|
||||
ResolveTo::<StakingPotAccountId<R>, pezpallet_balances::Pezpallet<R>>::on_unbalanced(fees)
|
||||
ResolveTo::<StakingPotAccountId<R>, pezpallet_balances::Pezpallet<R>>::on_unbalanced(
|
||||
fees,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +87,8 @@ where
|
||||
/// A `HandleCredit` implementation that naively transfers the fees to the block author.
|
||||
/// Will drop and burn the assets in case the transfer fails.
|
||||
pub struct AssetsToBlockAuthor<R, I>(PhantomData<(R, I)>);
|
||||
impl<R, I> HandleCredit<AccountIdOf<R>, pezpallet_assets::Pezpallet<R, I>> for AssetsToBlockAuthor<R, I>
|
||||
impl<R, I> HandleCredit<AccountIdOf<R>, pezpallet_assets::Pezpallet<R, I>>
|
||||
for AssetsToBlockAuthor<R, I>
|
||||
where
|
||||
I: 'static,
|
||||
R: pezpallet_authorship::Config + pezpallet_assets::Config<I>,
|
||||
@@ -135,8 +139,9 @@ impl<T: Get<Location>> ContainsPair<Asset, Location> for AssetsFrom<T> {
|
||||
}
|
||||
|
||||
/// Type alias to conveniently refer to the `Currency::Balance` associated type.
|
||||
pub type BalanceOf<T> =
|
||||
<pezpallet_balances::Pezpallet<T> as Currency<<T as pezframe_system::Config>::AccountId>>::Balance;
|
||||
pub type BalanceOf<T> = <pezpallet_balances::Pezpallet<T> as Currency<
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
>>::Balance;
|
||||
|
||||
/// Implements `OnUnbalanced::on_unbalanced` to teleport slashed assets to relay chain treasury
|
||||
/// account.
|
||||
@@ -201,8 +206,8 @@ mod tests {
|
||||
PalletId,
|
||||
};
|
||||
use pezframe_system::{limits, EnsureRoot};
|
||||
use pezpallet_collator_selection::IdentityCollator;
|
||||
use pezkuwi_primitives::AccountId;
|
||||
use pezpallet_collator_selection::IdentityCollator;
|
||||
use pezsp_core::H256;
|
||||
use pezsp_runtime::{
|
||||
traits::{BlakeTwo256, IdentityLookup},
|
||||
|
||||
@@ -59,7 +59,7 @@ where
|
||||
) -> Result<
|
||||
<pezpallet_assets::Pezpallet<Runtime, AssetInstance> as Inspect<AccountIdOf<Runtime>>>::Balance,
|
||||
XcmError,
|
||||
> {
|
||||
>{
|
||||
let amount = WeightToFee::weight_to_fee(&weight);
|
||||
// If the amount gotten is not at least the ED, then make it be the ED of the asset
|
||||
// This is to avoid burning assets and decreasing the supply
|
||||
|
||||
+1
-1
@@ -17,10 +17,10 @@
|
||||
use pezsp_core::storage::Storage;
|
||||
|
||||
// Pezcumulus
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
|
||||
};
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use teyrchains_common::Balance;
|
||||
|
||||
pub const PARA_ID: u32 = 1004;
|
||||
|
||||
+1
-1
@@ -17,10 +17,10 @@
|
||||
use pezsp_core::storage::Storage;
|
||||
|
||||
// Pezcumulus
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
|
||||
};
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use teyrchains_common::Balance;
|
||||
|
||||
pub const PARA_ID: u32 = 1004;
|
||||
|
||||
+14
-13
@@ -49,8 +49,8 @@ pub fn genesis() -> Storage {
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
pezbridge_hub_pezkuwichain_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
@@ -69,17 +69,18 @@ pub fn genesis() -> Storage {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
xcm_over_bridge_hub_zagros: pezbridge_hub_pezkuwichain_runtime::XcmOverBridgeHubZagrosConfig {
|
||||
opened_bridges: vec![
|
||||
// open AHR -> AHW bridge
|
||||
(
|
||||
Location::new(1, [Teyrchain(1000)]),
|
||||
Junctions::from([ByGenesis(ZAGROS_GENESIS_HASH).into(), Teyrchain(1000)]),
|
||||
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
|
||||
),
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
xcm_over_bridge_hub_zagros:
|
||||
pezbridge_hub_pezkuwichain_runtime::XcmOverBridgeHubZagrosConfig {
|
||||
opened_bridges: vec![
|
||||
// open AHR -> AHW bridge
|
||||
(
|
||||
Location::new(1, [Teyrchain(1000)]),
|
||||
Junctions::from([ByGenesis(ZAGROS_GENESIS_HASH).into(), Teyrchain(1000)]),
|
||||
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
|
||||
),
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
ethereum_system: pezbridge_hub_pezkuwichain_runtime::EthereumSystemConfig {
|
||||
para_id: PARA_ID.into(),
|
||||
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
|
||||
|
||||
+12
-10
@@ -49,8 +49,8 @@ pub fn genesis() -> Storage {
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
pezbridge_hub_zagros_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
@@ -61,14 +61,16 @@ pub fn genesis() -> Storage {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_grandpa: pezbridge_hub_zagros_runtime::BridgePezkuwichainGrandpaConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_messages: pezbridge_hub_zagros_runtime::BridgePezkuwichainMessagesConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_grandpa:
|
||||
pezbridge_hub_zagros_runtime::BridgePezkuwichainGrandpaConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_messages:
|
||||
pezbridge_hub_zagros_runtime::BridgePezkuwichainMessagesConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
xcm_over_bridge_hub_pezkuwichain:
|
||||
pezbridge_hub_zagros_runtime::XcmOverBridgeHubPezkuwichainConfig {
|
||||
opened_bridges: vec![
|
||||
|
||||
+5
-3
@@ -22,7 +22,9 @@ use pezsp_keyring::Sr25519Keyring as Keyring;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
|
||||
};
|
||||
use pez_penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub};
|
||||
use pez_penpal_runtime::xcm_config::{
|
||||
LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub,
|
||||
};
|
||||
use teyrchains_common::{AccountId, Balance};
|
||||
// Penpal
|
||||
pub const PARA_ID_A: u32 = 2000;
|
||||
@@ -56,8 +58,8 @@ pub fn genesis(para_id: u32) -> Storage {
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
pez_penpal_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
|
||||
@@ -65,7 +65,9 @@ use bp_messages::{
|
||||
MessageKey, OutboundLaneData,
|
||||
};
|
||||
pub use bp_xcm_bridge_hub::XcmBridgeHubCall;
|
||||
use pezpallet_bridge_messages::{Config as BridgeMessagesConfig, LaneIdOf, OutboundLanes, Pezpallet};
|
||||
use pezpallet_bridge_messages::{
|
||||
Config as BridgeMessagesConfig, LaneIdOf, OutboundLanes, Pezpallet,
|
||||
};
|
||||
pub use pezpallet_bridge_messages::{
|
||||
Instance1 as BridgeMessagesInstance1, Instance2 as BridgeMessagesInstance2,
|
||||
Instance3 as BridgeMessagesInstance3,
|
||||
@@ -112,9 +114,10 @@ where
|
||||
OutboundLanes::<S, SI>::get(lane).unwrap().latest_received_nonce;
|
||||
|
||||
(latest_received_nonce + 1..=latest_generated_nonce).for_each(|nonce| {
|
||||
let encoded_payload: Vec<u8> = Pezpallet::<S, SI>::outbound_message_data(lane, nonce)
|
||||
.expect("Bridge message does not exist")
|
||||
.into();
|
||||
let encoded_payload: Vec<u8> =
|
||||
Pezpallet::<S, SI>::outbound_message_data(lane, nonce)
|
||||
.expect("Bridge message does not exist")
|
||||
.into();
|
||||
let payload = Vec::<u8>::decode(&mut &encoded_payload[..])
|
||||
.expect("Decoding XCM message failed");
|
||||
let message = BridgeMessage { lane_id: LaneIdWrapper(lane).into(), nonce, payload };
|
||||
|
||||
+4
-4
@@ -14,17 +14,17 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub use asset_hub_pezkuwichain_emulated_chain;
|
||||
pub use pezbridge_hub_pezkuwichain_emulated_chain;
|
||||
pub use coretime_pezkuwichain_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use people_pezkuwichain_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use pezbridge_hub_pezkuwichain_emulated_chain;
|
||||
pub use pezkuwichain_emulated_chain;
|
||||
|
||||
use asset_hub_pezkuwichain_emulated_chain::AssetHubPezkuwichain;
|
||||
use pezbridge_hub_pezkuwichain_emulated_chain::BridgeHubPezkuwichain;
|
||||
use coretime_pezkuwichain_emulated_chain::CoretimePezkuwichain;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use people_pezkuwichain_emulated_chain::PeoplePezkuwichain;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use pezbridge_hub_pezkuwichain_emulated_chain::BridgeHubPezkuwichain;
|
||||
use pezkuwichain_emulated_chain::Pezkuwichain;
|
||||
|
||||
// Pezcumulus
|
||||
|
||||
+2
-2
@@ -15,17 +15,17 @@
|
||||
|
||||
pub use asset_hub_pezkuwichain_emulated_chain;
|
||||
pub use asset_hub_zagros_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use pezbridge_hub_pezkuwichain_emulated_chain;
|
||||
pub use pezbridge_hub_zagros_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use pezkuwichain_emulated_chain;
|
||||
pub use zagros_emulated_chain;
|
||||
|
||||
use asset_hub_pezkuwichain_emulated_chain::AssetHubPezkuwichain;
|
||||
use asset_hub_zagros_emulated_chain::AssetHubZagros;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use pezbridge_hub_pezkuwichain_emulated_chain::BridgeHubPezkuwichain;
|
||||
use pezbridge_hub_zagros_emulated_chain::BridgeHubZagros;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use pezkuwichain_emulated_chain::Pezkuwichain;
|
||||
use zagros_emulated_chain::Zagros;
|
||||
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub use asset_hub_zagros_emulated_chain;
|
||||
pub use pezbridge_hub_zagros_emulated_chain;
|
||||
pub use collectives_zagros_emulated_chain;
|
||||
pub use coretime_zagros_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use people_zagros_emulated_chain;
|
||||
pub use pez_penpal_emulated_chain;
|
||||
pub use pezbridge_hub_zagros_emulated_chain;
|
||||
pub use zagros_emulated_chain;
|
||||
|
||||
use asset_hub_zagros_emulated_chain::AssetHubZagros;
|
||||
use pezbridge_hub_zagros_emulated_chain::BridgeHubZagros;
|
||||
use collectives_zagros_emulated_chain::CollectivesZagros;
|
||||
use coretime_zagros_emulated_chain::CoretimeZagros;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use people_zagros_emulated_chain::PeopleZagros;
|
||||
use pez_penpal_emulated_chain::{PenpalA, PenpalB};
|
||||
use pezbridge_hub_zagros_emulated_chain::BridgeHubZagros;
|
||||
use zagros_emulated_chain::Zagros;
|
||||
|
||||
// Pezcumulus
|
||||
|
||||
+3
-3
@@ -39,13 +39,13 @@ mod imports {
|
||||
test_relay_is_trusted_teleporter, test_teyrchain_is_trusted_teleporter,
|
||||
test_teyrchain_is_trusted_teleporter_for_relay,
|
||||
test_xcm_fee_querying_apis_work_for_asset_hub,
|
||||
xcm_helpers::{
|
||||
fee_asset, get_amount_from_versioned_assets, non_fee_asset, xcm_transact_paid_execution,
|
||||
},
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, Test, TestArgs, TestContext,
|
||||
TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_helpers::{
|
||||
fee_asset, get_amount_from_versioned_assets, non_fee_asset, xcm_transact_paid_execution,
|
||||
},
|
||||
PenpalATeleportableAssetLocation, ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, XCM_V3,
|
||||
};
|
||||
pub(crate) use pezkuwichain_system_emulated_network::{
|
||||
|
||||
+10
-9
@@ -113,15 +113,16 @@ fn spend_roc_on_asset_hub() {
|
||||
let asset_hub_location: Location = [Teyrchain(1000)].into();
|
||||
let native_asset = Location::parent();
|
||||
|
||||
let treasury_spend_call = RuntimeCall::Treasury(pezpallet_treasury::Call::<Runtime>::spend {
|
||||
asset_kind: bx!(VersionedLocatableAsset::from((
|
||||
asset_hub_location.clone(),
|
||||
native_asset.into()
|
||||
))),
|
||||
amount: treasury_spend_balance,
|
||||
beneficiary: bx!(VersionedLocation::from(alice_location)),
|
||||
valid_from: None,
|
||||
});
|
||||
let treasury_spend_call =
|
||||
RuntimeCall::Treasury(pezpallet_treasury::Call::<Runtime>::spend {
|
||||
asset_kind: bx!(VersionedLocatableAsset::from((
|
||||
asset_hub_location.clone(),
|
||||
native_asset.into()
|
||||
))),
|
||||
amount: treasury_spend_balance,
|
||||
beneficiary: bx!(VersionedLocation::from(alice_location)),
|
||||
valid_from: None,
|
||||
});
|
||||
|
||||
assert_ok!(treasury_spend_call.dispatch(treasury_origin));
|
||||
|
||||
|
||||
+9
-9
@@ -40,14 +40,14 @@ mod imports {
|
||||
test_relay_is_trusted_teleporter, test_teyrchain_is_trusted_teleporter,
|
||||
test_teyrchain_is_trusted_teleporter_for_relay,
|
||||
test_xcm_fee_querying_apis_work_for_asset_hub,
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, Test, TestArgs, TestContext,
|
||||
TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_helpers::{
|
||||
fee_asset, find_mq_processed_id, find_xcm_sent_message_id,
|
||||
get_amount_from_versioned_assets, non_fee_asset, xcm_transact_paid_execution,
|
||||
},
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, Test, TestArgs, TestContext,
|
||||
TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_pez_simulator::helpers::TopicIdTracker,
|
||||
PenpalATeleportableAssetLocation, ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, USDT_ID, XCM_V3,
|
||||
};
|
||||
@@ -67,12 +67,9 @@ mod imports {
|
||||
genesis::{AssetHubZagrosAssetOwner, ED as ASSET_HUB_ZAGROS_ED},
|
||||
AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
pezbridge_hub_zagros_emulated_chain::{
|
||||
pezbridge_hub_zagros_runtime::xcm_config::{self as bhw_xcm_config},
|
||||
BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
},
|
||||
collectives_zagros_emulated_chain::CollectivesZagrosParaPallet as CollectivesZagrosPallet,
|
||||
coretime_zagros_emulated_chain::CoretimeZagrosParaPallet as CoretimeZagrosPallet,
|
||||
people_zagros_emulated_chain::PeopleZagrosParaPallet as PeopleZagrosPallet,
|
||||
pez_penpal_emulated_chain::{
|
||||
pez_penpal_runtime::xcm_config::{
|
||||
CustomizableAssetFromSystemAssetHub as PenpalCustomizableAssetFromSystemAssetHub,
|
||||
@@ -84,7 +81,10 @@ mod imports {
|
||||
PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner,
|
||||
PenpalBParaPallet as PenpalBPallet,
|
||||
},
|
||||
people_zagros_emulated_chain::PeopleZagrosParaPallet as PeopleZagrosPallet,
|
||||
pezbridge_hub_zagros_emulated_chain::{
|
||||
pezbridge_hub_zagros_runtime::xcm_config::{self as bhw_xcm_config},
|
||||
BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
},
|
||||
zagros_emulated_chain::{
|
||||
genesis::ED as ZAGROS_ED,
|
||||
zagros_runtime::{
|
||||
|
||||
+3
-1
@@ -15,7 +15,9 @@
|
||||
|
||||
use crate::imports::*;
|
||||
use codec::Encode;
|
||||
use pezframe_support::{assert_ok, pezsp_runtime::traits::Dispatchable, traits::schedule::DispatchTime};
|
||||
use pezframe_support::{
|
||||
assert_ok, pezsp_runtime::traits::Dispatchable, traits::schedule::DispatchTime,
|
||||
};
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
|
||||
#[test]
|
||||
|
||||
+2
-2
@@ -29,7 +29,6 @@ mod imports {
|
||||
asset_hub_zagros_runtime::xcm_config::LocationToAccountId as AssetHubLocationToAccountId,
|
||||
genesis::ED as ASSET_HUB_ZAGROS_ED, AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
collectives_zagros_emulated_chain::{
|
||||
collectives_zagros_runtime::{
|
||||
fellowship as collectives_fellowship,
|
||||
@@ -39,8 +38,9 @@ mod imports {
|
||||
CollectivesZagrosParaPallet as CollectivesZagrosPallet,
|
||||
},
|
||||
coretime_zagros_emulated_chain::CoretimeZagrosParaPallet as CoretimeZagrosPallet,
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
people_zagros_emulated_chain::PeopleZagrosParaPallet as PeopleZagrosPallet,
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
zagros_emulated_chain::{
|
||||
genesis::ED as ZAGROS_ED,
|
||||
zagros_runtime::{governance as zagros_governance, OriginCaller as ZagrosOriginCaller},
|
||||
|
||||
+14
-12
@@ -110,15 +110,16 @@ fn fellowship_treasury_spend() {
|
||||
let asset_hub_location: Location = [Teyrchain(1000)].into();
|
||||
let native_asset = Location::parent();
|
||||
|
||||
let treasury_spend_call = RuntimeCall::Treasury(pezpallet_treasury::Call::<Runtime>::spend {
|
||||
asset_kind: bx!(VersionedLocatableAsset::from((
|
||||
asset_hub_location.clone(),
|
||||
native_asset.into()
|
||||
))),
|
||||
amount: fellowship_treasury_balance,
|
||||
beneficiary: bx!(VersionedLocation::from(fellowship_treasury_location)),
|
||||
valid_from: None,
|
||||
});
|
||||
let treasury_spend_call =
|
||||
RuntimeCall::Treasury(pezpallet_treasury::Call::<Runtime>::spend {
|
||||
asset_kind: bx!(VersionedLocatableAsset::from((
|
||||
asset_hub_location.clone(),
|
||||
native_asset.into()
|
||||
))),
|
||||
amount: fellowship_treasury_balance,
|
||||
beneficiary: bx!(VersionedLocation::from(fellowship_treasury_location)),
|
||||
valid_from: None,
|
||||
});
|
||||
|
||||
assert_ok!(treasury_spend_call.dispatch(treasury_origin));
|
||||
|
||||
@@ -187,8 +188,8 @@ fn fellowship_treasury_spend() {
|
||||
}]
|
||||
.into();
|
||||
|
||||
let fellowship_treasury_spend_call =
|
||||
RuntimeCall::FellowshipTreasury(pezpallet_treasury::Call::<Runtime, Instance1>::spend {
|
||||
let fellowship_treasury_spend_call = RuntimeCall::FellowshipTreasury(
|
||||
pezpallet_treasury::Call::<Runtime, Instance1>::spend {
|
||||
asset_kind: bx!(VersionedLocatableAsset::from((
|
||||
asset_hub_location,
|
||||
native_asset.into()
|
||||
@@ -196,7 +197,8 @@ fn fellowship_treasury_spend() {
|
||||
amount: fellowship_spend_balance,
|
||||
beneficiary: bx!(VersionedLocation::from(alice_location)),
|
||||
valid_from: None,
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
assert_ok!(fellowship_treasury_spend_call.dispatch(fellows_origin));
|
||||
|
||||
|
||||
+1
-1
@@ -15,9 +15,9 @@
|
||||
|
||||
use crate::imports::*;
|
||||
use pezframe_support::traits::OnInitialize;
|
||||
use pezpallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
|
||||
use pezkuwichain_runtime_constants::system_teyrchain::coretime::TIMESLICE_PERIOD;
|
||||
use pezkuwichain_system_emulated_network::pezkuwichain_emulated_chain::pezkuwichain_runtime::Dmp;
|
||||
use pezpallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
|
||||
use pezsp_runtime::Perbill;
|
||||
|
||||
#[test]
|
||||
|
||||
+2
-2
@@ -30,14 +30,14 @@ mod imports {
|
||||
asset_hub_zagros_emulated_chain::{
|
||||
genesis::ED as ASSET_HUB_ZAGROS_ED, AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
collectives_zagros_emulated_chain::CollectivesZagrosParaPallet as CollectivesZagrosPallet,
|
||||
coretime_zagros_emulated_chain::{
|
||||
self, coretime_zagros_runtime::ExistentialDeposit as CoretimeZagrosExistentialDeposit,
|
||||
genesis::ED as CORETIME_ZAGROS_ED, CoretimeZagrosParaPallet as CoretimeZagrosPallet,
|
||||
},
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
people_zagros_emulated_chain::PeopleZagrosParaPallet as PeopleZagrosPallet,
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
zagros_emulated_chain::{genesis::ED as ZAGROS_ED, ZagrosRelayPallet as ZagrosPallet},
|
||||
AssetHubZagrosPara as AssetHubZagros, AssetHubZagrosParaReceiver as AssetHubZagrosReceiver,
|
||||
AssetHubZagrosParaSender as AssetHubZagrosSender, BridgeHubZagrosPara as BridgeHubZagros,
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
|
||||
use crate::imports::*;
|
||||
|
||||
/// CollectivesZagros dispatches `pezpallet_xcm::send` with `OriginKind:Xcm` to the dest with encoded
|
||||
/// whitelist call.
|
||||
/// CollectivesZagros dispatches `pezpallet_xcm::send` with `OriginKind:Xcm` to the dest with
|
||||
/// encoded whitelist call.
|
||||
#[cfg(test)]
|
||||
pub fn collectives_send_whitelist(
|
||||
dest: Location,
|
||||
|
||||
@@ -19,11 +19,11 @@ mod imports {
|
||||
pub(crate) use codec::Encode;
|
||||
pub(crate) use emulated_integration_tests_common::{
|
||||
impls::{assert_expected_events, bx, TestExt},
|
||||
xcm_pez_emulator::Chain,
|
||||
xcm_helpers::{
|
||||
build_xcm_send_authorize_upgrade_call, call_hash_of,
|
||||
dispatch_whitelisted_call_with_preimage,
|
||||
},
|
||||
xcm_pez_emulator::Chain,
|
||||
};
|
||||
pub(crate) use pezframe_support::{assert_err, assert_ok};
|
||||
pub(crate) use pezsp_runtime::{traits::Dispatchable, DispatchError};
|
||||
|
||||
+2
-2
@@ -28,10 +28,8 @@ mod imports {
|
||||
pub(crate) use zagros_system_emulated_network::{
|
||||
self,
|
||||
asset_hub_zagros_emulated_chain::AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
collectives_zagros_emulated_chain::CollectivesZagrosParaPallet as CollectivesZagrosPallet,
|
||||
coretime_zagros_emulated_chain::CoretimeZagrosParaPallet as CoretimeZagrosPallet,
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
people_zagros_emulated_chain::{
|
||||
people_zagros_runtime::{
|
||||
self, xcm_config::XcmConfig as PeopleZagrosXcmConfig,
|
||||
@@ -39,6 +37,8 @@ mod imports {
|
||||
},
|
||||
PeopleZagrosParaPallet as PeopleZagrosPallet,
|
||||
},
|
||||
pez_penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
|
||||
pezbridge_hub_zagros_emulated_chain::BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
zagros_emulated_chain::{genesis::ED as ZAGROS_ED, ZagrosRelayPallet as ZagrosPallet},
|
||||
AssetHubZagrosPara as AssetHubZagros, AssetHubZagrosParaReceiver as AssetHubZagrosReceiver,
|
||||
BridgeHubZagrosPara as BridgeHubZagros, CollectivesZagrosPara as CollectivesZagros,
|
||||
|
||||
+37
-35
@@ -16,8 +16,8 @@
|
||||
use crate::imports::*;
|
||||
|
||||
use codec::Encode;
|
||||
use pezframe_support::pezsp_runtime::traits::Dispatchable;
|
||||
use people_zagros_runtime::people::IdentityInfo;
|
||||
use pezframe_support::pezsp_runtime::traits::Dispatchable;
|
||||
use teyrchains_common::AccountId;
|
||||
use zagros_runtime::{
|
||||
governance::pezpallet_custom_origins::Origin::GeneralAdmin as GeneralAdminOrigin, Dmp,
|
||||
@@ -260,12 +260,11 @@ fn relay_commands_kill_identity_wrong_origin() {
|
||||
|
||||
Dmp::make_teyrchain_reachable(1004);
|
||||
|
||||
let kill_identity_call =
|
||||
PeopleCall::Identity(pezpallet_identity::Call::<PeopleRuntime>::kill_identity {
|
||||
target: people_zagros_runtime::MultiAddress::Id(PeopleZagros::account_id_of(
|
||||
ALICE,
|
||||
)),
|
||||
});
|
||||
let kill_identity_call = PeopleCall::Identity(pezpallet_identity::Call::<
|
||||
PeopleRuntime,
|
||||
>::kill_identity {
|
||||
target: people_zagros_runtime::MultiAddress::Id(PeopleZagros::account_id_of(ALICE)),
|
||||
});
|
||||
|
||||
let xcm_message = RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
@@ -312,12 +311,13 @@ fn relay_commands_add_remove_username_authority() {
|
||||
|
||||
Dmp::make_teyrchain_reachable(1004);
|
||||
|
||||
let add_username_authority =
|
||||
PeopleCall::Identity(pezpallet_identity::Call::<PeopleRuntime>::add_username_authority {
|
||||
authority: people_zagros_runtime::MultiAddress::Id(people_zagros_alice.clone()),
|
||||
suffix: b"suffix1".into(),
|
||||
allocation: 10,
|
||||
});
|
||||
let add_username_authority = PeopleCall::Identity(pezpallet_identity::Call::<
|
||||
PeopleRuntime,
|
||||
>::add_username_authority {
|
||||
authority: people_zagros_runtime::MultiAddress::Id(people_zagros_alice.clone()),
|
||||
suffix: b"suffix1".into(),
|
||||
allocation: 10,
|
||||
});
|
||||
|
||||
let add_authority_xcm_msg = RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
@@ -410,17 +410,18 @@ fn relay_commands_add_remove_username_authority() {
|
||||
suffix: b"suffix1".into(),
|
||||
});
|
||||
|
||||
let remove_authority_xcm_msg = RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
message: bx!(VersionedXcm::from(Xcm(vec![
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
Transact {
|
||||
origin_kind,
|
||||
call: remove_username_authority.encode().into(),
|
||||
fallback_max_weight: None
|
||||
}
|
||||
]))),
|
||||
});
|
||||
let remove_authority_xcm_msg =
|
||||
RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
message: bx!(VersionedXcm::from(Xcm(vec![
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
Transact {
|
||||
origin_kind,
|
||||
call: remove_username_authority.encode().into(),
|
||||
fallback_max_weight: None
|
||||
}
|
||||
]))),
|
||||
});
|
||||
|
||||
assert_ok!(remove_authority_xcm_msg.dispatch(origin));
|
||||
|
||||
@@ -476,17 +477,18 @@ fn relay_commands_add_remove_username_authority_wrong_origin() {
|
||||
allocation: 10,
|
||||
});
|
||||
|
||||
let add_authority_xcm_msg = RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
message: bx!(VersionedXcm::from(Xcm(vec![
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
Transact {
|
||||
origin_kind,
|
||||
call: add_username_authority.encode().into(),
|
||||
fallback_max_weight: None
|
||||
}
|
||||
]))),
|
||||
});
|
||||
let add_authority_xcm_msg =
|
||||
RuntimeCall::XcmPallet(pezpallet_xcm::Call::<Runtime>::send {
|
||||
dest: bx!(VersionedLocation::from(Location::new(0, [Teyrchain(1004)]))),
|
||||
message: bx!(VersionedXcm::from(Xcm(vec![
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
Transact {
|
||||
origin_kind,
|
||||
call: add_username_authority.encode().into(),
|
||||
fallback_max_weight: None
|
||||
}
|
||||
]))),
|
||||
});
|
||||
|
||||
assert_ok!(add_authority_xcm_msg.dispatch(origin.clone()));
|
||||
assert_expected_events!(
|
||||
|
||||
+1
-1
@@ -18,9 +18,9 @@
|
||||
use crate::imports::*;
|
||||
use codec::Encode;
|
||||
use emulated_integration_tests_common::accounts::ALICE;
|
||||
use people_zagros_runtime::people::{IdentityField, IdentityInfo};
|
||||
use pezframe_support::BoundedVec;
|
||||
use pezpallet_identity::Data;
|
||||
use people_zagros_runtime::people::{IdentityField, IdentityInfo};
|
||||
use xcm::latest::AssetTransferFilter;
|
||||
|
||||
#[test]
|
||||
|
||||
+5
-5
@@ -34,10 +34,10 @@ mod imports {
|
||||
impls::Inspect,
|
||||
test_dry_run_transfer_across_pk_bridge, test_relay_is_trusted_teleporter,
|
||||
test_teyrchain_is_trusted_teleporter, test_teyrchain_is_trusted_teleporter_for_relay,
|
||||
xcm_helpers::xcm_transact_paid_execution,
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_helpers::xcm_transact_paid_execution,
|
||||
ASSETS_PALLET_ID, USDT_ID,
|
||||
};
|
||||
pub(crate) use pezkuwichain_zagros_system_emulated_network::{
|
||||
@@ -52,10 +52,6 @@ mod imports {
|
||||
genesis::{AssetHubZagrosAssetOwner, ED as ASSET_HUB_ZAGROS_ED},
|
||||
AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
pezbridge_hub_pezkuwichain_emulated_chain::{
|
||||
genesis::ED as BRIDGE_HUB_PEZKUWICHAIN_ED, BridgeHubPezkuwichainExistentialDeposit,
|
||||
BridgeHubPezkuwichainParaPallet as BridgeHubPezkuwichainPallet,
|
||||
},
|
||||
pez_penpal_emulated_chain::{
|
||||
pez_penpal_runtime::xcm_config::{
|
||||
CustomizableAssetFromSystemAssetHub as PenpalCustomizableAssetFromSystemAssetHub,
|
||||
@@ -63,6 +59,10 @@ mod imports {
|
||||
},
|
||||
PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner,
|
||||
},
|
||||
pezbridge_hub_pezkuwichain_emulated_chain::{
|
||||
genesis::ED as BRIDGE_HUB_PEZKUWICHAIN_ED, BridgeHubPezkuwichainExistentialDeposit,
|
||||
BridgeHubPezkuwichainParaPallet as BridgeHubPezkuwichainPallet,
|
||||
},
|
||||
pezkuwichain_emulated_chain::{
|
||||
genesis::ED as PEZKUWICHAIN_ED, PezkuwichainRelayPallet as PezkuwichainPallet,
|
||||
},
|
||||
|
||||
+6
-6
@@ -37,10 +37,10 @@ mod imports {
|
||||
impls::Inspect,
|
||||
test_dry_run_transfer_across_pk_bridge, test_relay_is_trusted_teleporter,
|
||||
test_teyrchain_is_trusted_teleporter, test_teyrchain_is_trusted_teleporter_for_relay,
|
||||
xcm_helpers::xcm_transact_paid_execution,
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_helpers::xcm_transact_paid_execution,
|
||||
ASSETS_PALLET_ID, USDT_ID,
|
||||
};
|
||||
pub(crate) use pezkuwichain_zagros_system_emulated_network::{
|
||||
@@ -55,11 +55,6 @@ mod imports {
|
||||
genesis::{AssetHubZagrosAssetOwner, ED as ASSET_HUB_ZAGROS_ED},
|
||||
AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
pezbridge_hub_zagros_emulated_chain::{
|
||||
pezbridge_hub_zagros_runtime, genesis::ED as BRIDGE_HUB_ZAGROS_ED,
|
||||
BridgeHubZagrosExistentialDeposit, BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
BridgeHubZagrosRuntimeOrigin,
|
||||
},
|
||||
pez_penpal_emulated_chain::{
|
||||
self,
|
||||
pez_penpal_runtime::xcm_config::{
|
||||
@@ -70,6 +65,11 @@ mod imports {
|
||||
PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner,
|
||||
PenpalBParaPallet as PenpalBPallet,
|
||||
},
|
||||
pezbridge_hub_zagros_emulated_chain::{
|
||||
genesis::ED as BRIDGE_HUB_ZAGROS_ED, pezbridge_hub_zagros_runtime,
|
||||
BridgeHubZagrosExistentialDeposit, BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
BridgeHubZagrosRuntimeOrigin,
|
||||
},
|
||||
pezkuwichain_emulated_chain::PezkuwichainRelayPallet as PezkuwichainPallet,
|
||||
zagros_emulated_chain::{genesis::ED as ZAGROS_ED, ZagrosRelayPallet as ZagrosPallet},
|
||||
AssetHubPezkuwichainPara as AssetHubPezkuwichain,
|
||||
|
||||
+1
-1
@@ -16,8 +16,8 @@
|
||||
//! Tests related to XCM aliasing.
|
||||
|
||||
use crate::imports::*;
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::XcmConfig;
|
||||
use emulated_integration_tests_common::{macros::AccountId, test_cross_chain_alias};
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::XcmConfig;
|
||||
use pezframe_support::traits::ContainsPair;
|
||||
use xcm::latest::Junctions::*;
|
||||
|
||||
|
||||
+4
-4
@@ -32,16 +32,16 @@ use asset_hub_zagros_runtime::xcm_config::{
|
||||
bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee,
|
||||
UniversalLocation as AssetHubZagrosUniversalLocation,
|
||||
};
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue,
|
||||
};
|
||||
use codec::Encode;
|
||||
use emulated_integration_tests_common::{
|
||||
snowbridge::{SEPOLIA_ID, WETH},
|
||||
PENPAL_B_ID, RESERVABLE_ASSET_ID,
|
||||
};
|
||||
use pezframe_support::traits::fungibles::Mutate;
|
||||
use hex_literal::hex;
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue,
|
||||
};
|
||||
use pezframe_support::traits::fungibles::Mutate;
|
||||
use pezkuwichain_zagros_system_emulated_network::{
|
||||
asset_hub_zagros_emulated_chain::genesis::AssetHubZagrosAssetOwner,
|
||||
pez_penpal_emulated_chain::PARA_ID_B, zagros_emulated_chain::zagros_runtime::Dmp,
|
||||
|
||||
+1
-1
@@ -19,8 +19,8 @@ use emulated_integration_tests_common::{
|
||||
snowbridge::{SEPOLIA_ID, WETH},
|
||||
PenpalBTeleportableAssetLocation,
|
||||
};
|
||||
use pezframe_support::traits::fungibles::Mutate;
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::traits::fungibles::Mutate;
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::{
|
||||
pez_penpal_runtime::xcm_config::{CheckingAccount, TELEPORTABLE_ASSET_ID},
|
||||
PenpalAssetOwner,
|
||||
|
||||
+1
-1
@@ -14,8 +14,8 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::{imports::*, tests::snowbridge_common::*};
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::LocationToAccountId;
|
||||
use emulated_integration_tests_common::snowbridge::{SEPOLIA_ID, WETH};
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::LocationToAccountId;
|
||||
use pezsnowbridge_core::AssetMetadata;
|
||||
use pezsnowbridge_pezpallet_system::Error;
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::EthereumNetwork;
|
||||
|
||||
+6
-6
@@ -21,6 +21,12 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use asset_hub_zagros_runtime::ForeignAssets;
|
||||
use codec::Encode;
|
||||
use emulated_integration_tests_common::{
|
||||
snowbridge::{SEPOLIA_ID, WETH},
|
||||
RESERVABLE_ASSET_ID,
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_common_config::BridgeReward,
|
||||
bridge_to_ethereum_config::{
|
||||
@@ -28,12 +34,6 @@ use pezbridge_hub_zagros_runtime::{
|
||||
},
|
||||
EthereumInboundQueueV2,
|
||||
};
|
||||
use codec::Encode;
|
||||
use emulated_integration_tests_common::{
|
||||
snowbridge::{SEPOLIA_ID, WETH},
|
||||
RESERVABLE_ASSET_ID,
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::PARA_ID_B;
|
||||
use pezsnowbridge_core::{reward::MessageId, AssetMetadata, TokenIdOf};
|
||||
use pezsnowbridge_inbound_queue_primitives::v2::{
|
||||
|
||||
+2
-2
@@ -26,12 +26,12 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use asset_hub_zagros_runtime::ForeignAssets;
|
||||
use codec::Encode;
|
||||
use hex_literal::hex;
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_common_config::BridgeReward, bridge_to_ethereum_config::EthereumGatewayAddress,
|
||||
EthereumInboundQueueV2,
|
||||
};
|
||||
use codec::Encode;
|
||||
use hex_literal::hex;
|
||||
use pezsnowbridge_core::TokenIdOf;
|
||||
use pezsnowbridge_inbound_queue_primitives::v2::{
|
||||
EthereumAsset::{ForeignTokenERC20, NativeTokenERC20},
|
||||
|
||||
+1
-1
@@ -14,8 +14,8 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::tests::snowbridge_common::{eth_location, set_up_eth_and_hez_pool};
|
||||
use pezbridge_hub_zagros_runtime::bridge_common_config::{BridgeReward, BridgeRewardBeneficiaries};
|
||||
use emulated_integration_tests_common::snowbridge::ETHER_MIN_BALANCE;
|
||||
use pezbridge_hub_zagros_runtime::bridge_common_config::{BridgeReward, BridgeRewardBeneficiaries};
|
||||
use pezpallet_bridge_relayers::{Error::FailedToPayReward, RewardLedger};
|
||||
|
||||
use crate::imports::*;
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
//! Managed Collective Content Pezpallet
|
||||
//!
|
||||
//! The pezpallet provides the functionality to store different types of content. This would typically
|
||||
//! be used by an on-chain collective, such as the Pezkuwi Alliance or Ambassador Program.
|
||||
//! The pezpallet provides the functionality to store different types of content. This would
|
||||
//! typically be used by an on-chain collective, such as the Pezkuwi Alliance or Ambassador Program.
|
||||
//!
|
||||
//! The pezpallet stores content as an [OpaqueCid], which should correspond to some off-chain hosting
|
||||
//! service, such as IPFS, and contain any type of data. Each type of content has its own origin
|
||||
//! from which it can be managed. The origins are configurable in the runtime. Storing content does
|
||||
//! not require a deposit, as it is expected to be managed by a trusted collective.
|
||||
//! The pezpallet stores content as an [OpaqueCid], which should correspond to some off-chain
|
||||
//! hosting service, such as IPFS, and contain any type of data. Each type of content has its own
|
||||
//! origin from which it can be managed. The origins are configurable in the runtime. Storing
|
||||
//! content does not require a deposit, as it is expected to be managed by a trusted collective.
|
||||
//!
|
||||
//! Content types:
|
||||
//!
|
||||
|
||||
@@ -124,7 +124,8 @@ pub mod pezpallet {
|
||||
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type Currency: ReservableCurrency<Self::AccountId>;
|
||||
|
||||
/// Origin that can revoke citizenship (governance/root)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use pezframe_support::pezpallet_prelude::{BoundedVec, Get, RuntimeDebug};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_core::H256;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
/// Citizenship status levels
|
||||
/// PRIVACY: No personal data stored on-chain, only status and hash
|
||||
|
||||
@@ -114,7 +114,8 @@ pub mod pezpallet {
|
||||
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::AccountId>;
|
||||
type WeightInfo: WeightInfo;
|
||||
|
||||
|
||||
@@ -140,8 +140,8 @@ impl pezpallet_collective::Config<Instance1> for Test {
|
||||
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
let t = pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
// `pezpallet-collective`'in genesis'ini de kurmamıza gerek kalmadı çünkü artık testimiz ona bağlı
|
||||
// değil.
|
||||
// `pezpallet-collective`'in genesis'ini de kurmamıza gerek kalmadı çünkü artık testimiz ona
|
||||
// bağlı değil.
|
||||
let mut ext = pezsp_io::TestExternalities::new(t);
|
||||
ext.execute_with(|| System::set_block_number(1));
|
||||
ext
|
||||
|
||||
@@ -115,8 +115,8 @@ use pezframe_support::{
|
||||
};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezpallet_trust::TrustScoreProvider;
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_runtime::traits::{AccountIdConversion, Member, Saturating, Zero};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
//! # PEZ Treasury Pezpallet
|
||||
//!
|
||||
//! A pezpallet for managing the PEZ token distribution and treasury with automated halving mechanics.
|
||||
//! A pezpallet for managing the PEZ token distribution and treasury with automated halving
|
||||
//! mechanics.
|
||||
//!
|
||||
//! ## Overview
|
||||
//!
|
||||
@@ -92,8 +93,8 @@ use pezframe_support::{
|
||||
PalletId,
|
||||
};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_runtime::traits::{AccountIdConversion, Saturating, Zero};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
|
||||
@@ -91,7 +91,9 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(
|
||||
state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
use codec::Decode;
|
||||
|
||||
let (
|
||||
@@ -199,7 +201,9 @@ pub mod v2 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(
|
||||
_state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::info!("✅ Post-upgrade check passed for pezpallet-pez-treasury v2");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -97,8 +97,9 @@ impl pezpallet_assets::Config for Test {
|
||||
type AssetId = u32;
|
||||
type AssetIdParameter = u32;
|
||||
type Currency = Balances;
|
||||
type CreateOrigin =
|
||||
pezframe_support::traits::AsEnsureOriginWithArg<pezframe_system::EnsureSigned<Self::AccountId>>;
|
||||
type CreateOrigin = pezframe_support::traits::AsEnsureOriginWithArg<
|
||||
pezframe_system::EnsureSigned<Self::AccountId>,
|
||||
>;
|
||||
type ForceOrigin = pezframe_system::EnsureRoot<Self::AccountId>;
|
||||
type AssetDeposit = AssetDeposit;
|
||||
type AssetAccountDeposit = ConstU128<0>;
|
||||
|
||||
@@ -49,7 +49,8 @@ pub mod pezpallet {
|
||||
pub trait Config: pezframe_system::Config {
|
||||
/// The overarching event type.
|
||||
#[allow(deprecated)]
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
|
||||
type RuntimeOrigin: From<<Self as SystemConfig>::RuntimeOrigin>
|
||||
+ Into<Result<CumulusOrigin, <Self as Config>::RuntimeOrigin>>;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
//! # Referral Pezpallet
|
||||
//!
|
||||
//! A pezpallet for managing user referrals and tracking network growth through invitation mechanics.
|
||||
//! A pezpallet for managing user referrals and tracking network growth through invitation
|
||||
//! mechanics.
|
||||
//!
|
||||
//! ## Overview
|
||||
//!
|
||||
@@ -120,7 +121,8 @@ pub mod pezpallet {
|
||||
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config + pezpallet_identity_kyc::Config + TypeInfo {
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type WeightInfo: weights::WeightInfo;
|
||||
|
||||
/// Default referrer account - used when no referrer is specified
|
||||
|
||||
@@ -149,7 +149,8 @@ pub mod pezpallet {
|
||||
// Ensuring BlockNumber is convertible from u32.
|
||||
BlockNumberFor<Self>: From<u32>,
|
||||
{
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
/// Balance type to be used for staking.
|
||||
/// Adding all required mathematical and comparison properties.
|
||||
type Balance: Member
|
||||
|
||||
@@ -247,7 +247,8 @@ impl ExtBuilder {
|
||||
}
|
||||
|
||||
pub fn build(self) -> pezsp_io::TestExternalities {
|
||||
let mut storage = pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
let mut storage =
|
||||
pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
|
||||
let mut balances: Vec<(AccountId, Balance)> = vec![
|
||||
(1, 1_000_000 * UNITS),
|
||||
@@ -287,8 +288,8 @@ impl ExtBuilder {
|
||||
})
|
||||
.collect(),
|
||||
force_era: pezpallet_staking::Forcing::ForceNew, // Yeni era başlatmaya zorla
|
||||
min_nominator_bond: MinNominatorBond::get(), // Tanımlanan minimum değerleri kullan
|
||||
min_validator_bond: MinValidatorBond::get(), // Tanımlanan minimum değerleri kullan
|
||||
min_nominator_bond: MinNominatorBond::get(), // Tanımlanan minimum değerleri kullan
|
||||
min_validator_bond: MinValidatorBond::get(), // Tanımlanan minimum değerleri kullan
|
||||
..Default::default()
|
||||
}
|
||||
.assimilate_storage(&mut storage)
|
||||
|
||||
@@ -105,9 +105,9 @@ pub use pezpallet::*;
|
||||
|
||||
use alloc::{format, vec::Vec};
|
||||
use pezframe_support::pezpallet_prelude::{MaybeSerializeDeserialize, Parameter, RuntimeDebug};
|
||||
use pezsp_runtime::DispatchError;
|
||||
use scale_info::TypeInfo;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use pezsp_runtime::DispatchError;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarking;
|
||||
@@ -133,9 +133,12 @@ pub mod pezpallet {
|
||||
|
||||
#[pezpallet::config]
|
||||
pub trait Config:
|
||||
pezframe_system::Config + pezpallet_nfts::Config<ItemId = u32> + pezpallet_identity_kyc::Config
|
||||
pezframe_system::Config
|
||||
+ pezpallet_nfts::Config<ItemId = u32>
|
||||
+ pezpallet_identity_kyc::Config
|
||||
{
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
type WeightInfo: weights::WeightInfo;
|
||||
|
||||
|
||||
@@ -53,7 +53,10 @@ pub mod v1 {
|
||||
|
||||
weight
|
||||
} else {
|
||||
log::info!("👌 pezpallet-tiki migration not needed, current version is {:?}", current);
|
||||
log::info!(
|
||||
"👌 pezpallet-tiki migration not needed, current version is {:?}",
|
||||
current
|
||||
);
|
||||
T::DbWeight::get().reads(1)
|
||||
}
|
||||
}
|
||||
@@ -80,7 +83,9 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(
|
||||
state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
use codec::Decode;
|
||||
|
||||
let (pre_citizen_count, pre_user_tikis_count, pre_tiki_holder_count): (u32, u32, u32) =
|
||||
|
||||
@@ -27,8 +27,12 @@ mod benchmarks {
|
||||
T::Currency::make_free_balance_be(&pezpallet_account, funding);
|
||||
|
||||
// Create asset
|
||||
let _ =
|
||||
T::Assets::create(T::WrapperAssetId::get(), pezpallet_account.clone(), true, 1u32.into());
|
||||
let _ = T::Assets::create(
|
||||
T::WrapperAssetId::get(),
|
||||
pezpallet_account.clone(),
|
||||
true,
|
||||
1u32.into(),
|
||||
);
|
||||
|
||||
#[extrinsic_call]
|
||||
_(RawOrigin::Signed(caller.clone()), amount);
|
||||
@@ -51,8 +55,12 @@ mod benchmarks {
|
||||
T::Currency::make_free_balance_be(&pezpallet_account, funding);
|
||||
|
||||
// Create asset
|
||||
let _ =
|
||||
T::Assets::create(T::WrapperAssetId::get(), pezpallet_account.clone(), true, 1u32.into());
|
||||
let _ = T::Assets::create(
|
||||
T::WrapperAssetId::get(),
|
||||
pezpallet_account.clone(),
|
||||
true,
|
||||
1u32.into(),
|
||||
);
|
||||
|
||||
// Wrap first
|
||||
let _ = Pezpallet::<T>::wrap(RawOrigin::Signed(caller.clone()).into(), amount);
|
||||
|
||||
@@ -153,7 +153,8 @@ pub mod pezpallet {
|
||||
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config + pezpallet_identity_kyc::Config {
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type WeightInfo: WeightInfo;
|
||||
|
||||
type Score: Member
|
||||
|
||||
@@ -121,8 +121,13 @@ mod benchmarks {
|
||||
|
||||
let election = ActiveElections::<T>::get(0).unwrap();
|
||||
pezframe_system::Pezpallet::<T>::set_block_number(election.voting_start);
|
||||
Pezpallet::<T>::cast_vote(RawOrigin::Signed(voter.clone()).into(), 0, vec![candidate], None)
|
||||
.unwrap();
|
||||
Pezpallet::<T>::cast_vote(
|
||||
RawOrigin::Signed(voter.clone()).into(),
|
||||
0,
|
||||
vec![candidate],
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// 2. Advance to election end time
|
||||
pezframe_system::Pezpallet::<T>::set_block_number(election.end_block + 1u32.into());
|
||||
|
||||
@@ -224,7 +224,8 @@ pub mod pezpallet {
|
||||
+ pezpallet_identity_kyc::Config
|
||||
+ core::fmt::Debug
|
||||
{
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
type Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>;
|
||||
type RuntimeCall: Parameter
|
||||
|
||||
@@ -127,7 +127,9 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(
|
||||
state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
use codec::Decode;
|
||||
|
||||
let (
|
||||
@@ -339,7 +341,9 @@ pub mod v2 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(
|
||||
_state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::info!("✅ Post-upgrade check passed for pezpallet-welati v2");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::{pezpallet_prelude::BlockNumberFor, Config as SystemConfig};
|
||||
use pezpallet_tiki::Tiki;
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_runtime::RuntimeDebug;
|
||||
use pezsp_std::prelude::*;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
#[derive(RuntimeDebug, Eq, PartialEq)]
|
||||
pub enum ElectionOutcome<AccountId> {
|
||||
|
||||
+1
-1
@@ -24,10 +24,10 @@ use scale_info::TypeInfo;
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use pezframe_support::{
|
||||
dispatch::DispatchClass,
|
||||
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
|
||||
|
||||
+1
-1
@@ -25,9 +25,9 @@ use crate::{
|
||||
*,
|
||||
};
|
||||
use alloc::{vec, vec::Vec};
|
||||
use hex_literal::hex;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezframe_support::build_struct_json_patch;
|
||||
use hex_literal::hex;
|
||||
use pezsp_core::crypto::UncheckedInto;
|
||||
use pezsp_genesis_builder::PresetId;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -43,7 +43,9 @@ use assets_common::{
|
||||
AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert,
|
||||
};
|
||||
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
|
||||
use pezcumulus_pezpallet_teyrchain_system::{RelayNumberMonotonicallyIncreases, RelaychainDataProvider};
|
||||
use pezcumulus_pezpallet_teyrchain_system::{
|
||||
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
|
||||
};
|
||||
use pezcumulus_primitives_core::AggregateMessageOrigin;
|
||||
use pezsp_api::impl_runtime_apis;
|
||||
use pezsp_core::{crypto::KeyTypeId, OpaqueMetadata};
|
||||
@@ -104,8 +106,8 @@ mod tests;
|
||||
pub use pezsp_runtime::BuildStorage;
|
||||
|
||||
// Pezkuwi imports
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use pezkuwi_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use xcm::latest::prelude::{
|
||||
Asset, Assets as XcmAssets, Fungible, Here, InteriorLocation, Junction, Junction::*, Location,
|
||||
@@ -658,8 +660,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Uniques(
|
||||
pezpallet_uniques::Call::clear_collection_metadata { .. }
|
||||
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
@@ -1151,7 +1154,8 @@ impl pezpallet_treasury::Config for Runtime {
|
||||
type AssetKind = ();
|
||||
type Beneficiary = AccountId;
|
||||
type BeneficiaryLookup = pezsp_runtime::traits::IdentityLookup<Self::Beneficiary>;
|
||||
type Paymaster = pezframe_support::traits::tokens::pay::PayFromAccount<Balances, TreasuryAccount>;
|
||||
type Paymaster =
|
||||
pezframe_support::traits::tokens::pay::PayFromAccount<Balances, TreasuryAccount>;
|
||||
type BalanceConverter = pezframe_support::traits::tokens::UnityAssetBalanceConversion;
|
||||
type PayoutPeriod = PayoutSpendPeriod;
|
||||
type BlockNumberProvider = pezframe_system::Pezpallet<Runtime>;
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
use super::*;
|
||||
use pezcumulus_primitives_core::relay_chain::SessionIndex;
|
||||
use pezframe_election_provider_support::{ElectionDataProvider, SequentialPhragmen};
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
|
||||
use pezpallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf};
|
||||
use pezpallet_staking_async::UseValidatorsMap;
|
||||
use pezpallet_staking_async_rc_client as rc_client;
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
|
||||
use pezsp_runtime::{
|
||||
transaction_validity::TransactionPriority, FixedPointNumber, FixedU128, SaturatedConversion,
|
||||
};
|
||||
@@ -139,7 +139,8 @@ impl multi_block::verifier::Config for Runtime {
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
|
||||
type SolutionDataProvider = MultiBlockElectionSigned;
|
||||
type WeightInfo = weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -178,7 +179,8 @@ impl multi_block::unsigned::Config for Runtime {
|
||||
type OffchainSolver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>>;
|
||||
type MinerTxPriority = MinerTxPriority;
|
||||
type OffchainRepeat = OffchainRepeat;
|
||||
type WeightInfo = weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -288,7 +290,8 @@ impl pezpallet_staking_async::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = UseValidatorsMap<Self>;
|
||||
type MaxValidatorSet = MaxValidatorSet;
|
||||
type NominationsQuota = pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
|
||||
type NominationsQuota =
|
||||
pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
|
||||
type MaxUnlockingChunks = pezframe_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = pezframe_support::traits::ConstU32<84>;
|
||||
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
|
||||
|
||||
@@ -27,7 +27,8 @@ fn sane_block_weight() {
|
||||
use pezpallet_balances::WeightInfo;
|
||||
let block = RuntimeBlockWeights::get().max_block;
|
||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||
let transfer = base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||
let transfer =
|
||||
base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||
|
||||
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
|
||||
assert!(fit >= 1000, "{} should be at least 1000", fit);
|
||||
@@ -38,7 +39,8 @@ fn sane_block_weight() {
|
||||
fn sane_transfer_fee() {
|
||||
use pezpallet_balances::WeightInfo;
|
||||
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
|
||||
let transfer = base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||
let transfer =
|
||||
base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
|
||||
|
||||
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
|
||||
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod pezcumulus_pezpallet_teyrchain_system;
|
||||
pub mod pezcumulus_pezpallet_weight_reclaim;
|
||||
pub mod pezcumulus_pezpallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod pezframe_system;
|
||||
pub mod pezframe_system_extensions;
|
||||
pub mod pezpallet_asset_conversion;
|
||||
@@ -49,7 +50,6 @@ pub mod pezpallet_uniques;
|
||||
pub mod pezpallet_utility;
|
||||
pub mod pezpallet_xcm;
|
||||
pub mod pezpallet_xcm_bridge_hub_router;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod xcm;
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ use pezframe_support::{
|
||||
},
|
||||
};
|
||||
use pezframe_system::EnsureRoot;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezkuwichain_runtime_constants::system_teyrchain::ASSET_HUB_ID;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezsp_runtime::traits::{AccountIdConversion, TryConvertInto};
|
||||
use testnet_teyrchains_constants::pezkuwichain::snowbridge::{
|
||||
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX,
|
||||
@@ -271,8 +271,8 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet and
|
||||
// BridgeHub get free execution.
|
||||
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet
|
||||
// and BridgeHub get free execution.
|
||||
AllowExplicitUnpaidExecutionFrom<(
|
||||
ParentOrParentsPlurality,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
|
||||
@@ -33,6 +33,7 @@ use asset_test_pezutils::{
|
||||
ExtBuilder, GovernanceOrigin, SlotDurations,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::{
|
||||
assert_noop, assert_ok, parameter_types,
|
||||
traits::{
|
||||
@@ -43,7 +44,6 @@ use pezframe_support::{
|
||||
},
|
||||
weights::{Weight, WeightToFee as WeightToFeeT},
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezsp_consensus_aura::SlotDuration;
|
||||
use pezsp_core::crypto::Ss58Codec;
|
||||
use pezsp_runtime::traits::MaybeEquivalence;
|
||||
|
||||
@@ -21,11 +21,11 @@ extern crate alloc;
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{
|
||||
dispatch::DispatchClass,
|
||||
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
|
||||
|
||||
+1
-1
@@ -20,9 +20,9 @@ use crate::{
|
||||
*,
|
||||
};
|
||||
use alloc::{vec, vec::Vec};
|
||||
use hex_literal::hex;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezframe_support::build_struct_json_patch;
|
||||
use hex_literal::hex;
|
||||
use pezsp_core::crypto::UncheckedInto;
|
||||
use pezsp_genesis_builder::PresetId;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -23,11 +23,11 @@ use pezframe_support::{
|
||||
traits::{tokens::UnityOrOuterConversion, EitherOf, EitherOfDiverse, FromContains},
|
||||
};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use pezkuwi_runtime_common::{
|
||||
impls::{ContainsParts, VersionedLocatableAsset},
|
||||
prod_or_fast,
|
||||
};
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use pezsp_runtime::{traits::IdentityLookup, Percent};
|
||||
use teyrchains_common::pay::{LocalPay, VersionedLocatableAccount};
|
||||
use xcm::latest::BodyId;
|
||||
|
||||
@@ -36,7 +36,9 @@ pub mod governance;
|
||||
mod migrations;
|
||||
mod staking;
|
||||
|
||||
use governance::{pezpallet_custom_origins, FellowshipAdmin, GeneralAdmin, StakingAdmin, Treasurer};
|
||||
use governance::{
|
||||
pezpallet_custom_origins, FellowshipAdmin, GeneralAdmin, StakingAdmin, Treasurer,
|
||||
};
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
@@ -48,7 +50,9 @@ use assets_common::{
|
||||
};
|
||||
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use pezcumulus_pezpallet_teyrchain_system::{RelayNumberMonotonicallyIncreases, RelaychainDataProvider};
|
||||
use pezcumulus_pezpallet_teyrchain_system::{
|
||||
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
|
||||
};
|
||||
use pezcumulus_primitives_core::{relay_chain::AccountIndex, AggregateMessageOrigin, ParaId};
|
||||
use pezframe_support::{
|
||||
construct_runtime, derive_impl,
|
||||
@@ -783,8 +787,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Uniques(
|
||||
pezpallet_uniques::Call::clear_collection_metadata { .. }
|
||||
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
@@ -1521,7 +1526,8 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
|
||||
},
|
||||
Err(e) => {
|
||||
tracing::error!(target: "bridges::on_runtime_upgrade", error=?e, "Failed to destroy undecodable NFT item");
|
||||
return <Runtime as pezframe_system::Config>::DbWeight::get().reads_writes(0, writes);
|
||||
return <Runtime as pezframe_system::Config>::DbWeight::get()
|
||||
.reads_writes(0, writes);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1533,7 +1539,8 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
|
||||
},
|
||||
Err(e) => {
|
||||
tracing::error!(target: "bridges::on_runtime_upgrade", error=?e, "Failed to destroy undecodable NFT item");
|
||||
return <Runtime as pezframe_system::Config>::DbWeight::get().reads_writes(0, writes);
|
||||
return <Runtime as pezframe_system::Config>::DbWeight::get()
|
||||
.reads_writes(0, writes);
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ use super::*;
|
||||
use pezcumulus_primitives_core::relay_chain::SessionIndex;
|
||||
use pezframe_election_provider_support::{ElectionDataProvider, SequentialPhragmen};
|
||||
use pezframe_support::traits::EitherOf;
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
|
||||
use pezpallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf};
|
||||
use pezpallet_staking_async::UseValidatorsMap;
|
||||
use pezpallet_staking_async_rc_client as rc_client;
|
||||
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
|
||||
use pezsp_runtime::{
|
||||
transaction_validity::TransactionPriority, FixedPointNumber, FixedU128, SaturatedConversion,
|
||||
};
|
||||
@@ -140,7 +140,8 @@ impl multi_block::verifier::Config for Runtime {
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
|
||||
type SolutionDataProvider = MultiBlockElectionSigned;
|
||||
type WeightInfo = weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -179,7 +180,8 @@ impl multi_block::unsigned::Config for Runtime {
|
||||
type OffchainSolver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>>;
|
||||
type MinerTxPriority = MinerTxPriority;
|
||||
type OffchainRepeat = OffchainRepeat;
|
||||
type WeightInfo = weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -289,7 +291,8 @@ impl pezpallet_staking_async::Config for Runtime {
|
||||
type VoterList = VoterList;
|
||||
type TargetList = UseValidatorsMap<Self>;
|
||||
type MaxValidatorSet = MaxValidatorSet;
|
||||
type NominationsQuota = pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
|
||||
type NominationsQuota =
|
||||
pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
|
||||
type MaxUnlockingChunks = pezframe_support::traits::ConstU32<32>;
|
||||
type HistoryDepth = pezframe_support::traits::ConstU32<84>;
|
||||
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod inmemorydb_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod pezcumulus_pezpallet_teyrchain_system;
|
||||
pub mod pezcumulus_pezpallet_weight_reclaim;
|
||||
pub mod pezcumulus_pezpallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod pezframe_system;
|
||||
pub mod pezframe_system_extensions;
|
||||
pub mod inmemorydb_weights;
|
||||
pub mod pezpallet_ah_ops;
|
||||
pub mod pezpallet_asset_conversion;
|
||||
pub mod pezpallet_asset_conversion_ops;
|
||||
@@ -61,10 +62,9 @@ pub mod pezpallet_vesting;
|
||||
pub mod pezpallet_whitelist;
|
||||
pub mod pezpallet_xcm;
|
||||
pub mod pezpallet_xcm_bridge_hub_router;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod pezsnowbridge_pezpallet_system_backend;
|
||||
pub mod pezsnowbridge_pezpallet_system_frontend;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod xcm;
|
||||
|
||||
pub use block_weights::constants::BlockExecutionWeight;
|
||||
|
||||
@@ -38,9 +38,9 @@ use pezframe_support::{
|
||||
PalletId,
|
||||
};
|
||||
use pezframe_system::EnsureRoot;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezsnowbridge_outbound_queue_primitives::v2::exporter::PausableExporter;
|
||||
use pezsp_runtime::traits::{AccountIdConversion, TryConvertInto};
|
||||
use testnet_teyrchains_constants::zagros::locations::AssetHubParaId;
|
||||
@@ -325,8 +325,8 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet and
|
||||
// sibling teyrchains get free execution.
|
||||
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet
|
||||
// and sibling teyrchains get free execution.
|
||||
AllowExplicitUnpaidExecutionFrom<(
|
||||
ParentOrParentsPlurality,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
|
||||
@@ -40,6 +40,7 @@ use asset_test_pezutils::{
|
||||
};
|
||||
use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use codec::{Decode, Encode};
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::{
|
||||
assert_err, assert_noop, assert_ok, parameter_types,
|
||||
traits::{
|
||||
@@ -55,7 +56,6 @@ use pezframe_support::{
|
||||
},
|
||||
weights::{Weight, WeightToFee as WeightToFeeT},
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezpallet_revive::{
|
||||
test_utils::builder::{BareInstantiateBuilder, Contract},
|
||||
Code,
|
||||
@@ -89,8 +89,9 @@ const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32];
|
||||
const ERC20_PVM: &[u8] =
|
||||
include_bytes!("../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/erc20.polkavm");
|
||||
|
||||
const FAKE_ERC20_PVM: &[u8] =
|
||||
include_bytes!("../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/fake_erc20.polkavm");
|
||||
const FAKE_ERC20_PVM: &[u8] = include_bytes!(
|
||||
"../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/fake_erc20.polkavm"
|
||||
);
|
||||
|
||||
const EXPENSIVE_ERC20_PVM: &[u8] = include_bytes!(
|
||||
"../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/expensive_erc20.polkavm"
|
||||
|
||||
@@ -38,7 +38,8 @@ pub struct AssetPairFactory<Target, SelfParaId, PalletId, L = Location>(
|
||||
PhantomData<(Target, SelfParaId, PalletId, L)>,
|
||||
);
|
||||
impl<Target: Get<L>, SelfParaId: Get<ParaId>, PalletId: Get<u32>, L: TryFrom<Location> + Debug>
|
||||
pezpallet_asset_conversion::BenchmarkHelper<L> for AssetPairFactory<Target, SelfParaId, PalletId, L>
|
||||
pezpallet_asset_conversion::BenchmarkHelper<L>
|
||||
for AssetPairFactory<Target, SelfParaId, PalletId, L>
|
||||
where
|
||||
<L as TryFrom<Location>>::Error: Debug,
|
||||
{
|
||||
|
||||
@@ -137,7 +137,10 @@ where
|
||||
}
|
||||
|
||||
/// Helper function to convert `Balance` with Location` to `Asset`
|
||||
pub fn convert_balance<T: pezframe_support::pezpallet_prelude::Get<Location>, Balance: TryInto<u128>>(
|
||||
pub fn convert_balance<
|
||||
T: pezframe_support::pezpallet_prelude::Get<Location>,
|
||||
Balance: TryInto<u128>,
|
||||
>(
|
||||
balance: Balance,
|
||||
) -> Result<Asset, FungiblesAccessError> {
|
||||
match balance.try_into() {
|
||||
|
||||
@@ -74,8 +74,8 @@ pub type TrustBackedAssetsConvertedConcreteId<
|
||||
pub type UniquesConvertedConcreteId<UniquesPalletLocation> = MatchedConvertedConcreteId<
|
||||
CollectionId,
|
||||
ItemId,
|
||||
// The asset starts with the uniques pezpallet. The `CollectionId` of the asset is specified as a
|
||||
// junction within the pezpallet itself.
|
||||
// The asset starts with the uniques pezpallet. The `CollectionId` of the asset is specified as
|
||||
// a junction within the pezpallet itself.
|
||||
StartsWith<UniquesPalletLocation>,
|
||||
CollectionIdForUniquesConvert<UniquesPalletLocation>,
|
||||
TryConvertInto,
|
||||
@@ -175,8 +175,8 @@ pub type PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance> =
|
||||
TryConvertInto,
|
||||
>;
|
||||
|
||||
/// Adapter implementation for accessing pools (`pezpallet_asset_conversion`) that uses `AssetKind` as
|
||||
/// a `xcm::v*` which could be different from the `xcm::latest`.
|
||||
/// Adapter implementation for accessing pools (`pezpallet_asset_conversion`) that uses `AssetKind`
|
||||
/// as a `xcm::v*` which could be different from the `xcm::latest`.
|
||||
pub struct PoolAdapter<Runtime>(PhantomData<Runtime>);
|
||||
impl<
|
||||
Runtime: pezpallet_asset_conversion::Config<PoolId = (L, L), AssetKind = L>,
|
||||
@@ -230,15 +230,17 @@ impl<
|
||||
|
||||
/// Helper function for filtering pool.
|
||||
pub fn iter_assets_in_pool_with(asset: &L) -> impl Iterator<Item = L> + '_ {
|
||||
pezpallet_asset_conversion::Pools::<Runtime>::iter_keys().filter_map(|(asset_1, asset_2)| {
|
||||
if asset_1 == *asset {
|
||||
Some(asset_2)
|
||||
} else if asset_2 == *asset {
|
||||
Some(asset_1)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
pezpallet_asset_conversion::Pools::<Runtime>::iter_keys().filter_map(
|
||||
|(asset_1, asset_2)| {
|
||||
if asset_1 == *asset {
|
||||
Some(asset_2)
|
||||
} else if asset_2 == *asset {
|
||||
Some(asset_1)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -883,7 +883,8 @@ pub fn asset_transactor_transfer_with_pallet_assets_instance_works<
|
||||
From<AssetId> + Into<AssetId>,
|
||||
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::AssetIdParameter:
|
||||
From<AssetId> + Into<AssetId>,
|
||||
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::Balance: From<Balance> + Into<u128>,
|
||||
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::Balance:
|
||||
From<Balance> + Into<u128>,
|
||||
<Runtime as pezframe_system::Config>::AccountId:
|
||||
Into<<<Runtime as pezframe_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
|
||||
<<Runtime as pezframe_system::Config>::Lookup as StaticLookup>::Source:
|
||||
@@ -1199,11 +1200,15 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
|
||||
.with_tracing()
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
assert!(<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
|
||||
.collect::<Vec<_>>()
|
||||
.is_empty());
|
||||
assert!(
|
||||
<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
|
||||
.collect::<Vec<_>>()
|
||||
.is_empty()
|
||||
);
|
||||
assert_eq!(
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id),
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
|
||||
&foreign_creator_as_account_id
|
||||
),
|
||||
existential_deposit +
|
||||
asset_deposit + metadata_deposit_base +
|
||||
metadata_deposit_per_byte_eta +
|
||||
@@ -1289,9 +1294,11 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
|
||||
assert!(events.any(|e| matches!(e, pezpallet_assets::Event::TeamChanged { .. })));
|
||||
|
||||
// check assets after
|
||||
assert!(!<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
|
||||
.collect::<Vec<_>>()
|
||||
.is_empty());
|
||||
assert!(
|
||||
!<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
|
||||
.collect::<Vec<_>>()
|
||||
.is_empty()
|
||||
);
|
||||
|
||||
// check update metadata
|
||||
use pezframe_support::traits::fungibles::roles::Inspect as InspectRoles;
|
||||
@@ -1320,10 +1327,13 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
|
||||
Some(bob_account.clone())
|
||||
);
|
||||
assert!(
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id) >=
|
||||
existential_deposit + buy_execution_fee_amount.into(),
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
|
||||
&foreign_creator_as_account_id
|
||||
) >= existential_deposit + buy_execution_fee_amount.into(),
|
||||
"Free balance: {:?} should be ge {:?}",
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id),
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
|
||||
&foreign_creator_as_account_id
|
||||
),
|
||||
existential_deposit + buy_execution_fee_amount.into()
|
||||
);
|
||||
assert_metadata::<
|
||||
@@ -1701,9 +1711,10 @@ where
|
||||
assert_eq!(execution_fees, expected_weight_native_fee);
|
||||
|
||||
// We need some balance to create an asset.
|
||||
assert_ok!(
|
||||
pezpallet_balances::Pezpallet::<Runtime>::mint_into(&test_account, 3_000_000_000_000,)
|
||||
);
|
||||
assert_ok!(pezpallet_balances::Pezpallet::<Runtime>::mint_into(
|
||||
&test_account,
|
||||
3_000_000_000_000,
|
||||
));
|
||||
|
||||
// Now we try to use an asset that's not in a pool.
|
||||
let asset_id = 1984u32; // USDT.
|
||||
|
||||
+1
-1
@@ -21,10 +21,10 @@
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{
|
||||
dispatch::DispatchClass,
|
||||
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
|
||||
|
||||
+4
-2
@@ -35,12 +35,12 @@ use pezframe_support::{
|
||||
traits::{Equals, PalletInfoAccess},
|
||||
};
|
||||
use pezframe_system::{EnsureNever, EnsureRoot};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_bridge_messages::LaneIdOf;
|
||||
use pezpallet_bridge_relayers::extension::{
|
||||
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
|
||||
};
|
||||
use pezpallet_xcm_bridge_hub::XcmAsPlainPayload;
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
|
||||
use xcm::{
|
||||
latest::prelude::*,
|
||||
@@ -115,7 +115,9 @@ pub type WithPezkuwichainBulletinMessagesInstance = pezpallet_bridge_messages::I
|
||||
impl pezpallet_bridge_messages::Config<WithPezkuwichainBulletinMessagesInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<Runtime>;
|
||||
weights::pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<
|
||||
Runtime,
|
||||
>;
|
||||
|
||||
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
|
||||
type BridgedChain = bp_pezkuwi_bulletin::PezkuwiBulletin;
|
||||
|
||||
+3
-2
@@ -38,8 +38,8 @@ use crate::xcm_config::RelayNetwork;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use benchmark_helpers::DoNothingRouter;
|
||||
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
|
||||
use pezframe_support::{parameter_types, weights::ConstantMultiplier};
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::{parameter_types, weights::ConstantMultiplier};
|
||||
use pezpallet_xcm::EnsureXcm;
|
||||
use pezsp_runtime::{
|
||||
traits::{ConstU32, ConstU8, Keccak256},
|
||||
@@ -186,7 +186,8 @@ parameter_types! {
|
||||
};
|
||||
}
|
||||
|
||||
pub const SLOTS_PER_EPOCH: u32 = pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
|
||||
pub const SLOTS_PER_EPOCH: u32 =
|
||||
pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
|
||||
|
||||
impl pezsnowbridge_pezpallet_ethereum_client::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
+13
-11
@@ -35,11 +35,11 @@ use pezpallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload};
|
||||
|
||||
use pezframe_support::{parameter_types, traits::PalletInfoAccess};
|
||||
use pezframe_system::{EnsureNever, EnsureRoot};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_bridge_messages::LaneIdOf;
|
||||
use pezpallet_bridge_relayers::extension::{
|
||||
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
|
||||
};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
|
||||
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
|
||||
use xcm::{
|
||||
@@ -105,7 +105,8 @@ pezbp_runtime::generate_static_str_provider!(OnBridgeHubPezkuwichainRefundBridge
|
||||
pub type WithBridgeHubZagrosMessagesInstance = pezpallet_bridge_messages::Instance3;
|
||||
impl pezpallet_bridge_messages::Config<WithBridgeHubZagrosMessagesInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<Runtime>;
|
||||
|
||||
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
|
||||
type BridgedChain = bp_bridge_hub_zagros::BridgeHubZagros;
|
||||
@@ -120,12 +121,13 @@ impl pezpallet_bridge_messages::Config<WithBridgeHubZagrosMessagesInstance> for
|
||||
type LaneId = LegacyLaneId;
|
||||
|
||||
type DeliveryPayments = ();
|
||||
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubZagrosMessagesInstance,
|
||||
RelayersForLegacyLaneIdsMessagesInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
type DeliveryConfirmationPayments =
|
||||
pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubZagrosMessagesInstance,
|
||||
RelayersForLegacyLaneIdsMessagesInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
|
||||
type MessageDispatch = XcmOverBridgeHubZagros;
|
||||
type OnMessagesDelivered = XcmOverBridgeHubZagros;
|
||||
@@ -363,8 +365,8 @@ pub mod migration {
|
||||
|
||||
mod v1_wrong {
|
||||
use bp_messages::{LaneState, MessageNonce, UnrewardedRelayer};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezpallet_bridge_messages::BridgedChainOf;
|
||||
use pezsp_std::collections::vec_deque::VecDeque;
|
||||
|
||||
@@ -396,8 +398,8 @@ pub mod migration {
|
||||
/// for Pezkuwichain/Zagros).
|
||||
pub struct FixMessagesV1Migration<T, I>(pezsp_std::marker::PhantomData<(T, I)>);
|
||||
|
||||
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static> pezframe_support::traits::OnRuntimeUpgrade
|
||||
for FixMessagesV1Migration<T, I>
|
||||
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static>
|
||||
pezframe_support::traits::OnRuntimeUpgrade for FixMessagesV1Migration<T, I>
|
||||
{
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
use pezsp_core::Get;
|
||||
|
||||
@@ -75,11 +75,11 @@ use testnet_teyrchains_constants::pezkuwichain::{
|
||||
consensus::*, currency::*, fee::WeightToFee, time::*,
|
||||
};
|
||||
|
||||
use pezbp_runtime::HeaderId;
|
||||
use bridge_hub_common::{
|
||||
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
|
||||
AggregateMessageOrigin,
|
||||
};
|
||||
use pezbp_runtime::HeaderId;
|
||||
pub use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
pub use pezsp_runtime::{MultiAddress, Perbill, Permill};
|
||||
|
||||
@@ -501,7 +501,8 @@ impl pezpallet_session::Config for Runtime {
|
||||
// we don't have stash and controller, thus we don't need the convert as well.
|
||||
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
|
||||
type ShouldEndSession = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type NextSessionRotation = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type NextSessionRotation =
|
||||
pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type SessionManager = CollatorSelection;
|
||||
// Essentially just Aura, but let's be pedantic.
|
||||
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
|
||||
+3
-3
@@ -23,10 +23,11 @@ use ::pezpallet_bridge_relayers::WeightInfo as _;
|
||||
use ::pezpallet_bridge_teyrchains::WeightInfoExt as TeyrchainsWeightInfoExt;
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod pezcumulus_pezpallet_teyrchain_system;
|
||||
pub mod pezcumulus_pezpallet_weight_reclaim;
|
||||
pub mod pezcumulus_pezpallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod pezframe_system;
|
||||
pub mod pezframe_system_extensions;
|
||||
pub mod pezpallet_balances;
|
||||
@@ -44,12 +45,11 @@ pub mod pezpallet_timestamp;
|
||||
pub mod pezpallet_transaction_payment;
|
||||
pub mod pezpallet_utility;
|
||||
pub mod pezpallet_xcm;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod pezsnowbridge_pezpallet_ethereum_client;
|
||||
pub mod pezsnowbridge_pezpallet_inbound_queue;
|
||||
pub mod pezsnowbridge_pezpallet_outbound_queue;
|
||||
pub mod pezsnowbridge_pezpallet_system;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod xcm;
|
||||
|
||||
pub use block_weights::constants::BlockExecutionWeight;
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@ use pezframe_support::{
|
||||
},
|
||||
};
|
||||
use pezframe_system::EnsureRoot;
|
||||
use pezpallet_collator_selection::StakingPotAccountId;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_collator_selection::StakingPotAccountId;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezsp_runtime::traits::AccountIdConversion;
|
||||
use testnet_teyrchains_constants::pezkuwichain::snowbridge::EthereumNetwork;
|
||||
use teyrchains_common::{
|
||||
|
||||
+6
-5
@@ -17,13 +17,13 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_to_zagros_config::OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages,
|
||||
xcm_config::XcmConfig, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages,
|
||||
Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys,
|
||||
TxExtension, UncheckedExtrinsic,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezcumulus_primitives_core::XcmError::FailedToTransactAsset;
|
||||
use pezframe_support::parameter_types;
|
||||
use pezsnowbridge_pezpallet_ethereum_client::WeightInfo;
|
||||
@@ -97,7 +97,8 @@ pub fn transfer_token_to_ethereum_insufficient_fund() {
|
||||
fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() {
|
||||
let max_message_queue_weight = MessageQueueServiceWeight::get();
|
||||
let force_checkpoint =
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint();
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint(
|
||||
);
|
||||
let submit_checkpoint =
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::submit();
|
||||
max_message_queue_weight.all_gt(force_checkpoint);
|
||||
@@ -123,9 +124,9 @@ fn ethereum_to_pezkuwi_message_extrinsics_work() {
|
||||
}
|
||||
|
||||
/// Tests that the digest items are as expected when a Ethereum Outbound message is received.
|
||||
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed before
|
||||
/// the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this test
|
||||
/// will fail.
|
||||
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed
|
||||
/// before the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this
|
||||
/// test will fail.
|
||||
#[test]
|
||||
pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works() {
|
||||
pezsnowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use codec::{Decode, Encode};
|
||||
use hex_literal::hex;
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_common_config, bridge_to_bulletin_config, bridge_to_zagros_config,
|
||||
xcm_config::{RelayNetwork, TokenLocation, XcmConfig},
|
||||
@@ -25,9 +27,7 @@ use pezbridge_hub_pezkuwichain_runtime::{
|
||||
TeyrchainSystem, TransactionPayment, TxExtension, UncheckedExtrinsic,
|
||||
};
|
||||
use pezbridge_hub_test_utils::{GovernanceOrigin, SlotDurations};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8};
|
||||
use hex_literal::hex;
|
||||
use pezsnowbridge_core::ChannelId;
|
||||
use pezsp_consensus_aura::SlotDuration;
|
||||
use pezsp_core::{crypto::Ss58Codec, H160};
|
||||
@@ -131,14 +131,14 @@ mod bridge_hub_zagros_tests {
|
||||
BridgeGrandpaZagrosInstance, BridgeTeyrchainZagrosInstance, DeliveryRewardInBalance,
|
||||
RelayersForLegacyLaneIdsMessagesInstance,
|
||||
};
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, xcm_config::LocationToAccountId,
|
||||
};
|
||||
use pezbridge_hub_test_utils::test_cases::from_teyrchain;
|
||||
use bridge_to_zagros_config::{
|
||||
BridgeHubZagrosLocation, WithBridgeHubZagrosMessagesInstance,
|
||||
XcmOverBridgeHubZagrosInstance, ZagrosGlobalConsensusNetwork,
|
||||
};
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, xcm_config::LocationToAccountId,
|
||||
};
|
||||
use pezbridge_hub_test_utils::test_cases::from_teyrchain;
|
||||
use pezcumulus_primitives_core::UpwardMessageSender;
|
||||
|
||||
// Random para id of sibling chain used in tests.
|
||||
@@ -240,14 +240,20 @@ mod bridge_hub_zagros_tests {
|
||||
bp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
vec![
|
||||
(pezsnowbridge_pezpallet_outbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
|
||||
channel_id_one,
|
||||
)
|
||||
.to_vec(), 0u64.encode()),
|
||||
(pezsnowbridge_pezpallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
|
||||
channel_id_one,
|
||||
)
|
||||
.to_vec(), 0u64.encode()),
|
||||
(
|
||||
pezsnowbridge_pezpallet_outbound_queue::Nonce::<Runtime>::hashed_key_for::<
|
||||
ChannelId,
|
||||
>(channel_id_one)
|
||||
.to_vec(),
|
||||
0u64.encode(),
|
||||
),
|
||||
(
|
||||
pezsnowbridge_pezpallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<
|
||||
ChannelId,
|
||||
>(channel_id_one)
|
||||
.to_vec(),
|
||||
0u64.encode(),
|
||||
),
|
||||
],
|
||||
|| {
|
||||
// Outbound
|
||||
@@ -521,16 +527,16 @@ mod bridge_hub_bulletin_tests {
|
||||
use super::*;
|
||||
use bp_messages::LegacyLaneId;
|
||||
use bridge_common_config::BridgeGrandpaPezkuwichainBulletinInstance;
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_common_config::RelayersForLegacyLaneIdsMessagesInstance,
|
||||
xcm_config::LocationToAccountId,
|
||||
};
|
||||
use pezbridge_hub_test_utils::test_cases::from_grandpa_chain;
|
||||
use bridge_to_bulletin_config::{
|
||||
PezkuwichainBulletinGlobalConsensusNetwork,
|
||||
PezkuwichainBulletinGlobalConsensusNetworkLocation,
|
||||
WithPezkuwichainBulletinMessagesInstance, XcmOverPezkuwiBulletinInstance,
|
||||
};
|
||||
use pezbridge_hub_pezkuwichain_runtime::{
|
||||
bridge_common_config::RelayersForLegacyLaneIdsMessagesInstance,
|
||||
xcm_config::LocationToAccountId,
|
||||
};
|
||||
use pezbridge_hub_test_utils::test_cases::from_grandpa_chain;
|
||||
use pezcumulus_primitives_core::UpwardMessageSender;
|
||||
|
||||
// Random para id of sibling chain used in tests.
|
||||
|
||||
+1
-1
@@ -20,10 +20,10 @@
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::dispatch::DispatchClass;
|
||||
use pezsp_runtime::{RuntimeDebug, StateVersion};
|
||||
|
||||
|
||||
+18
-8
@@ -24,9 +24,9 @@ use crate::{
|
||||
};
|
||||
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
|
||||
use bridge_hub_common::AggregateMessageOrigin;
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::{parameter_types, traits::Contains, weights::ConstantMultiplier};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use hex_literal::hex;
|
||||
use pezpallet_xcm::EnsureXcm;
|
||||
use pezsnowbridge_beacon_primitives::{Fork, ForkVersions};
|
||||
use pezsnowbridge_core::{gwei, meth, AllowSiblingsOnly, PricingParameters, Rewards};
|
||||
@@ -53,7 +53,8 @@ use xcm::prelude::{GlobalConsensus, InteriorLocation, Location, PalletInstance,
|
||||
use xcm_executor::XcmExecutor;
|
||||
use zagros_runtime_constants::system_teyrchain::ASSET_HUB_ID;
|
||||
|
||||
pub const SLOTS_PER_EPOCH: u32 = pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
|
||||
pub const SLOTS_PER_EPOCH: u32 =
|
||||
pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
|
||||
|
||||
/// Exports message to the Ethereum Gateway contract.
|
||||
pub type SnowbridgeExporter = EthereumBlobExporter<
|
||||
@@ -194,7 +195,8 @@ impl pezsnowbridge_pezpallet_outbound_queue_v2::Config for Runtime {
|
||||
type WeightToFee = WeightToFee;
|
||||
type Verifier = EthereumBeaconClient;
|
||||
type GatewayAddress = EthereumGatewayAddress;
|
||||
type WeightInfo = crate::weights::pezsnowbridge_pezpallet_outbound_queue_v2::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
crate::weights::pezsnowbridge_pezpallet_outbound_queue_v2::WeightInfo<Runtime>;
|
||||
type EthereumNetwork = EthereumNetwork;
|
||||
type RewardKind = BridgeReward;
|
||||
type DefaultRewardKind = SnowbridgeReward;
|
||||
@@ -325,8 +327,8 @@ pub mod benchmark_helpers {
|
||||
RuntimeOrigin, System,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezframe_support::assert_ok;
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::assert_ok;
|
||||
use pezsnowbridge_beacon_primitives::BeaconHeader;
|
||||
use pezsnowbridge_inbound_queue_primitives::EventFixture;
|
||||
use pezsnowbridge_pezpallet_inbound_queue::BenchmarkHelper;
|
||||
@@ -357,7 +359,9 @@ pub mod benchmark_helpers {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: pezsnowbridge_pezpallet_inbound_queue_v2::Config> InboundQueueBenchmarkHelperV2<T> for Runtime {
|
||||
impl<T: pezsnowbridge_pezpallet_inbound_queue_v2::Config> InboundQueueBenchmarkHelperV2<T>
|
||||
for Runtime
|
||||
{
|
||||
fn initialize_storage() -> EventFixture {
|
||||
let message = make_register_token_message_v2();
|
||||
|
||||
@@ -370,7 +374,9 @@ pub mod benchmark_helpers {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: pezsnowbridge_pezpallet_outbound_queue_v2::Config> OutboundQueueBenchmarkHelperV2<T> for Runtime {
|
||||
impl<T: pezsnowbridge_pezpallet_outbound_queue_v2::Config> OutboundQueueBenchmarkHelperV2<T>
|
||||
for Runtime
|
||||
{
|
||||
fn initialize_storage(beacon_header: BeaconHeader, block_roots_root: H256) {
|
||||
EthereumBeaconClient::store_finalized_header(beacon_header, block_roots_root).unwrap();
|
||||
}
|
||||
@@ -440,7 +446,9 @@ pub(crate) mod migrations {
|
||||
>;
|
||||
|
||||
/// One shot migration for NetworkId::Zagros to NetworkId::ByGenesis(ZAGROS_GENESIS_HASH)
|
||||
pub struct MigrationForXcmV5<T: pezsnowbridge_pezpallet_system::Config>(core::marker::PhantomData<T>);
|
||||
pub struct MigrationForXcmV5<T: pezsnowbridge_pezpallet_system::Config>(
|
||||
core::marker::PhantomData<T>,
|
||||
);
|
||||
impl<T: pezsnowbridge_pezpallet_system::Config> pezframe_support::traits::OnRuntimeUpgrade
|
||||
for MigrationForXcmV5<T>
|
||||
{
|
||||
@@ -451,7 +459,9 @@ pub(crate) mod migrations {
|
||||
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1));
|
||||
Some(xcm::v5::Location::try_from(pre).expect("valid location"))
|
||||
};
|
||||
pezsnowbridge_pezpallet_system::ForeignToNativeId::<T>::translate_values(translate_zagros);
|
||||
pezsnowbridge_pezpallet_system::ForeignToNativeId::<T>::translate_values(
|
||||
translate_zagros,
|
||||
);
|
||||
|
||||
weight
|
||||
}
|
||||
|
||||
+11
-10
@@ -34,11 +34,11 @@ use pezframe_support::{
|
||||
traits::{ConstU32, PalletInfoAccess},
|
||||
};
|
||||
use pezframe_system::{EnsureNever, EnsureRoot};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_bridge_messages::LaneIdOf;
|
||||
use pezpallet_bridge_relayers::extension::{
|
||||
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
|
||||
};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use testnet_teyrchains_constants::zagros::currency::UNITS as ZGR;
|
||||
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
|
||||
use xcm::{
|
||||
@@ -151,12 +151,13 @@ impl pezpallet_bridge_messages::Config<WithBridgeHubPezkuwichainMessagesInstance
|
||||
type LaneId = LegacyLaneId;
|
||||
|
||||
type DeliveryPayments = ();
|
||||
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
BridgeRelayersInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
type DeliveryConfirmationPayments =
|
||||
pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
BridgeRelayersInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
|
||||
type MessageDispatch = XcmOverBridgeHubPezkuwichain;
|
||||
type OnMessagesDelivered = XcmOverBridgeHubPezkuwichain;
|
||||
@@ -381,8 +382,8 @@ pub mod migration {
|
||||
|
||||
mod v1_wrong {
|
||||
use bp_messages::{LaneState, MessageNonce, UnrewardedRelayer};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezpallet_bridge_messages::BridgedChainOf;
|
||||
use pezsp_std::collections::vec_deque::VecDeque;
|
||||
|
||||
@@ -414,8 +415,8 @@ pub mod migration {
|
||||
/// for Pezkuwichain/Zagros).
|
||||
pub struct FixMessagesV1Migration<T, I>(pezsp_std::marker::PhantomData<(T, I)>);
|
||||
|
||||
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static> pezframe_support::traits::OnRuntimeUpgrade
|
||||
for FixMessagesV1Migration<T, I>
|
||||
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static>
|
||||
pezframe_support::traits::OnRuntimeUpgrade for FixMessagesV1Migration<T, I>
|
||||
{
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
use pezsp_core::Get;
|
||||
|
||||
@@ -485,7 +485,8 @@ impl pezpallet_session::Config for Runtime {
|
||||
// we don't have stash and controller, thus we don't need the convert as well.
|
||||
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
|
||||
type ShouldEndSession = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type NextSessionRotation = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type NextSessionRotation =
|
||||
pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
|
||||
type SessionManager = CollatorSelection;
|
||||
// Essentially just Aura, but let's be pedantic.
|
||||
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
|
||||
@@ -23,10 +23,11 @@ use ::pezpallet_bridge_relayers::WeightInfo as _;
|
||||
use ::pezpallet_bridge_teyrchains::WeightInfoExt as TeyrchainsWeightInfoExt;
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod pezcumulus_pezpallet_teyrchain_system;
|
||||
pub mod pezcumulus_pezpallet_weight_reclaim;
|
||||
pub mod pezcumulus_pezpallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod pezframe_system;
|
||||
pub mod pezframe_system_extensions;
|
||||
pub mod pezpallet_balances;
|
||||
@@ -42,7 +43,6 @@ pub mod pezpallet_timestamp;
|
||||
pub mod pezpallet_transaction_payment;
|
||||
pub mod pezpallet_utility;
|
||||
pub mod pezpallet_xcm;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
pub mod xcm;
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ use pezframe_support::{
|
||||
},
|
||||
};
|
||||
use pezframe_system::EnsureRoot;
|
||||
use pezpallet_collator_selection::StakingPotAccountId;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
|
||||
use pezkuwi_teyrchain_primitives::primitives::Sibling;
|
||||
use pezpallet_collator_selection::StakingPotAccountId;
|
||||
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
|
||||
use pezsp_runtime::traits::AccountIdConversion;
|
||||
use testnet_teyrchains_constants::zagros::{
|
||||
locations::AssetHubLocation, snowbridge::EthereumNetwork,
|
||||
@@ -161,8 +161,8 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
// If the message is one that immediately attempts to pay for execution, then
|
||||
// allow it.
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent, its pluralities (i.e. governance bodies) and relay treasury pezpallet
|
||||
// get free execution.
|
||||
// Parent, its pluralities (i.e. governance bodies) and relay treasury
|
||||
// pezpallet get free execution.
|
||||
AllowExplicitUnpaidExecutionFrom<(
|
||||
ParentOrParentsPlurality,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
use bp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
use bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_to_pezkuwichain_config, xcm_config::XcmConfig, AllPalletsWithoutSystem,
|
||||
BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime,
|
||||
RuntimeCall, RuntimeEvent, SessionKeys, TxExtension, UncheckedExtrinsic,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezcumulus_primitives_core::XcmError::FailedToTransactAsset;
|
||||
use pezframe_support::parameter_types;
|
||||
use pezsnowbridge_pezpallet_ethereum_client::WeightInfo;
|
||||
@@ -98,7 +98,8 @@ pub fn transfer_token_to_ethereum_insufficient_fund() {
|
||||
fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() {
|
||||
let max_message_queue_weight = MessageQueueServiceWeight::get();
|
||||
let force_checkpoint =
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint();
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint(
|
||||
);
|
||||
let submit_checkpoint =
|
||||
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::submit();
|
||||
max_message_queue_weight.all_gt(force_checkpoint);
|
||||
@@ -124,9 +125,9 @@ fn ethereum_to_pezkuwi_message_extrinsics_work() {
|
||||
}
|
||||
|
||||
/// Tests that the digest items are as expected when a Ethereum Outbound message is received.
|
||||
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed before
|
||||
/// the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this test
|
||||
/// will fail.
|
||||
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed
|
||||
/// before the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this
|
||||
/// test will fail.
|
||||
#[test]
|
||||
pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works() {
|
||||
pezsnowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<
|
||||
|
||||
@@ -21,6 +21,13 @@ use bp_messages::LegacyLaneId;
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use bp_relayers::{PayRewardFromAccount, RewardsAccountOwner, RewardsAccountParams};
|
||||
use bridge_common_config::{BridgeRelayersInstance, BridgeReward, RequiredStakeForStakeAndSlash};
|
||||
use bridge_to_pezkuwichain_config::{
|
||||
BridgeGrandpaPezkuwichainInstance, BridgeHubPezkuwichainLocation,
|
||||
BridgeTeyrchainPezkuwichainInstance, DeliveryRewardInBalance,
|
||||
WithBridgeHubPezkuwichainMessagesInstance, XcmOverBridgeHubPezkuwichainInstance,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use hex_literal::hex;
|
||||
use pezbridge_hub_test_utils::{
|
||||
test_cases::{from_teyrchain, run_test},
|
||||
GovernanceOrigin, SlotDurations,
|
||||
@@ -36,12 +43,6 @@ use pezbridge_hub_zagros_runtime::{
|
||||
RuntimeOrigin, SessionKeys, TeyrchainSystem, TransactionPayment, TxExtension,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use bridge_to_pezkuwichain_config::{
|
||||
BridgeGrandpaPezkuwichainInstance, BridgeHubPezkuwichainLocation,
|
||||
BridgeTeyrchainPezkuwichainInstance, DeliveryRewardInBalance,
|
||||
WithBridgeHubPezkuwichainMessagesInstance, XcmOverBridgeHubPezkuwichainInstance,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezcumulus_primitives_core::UpwardMessageSender;
|
||||
use pezframe_support::{
|
||||
assert_err, assert_ok,
|
||||
@@ -52,7 +53,6 @@ use pezframe_support::{
|
||||
ConstU8,
|
||||
},
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezsp_consensus_aura::SlotDuration;
|
||||
use pezsp_core::crypto::Ss58Codec;
|
||||
use pezsp_keyring::Sr25519Keyring::{Alice, Bob};
|
||||
|
||||
@@ -21,9 +21,9 @@ use pezframe_support::{
|
||||
weights::WeightMeter,
|
||||
};
|
||||
use pezpallet_message_queue::OnQueueChanged;
|
||||
use scale_info::TypeInfo;
|
||||
use pezsnowbridge_core::ChannelId;
|
||||
use pezsp_core::H256;
|
||||
use scale_info::TypeInfo;
|
||||
use xcm::latest::prelude::{Junction, Location};
|
||||
|
||||
/// The aggregate origin of an inbound message.
|
||||
|
||||
+14
-7
@@ -129,7 +129,8 @@ pub fn relayed_incoming_message_works<RuntimeHelper>(
|
||||
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
helpers::relayed_incoming_message_works::<
|
||||
RuntimeHelper::Runtime,
|
||||
@@ -264,7 +265,8 @@ pub fn free_relay_extrinsic_works<RuntimeHelper>(
|
||||
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
// ensure that the runtime allows free header submissions
|
||||
let free_headers_interval = <RuntimeHelper::Runtime as BridgeGrandpaConfig<
|
||||
@@ -433,7 +435,8 @@ pub fn complex_relay_extrinsic_works<RuntimeHelper>(
|
||||
+ From<pezpallet_utility::Call<RuntimeHelper::Runtime>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
helpers::relayed_incoming_message_works::<
|
||||
RuntimeHelper::Runtime,
|
||||
@@ -560,7 +563,8 @@ where
|
||||
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
|
||||
// generate bridged relay chain finality, teyrchain heads and message proofs,
|
||||
@@ -630,7 +634,8 @@ where
|
||||
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
|
||||
// generate bridged relay chain finality, teyrchain heads and message proofs,
|
||||
@@ -694,7 +699,8 @@ where
|
||||
From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
|
||||
// generate bridged relay chain finality, teyrchain heads and message proofs,
|
||||
@@ -755,7 +761,8 @@ where
|
||||
From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
|
||||
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
{
|
||||
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
|
||||
// generate bridged relay chain finality, teyrchain heads and message proofs,
|
||||
|
||||
@@ -21,9 +21,9 @@ use crate::test_cases::{bridges_prelude::*, run_test, RuntimeHelper};
|
||||
use asset_test_pezutils::BasicTeyrchainRuntime;
|
||||
use bp_messages::MessageNonce;
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaId};
|
||||
use pezbp_runtime::Chain;
|
||||
use codec::Decode;
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::Chain;
|
||||
use pezframe_support::{
|
||||
assert_ok,
|
||||
dispatch::GetDispatchInfo,
|
||||
@@ -93,7 +93,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks that the best teyrchain header hash in the bridge teyrchains pezpallet equals to given one.
|
||||
/// Checks that the best teyrchain header hash in the bridge teyrchains pezpallet equals to given
|
||||
/// one.
|
||||
pub struct VerifySubmitTeyrchainHeaderProofOutcome<Runtime, PPI> {
|
||||
bridged_para_id: u32,
|
||||
expected_best_hash: ParaHash,
|
||||
@@ -122,8 +123,10 @@ where
|
||||
{
|
||||
fn verify_outcome(&self) {
|
||||
assert_eq!(
|
||||
pezpallet_bridge_teyrchains::ParasInfo::<Runtime, PPI>::get(ParaId(self.bridged_para_id))
|
||||
.map(|info| info.best_head_hash.head_hash),
|
||||
pezpallet_bridge_teyrchains::ParasInfo::<Runtime, PPI>::get(ParaId(
|
||||
self.bridged_para_id
|
||||
))
|
||||
.map(|info| info.best_head_hash.head_hash),
|
||||
Some(self.expected_best_hash),
|
||||
);
|
||||
}
|
||||
@@ -222,7 +225,10 @@ where
|
||||
Runtime: pezpallet_balances::Config,
|
||||
{
|
||||
fn verify_outcome(&self) {
|
||||
assert_eq!(pezpallet_balances::Pezpallet::<Runtime>::free_balance(&self.relayer), self.balance,);
|
||||
assert_eq!(
|
||||
pezpallet_balances::Pezpallet::<Runtime>::free_balance(&self.relayer),
|
||||
self.balance,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +280,8 @@ pub fn relayed_incoming_message_works<Runtime, AllPalletsWithoutSystem, MPI>(
|
||||
pezbp_runtime::ChainId,
|
||||
) -> CallsAndVerifiers<Runtime>,
|
||||
) where
|
||||
Runtime: BasicTeyrchainRuntime + pezcumulus_pezpallet_xcmp_queue::Config + BridgeMessagesConfig<MPI>,
|
||||
Runtime:
|
||||
BasicTeyrchainRuntime + pezcumulus_pezpallet_xcmp_queue::Config + BridgeMessagesConfig<MPI>,
|
||||
AllPalletsWithoutSystem:
|
||||
OnInitialize<BlockNumberFor<Runtime>> + OnFinalize<BlockNumberFor<Runtime>>,
|
||||
MPI: 'static,
|
||||
@@ -307,7 +314,10 @@ pub fn relayed_incoming_message_works<Runtime, AllPalletsWithoutSystem, MPI>(
|
||||
2,
|
||||
AccountId::from(alice).into(),
|
||||
);
|
||||
mock_open_hrmp_channel::<Runtime, pezcumulus_pezpallet_teyrchain_system::Pezpallet<Runtime>>(
|
||||
mock_open_hrmp_channel::<
|
||||
Runtime,
|
||||
pezcumulus_pezpallet_teyrchain_system::Pezpallet<Runtime>,
|
||||
>(
|
||||
runtime_para_id.into(),
|
||||
sibling_teyrchain_id.into(),
|
||||
included_head,
|
||||
@@ -439,9 +449,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
buy_execution_fee_amount.into();
|
||||
let source_account_id =
|
||||
LocationToAccountId::convert_location(&source).expect("valid location");
|
||||
let _ =
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::mint_into(&source_account_id, balance_needed)
|
||||
.expect("mint_into passes");
|
||||
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
|
||||
&source_account_id,
|
||||
balance_needed,
|
||||
)
|
||||
.expect("mint_into passes");
|
||||
Some(buy_execution_fee)
|
||||
} else {
|
||||
None
|
||||
@@ -451,10 +463,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
bridge_opener(*locations.clone(), maybe_paid_execution);
|
||||
|
||||
// check opened bridge
|
||||
let bridge = pezpallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
|
||||
locations.bridge_id(),
|
||||
)
|
||||
.expect("opened bridge");
|
||||
let bridge =
|
||||
pezpallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
|
||||
locations.bridge_id(),
|
||||
)
|
||||
.expect("opened bridge");
|
||||
|
||||
// check state
|
||||
assert_ok!(
|
||||
@@ -498,8 +511,8 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
.ensure_complete());
|
||||
}
|
||||
|
||||
/// Utility for opening bridge directly inserting data to the `pezpallet_xcm_bridge_hub`'s storage
|
||||
/// (used only for legacy purposes).
|
||||
/// Utility for opening bridge directly inserting data to the `pezpallet_xcm_bridge_hub`'s
|
||||
/// storage (used only for legacy purposes).
|
||||
pub fn open_bridge_with_storage<Runtime, XcmOverBridgePalletInstance>(
|
||||
locations: pezpallet_xcm_bridge_hub::BridgeLocations,
|
||||
lane_id: pezpallet_xcm_bridge_hub::LaneIdOf<Runtime, XcmOverBridgePalletInstance>,
|
||||
@@ -554,9 +567,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
buy_execution_fee_amount.into();
|
||||
let source_account_id =
|
||||
LocationToAccountId::convert_location(&expected_source).expect("valid location");
|
||||
let _ =
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::mint_into(&source_account_id, balance_needed)
|
||||
.expect("mint_into passes");
|
||||
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
|
||||
&source_account_id,
|
||||
balance_needed,
|
||||
)
|
||||
.expect("mint_into passes");
|
||||
Some(buy_execution_fee)
|
||||
} else {
|
||||
None
|
||||
|
||||
@@ -31,8 +31,8 @@ use bp_messages::{
|
||||
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
|
||||
LaneState, MessageKey, MessagesOperatingMode, OutboundLaneData,
|
||||
};
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
use pezframe_support::{
|
||||
assert_ok,
|
||||
dispatch::GetDispatchInfo,
|
||||
@@ -320,7 +320,9 @@ pub fn handle_export_message_from_system_teyrchain_to_outbound_queue_works<
|
||||
runtime_para_id: u32,
|
||||
sibling_teyrchain_id: u32,
|
||||
unwrap_pallet_bridge_messages_event: Box<
|
||||
dyn Fn(Vec<u8>) -> Option<pezpallet_bridge_messages::Event<Runtime, MessagesPalletInstance>>,
|
||||
dyn Fn(
|
||||
Vec<u8>,
|
||||
) -> Option<pezpallet_bridge_messages::Event<Runtime, MessagesPalletInstance>>,
|
||||
>,
|
||||
export_message_instruction: fn() -> Instruction<XcmConfig::RuntimeCall>,
|
||||
existential_deposit: Option<Asset>,
|
||||
@@ -409,7 +411,9 @@ pub fn handle_export_message_from_system_teyrchain_to_outbound_queue_works<
|
||||
let mut events = <pezframe_system::Pezpallet<Runtime>>::events()
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_pallet_bridge_messages_event(e.event.encode()));
|
||||
assert!(events.any(|e| matches!(e, pezpallet_bridge_messages::Event::MessageAccepted { .. })));
|
||||
assert!(
|
||||
events.any(|e| matches!(e, pezpallet_bridge_messages::Event::MessageAccepted { .. }))
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -565,9 +569,8 @@ pub fn message_dispatch_routing_works<
|
||||
let mut events = <pezframe_system::Pezpallet<Runtime>>::events()
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_pezcumulus_pezpallet_xcmp_queue_event(e.event.encode()));
|
||||
assert!(
|
||||
events.any(|e| matches!(e, pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }))
|
||||
);
|
||||
assert!(events
|
||||
.any(|e| matches!(e, pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. })));
|
||||
})
|
||||
}
|
||||
|
||||
@@ -689,10 +692,13 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
{
|
||||
run_test::<Runtime, _>(collator_session_key, runtime_para_id, vec![], || {
|
||||
// construct expected bridge configuration
|
||||
let locations = pezpallet_xcm_bridge_hub::Pezpallet::<Runtime, XcmOverBridgePalletInstance>::bridge_locations(
|
||||
expected_source.clone().into(),
|
||||
destination.clone().into(),
|
||||
).expect("valid bridge locations");
|
||||
let locations = pezpallet_xcm_bridge_hub::Pezpallet::<
|
||||
Runtime,
|
||||
XcmOverBridgePalletInstance,
|
||||
>::bridge_locations(
|
||||
expected_source.clone().into(), destination.clone().into()
|
||||
)
|
||||
.expect("valid bridge locations");
|
||||
let expected_lane_id =
|
||||
locations.calculate_lane_id(xcm::latest::VERSION).expect("valid laneId");
|
||||
let lanes_manager = LanesManagerOf::<Runtime, XcmOverBridgePalletInstance>::new();
|
||||
|
||||
+1
-1
@@ -23,9 +23,9 @@ use bp_messages::{
|
||||
target_chain::FromBridgedChainMessagesProof, ChainWithMessages, LaneState, MessageNonce,
|
||||
UnrewardedRelayersState,
|
||||
};
|
||||
use pezbp_runtime::{AccountIdOf, BlockNumberOf, Chain, HeaderOf, UnverifiedStorageProofParams};
|
||||
use bp_test_utils::make_default_justification;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{AccountIdOf, BlockNumberOf, Chain, HeaderOf, UnverifiedStorageProofParams};
|
||||
use pezpallet_bridge_grandpa::{BridgedChain, BridgedHeader};
|
||||
use pezsp_runtime::traits::Header as HeaderT;
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
+29
-27
@@ -26,12 +26,12 @@ use bp_messages::{
|
||||
target_chain::FromBridgedChainMessagesProof, ChainWithMessages, LaneState,
|
||||
UnrewardedRelayersState, Weight,
|
||||
};
|
||||
use pezbp_runtime::{
|
||||
AccountIdOf, BlockNumberOf, Chain, HeaderOf, Teyrchain, UnverifiedStorageProofParams,
|
||||
};
|
||||
use bp_test_utils::prepare_teyrchain_heads_proof;
|
||||
use bp_teyrchains::{RelayBlockHash, RelayBlockNumber};
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{
|
||||
AccountIdOf, BlockNumberOf, Chain, HeaderOf, Teyrchain, UnverifiedStorageProofParams,
|
||||
};
|
||||
use pezpallet_bridge_grandpa::BridgedHeader;
|
||||
use pezsp_runtime::traits::Header as HeaderT;
|
||||
use xcm::latest::prelude::*;
|
||||
@@ -82,14 +82,15 @@ where
|
||||
finality_target: Box::new(relay_chain_header),
|
||||
justification: grandpa_justification,
|
||||
};
|
||||
let submit_para_head = pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
|
||||
at_relay_block: (
|
||||
relay_chain_header_number.saturated_into(),
|
||||
relay_chain_header_hash.into(),
|
||||
),
|
||||
teyrchains: teyrchain_heads,
|
||||
teyrchain_heads_proof: para_heads_proof,
|
||||
};
|
||||
let submit_para_head =
|
||||
pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
|
||||
at_relay_block: (
|
||||
relay_chain_header_number.saturated_into(),
|
||||
relay_chain_header_hash.into(),
|
||||
),
|
||||
teyrchains: teyrchain_heads,
|
||||
teyrchain_heads_proof: para_heads_proof,
|
||||
};
|
||||
let submit_message = pezpallet_bridge_messages::Call::<Runtime, MPI>::receive_messages_proof {
|
||||
relayer_id_at_bridged_chain: relayer_id_at_bridged_chain.into(),
|
||||
proof: Box::new(message_proof),
|
||||
@@ -119,8 +120,8 @@ where
|
||||
GPI: 'static,
|
||||
PPI: 'static,
|
||||
MPI: 'static,
|
||||
<Runtime as pezpallet_bridge_grandpa::Config<GPI>>::BridgedChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
<Runtime as pezpallet_bridge_grandpa::Config<GPI>>::BridgedChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
BridgedChainOf<Runtime, MPI>: Chain<Hash = ParaHash> + Teyrchain,
|
||||
<Runtime as pezpallet_utility::Config>::RuntimeCall: From<pezpallet_bridge_grandpa::Call<Runtime, GPI>>
|
||||
+ From<pezpallet_bridge_teyrchains::Call<Runtime, PPI>>
|
||||
@@ -132,14 +133,15 @@ where
|
||||
finality_target: Box::new(relay_chain_header),
|
||||
justification: grandpa_justification,
|
||||
};
|
||||
let submit_para_head = pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
|
||||
at_relay_block: (
|
||||
relay_chain_header_number.saturated_into(),
|
||||
relay_chain_header_hash.into(),
|
||||
),
|
||||
teyrchains: teyrchain_heads,
|
||||
teyrchain_heads_proof: para_heads_proof,
|
||||
};
|
||||
let submit_para_head =
|
||||
pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
|
||||
at_relay_block: (
|
||||
relay_chain_header_number.saturated_into(),
|
||||
relay_chain_header_hash.into(),
|
||||
),
|
||||
teyrchains: teyrchain_heads,
|
||||
teyrchain_heads_proof: para_heads_proof,
|
||||
};
|
||||
let submit_message_delivery_proof =
|
||||
pezpallet_bridge_messages::Call::<Runtime, MPI>::receive_messages_delivery_proof {
|
||||
proof: message_delivery_proof,
|
||||
@@ -216,8 +218,8 @@ pub fn make_complex_relayer_delivery_proofs<
|
||||
FromBridgedChainMessagesProof<ParaHash, LaneId>,
|
||||
)
|
||||
where
|
||||
BridgedRelayChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
|
||||
ThisChainWithMessages: ChainWithMessages,
|
||||
LaneId: Copy + Encode,
|
||||
@@ -287,8 +289,8 @@ pub fn make_complex_relayer_confirmation_proofs<
|
||||
FromBridgedChainMessagesDeliveryProof<ParaHash, LaneId>,
|
||||
)
|
||||
where
|
||||
BridgedRelayChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
|
||||
ThisChainWithMessages: ChainWithMessages,
|
||||
LaneId: Copy + Encode,
|
||||
@@ -352,8 +354,8 @@ pub fn make_complex_bridged_teyrchain_heads_proof<BridgedRelayChain, BridgedTeyr
|
||||
ParaHeadsProof,
|
||||
)
|
||||
where
|
||||
BridgedRelayChain:
|
||||
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
|
||||
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
|
||||
+ ChainWithGrandpa,
|
||||
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
|
||||
{
|
||||
let bridged_para_head = ParaHead(
|
||||
|
||||
@@ -29,8 +29,8 @@ use pezpallet_bridge_grandpa::BridgedHeader;
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
use bp_messages::MessageNonce;
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
use bp_test_utils::authority_list;
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
use xcm::GetVersion;
|
||||
use xcm_builder::{BridgeMessage, HaulBlob, HaulBlobError, HaulBlobExporter};
|
||||
use xcm_executor::traits::{validate_export, ExportXcm};
|
||||
|
||||
@@ -33,14 +33,16 @@ mod tracks;
|
||||
|
||||
use super::*;
|
||||
use crate::xcm_config::{FellowshipAdminBodyId, LocationToAccountId, WndAssetHub};
|
||||
use pezframe_support::traits::{EitherOf, MapSuccess, TryMapSuccess};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
pub use origins::pezpallet_origins as pezpallet_ambassador_origins;
|
||||
use origins::pezpallet_origins::{
|
||||
EnsureAmbassadorsVoice, EnsureAmbassadorsVoiceFrom, EnsureHeadAmbassadorsVoice, Origin,
|
||||
};
|
||||
use pezframe_support::traits::{EitherOf, MapSuccess, TryMapSuccess};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use pezsp_core::ConstU128;
|
||||
use pezsp_runtime::traits::{CheckedReduceBy, ConstU16, ConvertToValue, Replace, ReplaceWithDefault};
|
||||
use pezsp_runtime::traits::{
|
||||
CheckedReduceBy, ConstU16, ConvertToValue, Replace, ReplaceWithDefault,
|
||||
};
|
||||
use xcm::prelude::*;
|
||||
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
|
||||
|
||||
@@ -106,7 +108,8 @@ pub type PromoteOrigin = EitherOf<
|
||||
pub type ExchangeOrigin = EitherOf<EnsureRootWithSuccess<AccountId, ConstU16<65535>>, Fellows>;
|
||||
|
||||
impl pezpallet_ranked_collective::Config<AmbassadorCollectiveInstance> for Runtime {
|
||||
type WeightInfo = weights::pezpallet_ranked_collective_ambassador_collective::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_ranked_collective_ambassador_collective::WeightInfo<Runtime>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type AddOrigin = MapSuccess<Self::PromoteOrigin, ReplaceWithDefault<()>>;
|
||||
type PromoteOrigin = PromoteOrigin;
|
||||
|
||||
+10
-8
@@ -25,6 +25,10 @@ use crate::{
|
||||
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, TeyrchainInfo,
|
||||
ZagrosTreasuryAccount, DAYS,
|
||||
};
|
||||
pub use origins::{
|
||||
pezpallet_origins as pezpallet_fellowship_origins, Architects, EnsureCanPromoteTo,
|
||||
EnsureCanRetainAt, EnsureFellowship, Fellows, Masters, Members, ToVoice,
|
||||
};
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
@@ -35,15 +39,11 @@ use pezframe_support::{
|
||||
PalletId,
|
||||
};
|
||||
use pezframe_system::{EnsureRoot, EnsureRootWithSuccess};
|
||||
pub use origins::{
|
||||
pezpallet_origins as pezpallet_fellowship_origins, Architects, EnsureCanPromoteTo, EnsureCanRetainAt,
|
||||
EnsureFellowship, Fellows, Masters, Members, ToVoice,
|
||||
};
|
||||
use pezpallet_ranked_collective::EnsureOfRank;
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use pezkuwi_runtime_common::impls::{
|
||||
ContainsParts, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
|
||||
};
|
||||
use pezpallet_ranked_collective::EnsureOfRank;
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use pezsp_arithmetic::Permill;
|
||||
use pezsp_core::{ConstU128, ConstU32, ConstU8};
|
||||
use pezsp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst};
|
||||
@@ -112,10 +112,12 @@ impl pezpallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
|
||||
pub type FellowshipCollectiveInstance = pezpallet_ranked_collective::Instance1;
|
||||
|
||||
impl pezpallet_ranked_collective::Config<FellowshipCollectiveInstance> for Runtime {
|
||||
type WeightInfo = weights::pezpallet_ranked_collective_fellowship_collective::WeightInfo<Runtime>;
|
||||
type WeightInfo =
|
||||
weights::pezpallet_ranked_collective_fellowship_collective::WeightInfo<Runtime>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
// Promotions and the induction of new members are serviced by `FellowshipCore` pezpallet instance.
|
||||
// Promotions and the induction of new members are serviced by `FellowshipCore` pezpallet
|
||||
// instance.
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type AddOrigin = pezframe_system::EnsureNever<()>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user