mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
fix(ci): fix check-toml-format, check-licenses-headers, check-zepter
- taplo.toml: add .cargo/** to exclude list (prevents scanning cached registry files) - deny.toml: reformat with taplo (tab indentation, proper spacing) - pezpallets: add Apache-2.0 SPDX license header to 51 files missing headers (referral, trust, perwerde, pez-treasury, pez-rewards, welati, token-wrapper, messaging, staking-score, presale, identity-kyc) - ci: check-zepter: prepend $HOME/.cargo/bin to PATH after cargo install so newly installed 1.82.1 takes precedence over system 1.78.2 - identity-kyc: fix clippy::needless_borrows_for_generic_args at lib.rs:326
This commit is contained in:
1 parent
857b63130d
commit
99be20ba05
53 files changed
+258
-1
No files matched your search
@@ -7,6 +7,7 @@ exclude = [
|
||||
"**/zombienet/**",
|
||||
"**/zombienet_tests/**",
|
||||
"target/**",
|
||||
".cargo/**",
|
||||
]
|
||||
|
||||
# global rules
|
||||
|
||||
@@ -103,6 +103,7 @@ check-zepter:
|
||||
script:
|
||||
- cargo metadata --format-version=1 --locked > /dev/null
|
||||
- cargo install zepter@1.82.1 --force
|
||||
- export PATH="$HOME/.cargo/bin:$PATH"
|
||||
- zepter --version
|
||||
- zepter run check
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-identity-kyc
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Identity & KYC Pezpallet - TRUSTLESS MODEL
|
||||
@@ -323,7 +328,7 @@ pub mod pezpallet {
|
||||
|
||||
// Identity hash must be unique - no other account can use the same hash
|
||||
ensure!(
|
||||
!IdentityHashToAccount::<T>::contains_key(&identity_hash),
|
||||
!IdentityHashToAccount::<T>::contains_key(identity_hash),
|
||||
Error::<T>::IdentityHashAlreadyUsed
|
||||
);
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_identity_kyc;
|
||||
use pezframe_support::{construct_runtime, derive_impl, parameter_types, traits::ConstU128};
|
||||
use pezframe_system::EnsureRoot;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{mock::*, types::KycLevel, Error, Event};
|
||||
use pezframe_support::{assert_noop, assert_ok, traits::Currency};
|
||||
use pezsp_core::H256;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-messaging
|
||||
//!
|
||||
//! Run benchmarks with:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_messaging;
|
||||
use pezframe_support::{
|
||||
derive_impl,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{mock::*, Error, Event, *};
|
||||
use pezframe_support::{assert_noop, assert_ok};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-perwerde
|
||||
|
||||
use super::{Pezpallet as Perwerde, *};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Perwerde (Education) Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_perwerde;
|
||||
use pezframe_support::{
|
||||
construct_runtime, parameter_types,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{
|
||||
mock::{new_test_ext, Perwerde as PerwerdePallet, RuntimeOrigin, System, Test},
|
||||
Event,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/pez-rewards/src/benchmarking.rs
|
||||
|
||||
use super::{BalanceOf, Call, Config};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # PEZ Rewards Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/pez-rewards/src/mock.rs (v1.0 - dev_accounts FIXED)
|
||||
|
||||
use crate as pezpallet_pez_rewards;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// tests.rs (v11 - Final Bug Fixes)
|
||||
|
||||
use crate::{mock::*, EpochState, Error, Event};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/pez-treasury/src/benchmarking.rs
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # PEZ Treasury Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Storage migrations for pezpallet-pez-treasury
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/pez-treasury/src/mock.rs
|
||||
// VERSION 3: AccountId tipi H256 yapıldı (u64 yerine)
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/pez-treasury/src/tests.rs
|
||||
|
||||
use crate::{mock::*, Error, Event};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
//! Autogenerated weights for `pezpallet_pez_treasury`
|
||||
//!
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-presale
|
||||
//!
|
||||
//! Complete benchmarks for all presale operations including:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_presale;
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-referral
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Referral Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// pezkuwi/pallets/referral/src/mock.rs (Updated for new trustless model)
|
||||
|
||||
use crate as pezpallet_referral;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{
|
||||
mock::*, Error, Event, PendingReferrals, ReferralCount, Referrals, ReferrerStatsStorage,
|
||||
};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use pezframe_support::pezpallet_prelude::RuntimeDebug;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-staking-score
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Simplified mock runtime for pezpallet-staking-score.
|
||||
//! No real staking pallet - all data comes via CachedStakingDetails.
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Tests for pezpallet-staking-score.
|
||||
//! All tests use receive_staking_details to populate CachedStakingDetails,
|
||||
//! mirroring the real People Chain architecture.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-tiki
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Custom Origin verification mechanisms based on Tiki ownership.
|
||||
//!
|
||||
//! This module provides `EnsureOrigin` implementations that verify
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Tiki (Role) Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Storage migrations for pezpallet-tiki
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_tiki;
|
||||
use crate::Tiki as TikiEnum;
|
||||
use pezframe_support::{
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{
|
||||
mock::*, Error, Event, RoleAssignmentType, Tiki as TikiEnum, TikiProvider, TikiScoreProvider,
|
||||
};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-token-wrapper
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Token Wrapper Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_token_wrapper;
|
||||
use pezframe_support::{
|
||||
construct_runtime, parameter_types,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
use pezframe_support::{assert_noop, assert_ok};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Benchmarking setup for pezpallet-trust
|
||||
//!
|
||||
//! These benchmarks measure the performance of trust score operations.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Trust Score Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate as pezpallet_trust;
|
||||
use pezframe_support::{
|
||||
derive_impl, parameter_types,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{mock::*, Error, Event};
|
||||
use pezframe_support::{assert_noop, assert_ok};
|
||||
use pezsp_runtime::traits::BadOrigin;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use super::*;
|
||||
use crate::types::*;
|
||||
use pezframe_benchmarking::v2::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! # Welati (Governance) Pezpallet
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//! Storage migrations for pezpallet-welati (Governance)
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{self as pezpallet_welati, *};
|
||||
use pezframe_support::{
|
||||
assert_ok, construct_runtime, derive_impl, parameter_types,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{
|
||||
mock::{
|
||||
add_parliament_member, last_event, run_to_block, ExtBuilder, RuntimeEvent, RuntimeOrigin,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// This file is part of PezkuwiChain.
|
||||
|
||||
// Copyright (C) Dijital Kurdistan Tech Institute
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::{pezpallet_prelude::BlockNumberFor, Config as SystemConfig};
|
||||
|
||||
Reference in new issue
Block a user