Merge development: FAZ 1 Complete - Workspace compile fixes & warning cleanup
This commit is contained in:
@@ -61,20 +61,23 @@ rand = { workspace = true, default-features = true }
|
||||
serde = { features = ["derive"], workspace = true, default-features = true }
|
||||
serde_json = { workspace = true, default-features = true }
|
||||
|
||||
# For storage benchmarks
|
||||
pezframe-benchmarking-cli = { workspace = true, optional = true }
|
||||
|
||||
# The Pezkuwi-SDK:
|
||||
pezkuwi-sdk = { features = [
|
||||
"bizinikiwi-build-script-utils",
|
||||
"bizinikiwi-frame-rpc-support",
|
||||
"bizinikiwi-frame-rpc-system",
|
||||
"bizinikiwi-prometheus-endpoint",
|
||||
"prometheus-endpoint",
|
||||
"bizinikiwi-rpc-client",
|
||||
"bizinikiwi-state-trie-migration-rpc",
|
||||
"bizinikiwi-wasm-builder",
|
||||
"frame-remote-externalities",
|
||||
"remote-externalities",
|
||||
"pez-fork-tree",
|
||||
"pez-generate-bags",
|
||||
"pez-subkey",
|
||||
"pez-tracing-gum",
|
||||
"gum",
|
||||
"pezframe-benchmarking-cli",
|
||||
"pezframe-support-procedural-tools",
|
||||
"pezmmr-gadget",
|
||||
@@ -150,9 +153,9 @@ pezkuwi-sdk = { features = [
|
||||
"pezsp-timestamp",
|
||||
"pezsp-tracing",
|
||||
"pezsp-transaction-storage-proof",
|
||||
"pezstaging-chain-spec-builder",
|
||||
"pezstaging-node-inspect",
|
||||
"pezstaging-tracking-allocator",
|
||||
"chain-spec-builder",
|
||||
"node-inspect",
|
||||
"tracking-allocator",
|
||||
"std",
|
||||
], workspace = true, default-features = true }
|
||||
|
||||
@@ -221,6 +224,7 @@ runtime-benchmarks = [
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
]
|
||||
storage-benchmark = ["pezframe-benchmarking-cli/storage-benchmark"]
|
||||
try-runtime = [
|
||||
"bizinikiwi-cli-test-utils/try-runtime",
|
||||
"pez-kitchensink-runtime/try-runtime",
|
||||
|
||||
@@ -125,12 +125,7 @@ pub fn run() -> Result<()> {
|
||||
let partial = new_partial(&config, None)?;
|
||||
cmd.run(partial.client)
|
||||
},
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
BenchmarkCmd::Storage(_) => Err(
|
||||
"Storage benchmarking can be enabled with `--features runtime-benchmarks`."
|
||||
.into(),
|
||||
),
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
#[cfg(feature = "storage-benchmark")]
|
||||
BenchmarkCmd::Storage(cmd) => {
|
||||
// ensure that we keep the task manager alive
|
||||
let partial = new_partial(&config, None)?;
|
||||
|
||||
@@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[[bin]]
|
||||
path = "bin/main.rs"
|
||||
name = "chain-spec-builder"
|
||||
name = "pezstaging-chain-spec-builder"
|
||||
|
||||
[lib]
|
||||
# Docs tests are not needed since the code samples that would be executed
|
||||
@@ -39,7 +39,7 @@ serde = { workspace = true, default-features = true }
|
||||
serde_json = { workspace = true, default-features = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bizinikiwi-test-runtime = { workspace = true }
|
||||
# bizinikiwi-test-runtime = { workspace = true } # publish=false
|
||||
cmd_lib = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
@@ -47,6 +47,6 @@ pretty_assertions = { workspace = true }
|
||||
# `cargo build --feature=generate-readme` updates the `README.md` file.
|
||||
generate-readme = []
|
||||
runtime-benchmarks = [
|
||||
"bizinikiwi-test-runtime/runtime-benchmarks",
|
||||
# "bizinikiwi-test-runtime/runtime-benchmarks",
|
||||
"pezsc-chain-spec/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
//! <td>A JSON object that provides an explicit and comprehensive representation of the
|
||||
//! <code>RuntimeGenesisConfig</code> struct, which is generated by <a
|
||||
//! href="../pezframe_support_procedural/macro.construct_runtime.html"
|
||||
//! ><code>pezkuwi_sdk_frame::runtime::prelude::construct_runtime</code></a> macro (<a
|
||||
//! ><code>pezframe::runtime::prelude::construct_runtime</code></a> macro (<a
|
||||
//! href="../bizinikiwi_test_runtime/struct.RuntimeGenesisConfig.html#"
|
||||
//! >example of generated struct</a>). Must contain *all* the keys of
|
||||
//! the genesis config, no defaults will be used.
|
||||
|
||||
@@ -1263,7 +1263,7 @@ impl<Block: BlockT> Backend<Block> {
|
||||
);
|
||||
}
|
||||
|
||||
SharedTrieCache::new(pezsp_trie::cache::CacheSize::new(maximum_size), config.metrics_registry.as_ref())
|
||||
SharedTrieCache::new(pezsp_trie::cache::CacheSize::new(maximum_size), None)
|
||||
});
|
||||
|
||||
let backend = Backend {
|
||||
|
||||
@@ -29,7 +29,7 @@ pezsp-mmr-primitives = { workspace = true, default-features = true }
|
||||
pezsp-runtime = { workspace = true, default-features = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bizinikiwi-test-runtime-client = { workspace = true }
|
||||
# bizinikiwi-test-runtime-client = { workspace = true }
|
||||
parking_lot = { workspace = true, default-features = true }
|
||||
pezsc-block-builder = { workspace = true, default-features = true }
|
||||
pezsp-tracing = { workspace = true, default-features = true }
|
||||
@@ -37,7 +37,7 @@ tokio = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
"bizinikiwi-test-runtime-client/runtime-benchmarks",
|
||||
# "bizinikiwi-test-runtime-client/runtime-benchmarks",
|
||||
"pezsc-block-builder/runtime-benchmarks",
|
||||
"pezsc-client-api/runtime-benchmarks",
|
||||
"pezsc-offchain/runtime-benchmarks",
|
||||
|
||||
@@ -67,8 +67,8 @@ serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread"] }
|
||||
tracing-subscriber = { workspace = true }
|
||||
txtesttool = { workspace = true }
|
||||
zombienet-configuration = { workspace = true }
|
||||
zombienet-sdk = { workspace = true }
|
||||
pezkuwi-zombienet-configuration = { workspace = true }
|
||||
pezkuwi-zombienet-sdk = { workspace = true }
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
|
||||
@@ -23,7 +23,7 @@ use anyhow::anyhow;
|
||||
use std::time::SystemTime;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use txtesttool::scenario::{ChainType, ScenarioBuilder};
|
||||
use zombienet_sdk::{
|
||||
use pezkuwi_zombienet_sdk::{
|
||||
pezkuwi_subxt::BizinikiwConfig, GlobalSettingsBuilder, LocalFileSystem, Network, NetworkConfig,
|
||||
NetworkConfigBuilder, NetworkConfigExt, WithRelaychain,
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::zombienet::{BlockSubscriptionType, NetworkSpawner, ScenarioBuilderSha
|
||||
use pezcumulus_zombienet_sdk_helpers::create_assign_core_call;
|
||||
use serde_json::json;
|
||||
use txtesttool::{execution_log::ExecutionLog, scenario::ScenarioBuilder};
|
||||
use zombienet_sdk::{
|
||||
use pezkuwi_zombienet_sdk::{
|
||||
pezkuwi_subxt::{OnlineClient, PezkuwiConfig},
|
||||
pezkuwi_subxt_signer::sr25519::dev,
|
||||
NetworkConfigBuilder,
|
||||
@@ -35,7 +35,7 @@ use zombienet_sdk::{
|
||||
#[ignore]
|
||||
async fn slot_based_3cores_test() -> Result<(), anyhow::Error> {
|
||||
let spawner = NetworkSpawner::with_closure(|| {
|
||||
let images = zombienet_sdk::environment::get_images_from_env();
|
||||
let images = pezkuwi_zombienet_sdk::environment::get_images_from_env();
|
||||
let names = ["alice", "bob", "charlie"];
|
||||
NetworkConfigBuilder::new()
|
||||
.with_relaychain(|r| {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "pezkuwi-sdk-frame"
|
||||
name = "pezframe"
|
||||
version = "0.1.0"
|
||||
authors = [
|
||||
"Kurdistan Tech Institute <info@pezkuwichain.io>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pezpallet-assets-freezer"
|
||||
version = "0.1.0"
|
||||
version = "0.44.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "MIT-0"
|
||||
@@ -17,7 +17,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezpallet-assets = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
@@ -29,19 +31,21 @@ pezpallet-balances = { workspace = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"log/std",
|
||||
"pezpallet-assets/std",
|
||||
"pezpallet-balances/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-assets/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezpallet-assets/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
]
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
use super::*;
|
||||
use frame::prelude::storage::StorageDoubleMap;
|
||||
use pezframe::prelude::storage::StorageDoubleMap;
|
||||
use pezpallet_assets::FrozenBalance;
|
||||
|
||||
// Implements [`FrozenBalance`] from [`pezpallet-assets`], so it can understand how much of an
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::{
|
||||
fungibles::{Inspect, InspectFreeze, MutateFreeze},
|
||||
@@ -60,7 +60,7 @@ use frame::{
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use frame::try_runtime::TryRuntimeError;
|
||||
use pezframe::try_runtime::TryRuntimeError;
|
||||
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
@@ -69,7 +69,7 @@ mod tests;
|
||||
|
||||
mod impls;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
use crate as pezpallet_assets_freezer;
|
||||
pub use crate::*;
|
||||
use codec::{Compact, Decode, Encode, MaxEncodedLen};
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
pub type AccountId = u64;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
use crate::mock::{self, *};
|
||||
|
||||
use codec::Compact;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use pezpallet_assets::FrozenBalance;
|
||||
|
||||
const WHO: AccountId = 1;
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -26,9 +28,9 @@ pezpallet-balances = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "pezpallet-balances/std", "scale-info/std"]
|
||||
try-runtime = ["frame/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
std = ["codec/std", "pezframe/std", "pezpallet-balances/std", "scale-info/std"]
|
||||
try-runtime = ["pezframe/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -50,7 +50,7 @@ use core::{
|
||||
marker::PhantomData,
|
||||
ops::{Deref, DerefMut},
|
||||
};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::{BalanceStatus, Currency, ReservableCurrency},
|
||||
};
|
||||
@@ -173,7 +173,7 @@ where
|
||||
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate as pezpallet_atomic_swap;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ pub use v1::*;
|
||||
/// To migrate your code from benchmarking v1 to benchmarking v2, you may follow these
|
||||
/// steps:
|
||||
/// 1. Change the import from `pezframe_benchmarking::v1::` to `pezframe_benchmarking::v2::*`, or
|
||||
/// `frame::benchmarking::prelude::*` under the umbrella crate;
|
||||
/// `pezframe::benchmarking::prelude::*` under the umbrella crate;
|
||||
/// 2. Move the code inside the v1 `benchmarks! { ... }` block to the v2 benchmarks module `mod
|
||||
/// benchmarks { ... }` under the benchmarks macro (`#[benchmarks]` for a regular module, or
|
||||
/// `#[instance_benchmarks]` to set up the module in instance benchmarking mode);
|
||||
|
||||
@@ -54,7 +54,7 @@ xcm-builder = { workspace = true }
|
||||
[dev-dependencies]
|
||||
array-bytes = { workspace = true, default-features = true }
|
||||
assert_matches = { workspace = true }
|
||||
pezpallet-contracts-fixtures = { workspace = true }
|
||||
# pezpallet-contracts-fixtures = { workspace = true } # Commented for crates.io publish (test-only crate)
|
||||
pretty_assertions = { workspace = true }
|
||||
wat = { workspace = true }
|
||||
|
||||
@@ -102,7 +102,7 @@ runtime-benchmarks = [
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-contracts-fixtures/runtime-benchmarks",
|
||||
# "pezpallet-contracts-fixtures/runtime-benchmarks", # Commented for crates.io publish
|
||||
"pezpallet-insecure-randomness-collective-flip/runtime-benchmarks",
|
||||
"pezpallet-proxy/runtime-benchmarks",
|
||||
"pezpallet-timestamp/runtime-benchmarks",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pezpallet-contracts-fixtures"
|
||||
publish = false
|
||||
publish = true
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
@@ -9,6 +9,7 @@ description = "Fixtures for testing contracts pezpallet."
|
||||
documentation.workspace = true
|
||||
repository = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
include = ["build.rs", "contracts/**", "src/**", "Cargo.toml"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -120,7 +120,29 @@ fn create_cargo_toml<'a>(
|
||||
output_dir: &Path,
|
||||
) -> Result<()> {
|
||||
let root_toml: toml::Value = toml::from_str(&fs::read_to_string(root_cargo_toml)?)?;
|
||||
let mut cargo_toml: toml::Value = toml::from_str(include_str!("./build/Cargo.toml"))?;
|
||||
// Template embedded to avoid include_str! path issues during crates.io publish
|
||||
const CARGO_TOML_TEMPLATE: &str = r#"[package]
|
||||
name = "contracts"
|
||||
version = "0.6.3"
|
||||
edition = "2021"
|
||||
description = "Pezkuwi SDK component: contracts"
|
||||
repository = "https://github.com/pezkuwichain/pezkuwi-sdk"
|
||||
homepage = "https://pezkuwi.io"
|
||||
authors = ["Pezkuwi Chain <admin@pezkuwi.io>"]
|
||||
license = "Apache-2.0"
|
||||
[[bin]]
|
||||
|
||||
[dependencies]
|
||||
common = { package = 'pezpallet-contracts-fixtures-common', path = "" }
|
||||
polkavm-derive = { version = "" }
|
||||
uapi = { package = 'pezpallet-contracts-uapi', path = "", default-features = false }
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
"#;
|
||||
let mut cargo_toml: toml::Value = toml::from_str(CARGO_TOML_TEMPLATE)?;
|
||||
let mut set_dep = |name, path| -> Result<()> {
|
||||
cargo_toml["dependencies"][name]["path"] = toml::Value::String(
|
||||
fixtures_dir.join(path).canonicalize()?.to_str().unwrap().to_string(),
|
||||
@@ -270,7 +292,13 @@ fn main() -> Result<()> {
|
||||
let fixtures_dir: PathBuf = env::var("CARGO_MANIFEST_DIR")?.into();
|
||||
let contracts_dir = fixtures_dir.join("contracts");
|
||||
let out_dir: PathBuf = env::var("OUT_DIR")?.into();
|
||||
let workspace_root = find_workspace_root(&fixtures_dir).expect("workspace root exists; qed");
|
||||
|
||||
// During crates.io package verification, workspace root may not exist.
|
||||
// In that case, skip contract compilation (contracts are pre-compiled in src/).
|
||||
let Some(workspace_root) = find_workspace_root(&fixtures_dir) else {
|
||||
eprintln!("Note: Workspace root not found, skipping contract compilation (expected during crates.io verification)");
|
||||
return Ok(());
|
||||
};
|
||||
let root_cargo_toml = workspace_root.join("Cargo.toml");
|
||||
|
||||
let entries = collect_entries(&contracts_dir, &out_dir);
|
||||
|
||||
@@ -23,9 +23,11 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
codec = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
frame = { features = ["runtime"], workspace = true }
|
||||
pezframe = { features = ["runtime"], workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "scale-info/std"]
|
||||
runtime-benchmarks = ["frame/runtime-benchmarks"]
|
||||
std = ["codec/std", "pezframe/std", "pezframe-system/std", "pezframe-support/std", "scale-info/std"]
|
||||
runtime-benchmarks = ["pezframe/runtime-benchmarks"]
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
#[frame::pezpallet(dev_mode)]
|
||||
#[pezframe::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
@@ -50,7 +50,7 @@ pub mod pezpallet {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::pezpallet as my_pallet;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
construct_runtime!(
|
||||
pub enum Runtime {
|
||||
|
||||
@@ -18,12 +18,14 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
safe-mix = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "safe-mix/std", "scale-info/std"]
|
||||
try-runtime = ["frame/try-runtime"]
|
||||
runtime-benchmarks = ["frame/runtime-benchmarks"]
|
||||
std = ["codec/std", "pezframe/std", "safe-mix/std", "scale-info/std"]
|
||||
try-runtime = ["pezframe/try-runtime"]
|
||||
runtime-benchmarks = ["pezframe/runtime-benchmarks"]
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
//! ### Example - Get random seed for the current block
|
||||
//!
|
||||
//! ```
|
||||
//! use frame::{prelude::*, traits::Randomness};
|
||||
//! use pezframe::{prelude::*, traits::Randomness};
|
||||
//!
|
||||
//! #[frame::pezpallet]
|
||||
//! #[pezframe::pezpallet]
|
||||
//! pub mod pezpallet {
|
||||
//! use super::*;
|
||||
//!
|
||||
@@ -71,7 +71,7 @@
|
||||
use safe_mix::TripletMix;
|
||||
|
||||
use codec::Encode;
|
||||
use frame::{prelude::*, traits::Randomness};
|
||||
use pezframe::{prelude::*, traits::Randomness};
|
||||
|
||||
const RANDOM_MATERIAL_LEN: u32 = 81;
|
||||
|
||||
@@ -83,7 +83,7 @@ fn block_number_to_index<T: Config>(block_number: BlockNumberFor<T>) -> usize {
|
||||
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
@@ -162,7 +162,7 @@ impl<T: Config> Randomness<T::Hash, BlockNumberFor<T>> for Pezpallet<T> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate as pezpallet_insecure_randomness_collective_flip;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
testing_prelude::{pezframe_system::limits, *},
|
||||
traits::Header as _,
|
||||
};
|
||||
|
||||
@@ -23,8 +23,8 @@ pezframe-system = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
# pezframe-support-test moved to integration tests to break circular dependency
|
||||
[dev-dependencies]
|
||||
pezframe-support-test = { workspace = true }
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
pezsp-core = { workspace = true, default-features = true }
|
||||
pezsp-io = { workspace = true, default-features = true }
|
||||
@@ -34,7 +34,6 @@ default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"pezframe-benchmarking?/std",
|
||||
"pezframe-support-test/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"pezpallet-balances/std",
|
||||
@@ -45,7 +44,6 @@ std = [
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support-test/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
@@ -53,7 +51,6 @@ runtime-benchmarks = [
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"pezframe-support-test/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
|
||||
@@ -17,7 +17,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezsp-mmr-primitives = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
@@ -30,13 +32,15 @@ pezsp-tracing = { workspace = true, default-features = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"log/std",
|
||||
"pezsp-mmr-primitives/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezsp-mmr-primitives/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = ["frame/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime"]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use crate::*;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
benchmarking::prelude::v1::benchmarks_instance_pallet,
|
||||
deps::pezframe_support::traits::OnInitialize,
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Default weights for the MMR Pezpallet
|
||||
//! This file was not auto-generated.
|
||||
|
||||
use frame::{deps::pezframe_support::weights::constants::*, weights_prelude::*};
|
||||
use pezframe::{deps::pezframe_support::weights::constants::*, weights_prelude::*};
|
||||
|
||||
impl crate::WeightInfo for () {
|
||||
fn on_initialize(peaks: u32) -> Weight {
|
||||
|
||||
@@ -61,7 +61,7 @@ extern crate alloc;
|
||||
use alloc::vec::Vec;
|
||||
use log;
|
||||
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
pub use pezsp_mmr_primitives::{
|
||||
self as primitives, utils, utils::NodesUtils, AncestryProof, Error, FullLeaf, LeafDataProvider,
|
||||
@@ -144,7 +144,7 @@ pub(crate) type HashingOf<T, I> = <T as Config<I>>::Hashing;
|
||||
/// Hash type used for the pezpallet.
|
||||
pub(crate) type HashOf<T, I> = <<T as Config<I>>::Hashing as Hash>::Output;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::{
|
||||
Config, HashOf, HashingOf,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
/// Stateless verification of the proof for a batch of leaves.
|
||||
/// Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
|
||||
@@ -65,7 +65,7 @@ where
|
||||
|
||||
pub fn is_ancestry_proof_optimal<H>(ancestry_proof: &AncestryProof<H::Output>) -> bool
|
||||
where
|
||||
H: frame::traits::Hash,
|
||||
H: pezframe::traits::Hash,
|
||||
{
|
||||
let prev_mmr_size = NodesUtils::new(ancestry_proof.prev_leaf_count).size();
|
||||
let mmr_size = NodesUtils::new(ancestry_proof.leaf_count).size();
|
||||
|
||||
@@ -20,7 +20,7 @@ pub mod storage;
|
||||
|
||||
pub use self::mmr::{is_ancestry_proof_optimal, verify_ancestry_proof, verify_leaves_proof, Mmr};
|
||||
use crate::primitives::{mmr_lib, DataOrHash, FullLeaf};
|
||||
use frame::traits;
|
||||
use pezframe::traits;
|
||||
|
||||
/// Node type for runtime `T`.
|
||||
pub type NodeOf<T, I, L> = Node<<T as crate::Config<I>>::Hashing, L>;
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
use alloc::{vec, vec::Vec};
|
||||
use codec::Encode;
|
||||
use core::iter::Peekable;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::{
|
||||
pezsp_core::offchain::StorageKind,
|
||||
pezsp_io::{offchain, offchain_index},
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
primitives::{Compact, LeafDataProvider},
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::pezframe_support::derive_impl,
|
||||
prelude::{pezframe_system, pezframe_system::config_preludes::TestDefaultConfig},
|
||||
testing_prelude::*,
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::{mock::*, *};
|
||||
|
||||
use crate::primitives::{mmr_lib::helper, utils, Compact, LeafProof};
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::pezsp_core::{
|
||||
offchain::{testing::TestOffchainExt, OffchainDbExt, OffchainWorkerExt},
|
||||
H256,
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_mmr`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pezpallet-meta-tx"
|
||||
description = "FRAME pezpallet enabling meta transactions."
|
||||
license = "Apache-2.0"
|
||||
version = "0.1.0"
|
||||
version = "0.44.0"
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
|
||||
@@ -19,7 +19,7 @@ impl-trait-for-tuples = { workspace = true }
|
||||
log = { workspace = true, default-features = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
@@ -39,7 +39,7 @@ pretty_assertions = { workspace = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"log/std",
|
||||
"pezframe-benchmarking?/std",
|
||||
"pezframe-support/std",
|
||||
@@ -51,7 +51,7 @@ std = [
|
||||
]
|
||||
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-executive/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
@@ -61,7 +61,7 @@ runtime-benchmarks = [
|
||||
]
|
||||
|
||||
try-runtime = [
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezframe-executive/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_migrations`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -21,7 +21,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezsp-application-crypto = { workspace = true }
|
||||
pezsp-mixnet = { workspace = true }
|
||||
@@ -32,15 +34,17 @@ serde = { features = ["derive"], workspace = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"log/std",
|
||||
"pezsp-application-crypto/std",
|
||||
"pezsp-mixnet/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
]
|
||||
try-runtime = ["frame/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezsp-mixnet/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -27,7 +27,7 @@ pub use pezpallet::*;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::{
|
||||
pezsp_io::{self, MultiRemovalResults},
|
||||
pezsp_runtime,
|
||||
@@ -172,7 +172,7 @@ fn twox<BlockNumber: UniqueSaturatedInto<u64>>(
|
||||
// The pezpallet
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[frame::pezpallet(dev_mode)]
|
||||
#[pezframe::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
#[pezpallet::pezpallet]
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
# third party
|
||||
@@ -29,9 +31,9 @@ pezpallet-balances = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "log/std", "scale-info/std"]
|
||||
std = ["codec/std", "pezframe/std", "log/std", "scale-info/std"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = ["frame/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use super::*;
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
|
||||
use crate::Pezpallet as Multisig;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ pub mod weights;
|
||||
|
||||
extern crate alloc;
|
||||
use alloc::{boxed::Box, vec, vec::Vec};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::{Currency, ReservableCurrency},
|
||||
};
|
||||
@@ -138,7 +138,7 @@ enum CallOrHash<T: Config> {
|
||||
Hash([u8; 32]),
|
||||
}
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
// Migrations for Multisig Pezpallet
|
||||
|
||||
use crate::*;
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
pub mod v1 {
|
||||
use super::*;
|
||||
|
||||
type OpaqueCall<T> = frame::traits::WrapperKeepOpaque<<T as Config>::RuntimeCall>;
|
||||
type OpaqueCall<T> = pezframe::traits::WrapperKeepOpaque<<T as Config>::RuntimeCall>;
|
||||
|
||||
#[frame::storage_alias]
|
||||
#[pezframe::storage_alias]
|
||||
type Calls<T: Config> = StorageMap<
|
||||
Pezpallet<T>,
|
||||
Identity,
|
||||
@@ -36,14 +36,14 @@ pub mod v1 {
|
||||
pub struct MigrateToV1<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, frame::try_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezframe::try_runtime::TryRuntimeError> {
|
||||
log!(info, "Number of calls to refund and delete: {}", Calls::<T>::iter().count());
|
||||
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
use frame::traits::ReservableCurrency as _;
|
||||
use pezframe::traits::ReservableCurrency as _;
|
||||
let current = Pezpallet::<T>::in_code_storage_version();
|
||||
let onchain = Pezpallet::<T>::on_chain_storage_version();
|
||||
|
||||
@@ -69,7 +69,7 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), frame::try_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezframe::try_runtime::TryRuntimeError> {
|
||||
ensure!(
|
||||
Calls::<T>::iter().count() == 0,
|
||||
"there are some dangling calls that need to be destroyed and refunded"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate as pezpallet_multisig;
|
||||
use frame::{prelude::*, runtime::prelude::*, testing_prelude::*};
|
||||
use pezframe::{prelude::*, runtime::prelude::*, testing_prelude::*};
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlockU32<Test>;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_multisig`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezpallet-assets = { workspace = true }
|
||||
pezpallet-nfts = { workspace = true }
|
||||
@@ -31,7 +33,9 @@ pezpallet-balances = { workspace = true, default-features = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"log/std",
|
||||
"pezpallet-assets/std",
|
||||
"pezpallet-balances/std",
|
||||
@@ -39,13 +43,13 @@ std = [
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-assets/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-nfts/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezpallet-assets/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
"pezpallet-nfts/try-runtime",
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use super::*;
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
|
||||
use frame::deps::pezframe_support::assert_ok;
|
||||
use pezframe::deps::pezframe_support::assert_ok;
|
||||
use fungible::{Inspect as InspectFungible, Mutate as MutateFungible};
|
||||
use nonfungibles_v2::{Create, Mutate};
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@ mod tests;
|
||||
|
||||
pub mod weights;
|
||||
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
use pezframe_system::Config as SystemConfig;
|
||||
pub use pezpallet::*;
|
||||
pub use types::*;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
use core::fmt::Display;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use super::*;
|
||||
use crate as pezpallet_nft_fractionalization;
|
||||
|
||||
use frame::{deps::pezsp_runtime::MultiSignature, testing_prelude::*, traits::Verify};
|
||||
use pezframe::{deps::pezsp_runtime::MultiSignature, testing_prelude::*, traits::Verify};
|
||||
use pezpallet_nfts::PalletFeatures;
|
||||
|
||||
type Block = MockBlock<Test>;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use crate::{mock::*, *};
|
||||
|
||||
use frame::{deps::pezsp_runtime::ModuleError, testing_prelude::*};
|
||||
use pezframe::{deps::pezsp_runtime::ModuleError, testing_prelude::*};
|
||||
use fungible::{hold::Inspect as InspectHold, Mutate as MutateFungible};
|
||||
use fungibles::{metadata::Inspect, InspectEnumerable};
|
||||
use TokenError::FundsUnavailable;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for `pezpallet_nft_fractionalization`.
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -27,10 +29,10 @@ pezsp-io = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "scale-info/std"]
|
||||
std = ["codec/std", "pezframe/std", "scale-info/std"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = ["frame/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
|
||||
use crate::*;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ pub use pezpallet::*;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
use fungible::{
|
||||
Balanced as FunBalanced, Inspect as FunInspect, Mutate as FunMutate,
|
||||
MutateHold as FunMutateHold,
|
||||
@@ -173,7 +173,7 @@ impl BenchmarkSetup for () {
|
||||
fn create_counterpart_asset() {}
|
||||
}
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! Test environment for NIS pezpallet.
|
||||
|
||||
use frame::{runtime::prelude::*, testing_prelude::*, traits::StorageMapShim};
|
||||
use pezframe::{runtime::prelude::*, testing_prelude::*, traits::StorageMapShim};
|
||||
|
||||
use crate::{self as pezpallet_nis, *};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! Tests for NIS pezpallet.
|
||||
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
use crate::{
|
||||
mock::{Balance, *},
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_nis`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -17,12 +17,14 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "log/std", "scale-info/std"]
|
||||
try-runtime = ["frame/try-runtime"]
|
||||
runtime-benchmarks = ["frame/runtime-benchmarks"]
|
||||
std = ["codec/std", "pezframe/std", "log/std", "scale-info/std"]
|
||||
try-runtime = ["pezframe/try-runtime"]
|
||||
runtime-benchmarks = ["pezframe/runtime-benchmarks"]
|
||||
|
||||
@@ -49,7 +49,7 @@ pub mod weights;
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{collections::btree_set::BTreeSet, vec::Vec};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::{pezsp_core::OpaquePeerId as PeerId, pezsp_io},
|
||||
prelude::*,
|
||||
};
|
||||
@@ -58,7 +58,7 @@ pub use weights::WeightInfo;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as pezframe_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use super::*;
|
||||
use crate as pezpallet_node_authorization;
|
||||
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
#[test]
|
||||
fn add_well_known_node_works() {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
pub trait WeightInfo {
|
||||
fn add_well_known_node() -> Weight;
|
||||
|
||||
@@ -18,17 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
docify = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezsp-metadata-ir = { optional = true, workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
std = ["codec/std", "frame/std", "pezsp-metadata-ir/std", "scale-info/std"]
|
||||
std = ["codec/std", "pezframe/std", "pezsp-metadata-ir/std", "scale-info/std"]
|
||||
|
||||
runtime-benchmarks = ["frame/runtime-benchmarks"]
|
||||
runtime-benchmarks = ["pezframe/runtime-benchmarks"]
|
||||
|
||||
try-runtime = ["frame/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime"]
|
||||
|
||||
frame-metadata = ["pezsp-metadata-ir"]
|
||||
|
||||
@@ -19,14 +19,16 @@ path = "src/paged_list.rs"
|
||||
|
||||
[dependencies]
|
||||
arbitrary = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
honggfuzz = { workspace = true }
|
||||
pezpallet-paged-list = { features = ["std"], workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["frame/std", "pezpallet-paged-list/std"]
|
||||
std = ["pezframe/std", "pezpallet-paged-list/std"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-paged-list/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
use arbitrary::Arbitrary;
|
||||
use honggfuzz::fuzz;
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*, runtime::prelude::storage::storage_noop_guard::StorageNoopGuard,
|
||||
testing_prelude::TestExternalities,
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
//!
|
||||
//! The pezpallet is quite unique since it does not expose any `Call`s, `Error`s or `Event`s. All
|
||||
//! interaction goes through the implemented
|
||||
//! [`StorageList`][frame::deps::pezframe_support::storage::StorageList] trait.
|
||||
//! [`StorageList`][pezframe::deps::pezframe_support::storage::StorageList] trait.
|
||||
//!
|
||||
//! A fuzzer for testing is provided in crate `pezpallet-paged-list-fuzzer`.
|
||||
//!
|
||||
@@ -72,10 +72,10 @@ mod tests;
|
||||
extern crate alloc;
|
||||
|
||||
use codec::FullCodec;
|
||||
use frame::{prelude::*, traits::StorageInstance};
|
||||
use pezframe::{prelude::*, traits::StorageInstance};
|
||||
pub use paged_list::StoragePagedList;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![cfg(feature = "std")]
|
||||
|
||||
use crate::{paged_list::StoragePagedListMeta, Config, ListPrefix};
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
use alloc::vec::Vec;
|
||||
use codec::{Decode, Encode, EncodeLike, FullCodec};
|
||||
use core::marker::PhantomData;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::pezsp_io,
|
||||
prelude::*,
|
||||
runtime::prelude::storage::{StorageAppender, StorageList, StoragePrefixedContainer},
|
||||
@@ -60,10 +60,10 @@ pub type ValueIndex = u32;
|
||||
/// are loaded once a page is read from storage. Iteration then happens on the cached elements. This
|
||||
/// reduces the number of storage `read` calls on the overlay. **Appending** to the list happens by
|
||||
/// appending to the last page by utilizing
|
||||
/// [`storage::append`](frame::deps::pezsp_io::storage::append). It allows to directly extend
|
||||
/// [`storage::append`](pezframe::deps::pezsp_io::storage::append). It allows to directly extend
|
||||
/// the elements of `values` vector of the page without loading the whole vector from storage. A new
|
||||
/// page is instantiated once [`Page::next`] overflows `ValuesPerNewPage`. Its vector will also be
|
||||
/// created through [`storage::append`](frame::deps::pezsp_io::storage::append). **Draining**
|
||||
/// created through [`storage::append`](pezframe::deps::pezsp_io::storage::append). **Draining**
|
||||
/// advances the internal indices identical to Iteration. It additionally persists the increments to
|
||||
/// storage and thereby 'drains' elements. Completely drained pages are deleted from storage.
|
||||
///
|
||||
@@ -83,7 +83,7 @@ pub struct StoragePagedList<Prefix, Value, ValuesPerNewPage> {
|
||||
|
||||
/// The state of a [`StoragePagedList`].
|
||||
///
|
||||
/// This struct doubles as [`frame::deps::pezframe_support::storage::StorageList::Appender`].
|
||||
/// This struct doubles as [`pezframe::deps::pezframe_support::storage::StorageList::Appender`].
|
||||
#[derive(
|
||||
Encode, Decode, CloneNoBound, PartialEqNoBound, EqNoBound, DebugNoBound, DefaultNoBound,
|
||||
)]
|
||||
@@ -407,7 +407,7 @@ where
|
||||
#[allow(dead_code)]
|
||||
pub(crate) mod mock {
|
||||
pub use super::*;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
parameter_types! {
|
||||
pub const ValuesPerNewPage: u32 = 5;
|
||||
@@ -428,7 +428,7 @@ pub(crate) mod mock {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::mock::*;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
#[test]
|
||||
fn append_works() {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use crate::{mock::*, *};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::storage::{StorageAppender, StoragePrefixedContainer},
|
||||
testing_prelude::*,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "pezpallet-parameters"
|
||||
description = "Pallet to store and configure parameters."
|
||||
repository.workspace = true
|
||||
license = "Apache-2.0"
|
||||
version = "0.1.0"
|
||||
version = "0.44.0"
|
||||
authors = [
|
||||
"Acala Developers",
|
||||
"Kurdistan Tech Institute <info@pezkuwichain.io>",
|
||||
@@ -28,9 +28,9 @@ pezframe-system = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
|
||||
# pezpallet-example-basic moved to integration tests to break circular dependency
|
||||
[dev-dependencies]
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
pezpallet-example-basic = { workspace = true, default-features = true }
|
||||
pezsp-io = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
@@ -50,7 +50,6 @@ runtime-benchmarks = [
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-example-basic/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
]
|
||||
@@ -58,6 +57,5 @@ try-runtime = [
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
"pezpallet-example-basic/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["max-encoded-len"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -27,14 +29,14 @@ pezpallet-utility = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "frame/std", "scale-info/std"]
|
||||
std = ["codec/std", "pezframe/std", "scale-info/std"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-utility/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
"pezpallet-utility/try-runtime",
|
||||
]
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use super::*;
|
||||
use crate::Pezpallet as Proxy;
|
||||
use alloc::{boxed::Box, vec};
|
||||
use frame::benchmarking::prelude::{
|
||||
use pezframe::benchmarking::prelude::{
|
||||
account, benchmarks, impl_test_function, whitelisted_caller, BenchmarkError, RawOrigin,
|
||||
};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub mod weights;
|
||||
|
||||
extern crate alloc;
|
||||
use alloc::{boxed::Box, vec};
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::{Currency, InstanceFilter, ReservableCurrency},
|
||||
};
|
||||
@@ -120,7 +120,7 @@ pub enum DepositKind {
|
||||
Announcements,
|
||||
}
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
@@ -154,7 +154,7 @@ pub mod pezpallet {
|
||||
+ Member
|
||||
+ Ord
|
||||
+ PartialOrd
|
||||
+ frame::traits::InstanceFilter<<Self as Config>::RuntimeCall>
|
||||
+ pezframe::traits::InstanceFilter<<Self as Config>::RuntimeCall>
|
||||
+ Default
|
||||
+ MaxEncodedLen;
|
||||
|
||||
@@ -998,7 +998,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
real: T::AccountId,
|
||||
call: <T as Config>::RuntimeCall,
|
||||
) {
|
||||
use frame::traits::{InstanceFilter as _, OriginTrait as _};
|
||||
use pezframe::traits::{InstanceFilter as _, OriginTrait as _};
|
||||
// This is a freshly authenticated new account, the origin restrictions doesn't apply.
|
||||
let mut origin: T::RuntimeOrigin = pezframe_system::RawOrigin::Signed(real).into();
|
||||
origin.add_filter(move |c: &<T as pezframe_system::Config>::RuntimeCall| {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use super::*;
|
||||
use crate as proxy;
|
||||
use alloc::{vec, vec::Vec};
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -79,7 +79,7 @@ impl Default for ProxyType {
|
||||
Self::Any
|
||||
}
|
||||
}
|
||||
impl frame::traits::InstanceFilter<RuntimeCall> for ProxyType {
|
||||
impl pezframe::traits::InstanceFilter<RuntimeCall> for ProxyType {
|
||||
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||
match self {
|
||||
ProxyType::Any => true,
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_proxy`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -27,8 +29,8 @@ pezpallet-balances = { workspace = true, default-features = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
]
|
||||
std = ["codec/std", "frame/std", "pezpallet-balances/std", "scale-info/std"]
|
||||
try-runtime = ["frame/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
std = ["codec/std", "pezframe/std", "pezpallet-balances/std", "scale-info/std"]
|
||||
try-runtime = ["pezframe/try-runtime", "pezpallet-balances/try-runtime"]
|
||||
|
||||
@@ -21,7 +21,7 @@ use super::*;
|
||||
|
||||
use crate::Pezpallet;
|
||||
use alloc::{boxed::Box, vec, vec::Vec};
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
|
||||
const SEED: u32 = 0;
|
||||
const DEFAULT_DELAY: u32 = 0;
|
||||
|
||||
@@ -154,7 +154,7 @@ extern crate alloc;
|
||||
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::{Currency, ReservableCurrency},
|
||||
};
|
||||
@@ -225,7 +225,7 @@ pub enum DepositKind<T: Config> {
|
||||
ActiveRecoveryFor(<T as pezframe_system::Config>::AccountId),
|
||||
}
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use super::*;
|
||||
|
||||
use crate as recovery;
|
||||
use frame::{deps::pezsp_io, testing_prelude::*};
|
||||
use pezframe::{deps::pezsp_io, testing_prelude::*};
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Tests for the module.
|
||||
|
||||
use crate::{mock::*, *};
|
||||
use frame::{deps::pezsp_runtime::bounded_vec, testing_prelude::*};
|
||||
use pezframe::{deps::pezsp_runtime::bounded_vec, testing_prelude::*};
|
||||
|
||||
#[test]
|
||||
fn basic_setup_works() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_recovery`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -31,7 +31,7 @@ use pezframe_support::weights::{
|
||||
};
|
||||
use pezframe_system::limits::BlockWeights;
|
||||
use pezkuwi_sdk::{
|
||||
pezkuwi_sdk_frame::{
|
||||
pezframe::{
|
||||
deps::pezsp_genesis_builder,
|
||||
runtime::{apis, prelude::*},
|
||||
traits::Block as BlockT,
|
||||
@@ -51,7 +51,7 @@ use pezpallet_transaction_payment::{
|
||||
use pezsp_weights::ConstantMultiplier;
|
||||
|
||||
pub use pezkuwi_sdk::{
|
||||
pezkuwi_sdk_frame::runtime::types_common::OpaqueBlock,
|
||||
pezframe::runtime::types_common::OpaqueBlock,
|
||||
teyrchains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature},
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ homepage.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version = "1.84"
|
||||
documentation.workspace = true
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[package.metadata.pezkuwi-sdk]
|
||||
exclude-from-umbrella = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pezpallet-revive-proc-macro"
|
||||
version = "0.1.0"
|
||||
version = "0.44.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pezpallet-revive-uapi"
|
||||
version = "0.1.0"
|
||||
version = "0.44.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
docify = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezpallet-balances = { optional = true, workspace = true }
|
||||
pezpallet-proxy = { optional = true, workspace = true }
|
||||
pezpallet-utility = { optional = true, workspace = true }
|
||||
@@ -33,20 +35,22 @@ pezpallet-utility = { workspace = true, default-features = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"pezpallet-balances?/std",
|
||||
"pezpallet-proxy?/std",
|
||||
"pezpallet-utility?/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-proxy/runtime-benchmarks",
|
||||
"pezpallet-utility/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezpallet-balances?/try-runtime",
|
||||
"pezpallet-proxy?/try-runtime",
|
||||
"pezpallet-utility?/try-runtime",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use super::{Pezpallet as SafeMode, *};
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
|
||||
#[benchmarks(where T::Currency: fungible::Mutate<T::AccountId>)]
|
||||
mod benchmarks {
|
||||
|
||||
@@ -75,7 +75,7 @@ pub mod mock;
|
||||
mod tests;
|
||||
pub mod weights;
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::{
|
||||
fungible::hold::{Inspect, Mutate},
|
||||
*,
|
||||
@@ -90,7 +90,7 @@ type BalanceOf<T> = <<T as Config>::Currency as fungible::Inspect<
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
>>::Balance;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
@@ -613,7 +613,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> frame::traits::SafeMode for Pezpallet<T> {
|
||||
impl<T: Config> pezframe::traits::SafeMode for Pezpallet<T> {
|
||||
type BlockNumber = BlockNumberFor<T>;
|
||||
|
||||
fn is_entered() -> bool {
|
||||
@@ -627,20 +627,20 @@ impl<T: Config> frame::traits::SafeMode for Pezpallet<T> {
|
||||
})
|
||||
}
|
||||
|
||||
fn enter(duration: BlockNumberFor<T>) -> Result<(), frame::traits::SafeModeError> {
|
||||
fn enter(duration: BlockNumberFor<T>) -> Result<(), pezframe::traits::SafeModeError> {
|
||||
Self::do_enter(None, duration).map_err(Into::into)
|
||||
}
|
||||
|
||||
fn extend(duration: BlockNumberFor<T>) -> Result<(), frame::traits::SafeModeError> {
|
||||
fn extend(duration: BlockNumberFor<T>) -> Result<(), pezframe::traits::SafeModeError> {
|
||||
Self::do_extend(None, duration).map_err(Into::into)
|
||||
}
|
||||
|
||||
fn exit() -> Result<(), frame::traits::SafeModeError> {
|
||||
fn exit() -> Result<(), pezframe::traits::SafeModeError> {
|
||||
Self::do_exit(ExitReason::Force).map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> From<Error<T>> for frame::traits::SafeModeError {
|
||||
impl<T: Config> From<Error<T>> for pezframe::traits::SafeModeError {
|
||||
fn from(err: Error<T>) -> Self {
|
||||
match err {
|
||||
Error::<T>::Entered => Self::AlreadyEntered,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use super::*;
|
||||
use crate as pezpallet_safe_mode;
|
||||
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
testing_prelude::*,
|
||||
traits::{InsideBoth, InstanceFilter, IsInVec},
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use super::*;
|
||||
use crate::mock::{RuntimeCall, *};
|
||||
|
||||
use frame::{testing_prelude::*, traits::Currency};
|
||||
use pezframe::{testing_prelude::*, traits::Currency};
|
||||
|
||||
#[test]
|
||||
fn fails_to_filter_calls_to_safe_mode_pallet() {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for `pezpallet_safe_mode`.
|
||||
|
||||
@@ -18,7 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezpallet-ranked-collective = { optional = true, workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
@@ -27,13 +29,15 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"log/std",
|
||||
"pezpallet-ranked-collective/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-ranked-collective/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = ["frame/try-runtime", "pezpallet-ranked-collective?/try-runtime"]
|
||||
try-runtime = ["pezframe/try-runtime", "pezpallet-ranked-collective?/try-runtime"]
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use super::*;
|
||||
use crate::Pezpallet as Salary;
|
||||
|
||||
use frame::benchmarking::prelude::*;
|
||||
use pezframe::benchmarking::prelude::*;
|
||||
const SEED: u32 = 0;
|
||||
|
||||
fn ensure_member_with_salary<T: Config<I>, I: 'static>(who: &T::AccountId) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use core::marker::PhantomData;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
prelude::*,
|
||||
traits::tokens::{GetSalary, Pay, PaymentStatus},
|
||||
};
|
||||
@@ -75,7 +75,7 @@ pub struct ClaimantStatus<CycleIndex, Balance, Id> {
|
||||
status: ClaimState<Balance, Id>,
|
||||
}
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
#[pezpallet::pezpallet]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use crate as pezpallet_salary;
|
||||
use crate::*;
|
||||
use frame::{deps::pezsp_io, testing_prelude::*};
|
||||
use pezframe::{deps::pezsp_io, testing_prelude::*};
|
||||
use pezpallet_ranked_collective::{EnsureRanked, Geometric};
|
||||
|
||||
type Rank = u16;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use crate as pezpallet_salary;
|
||||
use crate::*;
|
||||
use core::cell::RefCell;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::pezsp_runtime::traits::Identity, testing_prelude::*, traits::tokens::ConvertRank,
|
||||
};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use frame::weights_prelude::*;
|
||||
use pezframe::weights_prelude::*;
|
||||
|
||||
/// Weight functions needed for `pezpallet_salary`.
|
||||
pub trait WeightInfo {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user