rebrand: kusama → dicle
- Replace all kusama/Kusama references with dicle/Dicle - Rename weight files from ksm_size to dcl_size - Update papi-tests files from ksm to dcl - Remove chain-specs/kusama.json files - cargo check --workspace successful (Finished output) - Update MAINNET_ROADMAP.md: FAZ 8 completed
This commit is contained in:
@@ -70,7 +70,7 @@ impl SendXcm for TestSendXcm {
|
||||
|
||||
pub type TestXcmRouter = EnsureDecodableXcm<TestSendXcm>;
|
||||
|
||||
// copied from kusama constants
|
||||
// copied from dicle constants
|
||||
pub const UNITS: Balance = 1_000_000_000_000;
|
||||
pub const CENTS: Balance = UNITS / 30_000;
|
||||
|
||||
@@ -120,16 +120,16 @@ impl configuration::Config for Runtime {
|
||||
type WeightInfo = configuration::TestWeightInfo;
|
||||
}
|
||||
|
||||
// aims to closely emulate the Kusama XcmConfig
|
||||
// aims to closely emulate the Dicle XcmConfig
|
||||
parameter_types! {
|
||||
pub const KsmLocation: Location = Location::here();
|
||||
pub const KusamaNetwork: NetworkId = NetworkId::Kusama;
|
||||
pub UniversalLocation: InteriorLocation = KusamaNetwork::get().into();
|
||||
pub const DicleNetwork: NetworkId = NetworkId::Dicle;
|
||||
pub UniversalLocation: InteriorLocation = DicleNetwork::get().into();
|
||||
pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local);
|
||||
}
|
||||
|
||||
pub type SovereignAccountOf =
|
||||
(ChildTeyrchainConvertsVia<ParaId, AccountId>, AccountId32Aliases<KusamaNetwork, AccountId>);
|
||||
(ChildTeyrchainConvertsVia<ParaId, AccountId>, AccountId32Aliases<DicleNetwork, AccountId>);
|
||||
|
||||
pub type LocalCurrencyAdapter =
|
||||
FungibleAdapter<Balances, IsConcrete<KsmLocation>, SovereignAccountOf, AccountId, CheckAccount>;
|
||||
@@ -139,7 +139,7 @@ pub type LocalAssetTransactor = (LocalCurrencyAdapter,);
|
||||
type LocalOriginConverter = (
|
||||
SovereignSignedViaLocation<SovereignAccountOf, RuntimeOrigin>,
|
||||
ChildTeyrchainAsNative<origin::Origin, RuntimeOrigin>,
|
||||
SignedAccountId32AsNative<KusamaNetwork, RuntimeOrigin>,
|
||||
SignedAccountId32AsNative<DicleNetwork, RuntimeOrigin>,
|
||||
ChildSystemTeyrchainAsSuperuser<ParaId, RuntimeOrigin>,
|
||||
);
|
||||
|
||||
@@ -156,13 +156,13 @@ pub type Barrier = (
|
||||
);
|
||||
|
||||
parameter_types! {
|
||||
pub KusamaForAssetHub: (AssetFilter, Location) =
|
||||
pub DicleForAssetHub: (AssetFilter, Location) =
|
||||
(Wild(AllOf { id: AssetId(Here.into()), fun: WildFungible }), Teyrchain(1000).into());
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
pub const MaxAssetsIntoHolding: u32 = 4;
|
||||
}
|
||||
|
||||
pub type TrustedTeleporters = (xcm_builder::Case<KusamaForAssetHub>,);
|
||||
pub type TrustedTeleporters = (xcm_builder::Case<DicleForAssetHub>,);
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
@@ -200,7 +200,7 @@ impl xcm_executor::Config for XcmConfig {
|
||||
|
||||
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
|
||||
/// sending/executing XCMs.
|
||||
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, KusamaNetwork>;
|
||||
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, DicleNetwork>;
|
||||
|
||||
impl pezpallet_xcm::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
@@ -245,7 +245,7 @@ construct_runtime!(
|
||||
}
|
||||
);
|
||||
|
||||
pub fn kusama_like_with_balances(
|
||||
pub fn dicle_like_with_balances(
|
||||
balances: Vec<(AccountId, Balance)>,
|
||||
) -> pezsp_io::TestExternalities {
|
||||
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
mod mock;
|
||||
|
||||
use mock::{
|
||||
kusama_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig,
|
||||
dicle_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig,
|
||||
CENTS,
|
||||
};
|
||||
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
|
||||
@@ -44,7 +44,7 @@ fn buy_execution<C>() -> Instruction<C> {
|
||||
fn withdraw_and_deposit_works() {
|
||||
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
|
||||
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let other_para_id = 3000;
|
||||
let amount = REGISTER_AMOUNT;
|
||||
let weight = BaseXcmWeight::get() * 3;
|
||||
@@ -79,7 +79,7 @@ fn withdraw_and_deposit_works() {
|
||||
fn transfer_asset_works() {
|
||||
let bob = AccountId::new([1u8; 32]);
|
||||
let balances = vec![(ALICE, INITIAL_BALANCE), (bob.clone(), INITIAL_BALANCE)];
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let amount = REGISTER_AMOUNT;
|
||||
let weight = BaseXcmWeight::get();
|
||||
let message = Xcm(vec![TransferAsset {
|
||||
@@ -117,7 +117,7 @@ fn report_holding_works() {
|
||||
use xcm::opaque::latest::prelude::*;
|
||||
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
|
||||
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let other_para_id = 3000;
|
||||
let amount = REGISTER_AMOUNT;
|
||||
let weight = BaseXcmWeight::get() * 4;
|
||||
@@ -195,11 +195,11 @@ fn report_holding_works() {
|
||||
}
|
||||
|
||||
/// Scenario:
|
||||
/// A teyrchain wants to move KSM from Kusama to Asset Hub.
|
||||
/// A teyrchain wants to move DCL from Dicle to Asset Hub.
|
||||
/// The teyrchain sends an XCM to withdraw funds combined with a teleport to the destination.
|
||||
///
|
||||
/// This way of moving funds from a relay to a teyrchain will only work for trusted chains.
|
||||
/// Reserve based transfer should be used to move KSM to a community teyrchain.
|
||||
/// Reserve based transfer should be used to move DCL to a community teyrchain.
|
||||
///
|
||||
/// Asserts that the balances are updated accordingly and the correct XCM is sent.
|
||||
#[test]
|
||||
@@ -207,7 +207,7 @@ fn teleport_to_asset_hub_works() {
|
||||
use xcm::opaque::latest::prelude::*;
|
||||
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
|
||||
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let asset_hub_id = 1000;
|
||||
let other_para_id = 3000;
|
||||
let amount = REGISTER_AMOUNT;
|
||||
@@ -246,7 +246,7 @@ fn teleport_to_asset_hub_works() {
|
||||
}
|
||||
);
|
||||
|
||||
// teleports are allowed from asset hub to kusama.
|
||||
// teleports are allowed from asset hub to dicle.
|
||||
let message = Xcm(vec![
|
||||
WithdrawAsset((Here, amount).into()),
|
||||
buy_execution(),
|
||||
@@ -277,7 +277,7 @@ fn teleport_to_asset_hub_works() {
|
||||
}
|
||||
|
||||
/// Scenario:
|
||||
/// A teyrchain wants to move KSM from Kusama to the teyrchain.
|
||||
/// A teyrchain wants to move DCL from Dicle to the teyrchain.
|
||||
/// It withdraws funds and then deposits them into the reserve account of the destination chain.
|
||||
/// to the destination.
|
||||
///
|
||||
@@ -287,7 +287,7 @@ fn reserve_based_transfer_works() {
|
||||
use xcm::opaque::latest::prelude::*;
|
||||
let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating();
|
||||
let balances = vec![(ALICE, INITIAL_BALANCE), (para_acc.clone(), INITIAL_BALANCE)];
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let other_para_id = 3000;
|
||||
let amount = REGISTER_AMOUNT;
|
||||
let transfer_effects = vec![
|
||||
@@ -412,7 +412,7 @@ fn recursive_xcm_execution_fail() {
|
||||
let mut hash = fake_message_hash(&message);
|
||||
let weight = BaseXcmWeight::get() * 3;
|
||||
|
||||
kusama_like_with_balances(balances).execute_with(|| {
|
||||
dicle_like_with_balances(balances).execute_with(|| {
|
||||
let outcome = XcmExecutor::<XcmTestConfig>::prepare_and_execute(
|
||||
origin,
|
||||
message,
|
||||
|
||||
Reference in New Issue
Block a user