feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
@@ -0,0 +1,99 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Tests for try-state checks.
use super::*;
use pezframe_support::assert_ok;
#[test]
fn try_state_works_with_uninitialized_pallet() {
pezsp_io::TestExternalities::default().execute_with(|| {
// Verify the pallet is uninitialized
assert!(ActiveEra::<Test>::get().is_none());
assert!(CurrentEra::<Test>::get().is_none());
assert_eq!(Bonded::<Test>::iter().count(), 0);
assert_eq!(Ledger::<Test>::iter().count(), 0);
assert_eq!(Validators::<Test>::iter().count(), 0);
assert_eq!(Nominators::<Test>::iter().count(), 0);
// Try-state should pass with uninitialized state
assert_ok!(Staking::do_try_state(System::block_number()));
});
}
#[test]
fn try_state_detects_inconsistent_active_current_era() {
ExtBuilder::default().has_stakers(false).build_and_execute(|| {
// Set only ActiveEra (CurrentEra remains None) - this violates the invariant
ActiveEra::<Test>::put(ActiveEraInfo { index: 1, start: None });
CurrentEra::<Test>::kill();
// Try-state should fail due to inconsistent state
assert!(Staking::do_try_state(System::block_number()).is_err());
// Now set only CurrentEra (ActiveEra None) - this also violates the invariant
ActiveEra::<Test>::kill();
CurrentEra::<Test>::put(1);
// Try-state should fail due to inconsistent state
assert!(Staking::do_try_state(System::block_number()).is_err());
// Both None should pass
ActiveEra::<Test>::kill();
CurrentEra::<Test>::kill();
assert_ok!(Staking::do_try_state(System::block_number()));
// Both Some should pass (assuming other invariants are met)
ActiveEra::<Test>::put(ActiveEraInfo { index: 1, start: None });
CurrentEra::<Test>::put(1);
// Need to set up bonded eras for this to pass
use pezframe_support::BoundedVec;
let bonded_eras: BoundedVec<(u32, u32), _> =
BoundedVec::try_from(vec![(0, 0), (1, 0)]).unwrap();
BondedEras::<Test>::put(bonded_eras);
assert_ok!(Staking::do_try_state(System::block_number()));
});
}
#[test]
fn try_state_bad_exposure() {
ExtBuilder::default().try_state(false).build_and_execute(|| {
Session::roll_until_active_era(2);
assert!(Staking::do_try_state(System::block_number()).is_ok());
let (validator, mut metadata) = ErasStakersOverview::<T>::iter()
.take(1)
.map(|(_era, validator, metadata)| (validator, metadata))
.collect::<Vec<_>>()
.pop()
.unwrap();
metadata.total += 1;
ErasStakersOverview::<T>::insert(2, validator, metadata);
assert!(Staking::do_try_state(System::block_number()).is_err());
});
}
#[test]
fn try_state_bad_eras_total_stake() {
ExtBuilder::default().try_state(false).build_and_execute(|| {
Session::roll_until_active_era(2);
assert!(Staking::do_try_state(System::block_number()).is_ok());
ErasTotalStake::<T>::mutate(2, |s| *s -= 1);
assert!(Staking::do_try_state(System::block_number()).is_err());
});
}