Complete terminology rebrand to Pezkuwi ecosystem

Applied global changes: Polkadot->Pezkuwi, Parachain->TeyrChain, pallet->pezpallet, frame->pezframe.

Updated authors in Cargo.toml to include Kurdistan Tech Institute and pezkuwichain team.

Used Cargo aliases to maintain SDK compatibility while using rebranded names in source code.
This commit is contained in:
2025-12-22 09:03:43 +03:00
parent a52909422a
commit d839cbd92b
180 changed files with 3537 additions and 2889 deletions
+79 -79
View File
@@ -3,11 +3,11 @@ members = [ "node", "runtime", "template-fuzzer" ]
resolver = "2"
[workspace.package]
authors = [ "OpenZeppelin" ]
description = "EVM Runtime template for Polkadot Para{chains, cores}"
authors = [ "OpenZeppelin", "Kurdistan Tech Institue", "pezkuwichain team" ]
description = "EVM Runtime template for Pezkuwi Para{chains, cores}"
edition = "2021"
license = "GPL-3.0-only"
repository = "https://github.com/OpenZeppelin/polkadot-runtime-templates"
repository = "https://github.com/OpenZeppelin/pezkuwi-runtime-templates"
[workspace.dependencies]
clap = { version = "4.5.3", features = [ "derive" ] }
@@ -28,39 +28,39 @@ serde_derive = { version = "1.0.121", default-features = false }
serde_json = { version = "1.0.121", default-features = false }
smallvec = "1.11.0"
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
openzeppelin-pallet-abstractions = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
openzeppelin-pallet-abstractions-proc = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
pallet-asset-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-benchmarking = { package = "frame-benchmarking", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-benchmarking-cli = { package = "frame-benchmarking-cli", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-executive = { package = "frame-executive", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-metadata-hash-extension = { package = "frame-metadata-hash-extension", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-support = { package = "frame-support", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-system = { package = "frame-system", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-system-benchmarking = { package = "frame-system-benchmarking", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-system-rpc-runtime-api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezframe-try-runtime = { package = "frame-try-runtime", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
openzeppelin-pezpallet-abstractions = { package = "openzeppelin-pallet-abstractions", git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
openzeppelin-pezpallet-abstractions-proc = { package = "openzeppelin-pallet-abstractions-proc", git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
pezpallet-asset-tx-payment = { package = "pallet-asset-tx-payment", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-assets = { package = "pallet-assets", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-aura = { package = "pallet-aura", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-balances = { package = "pallet-balances", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-conviction-voting = { package = "pallet-conviction-voting", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-membership = { package = "pallet-membership", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-message-queue = { package = "pallet-message-queue", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-multisig = { package = "pallet-multisig", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-preimage = { package = "pallet-preimage", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-proxy = { package = "pallet-proxy", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-referenda = { package = "pallet-referenda", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-scheduler = { package = "pallet-scheduler", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-session = { package = "pallet-session", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-transaction-payment-rpc = { package = "pallet-transaction-payment-rpc", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-transaction-payment-rpc-runtime-api = { package = "pallet-transaction-payment-rpc-runtime-api", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-utility = { package = "pallet-utility", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-whitelist = { package = "pallet-whitelist", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
@@ -99,22 +99,22 @@ sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-fea
sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
bizinikiwi-build-script-utils = { package = "substrate-build-script-utils", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503" }
bizinikiwi-pezframe-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
bizinikiwi-prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
bizinikiwi-wasm-builder = { package = "substrate-wasm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# Pezkuwi
pezpallet-xcm = { package = "pallet-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezkuwi-cli = { package = "polkadot-cli", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezkuwi-teyrchain-primitives = { package = "polkadot-parachain-primitives", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezkuwi-primitives = { package = "polkadot-primitives", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezkuwi-runtime-common = { package = "polkadot-runtime-common", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezkuwi-runtime-teyrchains = { package = "polkadot-runtime-parachains", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
staging-xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
staging-xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
staging-xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-pez-simulator = { package = "xcm-simulator", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# Cumulus
assets-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
@@ -123,24 +123,24 @@ cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk",
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-teyrchain-inherent = { package = "cumulus-client-parachain-inherent", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-aura-ext = { package = "cumulus-pallet-aura-ext", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-teyrchain-system = { package = "cumulus-pallet-parachain-system", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-session-benchmarking = { package = "cumulus-pallet-session-benchmarking", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-weight-reclaim = { package = "cumulus-pallet-weight-reclaim", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-xcm = { package = "cumulus-pallet-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pezpallet-xcmp-queue = { package = "cumulus-pallet-xcmp-queue", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-teyrchain-inherent = { package = "cumulus-primitives-parachain-inherent", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pezpallet-collator-selection = { package = "pallet-collator-selection", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
teyrchain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
teyrchains-common = { package = "parachains-common", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# EVM
ethereum = { git = "https://github.com/rust-ethereum/ethereum", rev = "bbb544622208ef6e9890a2dbc224248f6dd13318" }
@@ -158,17 +158,17 @@ fp-dynamic-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "p
fp-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-rpc = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-self-contained = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-base-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-ethereum = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
pezpallet-base-fee = { package = "pallet-base-fee", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pezpallet-ethereum = { package = "pallet-ethereum", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
"forbid-evm-reentrancy",
] }
pallet-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
pezpallet-evm = { package = "pallet-evm", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
"forbid-evm-reentrancy",
] }
pallet-evm-chain-id = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pezpallet-evm-chain-id = { package = "pallet-evm-chain-id", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pezpallet-evm-precompile-modexp = { package = "pallet-evm-precompile-modexp", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pezpallet-evm-precompile-sha3fips = { package = "pallet-evm-precompile-sha3fips", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pezpallet-evm-precompile-simple = { package = "pallet-evm-precompile-simple", git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
# ORML
orml-oracle = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
@@ -178,32 +178,32 @@ orml-xcm-support = { git = "https://github.com/OpenZeppelin/open-runtime-module-
orml-xtokens = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
# Moonbeam
pallet-asset-manager = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-erc20-xcm-bridge = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-xcm-transactor = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-xcm-weight-trader = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pezpallet-asset-manager = { package = "pallet-asset-manager", git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pezpallet-erc20-xcm-bridge = { package = "pallet-erc20-xcm-bridge", git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pezpallet-xcm-transactor = { package = "pallet-xcm-transactor", git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pezpallet-xcm-weight-trader = { package = "pallet-xcm-weight-trader", git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
xcm-primitives = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
# Fuzzer
substrate-runtimes-fuzzers = { git = "https://github.com/srlabs/substrate-runtime-fuzzer.git", default-features = false, tag = "polkadot-v1.12.0" }
bizinikiwi-runtimes-fuzzers = { package = "substrate-runtimes-fuzzers", git = "https://github.com/srlabs/bizinikiwi-runtime-fuzzer.git", default-features = false, tag = "polkadot-v1.12.0" }
ziggy = { version = "0.8", default-features = false }
# Moonkit
nimbus-consensus = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
nimbus-primitives = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
pallet-author-inherent = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
pezpallet-author-inherent = { package = "pallet-author-inherent", git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
# Dancekit
ccp-authorities-noting-inherent = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
dp-consensus = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
pallet-cc-authorities-noting = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
pezpallet-cc-authorities-noting = { package = "pallet-cc-authorities-noting", git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
# Tanssi
tc-consensus = { git = "https://github.com/KitHat/tanssi", branch = "polkadot-stable2503", default-features = false }
# [patch."https://github.com/paritytech/polkadot-sdk"]
# Make pallet-migrations optional to avoid the error
# pallet-migrations = { version = "=9.0.0", optional = true }
# [patch."https://github.com/paritytech/pezkuwi-sdk"]
# Make pezpallet-migrations optional to avoid the error
# pezpallet-migrations = { version = "=9.0.0", optional = true }
[workspace.lints.clippy]
large_enum_variant = "allow"
+15 -15
View File
@@ -24,10 +24,10 @@ serde_json = { workspace = true }
# Local
evm-runtime-template = { path = "../runtime" }
# Substrate
frame-benchmarking = { workspace = true }
frame-benchmarking-cli = { workspace = true }
pallet-transaction-payment-rpc = { workspace = true }
# Bizinikiwi
pezframe-benchmarking = { workspace = true }
pezframe-benchmarking-cli = { workspace = true }
pezpallet-transaction-payment-rpc = { workspace = true }
sc-basic-authorship = { workspace = true }
sc-chain-spec = { workspace = true }
sc-cli = { workspace = true }
@@ -56,13 +56,13 @@ sp-io = { workspace = true }
sp-keystore = { workspace = true }
sp-runtime = { workspace = true }
sp-timestamp = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
substrate-prometheus-endpoint = { workspace = true }
bizinikiwi-pezframe-rpc-system = { workspace = true }
bizinikiwi-prometheus-endpoint = { workspace = true }
# Polkadot
polkadot-cli = { workspace = true }
polkadot-primitives = { workspace = true }
xcm = { workspace = true }
# Pezkuwi
pezkuwi-cli = { workspace = true }
pezkuwi-primitives = { workspace = true }
staging-xcm = { workspace = true }
# Cumulus
color-print = { workspace = true }
@@ -71,10 +71,10 @@ cumulus-client-collator = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-parachain-inherent = { workspace = true }
cumulus-client-teyrchain-inherent = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-primitives-teyrchain-inherent = { workspace = true }
cumulus-relay-chain-interface = { workspace = true }
cumulus-test-relay-sproof-builder = { workspace = true }
@@ -96,16 +96,16 @@ nimbus-consensus = { workspace = true }
tc-consensus = { workspace = true }
[build-dependencies]
substrate-build-script-utils = { workspace = true }
bizinikiwi-build-script-utils = { workspace = true }
[features]
default = []
async-backing = []
runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "tc-consensus/runtime-benchmarks" ]
runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "pezframe-benchmarking-cli/runtime-benchmarks", "pezframe-benchmarking/runtime-benchmarks", "pezkuwi-cli/runtime-benchmarks", "pezkuwi-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "tc-consensus/runtime-benchmarks" ]
tanssi = []
try-runtime = [
"evm-runtime-template/try-runtime",
"polkadot-cli/try-runtime",
"pezkuwi-cli/try-runtime",
"sp-runtime/try-runtime",
]
txpool = [ "fc-rpc/txpool" ]
+1 -1
View File
@@ -1,4 +1,4 @@
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
use bizinikiwi_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys();
+9 -9
View File
@@ -18,7 +18,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
use crate::contracts::{parse_contracts, ContractsPath};
/// Specialized `ChainSpec` for the normal parachain runtime.
/// Specialized `ChainSpec` for the normal teyrchain runtime.
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
/// The default XCM version to set in genesis config.
@@ -36,9 +36,9 @@ pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Pu
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
#[serde(deny_unknown_fields)]
pub struct Extensions {
/// The relay chain of the Parachain.
/// The relay chain of the TeyrChain.
pub relay_chain: String,
/// The id of the Parachain.
/// The id of the TeyrChain.
pub para_id: u32,
}
@@ -224,8 +224,8 @@ fn testnet_genesis(
"balances": {
"balances": endowed_accounts.iter().cloned().map(|k| (k, 1u64 << 60)).collect::<Vec<_>>(),
},
"parachainInfo": {
"parachainId": id,
"teyrchainInfo": {
"teyrchainId": id,
},
"collatorSelection": {
"invulnerables": invulnerables.iter().cloned().map(|(acc, _)| acc).collect::<Vec<_>>(),
@@ -250,7 +250,7 @@ fn testnet_genesis(
"evm": {
"accounts": accounts
},
"polkadotXcm": {
"pezkuwiXcm": {
"safeXcmVersion": Some(SAFE_XCM_VERSION),
},
"sudo": { "key": Some(root) }
@@ -304,8 +304,8 @@ fn testnet_genesis(
"balances": {
"balances": endowed_accounts.iter().cloned().map(|k| (k, 1u64 << 60)).collect::<Vec<_>>(),
},
"parachainInfo": {
"parachainId": id,
"teyrchainInfo": {
"teyrchainId": id,
},
"treasury": {},
"evmChainId": {
@@ -314,7 +314,7 @@ fn testnet_genesis(
"evm": {
"accounts": accounts
},
"polkadotXcm": {
"pezkuwiXcm": {
"safeXcmVersion": Some(SAFE_XCM_VERSION),
},
"sudo": { "key": Some(root) }
+13 -13
View File
@@ -29,19 +29,19 @@ pub enum Subcommand {
/// Remove the whole chain.
PurgeChain(cumulus_client_cli::PurgeChainCmd),
/// Export the genesis head data of the parachain.
/// Export the genesis head data of the teyrchain.
///
/// Head data is the encoded block header.
#[command(alias = "export-genesis-state")]
ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand),
/// Export the genesis wasm of the parachain.
/// Export the genesis wasm of the teyrchain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),
/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
/// The pezpallet benchmarking moved to the `pezpallet` sub-command.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
Benchmark(pezframe_benchmarking_cli::BenchmarkCmd),
/// Try-runtime has migrated to a standalone
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
@@ -94,14 +94,14 @@ impl ExtendedBuildSpecCmd {
const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
r#"<bold><underline>Examples:</></>
<bold>parachain-template-node build-spec --disable-default-bootnode > plain-parachain-chainspec.json</>
<bold>teyrchain-template-node build-spec --disable-default-bootnode > plain-teyrchain-chainspec.json</>
Export a chainspec for a local testnet in json format.
<bold>parachain-template-node --chain plain-parachain-chainspec.json --tmp -- --chain paseo-local</>
Launch a full node with chain specification loaded from plain-parachain-chainspec.json.
<bold>parachain-template-node</>
Launch a full node with default parachain <italic>local-testnet</> and relay chain <italic>paseo-local</>.
<bold>parachain-template-node --collator</>
Launch a collator with default parachain <italic>local-testnet</> and relay chain <italic>paseo-local</>.
<bold>teyrchain-template-node --chain plain-teyrchain-chainspec.json --tmp -- --chain paseo-local</>
Launch a full node with chain specification loaded from plain-teyrchain-chainspec.json.
<bold>teyrchain-template-node</>
Launch a full node with default teyrchain <italic>local-testnet</> and relay chain <italic>paseo-local</>.
<bold>teyrchain-template-node --collator</>
Launch a collator with default teyrchain <italic>local-testnet</> and relay chain <italic>paseo-local</>.
"#
);
#[derive(Debug, clap::Parser)]
@@ -139,7 +139,7 @@ pub struct Cli {
#[derive(Debug)]
pub struct RelayChainCli {
/// The actual relay chain cli object.
pub base: polkadot_cli::RunCmd,
pub base: pezkuwi_cli::RunCmd,
/// Optional chain id that should be passed to the relay chain.
pub chain_id: Option<String>,
@@ -157,7 +157,7 @@ impl RelayChainCli {
) -> Self {
let extension = crate::chain_spec::Extensions::try_get(&*para_config.chain_spec);
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config.base_path.path().join("polkadot");
let base_path = para_config.base_path.path().join("pezkuwi");
Self {
base_path: Some(base_path),
chain_id,
+30 -30
View File
@@ -1,11 +1,11 @@
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use cumulus_primitives_core::ParaId;
use evm_runtime_template::Block;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use pezframe_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::info;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Result, RpcEndpoint, SharedParams, SubstrateCli,
NetworkParams, Result, RpcEndpoint, SharedParams, BizinikiwiCli,
};
use sc_service::config::{BasePath, PrometheusConfig};
use sp_runtime::traits::AccountIdConversion;
@@ -29,9 +29,9 @@ fn load_spec(
})
}
impl SubstrateCli for Cli {
impl BizinikiwiCli for Cli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"TeyrChain Collator Template".into()
}
fn impl_version() -> String {
@@ -40,9 +40,9 @@ impl SubstrateCli for Cli {
fn description() -> String {
format!(
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n{} <parachain-args> -- <relay-chain-args>",
"TeyrChain Collator Template\n\nThe command-line arguments provided first will be \
passed to the teyrchain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n{} <teyrchain-args> -- <relay-chain-args>",
Self::executable_name()
)
}
@@ -52,7 +52,7 @@ impl SubstrateCli for Cli {
}
fn support_url() -> String {
"https://github.com/paritytech/polkadot-sdk/issues/new".into()
"https://github.com/paritytech/pezkuwi-sdk/issues/new".into()
}
fn copyright_start_year() -> i32 {
@@ -67,9 +67,9 @@ impl SubstrateCli for Cli {
}
}
impl SubstrateCli for RelayChainCli {
impl BizinikiwiCli for RelayChainCli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"TeyrChain Collator Template".into()
}
fn impl_version() -> String {
@@ -78,9 +78,9 @@ impl SubstrateCli for RelayChainCli {
fn description() -> String {
format!(
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n{} <parachain-args> -- <relay-chain-args>",
"TeyrChain Collator Template\n\nThe command-line arguments provided first will be \
passed to the teyrchain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n{} <teyrchain-args> -- <relay-chain-args>",
Self::executable_name()
)
}
@@ -90,7 +90,7 @@ impl SubstrateCli for RelayChainCli {
}
fn support_url() -> String {
"https://github.com/paritytech/polkadot-sdk/issues/new".into()
"https://github.com/paritytech/pezkuwi-sdk/issues/new".into()
}
fn copyright_start_year() -> i32 {
@@ -98,7 +98,7 @@ impl SubstrateCli for RelayChainCli {
}
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
pezkuwi_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
}
}
@@ -152,19 +152,19 @@ pub fn run() -> Result<()> {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
let polkadot_cli = RelayChainCli::new(
let pezkuwi_cli = RelayChainCli::new(
&config,
[RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()),
);
let polkadot_config = SubstrateCli::create_configuration(
&polkadot_cli,
&polkadot_cli,
let pezkuwi_config = BizinikiwiCli::create_configuration(
&pezkuwi_cli,
&pezkuwi_cli,
config.tokio_handle.clone(),
)
.map_err(|err| format!("Relay chain argument error: {}", err))?;
cmd.run(config, polkadot_config)
cmd.run(config, pezkuwi_config)
})
},
Some(Subcommand::ExportGenesisHead(cmd)) => {
@@ -235,31 +235,31 @@ pub fn run() -> Result<()> {
let para_id = chain_spec::Extensions::try_get(&*config.chain_spec)
.map(|e| e.para_id)
.ok_or("Could not find parachain ID in chain-spec.")?;
.ok_or("Could not find teyrchain ID in chain-spec.")?;
let polkadot_cli = RelayChainCli::new(
let pezkuwi_cli = RelayChainCli::new(
&config,
[RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()),
);
let id = ParaId::from(para_id);
let parachain_account =
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(
let teyrchain_account =
AccountIdConversion::<pezkuwi_primitives::AccountId>::into_account_truncating(
&id,
);
let tokio_handle = config.tokio_handle.clone();
let polkadot_config =
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle)
let pezkuwi_config =
BizinikiwiCli::create_configuration(&pezkuwi_cli, &pezkuwi_cli, tokio_handle)
.map_err(|err| format!("Relay chain argument error: {}", err))?;
info!("Parachain Account: {parachain_account}");
info!("TeyrChain Account: {teyrchain_account}");
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });
crate::service::start_parachain_node(
crate::service::start_teyrchain_node(
config,
polkadot_config,
pezkuwi_config,
collator_options,
&cli.eth,
id,
@@ -324,7 +324,7 @@ impl CliConfiguration<Self> for RelayChainCli {
where
F: FnOnce(&mut sc_cli::LoggerBuilder),
{
unreachable!("PolkadotCli is never initialized; qed");
unreachable!("PezkuwiCli is never initialized; qed");
}
fn chain_id(&self, is_dev: bool) -> Result<String> {
+3 -3
View File
@@ -11,7 +11,7 @@ use fc_rpc::EthTask;
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
pub use fc_storage::{StorageOverride, StorageOverrideHandler};
use futures::{future, prelude::*};
// Substrate
// Bizinikiwi
use sc_client_api::BlockchainEvents;
use sc_executor::{HostFunctions, WasmExecutor};
use sc_network_sync::SyncingService;
@@ -55,7 +55,7 @@ pub struct EthConfiguration {
#[arg(long)]
pub enable_dev_signer: bool,
/// The dynamic-fee pallet target gas price set by block author
/// The dynamic-fee pezpallet target gas price set by block author
#[arg(long, default_value = "1")]
pub target_gas_price: u64,
@@ -181,7 +181,7 @@ pub async fn spawn_frontier_tasks<RuntimeApi, Executor>(
read_notification_timeout: Duration::from_secs(30),
check_indexed_blocks_interval: Duration::from_secs(60),
},
fc_mapping_sync::SyncStrategy::Parachain,
fc_mapping_sync::SyncStrategy::TeyrChain,
sync,
pubsub_notification_sinks,
),
+1 -1
View File
@@ -1,4 +1,4 @@
//! Substrate Parachain Node Template CLI
//! Bizinikiwi TeyrChain Node Template CLI
#![warn(missing_docs)]
+1 -1
View File
@@ -6,7 +6,7 @@ pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
pub use fc_storage::StorageOverride;
use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi};
use jsonrpsee::RpcModule;
// Substrate
// Bizinikiwi
use sc_client_api::{
backend::{Backend, StorageProvider},
client::BlockchainEvents,
+6 -6
View File
@@ -1,6 +1,6 @@
//! A collection of node-specific RPC methods.
//! Substrate provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Substrate nodes. This file extends those RPC definitions with
//! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Bizinikiwi nodes. This file extends those RPC definitions with
//! capabilities that are specific to this project's runtime configuration.
#![warn(missing_docs)]
@@ -68,8 +68,8 @@ where
+ StorageProvider<Block, BE>
+ BlockchainEvents<Block>
+ 'static,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pezpallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: bizinikiwi_pezframe_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: sp_consensus_aura::AuraApi<Block, AuraId>,
C::Api: BlockBuilder<Block>,
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
@@ -79,8 +79,8 @@ where
CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static,
BE: Backend<Block> + 'static,
{
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use substrate_frame_rpc_system::{System, SystemApiServer};
use pezpallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use bizinikiwi_pezframe_rpc_system::{System, SystemApiServer};
let mut module = RpcExtension::new(());
let FullDeps { client, pool, eth } = deps;
+56 -56
View File
@@ -1,5 +1,5 @@
//! Service and ServiceFactory implementation. Specialized wrapper over
//! substrate service.
//! bizinikiwi service.
// std
use std::{path::Path, sync::Arc, time::Duration};
@@ -8,7 +8,7 @@ use cumulus_client_cli::CollatorOptions;
// Cumulus Imports
#[cfg(not(feature = "tanssi"))]
use cumulus_client_collator::service::CollatorService;
use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport;
use cumulus_client_consensus_common::TeyrChainBlockImport as TTeyrChainBlockImport;
#[cfg(not(feature = "tanssi"))]
use cumulus_client_consensus_proposer::Proposer;
use cumulus_client_service::{
@@ -27,8 +27,8 @@ use cumulus_relay_chain_interface::RelayChainInterface;
use evm_runtime_template::opaque::Hash;
// Local Runtime Types
use evm_runtime_template::{configs::TransactionConverter, opaque::Block, RuntimeApi};
// Substrate Imports
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
// Bizinikiwi Imports
use pezframe_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
use sc_client_api::Backend;
use sc_consensus::ImportQueue;
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
@@ -43,7 +43,7 @@ use sp_core::U256;
#[cfg(not(feature = "tanssi"))]
use sp_keystore::KeystorePtr;
#[cfg(not(feature = "tanssi"))]
use substrate_prometheus_endpoint::Registry;
use bizinikiwi_prometheus_endpoint::Registry;
use crate::eth::{
db_config_dir, new_frontier_partial, spawn_frontier_tasks, BackendType, EthConfiguration,
@@ -52,35 +52,35 @@ use crate::eth::{
#[cfg(not(feature = "runtime-benchmarks"))]
pub type HostFunctions =
(sp_io::SubstrateHostFunctions, cumulus_client_service::storage_proof_size::HostFunctions);
(sp_io::BizinikiwiHostFunctions, cumulus_client_service::storage_proof_size::HostFunctions);
#[cfg(feature = "runtime-benchmarks")]
pub type HostFunctions = (
sp_io::SubstrateHostFunctions,
sp_io::BizinikiwiHostFunctions,
cumulus_client_service::storage_proof_size::HostFunctions,
frame_benchmarking::benchmarking::HostFunctions,
pezframe_benchmarking::benchmarking::HostFunctions,
);
type ParachainExecutor = WasmExecutor<HostFunctions>;
type TeyrChainExecutor = WasmExecutor<HostFunctions>;
type ParachainClient = TFullClient<Block, RuntimeApi, ParachainExecutor>;
type TeyrChainClient = TFullClient<Block, RuntimeApi, TeyrChainExecutor>;
type ParachainBackend = TFullBackend<Block>;
type TeyrChainBackend = TFullBackend<Block>;
type ParachainBlockImport = TParachainBlockImport<Block, Arc<ParachainClient>, ParachainBackend>;
type TeyrChainBlockImport = TTeyrChainBlockImport<Block, Arc<TeyrChainClient>, TeyrChainBackend>;
/// Assembly of PartialComponents (enough to run chain ops subcommands)
pub type Service = PartialComponents<
ParachainClient,
ParachainBackend,
TeyrChainClient,
TeyrChainBackend,
(),
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::TransactionPoolHandle<Block, ParachainClient>,
sc_transaction_pool::TransactionPoolHandle<Block, TeyrChainClient>,
(
ParachainBlockImport,
TeyrChainBlockImport,
Option<Telemetry>,
Option<TelemetryWorkerHandle>,
FrontierBackend<ParachainClient>,
FrontierBackend<TeyrChainClient>,
Arc<dyn fc_storage::StorageOverride<Block>>,
),
>;
@@ -109,7 +109,7 @@ pub fn new_partial(
.default_heap_pages
.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ });
let executor = ParachainExecutor::builder()
let executor = TeyrChainExecutor::builder()
.with_execution_method(config.executor.wasm_method)
.with_onchain_heap_alloc_strategy(heap_pages)
.with_offchain_heap_alloc_strategy(heap_pages)
@@ -149,7 +149,7 @@ pub fn new_partial(
import_queue(config, client.clone(), backend.clone(), &task_manager);
#[cfg(not(feature = "tanssi"))]
let block_import = ParachainBlockImport::new(client.clone(), backend.clone());
let block_import = TeyrChainBlockImport::new(client.clone(), backend.clone());
#[cfg(not(feature = "tanssi"))]
let import_queue = build_import_queue(
client.clone(),
@@ -210,15 +210,15 @@ pub fn new_partial(
#[cfg(feature = "tanssi")]
pub fn import_queue(
parachain_config: &Configuration,
client: Arc<ParachainClient>,
backend: Arc<ParachainBackend>,
teyrchain_config: &Configuration,
client: Arc<TeyrChainClient>,
backend: Arc<TeyrChainBackend>,
task_manager: &TaskManager,
) -> (ParachainBlockImport, sc_consensus::BasicQueue<Block>) {
) -> (TeyrChainBlockImport, sc_consensus::BasicQueue<Block>) {
// The nimbus import queue ONLY checks the signature correctness
// Any other checks corresponding to the author-correctness should be done
// in the runtime
let block_import = ParachainBlockImport::new(client.clone(), backend);
let block_import = TeyrChainBlockImport::new(client.clone(), backend);
let import_queue = nimbus_consensus::import_queue(
client,
@@ -229,7 +229,7 @@ pub fn import_queue(
Ok((time,))
},
&task_manager.spawn_essential_handle(),
parachain_config.prometheus_registry(),
teyrchain_config.prometheus_registry(),
false,
)
.expect("function never fails");
@@ -237,23 +237,23 @@ pub fn import_queue(
(block_import, import_queue)
}
/// Start a node with the given parachain `Configuration` and relay chain
/// Start a node with the given teyrchain `Configuration` and relay chain
/// `Configuration`.
///
/// This is the actual implementation that is abstract over the executor and the
/// runtime api.
#[sc_tracing::logging::prefix_logs_with("Parachain")]
#[sc_tracing::logging::prefix_logs_with("TeyrChain")]
async fn start_node_impl(
parachain_config: Configuration,
polkadot_config: Configuration,
teyrchain_config: Configuration,
pezkuwi_config: Configuration,
collator_options: CollatorOptions,
eth_config: &EthConfiguration,
para_id: ParaId,
hwbench: Option<sc_sysinfo::HwBench>,
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient>)> {
let parachain_config = prepare_node_config(parachain_config);
) -> sc_service::error::Result<(TaskManager, Arc<TeyrChainClient>)> {
let teyrchain_config = prepare_node_config(teyrchain_config);
let params = new_partial(&parachain_config, eth_config)?;
let params = new_partial(&teyrchain_config, eth_config)?;
let FrontierPartialComponents { filter_pool, fee_history_cache, fee_history_cache_limit } =
new_frontier_partial(eth_config)?;
@@ -266,8 +266,8 @@ async fn start_node_impl(
let frontier_backend = Arc::new(frontier_backend);
let net_config = FullNetworkConfiguration::<_, _, sc_network::NetworkWorker<Block, Hash>>::new(
&parachain_config.network,
parachain_config.prometheus_config.as_ref().map(|cfg| cfg.registry.clone()),
&teyrchain_config.network,
teyrchain_config.prometheus_config.as_ref().map(|cfg| cfg.registry.clone()),
);
let client = params.client.clone();
@@ -275,8 +275,8 @@ async fn start_node_impl(
let mut task_manager = params.task_manager;
let relay_chain_interface = build_relay_chain_interface(
polkadot_config,
&parachain_config,
pezkuwi_config,
&teyrchain_config,
telemetry_worker_handle,
&mut task_manager,
collator_options.clone(),
@@ -290,8 +290,8 @@ async fn start_node_impl(
#[cfg(feature = "tanssi")]
let (relay_chain_interface, _) = relay_chain_interface;
let validator = parachain_config.role.is_authority();
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let validator = teyrchain_config.role.is_authority();
let prometheus_registry = teyrchain_config.prometheus_registry().cloned();
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
#[cfg(not(feature = "tanssi"))]
@@ -299,7 +299,7 @@ async fn start_node_impl(
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
build_network(BuildNetworkParams {
parachain_config: &parachain_config,
teyrchain_config: &teyrchain_config,
net_config,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
@@ -311,7 +311,7 @@ async fn start_node_impl(
})
.await?;
if parachain_config.offchain_worker.enabled {
if teyrchain_config.offchain_worker.enabled {
use futures::FutureExt;
task_manager.spawn_handle().spawn(
@@ -325,7 +325,7 @@ async fn start_node_impl(
transaction_pool.clone(),
)),
network_provider: Arc::new(network.clone()),
is_validator: parachain_config.role.is_authority(),
is_validator: teyrchain_config.role.is_authority(),
enable_http_requests: false,
custom_extensions: move |_| vec![],
})?
@@ -414,7 +414,7 @@ async fn start_node_impl(
client: client.clone(),
transaction_pool: transaction_pool.clone(),
task_manager: &mut task_manager,
config: parachain_config,
config: teyrchain_config,
keystore: params.keystore_container.keystore(),
backend: backend.clone(),
network: network.clone(),
@@ -518,10 +518,10 @@ async fn start_node_impl(
}
#[cfg(not(feature = "tanssi"))]
/// Build the import queue for the parachain runtime.
/// Build the import queue for the teyrchain runtime.
fn build_import_queue(
client: Arc<ParachainClient>,
block_import: ParachainBlockImport,
client: Arc<TeyrChainClient>,
block_import: TeyrChainBlockImport,
config: &Configuration,
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
@@ -547,14 +547,14 @@ fn build_import_queue(
#[cfg(not(feature = "tanssi"))]
fn start_consensus(
client: Arc<ParachainClient>,
#[cfg(feature = "async-backing")] backend: Arc<ParachainBackend>,
block_import: ParachainBlockImport,
client: Arc<TeyrChainClient>,
#[cfg(feature = "async-backing")] backend: Arc<TeyrChainBackend>,
block_import: TeyrChainBlockImport,
prometheus_registry: Option<&Registry>,
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
relay_chain_interface: Arc<dyn RelayChainInterface>,
transaction_pool: Arc<sc_transaction_pool::TransactionPoolHandle<Block, ParachainClient>>,
transaction_pool: Arc<sc_transaction_pool::TransactionPoolHandle<Block, TeyrChainClient>>,
keystore: KeystorePtr,
relay_chain_slot_duration: Duration,
para_id: ParaId,
@@ -631,18 +631,18 @@ fn start_consensus(
Ok(())
}
/// Start a parachain node.
pub async fn start_parachain_node(
parachain_config: Configuration,
polkadot_config: Configuration,
/// Start a teyrchain node.
pub async fn start_teyrchain_node(
teyrchain_config: Configuration,
pezkuwi_config: Configuration,
collator_options: CollatorOptions,
eth_config: &EthConfiguration,
para_id: ParaId,
hwbench: Option<sc_sysinfo::HwBench>,
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient>)> {
) -> sc_service::error::Result<(TaskManager, Arc<TeyrChainClient>)> {
start_node_impl(
parachain_config,
polkadot_config,
teyrchain_config,
pezkuwi_config,
collator_options,
eth_config,
para_id,
+6 -6
View File
@@ -1,6 +1,6 @@
use std::{collections::BTreeMap, sync::Arc};
use cumulus_client_parachain_inherent::ParachainInherentData;
use cumulus_client_teyrchain_inherent::TeyrChainInherentData;
use cumulus_primitives_core::PersistedValidationData;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
// Frontier
@@ -9,7 +9,7 @@ pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
pub use fc_storage::StorageOverride;
use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi};
use jsonrpsee::RpcModule;
// Substrate
// Bizinikiwi
use sc_client_api::{
backend::{Backend, StorageProvider},
client::BlockchainEvents,
@@ -134,7 +134,7 @@ where
};
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
// Create a dummy parachain inherent data provider which is required to pass
// Create a dummy teyrchain inherent data provider which is required to pass
// the checks by the para chain system. We use dummy values because in the 'pending context'
// neither do we have access to the real values nor do we need them.
let (relay_parent_storage_root, relay_chain_state) = RelayStateSproofBuilder {
@@ -143,19 +143,19 @@ where
}
.into_state_root_and_proof();
let vfp = PersistedValidationData {
// This is a hack to make `cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases`
// This is a hack to make `cumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases`
// happy. Relay parent number can't be bigger than u32::MAX.
relay_parent_number: u32::MAX,
relay_parent_storage_root,
..Default::default()
};
let parachain_inherent_data = ParachainInherentData {
let teyrchain_inherent_data = TeyrChainInherentData {
validation_data: vfp,
relay_chain_state,
downward_messages: Default::default(),
horizontal_messages: Default::default(),
};
Ok((timestamp, parachain_inherent_data, mocked_authorities_noting))
Ok((timestamp, teyrchain_inherent_data, mocked_authorities_noting))
}
};
+6 -6
View File
@@ -1,6 +1,6 @@
//! A collection of node-specific RPC methods.
//! Substrate provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Substrate nodes. This file extends those RPC definitions with
//! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Bizinikiwi nodes. This file extends those RPC definitions with
//! capabilities that are specific to this project's runtime configuration.
#![warn(missing_docs)]
@@ -70,8 +70,8 @@ where
+ StorageProvider<Block, BE>
+ BlockchainEvents<Block>
+ 'static,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pezpallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: bizinikiwi_pezframe_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: BlockBuilder<Block>,
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
@@ -80,8 +80,8 @@ where
CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static,
BE: Backend<Block> + 'static,
{
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use substrate_frame_rpc_system::{System, SystemApiServer};
use pezpallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use bizinikiwi_pezframe_rpc_system::{System, SystemApiServer};
let mut module = RpcExtension::new(());
let FullDeps { client, pool, deny_unsafe, eth } = deps;
+201 -201
View File
@@ -1,7 +1,7 @@
[package]
name = "evm-runtime-template"
authors = { workspace = true }
description = "An EVM parachain runtime template"
description = "An EVM teyrchain runtime template"
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
@@ -19,39 +19,39 @@ scale-info = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true, default-features = false, features = [ "alloc" ] }
smallvec = { workspace = true }
openzeppelin-pallet-abstractions = { workspace = true }
openzeppelin-pallet-abstractions-proc = { workspace = true }
openzeppelin-pezpallet-abstractions = { workspace = true }
openzeppelin-pezpallet-abstractions-proc = { workspace = true }
# Substrate
frame-benchmarking = { workspace = true, optional = true }
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-system-rpc-runtime-api = { workspace = true }
frame-try-runtime = { workspace = true, optional = true }
pallet-asset-tx-payment = { workspace = true }
pallet-assets = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true, features = [ "insecure_zero_ed" ] }
pallet-conviction-voting = { workspace = true }
pallet-membership = { workspace = true }
pallet-message-queue = { workspace = true }
pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-referenda = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-session = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-whitelist = { workspace = true }
# Bizinikiwi
pezframe-benchmarking = { workspace = true, optional = true }
pezframe-executive = { workspace = true }
pezframe-metadata-hash-extension = { workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
pezframe-system-benchmarking = { workspace = true, optional = true }
pezframe-system-rpc-runtime-api = { workspace = true }
pezframe-try-runtime = { workspace = true, optional = true }
pezpallet-asset-tx-payment = { workspace = true }
pezpallet-assets = { workspace = true }
pezpallet-aura = { workspace = true }
pezpallet-authorship = { workspace = true }
pezpallet-balances = { workspace = true, features = [ "insecure_zero_ed" ] }
pezpallet-conviction-voting = { workspace = true }
pezpallet-membership = { workspace = true }
pezpallet-message-queue = { workspace = true }
pezpallet-multisig = { workspace = true }
pezpallet-preimage = { workspace = true }
pezpallet-proxy = { workspace = true }
pezpallet-referenda = { workspace = true }
pezpallet-scheduler = { workspace = true }
pezpallet-session = { workspace = true }
pezpallet-sudo = { workspace = true }
pezpallet-timestamp = { workspace = true }
pezpallet-transaction-payment = { workspace = true }
pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
pezpallet-treasury = { workspace = true }
pezpallet-utility = { workspace = true }
pezpallet-whitelist = { workspace = true }
sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
sp-block-builder = { workspace = true }
@@ -67,42 +67,42 @@ sp-std = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
# Polkadot
pallet-xcm = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
# Pezkuwi
pezpallet-xcm = { workspace = true }
pezkuwi-teyrchain-primitives = { workspace = true }
pezkuwi-runtime-common = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }
# Cumulus
assets-common = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-weight-reclaim = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
cumulus-pezpallet-aura-ext = { workspace = true }
cumulus-pezpallet-teyrchain-system = { workspace = true }
cumulus-pezpallet-session-benchmarking = { workspace = true }
cumulus-pezpallet-weight-reclaim = { workspace = true }
cumulus-pezpallet-xcm = { workspace = true }
cumulus-pezpallet-xcmp-queue = { workspace = true }
cumulus-primitives-aura = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-timestamp = { workspace = true }
cumulus-primitives-utility = { workspace = true }
pallet-collator-selection = { workspace = true }
parachain-info = { workspace = true }
parachains-common = { workspace = true }
pezpallet-collator-selection = { workspace = true }
teyrchain-info = { workspace = true }
teyrchains-common = { workspace = true }
# Frontier
fp-account = { workspace = true }
fp-evm = { workspace = true }
fp-rpc = { workspace = true }
fp-self-contained = { workspace = true, features = [ "serde" ] }
pallet-base-fee = { workspace = true }
pallet-ethereum = { workspace = true }
pallet-evm = { workspace = true }
pallet-evm-chain-id = { workspace = true }
pallet-evm-precompile-modexp = { workspace = true }
pallet-evm-precompile-sha3fips = { workspace = true }
pallet-evm-precompile-simple = { workspace = true }
pezpallet-base-fee = { workspace = true }
pezpallet-ethereum = { workspace = true }
pezpallet-evm = { workspace = true }
pezpallet-evm-chain-id = { workspace = true }
pezpallet-evm-precompile-modexp = { workspace = true }
pezpallet-evm-precompile-sha3fips = { workspace = true }
pezpallet-evm-precompile-simple = { workspace = true }
# ORML
orml-oracle = { workspace = true }
@@ -112,38 +112,38 @@ orml-xcm-support = { workspace = true }
orml-xtokens = { workspace = true }
# Moonbeam
pallet-asset-manager = { workspace = true }
pallet-erc20-xcm-bridge = { workspace = true }
pallet-xcm-transactor = { workspace = true }
pallet-xcm-weight-trader = { workspace = true }
pezpallet-asset-manager = { workspace = true }
pezpallet-erc20-xcm-bridge = { workspace = true }
pezpallet-xcm-transactor = { workspace = true }
pezpallet-xcm-weight-trader = { workspace = true }
xcm-primitives = { workspace = true }
# Tanssi
dp-consensus = { workspace = true }
nimbus-primitives = { workspace = true }
pallet-author-inherent = { workspace = true }
pallet-cc-authorities-noting = { workspace = true }
pezpallet-author-inherent = { workspace = true }
pezpallet-cc-authorities-noting = { workspace = true }
[dev-dependencies]
ethereum = { workspace = true }
polkadot-runtime-parachains = { workspace = true }
pezkuwi-runtime-teyrchains = { workspace = true }
sp-io = { workspace = true }
sp-tracing = { workspace = true }
xcm-simulator = { workspace = true }
xcm-pez-simulator = { workspace = true }
[build-dependencies]
substrate-wasm-builder = { workspace = true }
bizinikiwi-wasm-builder = { workspace = true }
[features]
default = [ "std" ]
std = [
"assets-common/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-weight-reclaim/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-pezpallet-aura-ext/std",
"cumulus-pezpallet-teyrchain-system/std",
"cumulus-pezpallet-session-benchmarking/std",
"cumulus-pezpallet-weight-reclaim/std",
"cumulus-pezpallet-xcm/std",
"cumulus-pezpallet-xcmp-queue/std",
"cumulus-primitives-aura/std",
"cumulus-primitives-core/std",
"cumulus-primitives-utility/std",
@@ -153,58 +153,58 @@ std = [
"fp-evm/std",
"fp-rpc/std",
"fp-self-contained/std",
"frame-benchmarking?/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime?/std",
"pezframe-benchmarking?/std",
"pezframe-executive/std",
"pezframe-metadata-hash-extension/std",
"pezframe-support/std",
"pezframe-system-benchmarking?/std",
"pezframe-system-rpc-runtime-api/std",
"pezframe-system/std",
"pezframe-try-runtime?/std",
"log/std",
"nimbus-primitives/std",
"openzeppelin-pallet-abstractions/std",
"openzeppelin-pezpallet-abstractions/std",
"orml-oracle-runtime-api/std",
"orml-oracle/std",
"orml-xtokens/std",
"pallet-asset-manager/std",
"pallet-asset-tx-payment/std",
"pallet-assets/std",
"pallet-aura/std",
"pallet-author-inherent/std",
"pallet-authorship/std",
"pallet-balances/std",
"pallet-base-fee/std",
"pallet-cc-authorities-noting/std",
"pallet-collator-selection/std",
"pallet-conviction-voting/std",
"pallet-erc20-xcm-bridge/std",
"pallet-ethereum/std",
"pallet-evm-chain-id/std",
"pallet-evm/std",
"pallet-membership/std",
"pallet-message-queue/std",
"pallet-multisig/std",
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-referenda/std",
"pallet-scheduler/std",
"pallet-session/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-treasury/std",
"pallet-utility/std",
"pallet-whitelist/std",
"pallet-xcm-transactor/std",
"pallet-xcm-weight-trader/std",
"pallet-xcm/std",
"parachain-info/std",
"parachains-common/std",
"pezpallet-asset-manager/std",
"pezpallet-asset-tx-payment/std",
"pezpallet-assets/std",
"pezpallet-aura/std",
"pezpallet-author-inherent/std",
"pezpallet-authorship/std",
"pezpallet-balances/std",
"pezpallet-base-fee/std",
"pezpallet-cc-authorities-noting/std",
"pezpallet-collator-selection/std",
"pezpallet-conviction-voting/std",
"pezpallet-erc20-xcm-bridge/std",
"pezpallet-ethereum/std",
"pezpallet-evm-chain-id/std",
"pezpallet-evm/std",
"pezpallet-membership/std",
"pezpallet-message-queue/std",
"pezpallet-multisig/std",
"pezpallet-preimage/std",
"pezpallet-proxy/std",
"pezpallet-referenda/std",
"pezpallet-scheduler/std",
"pezpallet-session/std",
"pezpallet-sudo/std",
"pezpallet-timestamp/std",
"pezpallet-transaction-payment-rpc-runtime-api/std",
"pezpallet-transaction-payment/std",
"pezpallet-treasury/std",
"pezpallet-utility/std",
"pezpallet-whitelist/std",
"pezpallet-xcm-transactor/std",
"pezpallet-xcm-weight-trader/std",
"pezpallet-xcm/std",
"teyrchain-info/std",
"teyrchains-common/std",
"parity-scale-codec/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"pezkuwi-teyrchain-primitives/std",
"pezkuwi-runtime-common/std",
"scale-info/std",
"serde_json/std",
"sp-api/std",
@@ -221,106 +221,106 @@ std = [
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"xcm-builder/std",
"xcm-executor/std",
"staging-xcm-builder/std",
"staging-xcm-executor/std",
"xcm-primitives/std",
"xcm/std",
"staging-xcm/std",
]
async-backing = [ "openzeppelin-pallet-abstractions-proc/async-backing" ]
metadata-hash = [ "substrate-wasm-builder/metadata-hash" ]
async-backing = [ "openzeppelin-pezpallet-abstractions-proc/async-backing" ]
metadata-hash = [ "bizinikiwi-wasm-builder/metadata-hash" ]
runtime-benchmarks = [
"assets-common/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"cumulus-pezpallet-session-benchmarking/runtime-benchmarks",
"cumulus-pezpallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
"dp-consensus/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system-benchmarking/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"nimbus-primitives/runtime-benchmarks",
"orml-oracle/runtime-benchmarks",
"pallet-asset-manager/runtime-benchmarks",
"pallet-asset-tx-payment/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-author-inherent/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-cc-authorities-noting/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-ethereum/runtime-benchmarks",
"pallet-evm/runtime-benchmarks",
"pallet-membership/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"pallet-xcm-transactor/runtime-benchmarks",
"pallet-xcm-weight-trader/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"parachains-common/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"pezpallet-asset-manager/runtime-benchmarks",
"pezpallet-asset-tx-payment/runtime-benchmarks",
"pezpallet-assets/runtime-benchmarks",
"pezpallet-author-inherent/runtime-benchmarks",
"pezpallet-balances/runtime-benchmarks",
"pezpallet-cc-authorities-noting/runtime-benchmarks",
"pezpallet-collator-selection/runtime-benchmarks",
"pezpallet-conviction-voting/runtime-benchmarks",
"pezpallet-ethereum/runtime-benchmarks",
"pezpallet-evm/runtime-benchmarks",
"pezpallet-membership/runtime-benchmarks",
"pezpallet-message-queue/runtime-benchmarks",
"pezpallet-multisig/runtime-benchmarks",
"pezpallet-preimage/runtime-benchmarks",
"pezpallet-proxy/runtime-benchmarks",
"pezpallet-referenda/runtime-benchmarks",
"pezpallet-scheduler/runtime-benchmarks",
"pezpallet-sudo/runtime-benchmarks",
"pezpallet-timestamp/runtime-benchmarks",
"pezpallet-treasury/runtime-benchmarks",
"pezpallet-utility/runtime-benchmarks",
"pezpallet-whitelist/runtime-benchmarks",
"pezpallet-xcm-transactor/runtime-benchmarks",
"pezpallet-xcm-weight-trader/runtime-benchmarks",
"pezpallet-xcm/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
"pezkuwi-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"staging-xcm-builder/runtime-benchmarks",
"staging-xcm-executor/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-aura-ext/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-xcmp-queue/try-runtime",
"cumulus-pezpallet-aura-ext/try-runtime",
"cumulus-pezpallet-teyrchain-system/try-runtime",
"cumulus-pezpallet-xcm/try-runtime",
"cumulus-pezpallet-xcmp-queue/try-runtime",
"fp-self-contained/try-runtime",
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"frame-try-runtime/try-runtime",
"pezframe-executive/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezframe-try-runtime/try-runtime",
"nimbus-primitives/try-runtime",
"orml-oracle/try-runtime",
"orml-xtokens/try-runtime",
"pallet-asset-manager/try-runtime",
"pallet-asset-tx-payment/try-runtime",
"pallet-assets/try-runtime",
"pallet-aura/try-runtime",
"pallet-author-inherent/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-base-fee/try-runtime",
"pallet-cc-authorities-noting/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-conviction-voting/try-runtime",
"pallet-erc20-xcm-bridge/try-runtime",
"pallet-ethereum/try-runtime",
"pallet-evm-chain-id/try-runtime",
"pallet-membership/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-referenda/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-session/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-treasury/try-runtime",
"pallet-utility/try-runtime",
"pallet-whitelist/try-runtime",
"pallet-xcm-transactor/try-runtime",
"pallet-xcm-weight-trader/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polkadot-runtime-common/try-runtime",
"pezpallet-asset-manager/try-runtime",
"pezpallet-asset-tx-payment/try-runtime",
"pezpallet-assets/try-runtime",
"pezpallet-aura/try-runtime",
"pezpallet-author-inherent/try-runtime",
"pezpallet-authorship/try-runtime",
"pezpallet-balances/try-runtime",
"pezpallet-base-fee/try-runtime",
"pezpallet-cc-authorities-noting/try-runtime",
"pezpallet-collator-selection/try-runtime",
"pezpallet-conviction-voting/try-runtime",
"pezpallet-erc20-xcm-bridge/try-runtime",
"pezpallet-ethereum/try-runtime",
"pezpallet-evm-chain-id/try-runtime",
"pezpallet-membership/try-runtime",
"pezpallet-message-queue/try-runtime",
"pezpallet-multisig/try-runtime",
"pezpallet-preimage/try-runtime",
"pezpallet-proxy/try-runtime",
"pezpallet-referenda/try-runtime",
"pezpallet-scheduler/try-runtime",
"pezpallet-session/try-runtime",
"pezpallet-session/try-runtime",
"pezpallet-sudo/try-runtime",
"pezpallet-timestamp/try-runtime",
"pezpallet-transaction-payment/try-runtime",
"pezpallet-treasury/try-runtime",
"pezpallet-utility/try-runtime",
"pezpallet-whitelist/try-runtime",
"pezpallet-xcm-transactor/try-runtime",
"pezpallet-xcm-weight-trader/try-runtime",
"pezpallet-xcm/try-runtime",
"teyrchain-info/try-runtime",
"pezkuwi-runtime-common/try-runtime",
"sp-runtime/try-runtime",
]
+2 -2
View File
@@ -1,11 +1,11 @@
#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
fn main() {
substrate_wasm_builder::WasmBuilder::build_using_defaults();
bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
}
#[cfg(all(feature = "metadata-hash", feature = "std"))]
fn main() {
substrate_wasm_builder::WasmBuilder::init_with_defaults()
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
.enable_metadata_hash("UNIT", 12)
.build();
}
+30 -30
View File
@@ -1,38 +1,38 @@
frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[pallet_assets, Assets]
[pallet_balances, Balances]
[pallet_session, SessionBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_message_queue, MessageQueue]
[pallet_sudo, Sudo]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_scheduler, Scheduler]
[pallet_preimage, Preimage]
[pallet_proxy, Proxy]
[cumulus_pallet_parachain_system, ParachainSystem]
[pallet_multisig, Multisig]
[pallet_utility, Utility]
[pallet_treasury, Treasury]
[pallet_evm, EVM]
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
[pallet_asset_manager, AssetManager]
[pallet_conviction_voting, ConvictionVoting]
[pallet_whitelist, Whitelist]
[pallet_referenda, Referenda]
[pallet_xcm_transactor, XcmTransactor]
[pallet_xcm_weight_trader, XcmWeightTrader]
pezframe_benchmarking::define_benchmarks!(
[pezframe_system, SystemBench::<Runtime>]
[pezpallet_assets, Assets]
[pezpallet_balances, Balances]
[pezpallet_session, SessionBench::<Runtime>]
[pezpallet_timestamp, Timestamp]
[pezpallet_message_queue, MessageQueue]
[pezpallet_sudo, Sudo]
[pezpallet_collator_selection, CollatorSelection]
[cumulus_pezpallet_xcmp_queue, XcmpQueue]
[pezpallet_scheduler, Scheduler]
[pezpallet_preimage, Preimage]
[pezpallet_proxy, Proxy]
[cumulus_pezpallet_teyrchain_system, TeyrChainSystem]
[pezpallet_multisig, Multisig]
[pezpallet_utility, Utility]
[pezpallet_treasury, Treasury]
[pezpallet_evm, EVM]
[pezpallet_xcm, PezpalletXcmExtrinsicsBenchmark::<Runtime>]
[pezpallet_asset_manager, AssetManager]
[pezpallet_conviction_voting, ConvictionVoting]
[pezpallet_whitelist, Whitelist]
[pezpallet_referenda, Referenda]
[pezpallet_xcm_transactor, XcmTransactor]
[pezpallet_xcm_weight_trader, XcmWeightTrader]
);
use cumulus_primitives_core::{ChannelStatus, GetChannelInfo};
use frame_support::traits::{
use pezframe_support::traits::{
tokens::{Pay, PaymentStatus},
Get,
};
use sp_std::marker::PhantomData;
use crate::ParachainSystem;
use crate::TeyrChainSystem;
/// Trait for setting up any prerequisites for successful execution of benchmarks.
pub trait EnsureSuccessful {
@@ -40,12 +40,12 @@ pub trait EnsureSuccessful {
}
/// Implementation of the [`EnsureSuccessful`] trait which opens an HRMP channel between
/// the Collectives and a parachain with a given ID.
/// the Collectives and a teyrchain with a given ID.
pub struct OpenHrmpChannel<I>(PhantomData<I>);
impl<I: Get<u32>> EnsureSuccessful for OpenHrmpChannel<I> {
fn ensure_successful() {
if let ChannelStatus::Closed = ParachainSystem::get_channel_status(I::get().into()) {
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(I::get().into())
if let ChannelStatus::Closed = TeyrChainSystem::get_channel_status(I::get().into()) {
TeyrChainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(I::get().into())
}
}
}
@@ -1,4 +1,4 @@
use frame_support::{dispatch::GetDispatchInfo, weights::Weight};
use pezframe_support::{dispatch::GetDispatchInfo, weights::Weight};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use sp_core::{H160, H256};
@@ -17,9 +17,9 @@ use crate::{
};
// Required for runtime benchmarks
pallet_assets::runtime_benchmarks_enabled! {
pezpallet_assets::runtime_benchmarks_enabled! {
pub struct BenchmarkHelper;
impl<AssetIdParameter> pallet_assets::BenchmarkHelper<AssetIdParameter> for BenchmarkHelper
impl<AssetIdParameter> pezpallet_assets::BenchmarkHelper<AssetIdParameter> for BenchmarkHelper
where
AssetIdParameter: From<u128>,
{
@@ -86,7 +86,7 @@ impl From<AssetType> for AssetId {
match asset {
AssetType::Xcm(id) => {
let mut result: [u8; 16] = [0u8; 16];
let hash: H256 = id.using_encoded(<Runtime as frame_system::Config>::Hashing::hash);
let hash: H256 = id.using_encoded(<Runtime as pezframe_system::Config>::Hashing::hash);
result.copy_from_slice(&hash.as_fixed_bytes()[0..16]);
u128::from_le_bytes(result)
}
@@ -115,11 +115,11 @@ pub struct AssetRegistrarMetadata {
}
// We instruct how to register the Assets
// In this case, we tell it to Create an Asset in pallet-assets
// In this case, we tell it to Create an Asset in pezpallet-assets
pub struct AssetRegistrar;
use frame_support::{pallet_prelude::DispatchResult, transactional};
use pezframe_support::{pezpallet_prelude::DispatchResult, transactional};
impl pallet_asset_manager::AssetRegistrar<Runtime> for AssetRegistrar {
impl pezpallet_asset_manager::AssetRegistrar<Runtime> for AssetRegistrar {
#[transactional]
fn create_foreign_asset(
asset: AssetId,
@@ -156,10 +156,10 @@ impl pallet_asset_manager::AssetRegistrar<Runtime> for AssetRegistrar {
// For us both of them (Foreign and Local) have the same annotated weight for a given
// witness
// We need to take the dispatch info from the destroy call, which is already annotated in
// the assets pallet
// the assets pezpallet
// This is the dispatch info of destroy
RuntimeCall::Assets(pallet_assets::Call::<Runtime>::start_destroy { id: asset.into() })
RuntimeCall::Assets(pezpallet_assets::Call::<Runtime>::start_destroy { id: asset.into() })
.get_dispatch_info()
.call_weight
}
@@ -206,7 +206,7 @@ impl AccountIdAssetIdConversion<AccountId, AssetId> for Runtime {
#[cfg(test)]
mod tests {
mod asset_registrar {
use pallet_asset_manager::AssetRegistrar;
use pezpallet_asset_manager::AssetRegistrar;
use sp_io::TestExternalities;
use crate::{
@@ -375,13 +375,13 @@ mod tests {
// Test with X1 junction
let v3_location = MultiLocation {
parents: 0,
interior: JunctionsV3::X1(JunctionV3::Parachain(1000)),
interior: JunctionsV3::X1(JunctionV3::TeyrChain(1000)),
};
let v4_location = convert_v3_to_v4(v3_location).unwrap();
assert_eq!(v4_location.parents, 0);
// Create X1 junction with Arc
let junction_array = Arc::new([xcm::v4::Junction::Parachain(1000)]);
let junction_array = Arc::new([xcm::v4::Junction::TeyrChain(1000)]);
let expected_interior = xcm::v4::Junctions::X1(junction_array);
assert_eq!(v4_location.interior, expected_interior);
}
@@ -401,7 +401,7 @@ mod tests {
// Test with more complex location
let v3_location = MultiLocation {
parents: 0,
interior: JunctionsV3::X1(JunctionV3::Parachain(1000)),
interior: JunctionsV3::X1(JunctionV3::TeyrChain(1000)),
};
let asset_type = AssetType::from(v3_location);
match asset_type {
@@ -409,7 +409,7 @@ mod tests {
assert_eq!(location.parents, 0);
// Create X1 junction with Arc
let junction_array = Arc::new([xcm::v4::Junction::Parachain(1000)]);
let junction_array = Arc::new([xcm::v4::Junction::TeyrChain(1000)]);
let expected_interior = xcm::v4::Junctions::X1(junction_array);
assert_eq!(location.interior, expected_interior);
}
@@ -1,18 +1,18 @@
//! Custom origins for governance interventions.
pub use pallet_custom_origins::*;
pub use pezpallet_custom_origins::*;
#[frame_support::pallet]
pub mod pallet_custom_origins {
use frame_support::pallet_prelude::*;
#[pezframe_support::pezpallet]
pub mod pezpallet_custom_origins {
use pezframe_support::pezpallet_prelude::*;
use crate::configs::governance::{Balance, CENTS, GRAND};
#[pallet::config]
pub trait Config: frame_system::Config {}
#[pezpallet::config]
pub trait Config: pezframe_system::Config {}
#[pallet::pallet]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
pub struct Pezpallet<T>(_);
#[derive(
PartialEq,
@@ -25,7 +25,7 @@ pub mod pallet_custom_origins {
TypeInfo,
RuntimeDebug,
)]
#[pallet::origin]
#[pezpallet::origin]
pub enum Origin {
/// Origin for spending (any amount of) funds.
Treasurer,
@@ -126,10 +126,10 @@ pub mod pallet_custom_origins {
#[cfg(test)]
mod tests {
use frame_support::traits::EnsureOrigin;
use pezframe_support::traits::EnsureOrigin;
use crate::{
configs::{governance::Spender, pallet_custom_origins::Origin},
configs::{governance::Spender, pezpallet_custom_origins::Origin},
constants::currency::{CENTS, GRAND},
Balance,
};
@@ -254,7 +254,7 @@ mod tests {
mod treasurer {
use super::*;
use crate::configs::pallet_custom_origins::Treasurer;
use crate::configs::pezpallet_custom_origins::Treasurer;
#[test]
pub fn test_treasurer_try_origin() {
@@ -273,7 +273,7 @@ mod tests {
mod referendum_canceller {
use super::*;
use crate::configs::pallet_custom_origins::ReferendumCanceller;
use crate::configs::pezpallet_custom_origins::ReferendumCanceller;
#[test]
pub fn test_referendum_canceller_try_origin() {
@@ -2,7 +2,7 @@
use alloc::borrow::Cow;
use pallet_referenda::Track;
use pezpallet_referenda::Track;
use sp_runtime::str_array as s;
use super::*;
@@ -11,7 +11,7 @@ use crate::constants::MINUTES;
const fn percent(x: i32) -> sp_arithmetic::FixedI64 {
sp_arithmetic::FixedI64::from_rational(x as u128, 100)
}
use pallet_referenda::Curve;
use pezpallet_referenda::Curve;
const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50));
const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
@@ -40,15 +40,15 @@ const SUP_WHITELISTED_CALLER: Curve =
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));
pub struct TracksInfo;
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
impl pezpallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = u16;
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PalletsOrigin;
fn tracks() -> impl Iterator<Item = Cow<'static, Track<Self::Id, Balance, BlockNumber>>> {
static DATA: [Track<u16, Balance, BlockNumber>; 10] = [
Track {
id: 0u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("root"),
max_deciding: 1,
decision_deposit: 100 * GRAND,
@@ -62,7 +62,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 1u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("whitelisted_caller"),
max_deciding: 100,
decision_deposit: 10 * GRAND,
@@ -76,7 +76,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 11u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("treasurer"),
max_deciding: 10,
decision_deposit: GRAND,
@@ -90,7 +90,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 20u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("referendum_canceller"),
max_deciding: 1_000,
decision_deposit: 10 * GRAND,
@@ -104,7 +104,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 21u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("referendum_killer"),
max_deciding: 1_000,
decision_deposit: 50 * GRAND,
@@ -118,7 +118,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 30u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("small_tipper"),
max_deciding: 200,
decision_deposit: 3 * CENTS,
@@ -132,7 +132,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 31u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("big_tipper"),
max_deciding: 100,
decision_deposit: 10 * 3 * CENTS,
@@ -146,7 +146,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 32u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("small_spender"),
max_deciding: 50,
decision_deposit: 100 * 3 * CENTS,
@@ -160,7 +160,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 33u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("medium_spender"),
max_deciding: 50,
decision_deposit: 200 * 3 * CENTS,
@@ -174,7 +174,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
},
Track {
id: 34u16,
info: pallet_referenda::TrackInfo {
info: pezpallet_referenda::TrackInfo {
name: s("big_spender"),
max_deciding: 50,
decision_deposit: 400 * 3 * CENTS,
@@ -191,9 +191,9 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
}
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) {
if let Ok(system_origin) = pezframe_system::RawOrigin::try_from(id.clone()) {
match system_origin {
frame_system::RawOrigin::Root => Ok(0),
pezframe_system::RawOrigin::Root => Ok(0),
_ => Err(()),
}
} else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) {
@@ -224,27 +224,27 @@ mod tests {
#[test]
fn test_track_system_origin() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::system(frame_system::RawOrigin::Root))
>>::track_for(&OriginCaller::system(pezframe_system::RawOrigin::Root))
.expect("incorrect config");
assert_eq!(track, 0);
}
#[test]
fn test_track_system_origin_error() {
let () = <crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
let () = <crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::system(frame_system::RawOrigin::None))
>>::track_for(&OriginCaller::system(pezframe_system::RawOrigin::None))
.expect_err("incorrect config");
}
#[test]
fn test_track_custom_origin_whitelisted_caller() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::WhitelistedCaller))
@@ -255,7 +255,7 @@ mod tests {
#[test]
fn test_track_custom_origin_treasurer() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::Treasurer))
@@ -266,7 +266,7 @@ mod tests {
#[test]
fn test_track_custom_origin_referendum_canceller() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::ReferendumCanceller))
@@ -277,7 +277,7 @@ mod tests {
#[test]
fn test_track_custom_origin_referendum_killer() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::ReferendumKiller))
@@ -288,7 +288,7 @@ mod tests {
#[test]
fn test_track_custom_origin_small_tipper() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::SmallTipper))
@@ -299,7 +299,7 @@ mod tests {
#[test]
fn test_track_custom_origin_big_tipper() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::BigTipper))
@@ -310,7 +310,7 @@ mod tests {
#[test]
fn test_track_custom_origin_small_spender() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::SmallSpender))
@@ -321,7 +321,7 @@ mod tests {
#[test]
fn test_track_custom_origin_medium_spender() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::MediumSpender))
@@ -332,7 +332,7 @@ mod tests {
#[test]
fn test_track_custom_origin_big_spender() {
let track =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::Origins(origins::Origin::BigSpender))
@@ -343,10 +343,10 @@ mod tests {
#[test]
fn test_track_error() {
let () =
<crate::configs::governance::tracks::TracksInfo as pallet_referenda::TracksInfo<
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::CumulusXcm(cumulus_pallet_xcm::Origin::Relay))
>>::track_for(&OriginCaller::CumulusXcm(cumulus_pezpallet_xcm::Origin::Relay))
.expect_err("incorrect config");
}
}
+45 -45
View File
@@ -5,15 +5,15 @@ pub mod xcm_config;
use asset_config::*;
#[cfg(feature = "tanssi")]
use cumulus_pallet_parachain_system::ExpectParentIncluded;
use cumulus_pezpallet_teyrchain_system::ExpectParentIncluded;
#[cfg(feature = "async-backing")]
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_pezpallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
#[cfg(not(feature = "async-backing"))]
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use cumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
#[cfg(not(feature = "tanssi"))]
use frame_support::PalletId;
use frame_support::{
use pezframe_support::PalletId;
use pezframe_support::{
derive_impl,
dispatch::DispatchClass,
parameter_types,
@@ -23,37 +23,37 @@ use frame_support::{
},
weights::{ConstantMultiplier, Weight},
};
use frame_system::{
use pezframe_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot, EnsureRootWithSuccess, EnsureSigned,
};
pub use governance::origins::pallet_custom_origins;
pub use governance::origins::pezpallet_custom_origins;
use governance::{origins::Treasurer, tracks, Spender, WhitelistedCaller};
#[cfg(feature = "tanssi")]
use nimbus_primitives::NimbusId;
use openzeppelin_pallet_abstractions::{
use openzeppelin_pezpallet_abstractions::{
impl_openzeppelin_assets, impl_openzeppelin_evm, impl_openzeppelin_governance,
impl_openzeppelin_system, impl_openzeppelin_xcm, AssetsConfig, AssetsWeight, EvmConfig,
EvmWeight, GovernanceConfig, GovernanceWeight, SystemConfig, SystemWeight, XcmConfig,
XcmWeight,
};
#[cfg(not(feature = "tanssi"))]
use openzeppelin_pallet_abstractions::{
use openzeppelin_pezpallet_abstractions::{
impl_openzeppelin_consensus, ConsensusConfig, ConsensusWeight,
};
#[cfg(feature = "tanssi")]
use openzeppelin_pallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig, TanssiWeight};
use pallet_asset_tx_payment::HandleCredit;
use pallet_ethereum::PostLogContent;
use pallet_evm::{
EVMCurrencyAdapter, EnsureAccountId20, FrameSystemAccountProvider, IdentityAddressMapping,
use openzeppelin_pezpallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig, TanssiWeight};
use pezpallet_asset_tx_payment::HandleCredit;
use pezpallet_ethereum::PostLogContent;
use pezpallet_evm::{
EVMCurrencyAdapter, EnsureAccountId20, PezframeSystemAccountProvider, IdentityAddressMapping,
};
use parachains_common::{
use teyrchains_common::{
impls::AccountIdOf,
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
};
use parity_scale_codec::{Decode, Encode};
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use pezkuwi_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
#[cfg(not(feature = "tanssi"))]
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{H160, U256};
@@ -68,7 +68,7 @@ use xcm_builder::ProcessXcmMessage;
use xcm_builder::{
AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
FrameTransactionalProcessor, TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin,
PezframeTransactionalProcessor, TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin,
WithUniqueTopic,
};
use xcm_config::*;
@@ -87,20 +87,20 @@ use crate::{
};
use crate::{
constants::{
currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, MICROCENTS, MILLICENTS},
currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, MICTYRENTS, MILLICENTS},
AVERAGE_ON_INITIALIZE_RATIO, DAYS, MAXIMUM_BLOCK_WEIGHT, MAX_BLOCK_LENGTH,
NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION, WEIGHT_PER_GAS,
},
opaque,
types::{
AccountId, AssetId, AssetKind, Balance, Beneficiary, Block, Hash,
MessageQueueServiceWeight, Nonce, PrecompilesValue, PriceForSiblingParachainDelivery,
ProxyType, TreasuryInteriorLocation, TreasuryPalletId, TreasuryPaymaster, Version,
MessageQueueServiceWeight, Nonce, PrecompilesValue, PriceForSiblingTeyrChainDelivery,
ProxyType, TreasuryInteriorLocation, TreasuryPezpalletId, TreasuryPaymaster, Version,
},
weights::{BlockExecutionWeight, ExtrinsicBaseWeight},
AllPalletsWithSystem, AssetManager, Balances, BaseFee, EVMChainId, Erc20XcmBridge,
MessageQueue, OpenZeppelinPrecompiles, Oracle, OracleMembership, OriginCaller, PalletInfo,
ParachainInfo, ParachainSystem, PolkadotXcm, Preimage, Referenda, Runtime, RuntimeCall,
AllPezpalletsWithSystem, AssetManager, Balances, BaseFee, EVMChainId, Erc20XcmBridge,
MessageQueue, OpenZeppelinPrecompiles, Oracle, OracleMembership, OriginCaller, PezpalletInfo,
TeyrChainInfo, TeyrChainSystem, PezkuwiXcm, Preimage, Referenda, Runtime, RuntimeCall,
RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, RuntimeTask, Scheduler,
System, Timestamp, Treasury, UncheckedExtrinsic, WeightToFee, XcmpQueue,
};
@@ -141,7 +141,7 @@ impl GovernanceConfig for OpenZeppelinRuntime {
type ReferendaSubmitOrigin = EnsureSigned<AccountId>;
type ReferendaUndecidingTimeout = ConstU32<{ 14 * DAYS }>;
type TreasuryInteriorLocation = TreasuryInteriorLocation;
type TreasuryPalletId = TreasuryPalletId;
type TreasuryPezpalletId = TreasuryPezpalletId;
type TreasuryPayoutSpendPeriod = ConstU32<{ 30 * DAYS }>;
type TreasuryRejectOrigin = EitherOfDiverse<EnsureRoot<AccountId>, Treasurer>;
type TreasurySpendOrigin = TreasurySpender;
@@ -168,7 +168,7 @@ impl XcmConfig for OpenZeppelinRuntime {
type MessageQueueHeapSize = ConstU32<{ 64 * 1024 }>;
type MessageQueueMaxStale = ConstU32<8>;
type MessageQueueServiceWeight = MessageQueueServiceWeight;
type ParachainMinFee = ParachainMinFee;
type TeyrChainMinFee = TeyrChainMinFee;
type PauseSupportedAssetOrigin = EnsureRoot<AccountId>;
type RelayLocation = RelayLocation;
type RemoveSupportedAssetOrigin = EnsureRoot<AccountId>;
@@ -177,7 +177,7 @@ impl XcmConfig for OpenZeppelinRuntime {
type SelfLocation = SelfLocation;
type SelfReserve = SelfReserve;
type SovereignAccountDispatcherOrigin = EnsureRoot<AccountId>;
type Trader = pallet_xcm_weight_trader::Trader<Runtime>;
type Trader = pezpallet_xcm_weight_trader::Trader<Runtime>;
type TransactorReserveProvider =
xcm_primitives::AbsoluteAndRelativeReserve<SelfLocationAbsolute>;
type Transactors = Transactors;
@@ -211,16 +211,16 @@ parameter_types! {
}
pub struct AssetsToBlockAuthor<R, I>(PhantomData<(R, I)>);
impl<R, I> HandleCredit<AccountIdOf<R>, pallet_assets::Pallet<R, I>> for AssetsToBlockAuthor<R, I>
impl<R, I> HandleCredit<AccountIdOf<R>, pezpallet_assets::Pallet<R, I>> for AssetsToBlockAuthor<R, I>
where
I: 'static,
R: pallet_authorship::Config + pallet_assets::Config<I>,
R: pezpallet_authorship::Config + pezpallet_assets::Config<I>,
{
fn handle_credit(credit: Credit<AccountIdOf<R>, pallet_assets::Pallet<R, I>>) {
use frame_support::traits::fungibles::Balanced;
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
fn handle_credit(credit: Credit<AccountIdOf<R>, pezpallet_assets::Pallet<R, I>>) {
use pezframe_support::traits::fungibles::Balanced;
if let Some(author) = pezpallet_authorship::Pallet::<R>::author() {
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
let _ = pallet_assets::Pallet::<R, I>::resolve(&author, credit);
let _ = pezpallet_assets::Pallet::<R, I>::resolve(&author, credit);
}
}
}
@@ -245,8 +245,8 @@ impl AssetsConfig for OpenZeppelinRuntime {
}
#[cfg(feature = "tanssi")]
impl TanssiConfig for OpenZeppelinRuntime {
type AuthorInherent = pallet_author_inherent::weights::SubstrateWeight<Runtime>;
type AuthoritiesNothing = pallet_cc_authorities_noting::weights::SubstrateWeight<Runtime>;
type AuthorInherent = pezpallet_author_inherent::weights::BizinikiwiWeight<Runtime>;
type AuthoritiesNothing = pezpallet_cc_authorities_noting::weights::BizinikiwiWeight<Runtime>;
}
impl_openzeppelin_assets!(OpenZeppelinRuntime);
impl_openzeppelin_system!(OpenZeppelinRuntime);
@@ -290,9 +290,9 @@ impl<F: FindAuthor<NimbusId>> FindAuthor<H160> for FindAuthorSession<F> {
pub struct TransactionConverter;
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
fn convert_transaction(&self, transaction: pezpallet_ethereum::Transaction) -> UncheckedExtrinsic {
UncheckedExtrinsic::new_bare(
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
pezpallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
)
}
}
@@ -300,10 +300,10 @@ impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {
fn convert_transaction(
&self,
transaction: pallet_ethereum::Transaction,
transaction: pezpallet_ethereum::Transaction,
) -> opaque::UncheckedExtrinsic {
let extrinsic = UncheckedExtrinsic::new_bare(
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
pezpallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
);
let encoded = extrinsic.encode();
opaque::UncheckedExtrinsic::decode(&mut &encoded[..])
@@ -314,8 +314,8 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
#[cfg(test)]
mod tests {
mod assets_to_block_author {
use frame_support::traits::fungibles::Balanced;
use pallet_asset_tx_payment::HandleCredit;
use pezframe_support::traits::fungibles::Balanced;
use pezpallet_asset_tx_payment::HandleCredit;
use parity_scale_codec::Encode;
use sp_runtime::{
testing::{Digest, DigestItem},
@@ -339,8 +339,8 @@ mod tests {
let mut digest = Digest::default();
digest.push(DigestItem::PreRuntime(MOCK_ENGINE_ID, author.encode()));
// For unit tests we are updating storage of author in a straightforward way
frame_support::storage::unhashed::put(
&frame_support::storage::storage_prefix(b"Authorship", b"Author"),
pezframe_support::storage::unhashed::put(
&pezframe_support::storage::storage_prefix(b"Authorship", b"Author"),
&author,
);
// Create asset and mint initial supply
@@ -381,7 +381,7 @@ mod tests {
fn new_test_ext() -> sp_io::TestExternalities {
use sp_runtime::BuildStorage;
frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into()
pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into()
}
}
mod transaction_converter {
@@ -393,11 +393,11 @@ mod tests {
use crate::{configs::TransactionConverter, RuntimeCall, UncheckedExtrinsic};
fn get_transaction() -> pallet_ethereum::Transaction {
fn get_transaction() -> pezpallet_ethereum::Transaction {
let mut input = vec![];
let data = "095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000001b1ae4d6e2ef5000000".as_bytes();
input.extend_from_slice(data);
pallet_ethereum::Transaction::Legacy(LegacyTransaction {
pezpallet_ethereum::Transaction::Legacy(LegacyTransaction {
nonce: U256::from_dec_str("842").unwrap(),
gas_price: U256::from_dec_str("35540887252").unwrap(),
gas_limit: U256::from_dec_str("500000").unwrap(),
+28 -28
View File
@@ -1,8 +1,8 @@
#[cfg(not(feature = "tanssi"))]
use openzeppelin_pallet_abstractions::ConsensusWeight;
use openzeppelin_pezpallet_abstractions::ConsensusWeight;
#[cfg(feature = "tanssi")]
use openzeppelin_pallet_abstractions::TanssiWeight;
use openzeppelin_pallet_abstractions::{
use openzeppelin_pezpallet_abstractions::TanssiWeight;
use openzeppelin_pezpallet_abstractions::{
AssetsWeight, EvmWeight, GovernanceWeight, SystemWeight, XcmWeight,
};
@@ -13,53 +13,53 @@ use crate::{
};
impl SystemWeight for OpenZeppelinRuntime {
type Balances = weights::pallet_balances::WeightInfo<Runtime>;
type Balances = weights::pezpallet_balances::WeightInfo<Runtime>;
type DbWeight = RocksDbWeight;
type Multisig = weights::pallet_multisig::WeightInfo<Runtime>;
type ParachainSystem = weights::cumulus_pallet_parachain_system::WeightInfo<Runtime>;
type Preimage = weights::pallet_preimage::WeightInfo<Runtime>;
type Proxy = weights::pallet_proxy::WeightInfo<Runtime>;
type Scheduler = weights::pallet_scheduler::WeightInfo<Runtime>;
type Timestamp = weights::pallet_timestamp::WeightInfo<Runtime>;
type Utility = weights::pallet_utility::WeightInfo<Runtime>;
type Multisig = weights::pezpallet_multisig::WeightInfo<Runtime>;
type TeyrChainSystem = weights::cumulus_pezpallet_teyrchain_system::WeightInfo<Runtime>;
type Preimage = weights::pezpallet_preimage::WeightInfo<Runtime>;
type Proxy = weights::pezpallet_proxy::WeightInfo<Runtime>;
type Scheduler = weights::pezpallet_scheduler::WeightInfo<Runtime>;
type Timestamp = weights::pezpallet_timestamp::WeightInfo<Runtime>;
type Utility = weights::pezpallet_utility::WeightInfo<Runtime>;
}
#[cfg(not(feature = "tanssi"))]
impl ConsensusWeight for OpenZeppelinRuntime {
type CollatorSelection = weights::pallet_collator_selection::WeightInfo<Runtime>;
type Session = weights::pallet_session::WeightInfo<Runtime>;
type CollatorSelection = weights::pezpallet_collator_selection::WeightInfo<Runtime>;
type Session = weights::pezpallet_session::WeightInfo<Runtime>;
}
impl AssetsWeight for OpenZeppelinRuntime {
type AssetManager = weights::pallet_asset_manager::WeightInfo<Runtime>;
type Assets = weights::pallet_assets::WeightInfo<Runtime>;
type AssetManager = weights::pezpallet_asset_manager::WeightInfo<Runtime>;
type Assets = weights::pezpallet_assets::WeightInfo<Runtime>;
// TODO: fix weight
type OracleMembership = ();
type OrmlOracle = (); // TODO: fix weight
}
impl GovernanceWeight for OpenZeppelinRuntime {
type ConvictionVoting = weights::pallet_conviction_voting::WeightInfo<Runtime>;
type Referenda = weights::pallet_referenda::WeightInfo<Runtime>;
type Sudo = weights::pallet_sudo::WeightInfo<Runtime>;
type Treasury = weights::pallet_treasury::WeightInfo<Runtime>;
type Whitelist = weights::pallet_whitelist::WeightInfo<Runtime>;
type ConvictionVoting = weights::pezpallet_conviction_voting::WeightInfo<Runtime>;
type Referenda = weights::pezpallet_referenda::WeightInfo<Runtime>;
type Sudo = weights::pezpallet_sudo::WeightInfo<Runtime>;
type Treasury = weights::pezpallet_treasury::WeightInfo<Runtime>;
type Whitelist = weights::pezpallet_whitelist::WeightInfo<Runtime>;
}
impl XcmWeight for OpenZeppelinRuntime {
type MessageQueue = weights::pallet_message_queue::WeightInfo<Runtime>;
type Xcm = weights::pallet_xcm::WeightInfo<Runtime>;
type XcmTransactor = weights::pallet_xcm_transactor::WeightInfo<Runtime>;
type XcmWeightTrader = weights::pallet_xcm_weight_trader::WeightInfo<Runtime>;
type XcmpQueue = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
type MessageQueue = weights::pezpallet_message_queue::WeightInfo<Runtime>;
type Xcm = weights::pezpallet_xcm::WeightInfo<Runtime>;
type XcmTransactor = weights::pezpallet_xcm_transactor::WeightInfo<Runtime>;
type XcmWeightTrader = weights::pezpallet_xcm_weight_trader::WeightInfo<Runtime>;
type XcmpQueue = weights::cumulus_pezpallet_xcmp_queue::WeightInfo<Runtime>;
}
impl EvmWeight for OpenZeppelinRuntime {
type Evm = weights::pallet_evm::WeightInfo<Runtime>;
type Evm = weights::pezpallet_evm::WeightInfo<Runtime>;
}
#[cfg(feature = "tanssi")]
impl TanssiWeight for OpenZeppelinRuntime {
type AuthorInherent = pallet_author_inherent::weights::SubstrateWeight<Runtime>;
type AuthoritiesNoting = pallet_cc_authorities_noting::weights::SubstrateWeight<Runtime>;
type AuthorInherent = pezpallet_author_inherent::weights::BizinikiwiWeight<Runtime>;
type AuthoritiesNoting = pezpallet_cc_authorities_noting::weights::BizinikiwiWeight<Runtime>;
}
+68 -68
View File
@@ -1,15 +1,15 @@
use core::marker::PhantomData;
use frame_support::{
use pezframe_support::{
parameter_types,
traits::{ConstU32, Contains, ContainsPair, Everything, PalletInfoAccess},
traits::{ConstU32, Contains, ContainsPair, Everything, PezpalletInfoAccess},
weights::Weight,
};
use orml_traits::{location::Reserve, parameter_type_with_key};
use orml_xcm_support::MultiNativeAsset;
use pallet_xcm::XcmPassthrough;
use pezpallet_xcm::XcmPassthrough;
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use polkadot_parachain_primitives::primitives::{self, Sibling};
use pezkuwi_teyrchain_primitives::primitives::{self, Sibling};
use scale_info::TypeInfo;
use sp_core::H160;
use sp_runtime::Vec;
@@ -17,8 +17,8 @@ use xcm::latest::prelude::{Assets as XcmAssets, *};
use xcm_builder::{
AccountKey20Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, Case,
ConvertedConcreteId, DenyReserveTransferToRelayChain, DenyThenTry, FixedWeightBounds,
FungibleAdapter, FungiblesAdapter, HandleFee, IsChildSystemParachain, IsConcrete, NoChecking,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
FungibleAdapter, FungiblesAdapter, HandleFee, IsChildSystemTeyrChain, IsConcrete, NoChecking,
ParentIsPreset, RelayChainAsNative, SiblingTeyrChainAsNative, SiblingTeyrChainConvertsVia,
SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
};
@@ -27,35 +27,35 @@ use xcm_primitives::{AsAssetType, UtilityAvailableCalls, UtilityEncodeCall, XcmT
use crate::{
configs::{
AssetType, Erc20XcmBridgePalletLocation, ParachainSystem, Runtime, RuntimeCall,
AssetType, Erc20XcmBridgePezpalletLocation, TeyrChainSystem, Runtime, RuntimeCall,
RuntimeOrigin, XcmpQueue,
},
types::{AccountId, AssetId, Balance},
AssetManager, Assets, Balances, ParachainInfo, Treasury,
AssetManager, Assets, Balances, TeyrChainInfo, Treasury,
};
parameter_types! {
pub const RelayNetwork: Option<NetworkId> = None;
pub AssetsPalletLocation: Location =
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
pub BalancesPalletLocation: Location = PalletInstance(<Balances as PalletInfoAccess>::index() as u8).into();
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
pub AssetsPezpalletLocation: Location =
PezpalletInstance(<Assets as PezpalletInfoAccess>::index() as u8).into();
pub BalancesPezpalletLocation: Location = PezpalletInstance(<Balances as PezpalletInfoAccess>::index() as u8).into();
pub RelayChainOrigin: RuntimeOrigin = cumulus_pezpallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorLocation = TeyrChain(TeyrChainInfo::teyrchain_id().into()).into();
// Self Reserve location, defines the multilocation identifiying the self-reserve currency
// This is used to match it also against our Balances pallet when we receive such
// a Location: (Self Balances pallet index)
// This is used to match it also against our Balances pezpallet when we receive such
// a Location: (Self Balances pezpallet index)
// We use the RELATIVE multilocation
pub SelfReserve: Location = Location {
parents:0,
interior: [
PalletInstance(<Balances as PalletInfoAccess>::index() as u8)
PezpalletInstance(<Balances as PezpalletInfoAccess>::index() as u8)
].into()
};
}
/// `AssetId/Balancer` converter for `TrustBackedAssets`
pub type TrustBackedAssetsConvertedConcreteId =
assets_common::TrustBackedAssetsConvertedConcreteId<AssetsPalletLocation, Balance>;
assets_common::TrustBackedAssetsConvertedConcreteId<AssetsPezpalletLocation, Balance>;
/// Type for specifying how a `Location` can be converted into an
/// `AccountId`. This is used when determining ownership of accounts for asset
@@ -64,8 +64,8 @@ pub type TrustBackedAssetsConvertedConcreteId =
pub type LocationToAccountId = (
// The parent (Relay-chain) origin converts to the parent `AccountId`.
ParentIsPreset<AccountId>,
// Sibling parachain origins convert to AccountId via the `ParaId::into`.
SiblingParachainConvertsVia<Sibling, AccountId>,
// Sibling teyrchain origins convert to AccountId via the `ParaId::into`.
SiblingTeyrChainConvertsVia<Sibling, AccountId>,
// If we receive a Location of type AccountKey20, just generate a native account
AccountKey20Aliases<RelayNetwork, AccountId>,
);
@@ -75,7 +75,7 @@ pub type LocalAssetTransactor = FungibleAdapter<
// Use this currency:
Balances,
// Use this currency when it is a fungible asset matching the given location or name:
IsConcrete<BalancesPalletLocation>,
IsConcrete<BalancesPezpalletLocation>,
// Do a simple punn to convert an AccountId20 Location into a native chain account ID:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
@@ -115,13 +115,13 @@ pub type XcmOriginToTransactDispatchOrigin = (
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
// recognized.
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
// Native converter for sibling TeyrChains; will convert to a `SiblingPara` origin when
// recognized.
SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
SiblingTeyrChainAsNative<cumulus_pezpallet_xcm::Origin, RuntimeOrigin>,
// Xcm Origins defined by a Multilocation of type AccountKey20 can be converted to a 20 byte-
// account local origin
SignedAccountKey20AsNative<RelayNetwork, RuntimeOrigin>,
// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
// Xcm origins can be represented natively under the Xcm pezpallet's Xcm origin.
XcmPassthrough<RuntimeOrigin>,
);
@@ -216,7 +216,7 @@ where
parameter_types! {
/// Location of Asset Hub
pub AssetHubLocation: Location = Location::new(1, [Parachain(1000)]);
pub AssetHubLocation: Location = Location::new(1, [TeyrChain(1000)]);
pub const RelayLocation: Location = Location::parent();
pub RelayLocationFilter: AssetFilter = Wild(AllOf {
fun: WildFungible,
@@ -231,7 +231,7 @@ parameter_types! {
pub type Reserves = (
// Assets bridged from different consensus systems held in reserve on Asset Hub.
IsBridgedConcreteAssetFrom<AssetHubLocation>,
// Relaychain (DOT) from Asset Hub
// Relaychain (HEZ) from Asset Hub
Case<RelayChainNativeAssetFromAssetHub>,
// Assets which the reserve is the same as the origin.
MultiNativeAsset<AbsoluteAndRelativeReserve<SelfLocationAbsolute>>,
@@ -243,12 +243,12 @@ parameter_types! {
/// If you change this config, keep in mind that you should define how you collect fees.
pub type FeeManager = XcmFeeManagerFromComponents<
IsChildSystemParachain<primitives::Id>,
IsChildSystemTeyrChain<primitives::Id>,
XcmFeeToAccount<AssetTransactors, AccountId, TreasuryAccount>,
>;
pub type XcmWeigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
use frame_support::{pallet_prelude::Get, traits::OriginTrait};
use pezframe_support::{pezpallet_prelude::Get, traits::OriginTrait};
use sp_runtime::traits::TryConvert;
// Convert a local Origin (i.e., a signed 20 byte account Origin) to a Multilocation
@@ -258,12 +258,12 @@ pub struct SignedToAccountId20<Origin, AccountId, Network>(
impl<Origin: OriginTrait + Clone, AccountId: Into<[u8; 20]>, Network: Get<Option<NetworkId>>>
TryConvert<Origin, Location> for SignedToAccountId20<Origin, AccountId, Network>
where
Origin::PalletsOrigin: From<frame_system::RawOrigin<AccountId>>
+ TryInto<frame_system::RawOrigin<AccountId>, Error = Origin::PalletsOrigin>,
Origin::PalletsOrigin: From<pezframe_system::RawOrigin<AccountId>>
+ TryInto<pezframe_system::RawOrigin<AccountId>, Error = Origin::PalletsOrigin>,
{
fn try_convert(o: Origin) -> Result<Location, Origin> {
o.try_with_caller(|caller| match caller.try_into() {
Ok(frame_system::RawOrigin::Signed(who)) =>
Ok(pezframe_system::RawOrigin::Signed(who)) =>
Ok(AccountKey20 { key: who.into(), network: Network::get() }.into()),
Ok(other) => Err(other.into()),
Err(other) => Err(other),
@@ -278,7 +278,7 @@ pub type LocalOriginToLocation = SignedToAccountId20<RuntimeOrigin, AccountId, R
/// the right message queues.
pub type XcmRouter = WithUniqueTopic<(
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, (), ()>,
cumulus_primitives_utility::ParentAsUmp<TeyrChainSystem, (), ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
)>;
@@ -296,16 +296,16 @@ parameter_types! {
pub SelfLocationAbsolute: Location = Location {
parents:1,
interior: [
Parachain(ParachainInfo::parachain_id().into())
TeyrChain(TeyrChainInfo::teyrchain_id().into())
].into()
};
}
parameter_type_with_key! {
pub ParachainMinFee: |location: Location| -> Option<u128> {
pub TeyrChainMinFee: |location: Location| -> Option<u128> {
match (location.parents, location.first_interior()) {
// Polkadot AssetHub fee
(1, Some(Parachain(1000u32))) => Some(50_000_000u128),
// Pezkuwi AssetHub fee
(1, Some(TeyrChain(1000u32))) => Some(50_000_000u128),
_ => None,
}
};
@@ -339,7 +339,7 @@ where
}
CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset),
CurrencyId::Erc20 { contract_address } => {
let mut location = Erc20XcmBridgePalletLocation::get();
let mut location = Erc20XcmBridgePezpalletLocation::get();
location
.push_interior(Junction::AccountKey20 {
key: contract_address.0,
@@ -361,19 +361,19 @@ impl ConvertLocation<H160> for LocationToH160 {
}
}
/// The `DOTReserveProvider` overrides the default reserve location for DOT (Polkadot's native token).
/// The `HEZReserveProvider` overrides the default reserve location for HEZ (Pezkuwi's native token).
///
/// DOT can exist in multiple locations, and this provider ensures that the reserve is correctly set
/// to the AssetHub parachain.
/// HEZ can exist in multiple locations, and this provider ensures that the reserve is correctly set
/// to the AssetHub teyrchain.
///
/// - **Default Location:** `{ parents: 1, location: Here }`
/// - **Reserve Location on AssetHub:** `{ parents: 1, location: X1(Parachain(AssetHubParaId)) }`
/// - **Reserve Location on AssetHub:** `{ parents: 1, location: X1(TeyrChain(AssetHubParaId)) }`
///
/// This provider ensures that if the asset's ID points to the default "Here" location,
/// it will instead be mapped to the AssetHub parachain.
pub struct DOTReserveProvider;
/// it will instead be mapped to the AssetHub teyrchain.
pub struct HEZReserveProvider;
impl Reserve for DOTReserveProvider {
impl Reserve for HEZReserveProvider {
fn reserve(asset: &Asset) -> Option<Location> {
let AssetId(location) = &asset.id;
@@ -394,8 +394,8 @@ impl Reserve for DOTReserveProvider {
/// Specifically, these bridged assets can have two known reserves:
/// 1. **Ethereum-based Reserve:**
/// `{ parents: 1, location: X1(GlobalConsensus(Ethereum{ chain_id: 1 })) }`
/// 2. **AssetHub Parachain Reserve:**
/// `{ parents: 1, location: X1(Parachain(AssetHubParaId)) }`
/// 2. **AssetHub TeyrChain Reserve:**
/// `{ parents: 1, location: X1(TeyrChain(AssetHubParaId)) }`
///
/// This provider maps the reserve for bridged assets to AssetHub when the asset originates
/// from a global consensus system, such as Ethereum.
@@ -429,7 +429,7 @@ impl Reserve for RelativeReserveProvider {
fn reserve(asset: &Asset) -> Option<Location> {
let AssetId(location) = &asset.id;
if location.parents == 0
&& !matches!(location.first_interior(), Some(Junction::Parachain(_)))
&& !matches!(location.first_interior(), Some(Junction::TeyrChain(_)))
{
Some(Location::here())
} else {
@@ -441,7 +441,7 @@ impl Reserve for RelativeReserveProvider {
/// Struct that uses RelativeReserveProvider to output relative views of multilocations
///
/// Additionally accepts a Location that aims at representing the chain part
/// (parent: 1, Parachain(paraId)) of the absolute representation of our chain.
/// (parent: 1, TeyrChain(paraId)) of the absolute representation of our chain.
/// If a token reserve matches against this absolute view, we return Some(Location::here())
/// This helps users by preventing errors when they try to transfer a token through xtokens
/// to our chain (either inserting the relative or the absolute value).
@@ -468,17 +468,17 @@ pub struct ReserveProviders;
impl Reserve for ReserveProviders {
fn reserve(asset: &Asset) -> Option<Location> {
// Try each provider's reserve method in sequence.
DOTReserveProvider::reserve(asset)
HEZReserveProvider::reserve(asset)
.or_else(|| BridgedAssetReserveProvider::reserve(asset))
.or_else(|| AbsoluteAndRelativeReserve::<SelfLocationAbsolute>::reserve(asset))
}
}
pub struct AssetFeesFilter;
impl frame_support::traits::Contains<Location> for AssetFeesFilter {
impl pezframe_support::traits::Contains<Location> for AssetFeesFilter {
fn contains(location: &Location) -> bool {
location.parent_count() > 0
&& location.first_interior() != Erc20XcmBridgePalletLocation::get().first_interior()
&& location.first_interior() != Erc20XcmBridgePezpalletLocation::get().first_interior()
}
}
@@ -514,8 +514,8 @@ impl TryFrom<u8> for Transactors {
impl UtilityEncodeCall for Transactors {
fn encode_call(self, call: UtilityAvailableCalls) -> Vec<u8> {
match self {
Transactors::Relay => pallet_xcm_transactor::Pallet::<Runtime>::encode_call(
pallet_xcm_transactor::Pallet(sp_std::marker::PhantomData::<Runtime>),
Transactors::Relay => pezpallet_xcm_transactor::Pallet::<Runtime>::encode_call(
pezpallet_xcm_transactor::Pallet(sp_std::marker::PhantomData::<Runtime>),
call,
),
}
@@ -570,7 +570,7 @@ mod testing {
mod tests {
mod is_bridged_concrete_assets_from {
use frame_support::traits::ContainsPair;
use pezframe_support::traits::ContainsPair;
use xcm::latest::{Asset, AssetId, Fungibility, Junctions, Location};
use crate::configs::{AssetHubLocation, IsBridgedConcreteAssetFrom};
@@ -640,7 +640,7 @@ mod tests {
let contract_address = H160::from_low_u64_be(0x1234);
let currency = CurrencyId::Erc20 { contract_address };
let mut expected_location = crate::configs::Erc20XcmBridgePalletLocation::get();
let mut expected_location = crate::configs::Erc20XcmBridgePezpalletLocation::get();
expected_location
.push_interior(AccountKey20 { network: None, key: contract_address.0 })
.unwrap();
@@ -652,7 +652,7 @@ mod tests {
}
mod asset_fee_filter {
use frame_support::traits::Contains;
use pezframe_support::traits::Contains;
use xcm::latest::{Junction::AccountKey20, Location};
use crate::configs::AssetFeesFilter;
@@ -665,7 +665,7 @@ mod tests {
#[test]
fn test_asset_fee_filter_invalid() {
let location = crate::configs::Erc20XcmBridgePalletLocation::get();
let location = crate::configs::Erc20XcmBridgePezpalletLocation::get();
assert!(!AssetFeesFilter::contains(&location));
}
@@ -713,7 +713,7 @@ mod tests {
}
mod reserve_providers {
use frame_support::traits::Get;
use pezframe_support::traits::Get;
use orml_traits::location::Reserve;
use xcm::latest::{Asset, AssetId, Fungibility, Junction, Junctions, Location};
@@ -723,7 +723,7 @@ mod tests {
#[test]
fn test_relative_reserve_provider_here() {
// Test case for a local asset (parents = 0, no Parachain junction)
// Test case for a local asset (parents = 0, no TeyrChain junction)
let local_asset = Asset {
id: AssetId(Location { parents: 0, interior: Junctions::Here }),
fun: Fungibility::Fungible(100),
@@ -735,7 +735,7 @@ mod tests {
#[test]
fn test_relative_reserve_provider_local_with_junctions() {
// Test case for a local asset with junctions but not Parachain
// Test case for a local asset with junctions but not TeyrChain
use std::sync::Arc;
let junction = Junction::AccountId32 { network: None, id: [0; 32] };
@@ -751,14 +751,14 @@ mod tests {
}
#[test]
fn test_relative_reserve_provider_parachain() {
// Test case for a parachain asset
fn test_relative_reserve_provider_teyrchain() {
// Test case for a teyrchain asset
use std::sync::Arc;
let junction = Junction::Parachain(1000);
let junction = Junction::TeyrChain(1000);
let junction_array = Arc::new([junction]);
let parachain_asset = Asset {
let teyrchain_asset = Asset {
id: AssetId(Location {
parents: 0,
interior: Junctions::X1(junction_array.clone()),
@@ -766,7 +766,7 @@ mod tests {
fun: Fungibility::Fungible(100),
};
let reserve = RelativeReserveProvider::reserve(&parachain_asset);
let reserve = RelativeReserveProvider::reserve(&teyrchain_asset);
// Should return the chain location, not Here
let expected = Location { parents: 0, interior: Junctions::X1(junction_array) };
assert_eq!(reserve, Some(expected));
@@ -794,14 +794,14 @@ mod tests {
struct MockAbsoluteLocation;
impl Get<Location> for MockAbsoluteLocation {
fn get() -> Location {
let junction = Junction::Parachain(1000);
let junction = Junction::TeyrChain(1000);
let junction_array = Arc::new([junction]);
Location { parents: 1, interior: Junctions::X1(junction_array) }
}
}
// Test case where the reserve matches the absolute location
let junction = Junction::Parachain(1000);
let junction = Junction::TeyrChain(1000);
let junction_array = Arc::new([junction]);
let asset = Asset {
@@ -822,14 +822,14 @@ mod tests {
struct MockAbsoluteLocation;
impl Get<Location> for MockAbsoluteLocation {
fn get() -> Location {
let junction = Junction::Parachain(1000);
let junction = Junction::TeyrChain(1000);
let junction_array = Arc::new([junction]);
Location { parents: 1, interior: Junctions::X1(junction_array) }
}
}
// Test case where the reserve doesn't match the absolute location
let junction = Junction::Parachain(2000);
let junction = Junction::TeyrChain(2000);
let junction_array = Arc::new([junction]);
let asset = Asset {
+9 -9
View File
@@ -1,4 +1,4 @@
use frame_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight};
use pezframe_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight};
use sp_runtime::Perbill;
use sp_version::{Cow, RuntimeVersion};
@@ -7,7 +7,7 @@ use crate::types::BlockNumber;
pub mod currency {
use crate::types::Balance;
pub const MICROCENTS: Balance = 1_000_000;
pub const MICTYRENTS: Balance = 1_000_000;
pub const MILLICENTS: Balance = 1_000_000_000;
pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent.
pub const DOLLARS: Balance = 100 * CENTS;
@@ -16,7 +16,7 @@ pub mod currency {
/// NB: Notice, that existential deposit was set to 0 intentionally to increase compatibility with EVM.
/// However, it leads to some risks, most importantly state bloating.
/// We acknowledge that there is such a risk and we have an opened issue to resolve it:
/// https://github.com/OpenZeppelin/polkadot-runtime-templates/issues/195
/// https://github.com/OpenZeppelin/pezkuwi-runtime-templates/issues/195
/// If you read this message please check out this issue to see if it is resolved and what can you do to implement the fix.
#[cfg(not(feature = "runtime-benchmarks"))]
pub const EXISTENTIAL_DEPOSIT: Balance = 0;
@@ -35,8 +35,8 @@ pub const POLY_DEGREE: u8 = 1;
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: Cow::Borrowed("template-parachain"),
impl_name: Cow::Borrowed("template-parachain"),
spec_name: Cow::Borrowed("template-teyrchain"),
impl_name: Cow::Borrowed("template-teyrchain"),
authoring_version: 1,
spec_version: 1,
impl_version: 0,
@@ -47,8 +47,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// This determines the average expected block time that we are targeting.
/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.
/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked
/// up by `pallet_aura` to implement `fn slot_duration()`.
/// `SLOT_DURATION` is picked up by `pezpallet_timestamp` which is in turn picked
/// up by `pezpallet_aura` to implement `fn slot_duration()`.
///
/// Change this to adjust the block time.
#[cfg(feature = "async-backing")]
@@ -90,9 +90,9 @@ pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;
#[cfg(not(feature = "async-backing"))]
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent.
/// How many teyrchain blocks are processed by the relay chain per parent.
/// Limits the number of blocks authored per slot.
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
pub const BLOCK_PTYRESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
/// Maximum length for a block.
@@ -3,8 +3,8 @@
use alloc::{format, vec, vec::Vec};
use cumulus_primitives_core::ParaId;
use frame_support::build_struct_json_patch;
use parachains_common::AuraId;
use pezframe_support::build_struct_json_patch;
use teyrchains_common::AuraId;
use serde_json::Value;
use sp_core::{ecdsa, Pair, Public};
use sp_genesis_builder::PresetId;
@@ -12,16 +12,16 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
use crate::{
constants::currency::EXISTENTIAL_DEPOSIT, AccountId, BalancesConfig, CollatorSelectionConfig,
ParachainInfoConfig, PolkadotXcmConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys,
TeyrChainInfoConfig, PezkuwiXcmConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys,
Signature, SudoConfig,
};
/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
/// Parachain id used for genesis config presets of parachain template.
/// TeyrChain id used for genesis config presets of teyrchain template.
#[docify::export_content]
pub const PARACHAIN_ID: u32 = 1000;
pub const TEYRCHAIN_ID: u32 = 1000;
/// Generate the session keys from individual elements.
pub fn template_session_keys(keys: AuraId) -> SessionKeys {
@@ -69,7 +69,7 @@ fn testnet_genesis(
.map(|k| (k, 1u128 << 60))
.collect::<Vec<_>>(),
},
parachain_info: ParachainInfoConfig { parachain_id: id },
teyrchain_info: TeyrChainInfoConfig { teyrchain_id: id },
collator_selection: CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect::<Vec<_>>(),
candidacy_bond: EXISTENTIAL_DEPOSIT * 16,
@@ -86,7 +86,7 @@ fn testnet_genesis(
})
.collect::<Vec<_>>(),
},
polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
pezkuwi_xcm: PezkuwiXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
sudo: SudoConfig { key: Some(root) },
})
}
@@ -113,7 +113,7 @@ fn local_testnet_genesis() -> Value {
// Sudo: Alith.
let root = AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac"));
testnet_genesis(invulnerables, endowed_accounts, root, PARACHAIN_ID.into())
testnet_genesis(invulnerables, endowed_accounts, root, TEYRCHAIN_ID.into())
}
fn development_config_genesis() -> Value {
@@ -167,17 +167,17 @@ mod tests {
// Top-level keys present
for k in
["balances", "parachainInfo", "collatorSelection", "session", "polkadotXcm", "sudo"]
["balances", "teyrchainInfo", "collatorSelection", "session", "pezkuwiXcm", "sudo"]
{
assert!(v.get(k).is_some(), "{k} missing");
}
// ParachainId
assert_eq!(v["parachainInfo"]["parachainId"], json!(PARACHAIN_ID), "wrong parachain id");
// TeyrChainId
assert_eq!(v["teyrchainInfo"]["teyrchainId"], json!(TEYRCHAIN_ID), "wrong teyrchain id");
// XCM version
assert_eq!(
v["polkadotXcm"]["safeXcmVersion"],
v["pezkuwiXcm"]["safeXcmVersion"],
json!(Some(SAFE_XCM_VERSION)),
"wrong SAFE_XCM_VERSION"
);
+33 -33
View File
@@ -16,11 +16,11 @@ mod genesis_config_presets;
mod types;
mod weights;
use frame_support::{
use pezframe_support::{
traits::OnFinalize,
weights::{WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial},
};
pub use genesis_config_presets::PARACHAIN_ID;
pub use genesis_config_presets::TEYRCHAIN_ID;
use smallvec::smallvec;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::H160;
@@ -37,7 +37,7 @@ use sp_std::prelude::{Vec, *};
use sp_version::NativeVersion;
use crate::{
configs::pallet_custom_origins,
configs::pezpallet_custom_origins,
constants::{currency::MILLICENTS, POLY_DEGREE, P_FACTOR, Q_FACTOR, VERSION},
weights::ExtrinsicBaseWeight,
};
@@ -110,9 +110,9 @@ impl fp_self_contained::SelfContainedCall for RuntimeCall {
info: Self::SignedInfo,
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
match self {
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) =>
call @ RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact { .. }) =>
Some(call.dispatch(RuntimeOrigin::from(
pallet_ethereum::RawOrigin::EthereumTransaction(info),
pezpallet_ethereum::RawOrigin::EthereumTransaction(info),
))),
_ => None,
}
@@ -193,7 +193,7 @@ pub fn native_version() -> NativeVersion {
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
use openzeppelin_pallet_abstractions_proc::openzeppelin_construct_runtime;
use openzeppelin_pezpallet_abstractions_proc::openzeppelin_construct_runtime;
#[cfg(not(feature = "tanssi"))]
#[openzeppelin_construct_runtime]
@@ -227,7 +227,7 @@ mod runtime {
struct EVM;
}
use openzeppelin_pallet_abstractions_proc::openzeppelin_runtime_apis;
use openzeppelin_pezpallet_abstractions_proc::openzeppelin_runtime_apis;
#[cfg(not(feature = "tanssi"))]
#[openzeppelin_runtime_apis]
@@ -262,7 +262,7 @@ mod apis {
mod system {
type Executive = Executive;
type System = System;
type ParachainSystem = ParachainSystem;
type ParachainSystem = TeyrChainSystem;
type RuntimeVersion = VERSION;
type AccountId = AccountId;
type Nonce = Nonce;
@@ -271,13 +271,13 @@ mod apis {
}
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type AllPalletsWithSystem = AllPezpalletsWithSystem;
type Assets = Assets;
type AssetManager = AssetManager;
type AssetType = AssetType;
type RuntimeOrigin = RuntimeOrigin;
type RelayLocation = RelayLocation;
type ParachainSystem = ParachainSystem;
type ParachainSystem = TeyrChainSystem;
type System = System;
type ExistentialDeposit = ExistentialDeposit;
type AssetId = AssetId;
@@ -318,7 +318,7 @@ mod apis {
mod system {
type Executive = Executive;
type System = System;
type ParachainSystem = ParachainSystem;
type ParachainSystem = TeyrChainSystem;
type RuntimeVersion = VERSION;
type AccountId = AccountId;
type Nonce = Nonce;
@@ -327,13 +327,13 @@ mod apis {
}
mod benchmarks {
type AllPalletsWithSystem = AllPalletsWithSystem;
type AllPalletsWithSystem = AllPezpalletsWithSystem;
type Assets = Assets;
type AssetManager = AssetManager;
type AssetType = AssetType;
type RuntimeOrigin = RuntimeOrigin;
type RelayLocation = RelayLocation;
type ParachainSystem = ParachainSystem;
type ParachainSystem = TeyrChainSystem;
type System = System;
type ExistentialDeposit = ExistentialDeposit;
type AssetId = AssetId;
@@ -352,7 +352,7 @@ mod benchmark;
#[cfg(test)]
mod test {
use frame_support::weights::WeightToFeePolynomial;
use pezframe_support::weights::WeightToFeePolynomial;
use crate::{
constants::{POLY_DEGREE, VERSION},
@@ -380,17 +380,17 @@ mod test {
use ethereum::{LegacyTransaction, TransactionSignature};
use fp_account::AccountId20;
use fp_self_contained::SelfContainedCall;
use frame_support::dispatch::GetDispatchInfo;
use pallet_ethereum::TransactionAction;
use pezframe_support::dispatch::GetDispatchInfo;
use pezpallet_ethereum::TransactionAction;
use sp_core::{H160, H256, U256};
use crate::{Runtime, RuntimeCall, RuntimeOrigin};
fn get_transaction() -> pallet_ethereum::Transaction {
fn get_transaction() -> pezpallet_ethereum::Transaction {
let mut input = vec![];
let data = "095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000001b1ae4d6e2ef5000000".as_bytes();
input.extend_from_slice(data);
pallet_ethereum::Transaction::Legacy(LegacyTransaction {
pezpallet_ethereum::Transaction::Legacy(LegacyTransaction {
nonce: U256::from_dec_str("842").unwrap(),
gas_price: U256::from_dec_str("35540887252").unwrap(),
gas_limit: U256::from_dec_str("500000").unwrap(),
@@ -416,7 +416,7 @@ mod test {
#[test]
fn test_is_self_contained_ethereum() {
let call = RuntimeCall::Ethereum(pallet_ethereum::Call::transact {
let call = RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact {
transaction: get_transaction(),
});
assert!(call.is_self_contained())
@@ -424,7 +424,7 @@ mod test {
#[test]
fn test_is_not_self_contained() {
let call = RuntimeCall::Balances(pallet_balances::Call::burn {
let call = RuntimeCall::Balances(pezpallet_balances::Call::burn {
value: 1,
keep_alive: true,
});
@@ -433,7 +433,7 @@ mod test {
#[test]
fn test_check_self_contained() {
let call = RuntimeCall::Ethereum(pallet_ethereum::Call::transact {
let call = RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact {
transaction: get_transaction(),
});
assert!(call.check_self_contained().is_some());
@@ -442,7 +442,7 @@ mod test {
#[test]
fn test_check_not_self_contained() {
let call = RuntimeCall::Balances(pallet_balances::Call::burn {
let call = RuntimeCall::Balances(pezpallet_balances::Call::burn {
value: 1,
keep_alive: true,
});
@@ -452,7 +452,7 @@ mod test {
#[test]
fn test_validate_self_contained() {
let call = RuntimeCall::Ethereum(pallet_ethereum::Call::transact {
let call = RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact {
transaction: get_transaction(),
});
let info = call.get_dispatch_info();
@@ -460,7 +460,7 @@ mod test {
sp_io::TestExternalities::default().execute_with(|| {
let addr =
H160::from_str("0x78DFFE34196A5987fb73fb9bbfd55a2A33e467Fb").unwrap();
let _ = pallet_balances::Pallet::<Runtime>::force_set_balance(
let _ = pezpallet_balances::Pallet::<Runtime>::force_set_balance(
RuntimeOrigin::root(),
AccountId20(addr.0),
90000000000000000,
@@ -476,7 +476,7 @@ mod test {
#[test]
fn test_validate_not_self_contained() {
let call = RuntimeCall::Balances(pallet_balances::Call::burn {
let call = RuntimeCall::Balances(pezpallet_balances::Call::burn {
value: 1,
keep_alive: true,
});
@@ -495,7 +495,7 @@ mod test {
#[test]
fn test_pre_dispatch_self_contained() {
let call = RuntimeCall::Ethereum(pallet_ethereum::Call::transact {
let call = RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact {
transaction: get_transaction(),
});
let info = call.get_dispatch_info();
@@ -504,14 +504,14 @@ mod test {
let addr =
H160::from_str("0x78DFFE34196A5987fb73fb9bbfd55a2A33e467Fb").unwrap();
let who = AccountId20(addr.0);
let _ = pallet_balances::Pallet::<Runtime>::force_set_balance(
let _ = pezpallet_balances::Pallet::<Runtime>::force_set_balance(
RuntimeOrigin::root(),
who,
90000000000000000,
);
// I do not know any other way to increase nonce
for _ in 0..842 {
frame_system::Pallet::<Runtime>::inc_account_nonce(who);
pezframe_system::Pallet::<Runtime>::inc_account_nonce(who);
}
let () = call
.pre_dispatch_self_contained(&addr, &info, 0)
@@ -522,7 +522,7 @@ mod test {
#[test]
fn test_pre_dispatch_not_self_contained() {
let call = RuntimeCall::Balances(pallet_balances::Call::burn {
let call = RuntimeCall::Balances(pezpallet_balances::Call::burn {
value: 1,
keep_alive: true,
});
@@ -541,7 +541,7 @@ mod test {
#[test]
fn test_apply_self_contained() {
let call = RuntimeCall::Ethereum(pallet_ethereum::Call::transact {
let call = RuntimeCall::Ethereum(pezpallet_ethereum::Call::transact {
transaction: get_transaction(),
});
@@ -549,14 +549,14 @@ mod test {
let addr =
H160::from_str("0x78DFFE34196A5987fb73fb9bbfd55a2A33e467Fb").unwrap();
let who = AccountId20(addr.0);
let _ = pallet_balances::Pallet::<Runtime>::force_set_balance(
let _ = pezpallet_balances::Pallet::<Runtime>::force_set_balance(
RuntimeOrigin::root(),
who,
90000000000000000,
);
// I do not know any other way to increase nonce
for _ in 0..842 {
frame_system::Pallet::<Runtime>::inc_account_nonce(who);
pezframe_system::Pallet::<Runtime>::inc_account_nonce(who);
}
let _ = call
.apply_self_contained(addr)
@@ -567,7 +567,7 @@ mod test {
#[test]
fn test_apply_not_self_contained() {
let call = RuntimeCall::Balances(pallet_balances::Call::burn {
let call = RuntimeCall::Balances(pezpallet_balances::Call::burn {
value: 1,
keep_alive: true,
});
+6 -6
View File
@@ -1,11 +1,11 @@
use core::marker::PhantomData;
use pallet_evm::{
use pezpallet_evm::{
IsPrecompileResult, Precompile, PrecompileHandle, PrecompileResult, PrecompileSet,
};
use pallet_evm_precompile_modexp::Modexp;
use pallet_evm_precompile_sha3fips::Sha3FIPS256;
use pallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripemd160, Sha256};
use pezpallet_evm_precompile_modexp::Modexp;
use pezpallet_evm_precompile_sha3fips::Sha3FIPS256;
use pezpallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripemd160, Sha256};
use sp_core::H160;
#[derive(Default)]
@@ -13,7 +13,7 @@ pub struct OpenZeppelinPrecompiles<R>(PhantomData<R>);
impl<R> OpenZeppelinPrecompiles<R>
where
R: pallet_evm::Config,
R: pezpallet_evm::Config,
{
pub fn new() -> Self {
Self(Default::default())
@@ -25,7 +25,7 @@ where
}
impl<R> PrecompileSet for OpenZeppelinPrecompiles<R>
where
R: pallet_evm::Config,
R: pezpallet_evm::Config,
{
fn execute(&self, handle: &mut impl PrecompileHandle) -> Option<PrecompileResult> {
match handle.code_address() {
+40 -40
View File
@@ -1,13 +1,13 @@
use fp_account::EthereumSignature;
#[cfg(not(feature = "tanssi"))]
use frame_support::traits::EitherOfDiverse;
use frame_support::{parameter_types, traits::InstanceFilter, weights::Weight, PalletId};
use pezframe_support::traits::EitherOfDiverse;
use pezframe_support::{parameter_types, traits::InstanceFilter, weights::Weight, PezpalletId};
#[cfg(not(feature = "tanssi"))]
use frame_system::EnsureRoot;
use pezframe_system::EnsureRoot;
#[cfg(not(feature = "tanssi"))]
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use polkadot_runtime_common::impls::{
use pezkuwi_runtime_common::impls::{
LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
};
use scale_info::TypeInfo;
@@ -32,11 +32,11 @@ use crate::{
use crate::{
configs::{xcm_config::RelayLocation, StakingAdminBodyId},
constants::{
BLOCK_PROCESSING_VELOCITY, RELAY_CHAIN_SLOT_DURATION_MILLIS, UNINCLUDED_SEGMENT_CAPACITY,
BLOCK_PTYRESSING_VELOCITY, RELAY_CHAIN_SLOT_DURATION_MILLIS, UNINCLUDED_SEGMENT_CAPACITY,
},
};
pub use crate::{
constants::VERSION, AllPalletsWithSystem, OpenZeppelinPrecompiles, Runtime,
constants::VERSION, AllPezpalletsWithSystem, OpenZeppelinPrecompiles, Runtime,
RuntimeBlockWeights, RuntimeCall, Treasury, XcmpQueue,
};
@@ -75,32 +75,32 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// The TransactionExtension to the basic transaction logic.
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
pub type TxExtension = cumulus_pezpallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
pezframe_system::CheckNonZeroSender<Runtime>,
pezframe_system::CheckSpecVersion<Runtime>,
pezframe_system::CheckTxVersion<Runtime>,
pezframe_system::CheckGenesis<Runtime>,
pezframe_system::CheckEra<Runtime>,
pezframe_system::CheckNonce<Runtime>,
pezframe_system::CheckWeight<Runtime>,
pezpallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
pezframe_metadata_hash_extension::CheckMetadataHash<Runtime>,
),
>;
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
pub type Executive = pezframe_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
pezframe_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
AllPezpalletsWithSystem,
>;
/// Price For Sibling Parachain Delivery
pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice<
/// Price For Sibling TeyrChain Delivery
pub type PriceForSiblingTeyrChainDelivery = pezkuwi_runtime_common::xcm_sender::ExponentialPrice<
FeeAssetId,
ToSiblingBaseDeliveryFee,
TransactionByteFee,
@@ -109,10 +109,10 @@ pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender:
/// Configures the number of blocks that can be created without submission of validity proof to the relay chain
#[cfg(not(feature = "tanssi"))]
pub type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
pub type ConsensusHook = cumulus_pezpallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
BLOCK_PTYRESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
>;
@@ -124,15 +124,15 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<RelayLocation, StakingAdminBodyId>>,
>;
/// These aliases are describing the Beneficiary and AssetKind for the Treasury pallet
/// These aliases are describing the Beneficiary and AssetKind for the Treasury pezpallet
pub type Beneficiary = VersionedLocation;
pub type AssetKind = VersionedLocatableAsset;
/// This is a type that describes how we should transfer bounties from treasury pallet
/// This is a type that describes how we should transfer bounties from treasury pezpallet
pub type TreasuryPaymaster = PayOverXcm<
TreasuryInteriorLocation,
xcm_config::XcmRouter,
crate::PolkadotXcm,
crate::PezkuwiXcm,
ConstU32<{ 6 * HOURS }>,
Beneficiary,
AssetKind,
@@ -141,7 +141,7 @@ pub type TreasuryPaymaster = PayOverXcm<
>;
/// The type used to represent the kinds of proxying allowed.
/// If you are adding new pallets, consider adding new ProxyType variant
/// If you are adding new pezpallets, consider adding new ProxyType variant
#[derive(
Copy,
Clone,
@@ -177,7 +177,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }),
ProxyType::CancelProxy => matches!(
c,
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
| RuntimeCall::Multisig { .. }
),
#[cfg(not(feature = "tanssi"))]
@@ -191,11 +191,11 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
// Getter types used in OpenZeppelinRuntime configuration
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry");
pub const TreasuryPezpalletId: PezpalletId = PezpalletId(*b"py/trsry");
pub TreasuryAccount: AccountId = Treasury::account_id();
// The asset's interior location for the paying account. This is the Treasury
// pallet instance (which sits at index 13).
pub TreasuryInteriorLocation: InteriorLocation = PalletInstance(13).into();
// pezpallet instance (which sits at index 13).
pub TreasuryInteriorLocation: InteriorLocation = PezpalletInstance(13).into();
pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
pub PrecompilesValue: OpenZeppelinPrecompiles<Runtime> = OpenZeppelinPrecompiles::<_>::new();
}
@@ -203,7 +203,7 @@ parameter_types! {
#[cfg(test)]
mod test {
mod filter {
use frame_support::traits::InstanceFilter;
use pezframe_support::traits::InstanceFilter;
use sp_core::H256;
use crate::{types::ProxyType, AssetManager, RuntimeCall};
@@ -212,7 +212,7 @@ mod test {
#[cfg(not(feature = "tanssi"))]
fn test_filter_any() {
let call = RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max: 10 },
pezpallet_collator_selection::Call::set_desired_candidates { max: 10 },
);
let proxy_type = ProxyType::Any;
assert!(proxy_type.filter(&call));
@@ -223,11 +223,11 @@ mod test {
fn test_filter_nontransfer() {
let proxy_type = ProxyType::NonTransfer;
let valid_call = RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max: 10 },
pezpallet_collator_selection::Call::set_desired_candidates { max: 10 },
);
assert!(proxy_type.filter(&valid_call));
let invalid_call =
RuntimeCall::Balances(pallet_balances::Call::burn { value: 1, keep_alive: true });
RuntimeCall::Balances(pezpallet_balances::Call::burn { value: 1, keep_alive: true });
assert!(!proxy_type.filter(&invalid_call));
}
@@ -236,10 +236,10 @@ mod test {
fn test_filter_cancel_proxy() {
let proxy_type = ProxyType::CancelProxy;
let invalid_call = RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max: 10 },
pezpallet_collator_selection::Call::set_desired_candidates { max: 10 },
);
assert!(!proxy_type.filter(&invalid_call));
let valid_call = RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement {
let valid_call = RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement {
delegate: AssetManager::account_id(),
call_hash: H256::zero(),
});
@@ -251,11 +251,11 @@ mod test {
fn test_filter_collator() {
let proxy_type = ProxyType::Collator;
let valid_call = RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max: 10 },
pezpallet_collator_selection::Call::set_desired_candidates { max: 10 },
);
assert!(proxy_type.filter(&valid_call));
let invalid_call =
RuntimeCall::Balances(pallet_balances::Call::burn { value: 1, keep_alive: true });
RuntimeCall::Balances(pezpallet_balances::Call::burn { value: 1, keep_alive: true });
assert!(!proxy_type.filter(&invalid_call));
}
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -16,7 +16,7 @@
// limitations under the License.
pub mod constants {
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -29,7 +29,7 @@ pub mod constants {
#[cfg(test)]
mod test_weights {
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,5 +1,5 @@
//! Autogenerated weights for `cumulus_pallet_parachain_system`
//! Autogenerated weights for `cumulus_pezpallet_teyrchain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,36 +10,36 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-cumulus_pallet_parachain_system.json
// --pallet=cumulus_pallet_parachain_system
// --json-file=benchmarking/results/results-cumulus_pezpallet_teyrchain_system.json
// --pezpallet=cumulus_pezpallet_teyrchain_system
// --chain=dev
// --output=benchmarking/new-benchmarks/cumulus_pallet_parachain_system.rs
// --output=benchmarking/new-benchmarks/cumulus_pezpallet_teyrchain_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_parachain_system`.
/// Weight functions for `cumulus_pezpallet_teyrchain_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_parachain_system::WeightInfo for WeightInfo<T> {
/// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
impl<T: pezframe_system::Config> cumulus_pezpallet_teyrchain_system::WeightInfo for WeightInfo<T> {
/// Storage: `TeyrChainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `TeyrChainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `TeyrChainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1000)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
@@ -1,5 +1,5 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//! Autogenerated weights for `cumulus_pezpallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-cumulus_pallet_xcmp_queue.json
// --pallet=cumulus_pallet_xcmp_queue
// --json-file=benchmarking/results/results-cumulus_pezpallet_xcmp_queue.json
// --pezpallet=cumulus_pezpallet_xcmp_queue
// --chain=dev
// --output=benchmarking/new-benchmarks/cumulus_pallet_xcmp_queue.rs
// --output=benchmarking/new-benchmarks/cumulus_pezpallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
/// Weight functions for `cumulus_pezpallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> cumulus_pezpallet_xcmp_queue::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
fn set_config_with_u32() -> Weight {
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -16,7 +16,7 @@
// limitations under the License.
pub mod constants {
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -29,7 +29,7 @@ pub mod constants {
#[cfg(test)]
mod test_weights {
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
+24 -24
View File
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,32 +18,32 @@
//! Expose the auto generated weight files.
pub mod block_weights;
pub mod cumulus_pallet_parachain_system;
pub mod cumulus_pallet_xcmp_queue;
pub mod cumulus_pezpallet_teyrchain_system;
pub mod cumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pallet_asset_manager;
pub mod pallet_assets;
pub mod pallet_balances;
pub mod pezpallet_asset_manager;
pub mod pezpallet_assets;
pub mod pezpallet_balances;
#[cfg(not(feature = "tanssi"))]
pub mod pallet_collator_selection;
pub mod pallet_conviction_voting;
pub mod pallet_evm;
pub mod pallet_message_queue;
pub mod pallet_multisig;
pub mod pallet_preimage;
pub mod pallet_proxy;
pub mod pallet_referenda;
pub mod pallet_scheduler;
pub mod pezpallet_collator_selection;
pub mod pezpallet_conviction_voting;
pub mod pezpallet_evm;
pub mod pezpallet_message_queue;
pub mod pezpallet_multisig;
pub mod pezpallet_preimage;
pub mod pezpallet_proxy;
pub mod pezpallet_referenda;
pub mod pezpallet_scheduler;
#[cfg(not(feature = "tanssi"))]
pub mod pallet_session;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_treasury;
pub mod pallet_utility;
pub mod pallet_whitelist;
pub mod pallet_xcm;
pub mod pallet_xcm_transactor;
pub mod pallet_xcm_weight_trader;
pub mod pezpallet_session;
pub mod pezpallet_sudo;
pub mod pezpallet_timestamp;
pub mod pezpallet_treasury;
pub mod pezpallet_utility;
pub mod pezpallet_whitelist;
pub mod pezpallet_xcm;
pub mod pezpallet_xcm_transactor;
pub mod pezpallet_xcm_weight_trader;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub use block_weights::constants::BlockExecutionWeight;
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -16,7 +16,7 @@
// limitations under the License.
pub mod constants {
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
@@ -32,7 +32,7 @@ pub mod constants {
#[cfg(test)]
mod test_db_weights {
use frame_support::weights::constants;
use pezframe_support::weights::constants;
use super::constants::ParityDbWeight as W;
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_asset_manager`
//! Autogenerated weights for `pezpallet_asset_manager`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_asset_manager.json
// --pallet=pallet_asset_manager
// --json-file=benchmarking/results/results-pezpallet_asset_manager.json
// --pezpallet=pezpallet_asset_manager
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_asset_manager.rs
// --output=benchmarking/new-benchmarks/pezpallet_asset_manager.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_asset_manager`.
/// Weight functions for `pezpallet_asset_manager`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_asset_manager::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_asset_manager::WeightInfo for WeightInfo<T> {
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_assets`
//! Autogenerated weights for `pezpallet_assets`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_assets.json
// --pallet=pallet_assets
// --json-file=benchmarking/results/results-pezpallet_assets.json
// --pezpallet=pezpallet_assets
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_assets.rs
// --output=benchmarking/new-benchmarks/pezpallet_assets.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_assets`.
/// Weight functions for `pezpallet_assets`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_assets::WeightInfo for WeightInfo<T> {
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
/// Storage: `Assets::NextAssetId` (r:1 w:0)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_balances`
//! Autogenerated weights for `pezpallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_balances.json
// --pallet=pallet_balances
// --json-file=benchmarking/results/results-pezpallet_balances.json
// --pezpallet=pezpallet_balances
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_balances.rs
// --output=benchmarking/new-benchmarks/pezpallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_balances`.
/// Weight functions for `pezpallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_collator_selection`
//! Autogenerated weights for `pezpallet_collator_selection`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_collator_selection.json
// --pallet=pallet_collator_selection
// --json-file=benchmarking/results/results-pezpallet_collator_selection.json
// --pezpallet=pezpallet_collator_selection
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_collator_selection.rs
// --output=benchmarking/new-benchmarks/pezpallet_collator_selection.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
/// Weight functions for `pezpallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_collator_selection::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:20 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_conviction_voting`
//! Autogenerated weights for `pezpallet_conviction_voting`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_conviction_voting.json
// --pallet=pallet_conviction_voting
// --json-file=benchmarking/results/results-pezpallet_conviction_voting.json
// --pezpallet=pezpallet_conviction_voting
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_conviction_voting.rs
// --output=benchmarking/new-benchmarks/pezpallet_conviction_voting.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_conviction_voting`.
/// Weight functions for `pezpallet_conviction_voting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_conviction_voting::WeightInfo for WeightInfo<T> {
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_evm`
//! Autogenerated weights for `pezpallet_evm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_evm.json
// --pallet=pallet_evm
// --json-file=benchmarking/results/results-pezpallet_evm.json
// --pezpallet=pezpallet_evm
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_evm.rs
// --output=benchmarking/new-benchmarks/pezpallet_evm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_evm`.
/// Weight functions for `pezpallet_evm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_evm::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_evm::WeightInfo for WeightInfo<T> {
fn withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_message_queue`
//! Autogenerated weights for `pezpallet_message_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_message_queue.json
// --pallet=pallet_message_queue
// --json-file=benchmarking/results/results-pezpallet_message_queue.json
// --pezpallet=pezpallet_message_queue
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_message_queue.rs
// --output=benchmarking/new-benchmarks/pezpallet_message_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_message_queue`.
/// Weight functions for `pezpallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_multisig`
//! Autogenerated weights for `pezpallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_multisig.json
// --pallet=pallet_multisig
// --json-file=benchmarking/results/results-pezpallet_multisig.json
// --pezpallet=pezpallet_multisig
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_multisig.rs
// --output=benchmarking/new-benchmarks/pezpallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
/// Weight functions for `pezpallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_preimage`
//! Autogenerated weights for `pezpallet_preimage`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_preimage.json
// --pallet=pallet_preimage
// --json-file=benchmarking/results/results-pezpallet_preimage.json
// --pezpallet=pezpallet_preimage
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_preimage.rs
// --output=benchmarking/new-benchmarks/pezpallet_preimage.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_preimage`.
/// Weight functions for `pezpallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_preimage::WeightInfo for WeightInfo<T> {
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_proxy`
//! Autogenerated weights for `pezpallet_proxy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_proxy.json
// --pallet=pallet_proxy
// --json-file=benchmarking/results/results-pezpallet_proxy.json
// --pezpallet=pezpallet_proxy
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_proxy.rs
// --output=benchmarking/new-benchmarks/pezpallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
/// Weight functions for `pezpallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_referenda`
//! Autogenerated weights for `pezpallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_referenda.json
// --pallet=pallet_referenda
// --json-file=benchmarking/results/results-pezpallet_referenda.json
// --pezpallet=pezpallet_referenda
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_referenda.rs
// --output=benchmarking/new-benchmarks/pezpallet_referenda.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_referenda`.
/// Weight functions for `pezpallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
/// Storage: `Referenda::ReferendumCount` (r:1 w:1)
/// Proof: `Referenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_scheduler`
//! Autogenerated weights for `pezpallet_scheduler`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_scheduler.json
// --pallet=pallet_scheduler
// --json-file=benchmarking/results/results-pezpallet_scheduler.json
// --pezpallet=pezpallet_scheduler
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_scheduler.rs
// --output=benchmarking/new-benchmarks/pezpallet_scheduler.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_scheduler`.
/// Weight functions for `pezpallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_scheduler::WeightInfo for WeightInfo<T> {
/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn service_agendas_base() -> Weight {
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_session`
//! Autogenerated weights for `pezpallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_session.json
// --pallet=pallet_session
// --json-file=benchmarking/results/results-pezpallet_session.json
// --pezpallet=pezpallet_session
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_session.rs
// --output=benchmarking/new-benchmarks/pezpallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_session`.
/// Weight functions for `pezpallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_sudo`
//! Autogenerated weights for `pezpallet_sudo`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_sudo.json
// --pallet=pallet_sudo
// --json-file=benchmarking/results/results-pezpallet_sudo.json
// --pezpallet=pezpallet_sudo
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_sudo.rs
// --output=benchmarking/new-benchmarks/pezpallet_sudo.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_sudo`.
/// Weight functions for `pezpallet_sudo`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_sudo::WeightInfo for WeightInfo<T> {
/// Storage: `Sudo::Key` (r:1 w:1)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
fn set_key() -> Weight {
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_timestamp`
//! Autogenerated weights for `pezpallet_timestamp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_timestamp.json
// --pallet=pallet_timestamp
// --json-file=benchmarking/results/results-pezpallet_timestamp.json
// --pezpallet=pezpallet_timestamp
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_timestamp.rs
// --output=benchmarking/new-benchmarks/pezpallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
/// Weight functions for `pezpallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_treasury`
//! Autogenerated weights for `pezpallet_treasury`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_treasury.json
// --pallet=pallet_treasury
// --json-file=benchmarking/results/results-pezpallet_treasury.json
// --pezpallet=pezpallet_treasury
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_treasury.rs
// --output=benchmarking/new-benchmarks/pezpallet_treasury.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_treasury`.
/// Weight functions for `pezpallet_treasury`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_treasury::WeightInfo for WeightInfo<T> {
/// Storage: `Treasury::ProposalCount` (r:1 w:1)
/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Treasury::Approvals` (r:1 w:1)
@@ -100,20 +100,20 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
}
/// Storage: `Treasury::Spends` (r:1 w:1)
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrChainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(65570), added: 68045, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `527`
@@ -126,8 +126,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
}
/// Storage: `Treasury::Spends` (r:1 w:1)
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::Queries` (r:1 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `206`
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_utility`
//! Autogenerated weights for `pezpallet_utility`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_utility.json
// --pallet=pallet_utility
// --json-file=benchmarking/results/results-pezpallet_utility.json
// --pezpallet=pezpallet_utility
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_utility.rs
// --output=benchmarking/new-benchmarks/pezpallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_utility`.
/// Weight functions for `pezpallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_whitelist`
//! Autogenerated weights for `pezpallet_whitelist`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_whitelist.json
// --pallet=pallet_whitelist
// --json-file=benchmarking/results/results-pezpallet_whitelist.json
// --pezpallet=pezpallet_whitelist
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_whitelist.rs
// --output=benchmarking/new-benchmarks/pezpallet_whitelist.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_whitelist`.
/// Weight functions for `pezpallet_whitelist`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_whitelist::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_whitelist::WeightInfo for WeightInfo<T> {
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_xcm`
//! Autogenerated weights for `pezpallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,30 +10,30 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_xcm.json
// --pallet=pallet_xcm
// --json-file=benchmarking/results/results-pezpallet_xcm.json
// --pezpallet=pezpallet_xcm
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_xcm.rs
// --output=benchmarking/new-benchmarks/pezpallet_xcm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
/// Weight functions for `pezpallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
impl<T: pezframe_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
@@ -43,8 +43,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
@@ -54,10 +54,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn send() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
@@ -78,10 +78,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:2 w:0)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:2 w:2)
@@ -92,8 +92,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrChainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
@@ -108,10 +108,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(15))
.saturating_add(T::DbWeight::get().writes(10))
}
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:1 w:0)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:1)
@@ -120,10 +120,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `686`
@@ -134,8 +134,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn execute() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
@@ -145,8 +145,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
@@ -164,16 +164,16 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight::from_parts(3_121_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_subscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
@@ -184,14 +184,14 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `170`
@@ -202,8 +202,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1)
/// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::XcmExecutionSuspended` (r:0 w:1)
/// Proof: `PezkuwiXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn force_suspension() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
@@ -213,8 +213,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:5 w:2)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_supported_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `23`
@@ -225,8 +225,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:5 w:2)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notifiers() -> Weight {
// Proof Size summary in bytes:
// Measured: `27`
@@ -237,8 +237,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:6 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn already_notified_target() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
@@ -248,12 +248,12 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 15916))
.saturating_add(T::DbWeight::get().reads(6))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn notify_current_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `110`
@@ -264,8 +264,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:4 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn notify_target_migration_fail() -> Weight {
// Proof Size summary in bytes:
// Measured: `37`
@@ -275,8 +275,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 10927))
.saturating_add(T::DbWeight::get().reads(4))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notify_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `34`
@@ -287,12 +287,12 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:5 w:2)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn migrate_and_notify_old_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `110`
@@ -303,10 +303,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn new_query() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
@@ -317,8 +317,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::Queries` (r:1 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn take_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `7576`
@@ -329,10 +329,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1)
/// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::AssetTraps` (r:1 w:1)
/// Proof: `PezkuwiXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:1 w:0)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_xcm_transactor`
//! Autogenerated weights for `pezpallet_xcm_transactor`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_xcm_transactor.json
// --pallet=pallet_xcm_transactor
// --json-file=benchmarking/results/results-pezpallet_xcm_transactor.json
// --pezpallet=pezpallet_xcm_transactor
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_xcm_transactor.rs
// --output=benchmarking/new-benchmarks/pezpallet_xcm_transactor.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_xcm_transactor`.
/// Weight functions for `pezpallet_xcm_transactor`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm_transactor::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_xcm_transactor::WeightInfo for WeightInfo<T> {
/// Storage: `XcmTransactor::IndexToAccount` (r:1 w:1)
/// Proof: `XcmTransactor::IndexToAccount` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn register() -> Weight {
@@ -98,8 +98,8 @@ impl<T: frame_system::Config> pallet_xcm_transactor::WeightInfo for WeightInfo<T
/// Proof: `XcmTransactor::TransactInfoWithWeightLimit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmTransactor::DestinationAssetFeePerSecond` (r:1 w:0)
/// Proof: `XcmTransactor::DestinationAssetFeePerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AssetManager::AssetTypeId` (r:1 w:0)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:0)
@@ -119,8 +119,8 @@ impl<T: frame_system::Config> pallet_xcm_transactor::WeightInfo for WeightInfo<T
/// Proof: `XcmTransactor::TransactInfoWithWeightLimit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmTransactor::DestinationAssetFeePerSecond` (r:1 w:0)
/// Proof: `XcmTransactor::DestinationAssetFeePerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AssetManager::AssetTypeId` (r:1 w:0)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:0)
@@ -140,12 +140,12 @@ impl<T: frame_system::Config> pallet_xcm_transactor::WeightInfo for WeightInfo<T
/// Proof: `XcmTransactor::TransactInfoWithWeightLimit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmTransactor::DestinationAssetFeePerSecond` (r:1 w:0)
/// Proof: `XcmTransactor::DestinationAssetFeePerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn transact_through_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `534`
@@ -164,12 +164,12 @@ impl<T: frame_system::Config> pallet_xcm_transactor::WeightInfo for WeightInfo<T
/// Proof: `XcmTransactor::TransactInfoWithWeightLimit` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmTransactor::DestinationAssetFeePerSecond` (r:1 w:0)
/// Proof: `XcmTransactor::DestinationAssetFeePerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainInfo::TeyrChainId` (r:1 w:0)
/// Proof: `TeyrChainInfo::TeyrChainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `TeyrChainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrChainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrChainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `TeyrChainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn hrmp_manage() -> Weight {
// Proof Size summary in bytes:
// Measured: `538`
@@ -1,5 +1,5 @@
//! Autogenerated weights for `pallet_xcm_weight_trader`
//! Autogenerated weights for `pezpallet_xcm_weight_trader`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -10,28 +10,28 @@
// Executed Command:
// target/release/evm-template-node
// benchmark
// pallet
// pezpallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-pallet_xcm_weight_trader.json
// --pallet=pallet_xcm_weight_trader
// --json-file=benchmarking/results/results-pezpallet_xcm_weight_trader.json
// --pezpallet=pezpallet_xcm_weight_trader
// --chain=dev
// --output=benchmarking/new-benchmarks/pallet_xcm_weight_trader.rs
// --output=benchmarking/new-benchmarks/pezpallet_xcm_weight_trader.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_xcm_weight_trader`.
/// Weight functions for `pezpallet_xcm_weight_trader`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm_weight_trader::WeightInfo for WeightInfo<T> {
impl<T: pezframe_system::Config> pezpallet_xcm_weight_trader::WeightInfo for WeightInfo<T> {
/// Storage: `XcmWeightTrader::SupportedAssets` (r:1 w:1)
/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
fn add_asset() -> Weight {
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -16,13 +16,13 @@
// limitations under the License.
pub mod constants {
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
@@ -32,7 +32,7 @@ pub mod constants {
#[cfg(test)]
mod test_db_weights {
use frame_support::weights::constants;
use pezframe_support::weights::constants;
use super::constants::RocksDbWeight as W;
+2 -2
View File
@@ -1,10 +1,10 @@
// ExtBuilder impl for all runtime integration tests
use evm_runtime_template::{BuildStorage, Runtime, System};
use frame_support::weights::Weight;
use pezframe_support::weights::Weight;
pub fn run_with_system_weight<F: FnMut()>(w: Weight, mut assertions: F) {
let mut t: sp_io::TestExternalities =
frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into();
pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into();
t.execute_with(|| {
System::set_block_consumed_resources(w, 0);
assertions()
+52 -52
View File
@@ -3,7 +3,7 @@ mod constant_tests {
#[test]
fn test_constants() {
assert_eq!(MICROCENTS, 1_000_000);
assert_eq!(MICTYRENTS, 1_000_000);
assert_eq!(MILLICENTS, 1_000_000_000);
@@ -28,7 +28,7 @@ mod runtime_tests {
constants::{currency::*, *},
BlockNumber, Runtime,
};
use frame_support::{pallet_prelude::Weight, traits::TypedGet, PalletId};
use pezframe_support::{pezpallet_prelude::Weight, traits::TypedGet, PezpalletId};
use sp_runtime::{Cow, Perbill};
use sp_version::RuntimeVersion;
use xcm::latest::prelude::BodyId;
@@ -39,8 +39,8 @@ mod runtime_tests {
assert_eq!(
VERSION,
RuntimeVersion {
spec_name: Cow::Borrowed("template-parachain"),
impl_name: Cow::Borrowed("template-parachain"),
spec_name: Cow::Borrowed("template-teyrchain"),
impl_name: Cow::Borrowed("template-teyrchain"),
authoring_version: 1,
spec_version: 1,
impl_version: 0,
@@ -61,12 +61,12 @@ mod runtime_tests {
}
#[test]
fn frame_system_constants() {
fn pezframe_system_constants() {
#[cfg(not(feature = "async-backing"))]
assert_eq!(
MAXIMUM_BLOCK_WEIGHT,
Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
)
);
@@ -75,7 +75,7 @@ mod runtime_tests {
assert_eq!(
MAXIMUM_BLOCK_WEIGHT,
Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
)
);
@@ -88,7 +88,7 @@ mod runtime_tests {
#[cfg(feature = "async-backing")]
assert_eq!(UNINCLUDED_SEGMENT_CAPACITY, 3);
assert_eq!(BLOCK_PROCESSING_VELOCITY, 1);
assert_eq!(BLOCK_PTYRESSING_VELOCITY, 1);
assert_eq!(RELAY_CHAIN_SLOT_DURATION_MILLIS, 6000);
@@ -107,105 +107,105 @@ mod runtime_tests {
assert_eq!(MAX_BLOCK_LENGTH, 5 * 1024 * 1024);
assert_eq!(<Runtime as frame_system::Config>::SS58Prefix::get(), 42);
assert_eq!(<Runtime as pezframe_system::Config>::SS58Prefix::get(), 42);
assert_eq!(<Runtime as frame_system::Config>::MaxConsumers::get(), 16);
assert_eq!(<Runtime as pezframe_system::Config>::MaxConsumers::get(), 16);
}
#[test]
fn proxy_constants() {
assert_eq!(<Runtime as pallet_proxy::Config>::MaxProxies::get(), 32);
assert_eq!(<Runtime as pezpallet_proxy::Config>::MaxProxies::get(), 32);
assert_eq!(<Runtime as pallet_proxy::Config>::MaxPending::get(), 32);
assert_eq!(<Runtime as pezpallet_proxy::Config>::MaxPending::get(), 32);
assert_eq!(<Runtime as pallet_proxy::Config>::ProxyDepositBase::get(), deposit(1, 40));
assert_eq!(<Runtime as pezpallet_proxy::Config>::ProxyDepositBase::get(), deposit(1, 40));
assert_eq!(
<Runtime as pallet_proxy::Config>::AnnouncementDepositBase::get(),
<Runtime as pezpallet_proxy::Config>::AnnouncementDepositBase::get(),
deposit(1, 48)
);
assert_eq!(<Runtime as pallet_proxy::Config>::ProxyDepositFactor::get(), deposit(0, 33));
assert_eq!(<Runtime as pezpallet_proxy::Config>::ProxyDepositFactor::get(), deposit(0, 33));
assert_eq!(
<Runtime as pallet_proxy::Config>::AnnouncementDepositFactor::get(),
<Runtime as pezpallet_proxy::Config>::AnnouncementDepositFactor::get(),
deposit(0, 66)
);
}
#[test]
fn balances_constants() {
assert_eq!(<Runtime as pallet_balances::Config>::MaxFreezes::get(), 0);
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxFreezes::get(), 0);
assert_eq!(<Runtime as pallet_balances::Config>::MaxLocks::get(), 50);
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxLocks::get(), 50);
assert_eq!(<Runtime as pallet_balances::Config>::MaxReserves::get(), 50);
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxReserves::get(), 50);
}
#[test]
fn assets_constants() {
assert_eq!(<Runtime as pallet_assets::Config>::AssetDeposit::get(), 10 * CENTS);
assert_eq!(<Runtime as pezpallet_assets::Config>::AssetDeposit::get(), 10 * CENTS);
assert_eq!(<Runtime as pallet_assets::Config>::AssetAccountDeposit::get(), deposit(1, 16));
assert_eq!(<Runtime as pezpallet_assets::Config>::AssetAccountDeposit::get(), deposit(1, 16));
assert_eq!(<Runtime as pallet_assets::Config>::ApprovalDeposit::get(), MILLICENTS);
assert_eq!(<Runtime as pezpallet_assets::Config>::ApprovalDeposit::get(), MILLICENTS);
assert_eq!(<Runtime as pallet_assets::Config>::StringLimit::get(), 50);
assert_eq!(<Runtime as pezpallet_assets::Config>::StringLimit::get(), 50);
assert_eq!(<Runtime as pallet_assets::Config>::MetadataDepositBase::get(), deposit(1, 68));
assert_eq!(<Runtime as pezpallet_assets::Config>::MetadataDepositBase::get(), deposit(1, 68));
assert_eq!(
<Runtime as pallet_assets::Config>::MetadataDepositPerByte::get(),
<Runtime as pezpallet_assets::Config>::MetadataDepositPerByte::get(),
deposit(0, 1)
);
assert_eq!(<Runtime as pallet_assets::Config>::RemoveItemsLimit::get(), 1000);
assert_eq!(<Runtime as pezpallet_assets::Config>::RemoveItemsLimit::get(), 1000);
}
#[test]
fn transaction_payment_constants() {
assert_eq!(configs::TransactionByteFee::get(), 10 * MICROCENTS);
assert_eq!(configs::TransactionByteFee::get(), 10 * MICTYRENTS);
assert_eq!(
<Runtime as pallet_transaction_payment::Config>::OperationalFeeMultiplier::get(),
<Runtime as pezpallet_transaction_payment::Config>::OperationalFeeMultiplier::get(),
5
);
}
#[test]
fn cumulus_pallet_parachain_system_constants() {
fn cumulus_pezpallet_teyrchain_system_constants() {
assert_eq!(
<Runtime as cumulus_pallet_parachain_system::Config>::ReservedXcmpWeight::get(),
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedXcmpWeight::get(),
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
);
assert_eq!(
<Runtime as cumulus_pallet_parachain_system::Config>::ReservedDmpWeight::get(),
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedDmpWeight::get(),
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
);
}
#[test]
fn message_queue_constants() {
assert_eq!(<Runtime as pallet_message_queue::Config>::HeapSize::get(), 64 * 1024);
assert_eq!(<Runtime as pallet_message_queue::Config>::MaxStale::get(), 8);
assert_eq!(<Runtime as pezpallet_message_queue::Config>::HeapSize::get(), 64 * 1024);
assert_eq!(<Runtime as pezpallet_message_queue::Config>::MaxStale::get(), 8);
}
#[test]
fn cumulus_pallet_xcmp_queue_constants() {
fn cumulus_pezpallet_xcmp_queue_constants() {
assert_eq!(
<Runtime as cumulus_pallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
<Runtime as cumulus_pezpallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
1000
);
}
#[test]
fn multisig_constants() {
assert_eq!(<Runtime as pallet_multisig::Config>::DepositBase::get(), deposit(1, 88));
assert_eq!(<Runtime as pezpallet_multisig::Config>::DepositBase::get(), deposit(1, 88));
assert_eq!(<Runtime as pallet_multisig::Config>::DepositFactor::get(), deposit(0, 32));
assert_eq!(<Runtime as pezpallet_multisig::Config>::DepositFactor::get(), deposit(0, 32));
assert_eq!(<Runtime as pallet_multisig::Config>::MaxSignatories::get(), 100);
assert_eq!(<Runtime as pezpallet_multisig::Config>::MaxSignatories::get(), 100);
}
#[test]
@@ -221,40 +221,40 @@ mod runtime_tests {
#[cfg(not(feature = "tanssi"))]
fn aura_constants() {
#[cfg(not(feature = "async-backing"))]
assert!(!<Runtime as pallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
assert!(!<Runtime as pezpallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
#[cfg(feature = "async-backing")]
assert!(<Runtime as pallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
assert!(<Runtime as pezpallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
assert_eq!(<Runtime as pallet_aura::Config>::MaxAuthorities::get(), 100_000);
assert_eq!(<Runtime as pezpallet_aura::Config>::MaxAuthorities::get(), 100_000);
}
#[test]
#[cfg(not(feature = "tanssi"))]
fn collator_selection_constants() {
let pallet_id_to_string = |id: PalletId| -> String {
let pezpallet_id_to_string = |id: PezpalletId| -> String {
core::str::from_utf8(&id.0).unwrap_or_default().to_string()
};
assert_eq!(
pallet_id_to_string(<Runtime as pallet_collator_selection::Config>::PotId::get()),
pallet_id_to_string(PalletId(*b"PotStake"))
pezpallet_id_to_string(<Runtime as pezpallet_collator_selection::Config>::PotId::get()),
pezpallet_id_to_string(PezpalletId(*b"PotStake"))
);
assert_eq!(configs::SessionLength::get(), 6 * HOURS);
assert_eq!(configs::StakingAdminBodyId::get(), BodyId::Defense);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxCandidates::get(), 100);
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MaxCandidates::get(), 100);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxInvulnerables::get(), 20);
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MaxInvulnerables::get(), 20);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MinEligibleCollators::get(), 4);
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MinEligibleCollators::get(), 4);
}
}
mod xcm_tests {
use evm_runtime_template::{configs, Runtime};
use frame_support::weights::Weight;
use pezframe_support::weights::Weight;
#[test]
fn xcm_executor_constants() {
@@ -264,9 +264,9 @@ mod xcm_tests {
}
#[test]
fn pallet_xcm_constants() {
assert_eq!(<Runtime as pallet_xcm::Config>::MaxLockers::get(), 8);
assert_eq!(<Runtime as pallet_xcm::Config>::MaxRemoteLockConsumers::get(), 0);
assert_eq!(<Runtime as pallet_xcm::Config>::VERSION_DISCOVERY_QUEUE_SIZE, 100);
fn pezpallet_xcm_constants() {
assert_eq!(<Runtime as pezpallet_xcm::Config>::MaxLockers::get(), 8);
assert_eq!(<Runtime as pezpallet_xcm::Config>::MaxRemoteLockConsumers::get(), 0);
assert_eq!(<Runtime as pezpallet_xcm::Config>::VERSION_DISCOVERY_QUEUE_SIZE, 100);
}
}
+4 -4
View File
@@ -2,9 +2,9 @@
mod common;
use common::*;
use evm_runtime_template::{Runtime, RuntimeBlockWeights};
use frame_support::pallet_prelude::*;
use pallet_transaction_payment::Multiplier;
use polkadot_runtime_common::MinimumMultiplier;
use pezframe_support::pezpallet_prelude::*;
use pezpallet_transaction_payment::Multiplier;
use pezkuwi_runtime_common::MinimumMultiplier;
use sp_runtime::{traits::Convert, Perquintill};
fn min_multiplier() -> Multiplier {
@@ -17,7 +17,7 @@ fn target() -> Weight {
}
fn runtime_multiplier_update(fm: Multiplier) -> Multiplier {
<Runtime as pallet_transaction_payment::Config>::FeeMultiplierUpdate::convert(fm)
<Runtime as pezpallet_transaction_payment::Config>::FeeMultiplierUpdate::convert(fm)
}
#[test]
+23 -23
View File
@@ -2,37 +2,37 @@
#[cfg(not(feature = "tanssi"))]
use evm_runtime_template::{Aura, AuraExt, Authorship, CollatorSelection, Session};
use evm_runtime_template::{
Balances, CumulusXcm, MessageQueue, Multisig, ParachainInfo, ParachainSystem, PolkadotXcm,
Balances, CumulusXcm, MessageQueue, Multisig, TeyrChainInfo, TeyrChainSystem, PezkuwiXcm,
Proxy, Runtime, Sudo, System, Timestamp, TransactionPayment, XcmpQueue,
};
use frame_support::traits::PalletInfo;
use pezframe_support::traits::PalletInfo;
fn assert_pallet_prefix<P: 'static>(name: &str) {
assert_eq!(<Runtime as frame_system::Config>::PalletInfo::name::<P>(), Some(name));
fn assert_pezpallet_prefix<P: 'static>(name: &str) {
assert_eq!(<Runtime as pezframe_system::Config>::PalletInfo::name::<P>(), Some(name));
}
#[test]
fn verify_pallet_prefixes() {
assert_pallet_prefix::<System>("System");
assert_pallet_prefix::<ParachainSystem>("ParachainSystem");
assert_pallet_prefix::<Timestamp>("Timestamp");
assert_pallet_prefix::<ParachainInfo>("ParachainInfo");
assert_pallet_prefix::<Proxy>("Proxy");
assert_pallet_prefix::<Balances>("Balances");
assert_pallet_prefix::<TransactionPayment>("TransactionPayment");
assert_pallet_prefix::<Sudo>("Sudo");
assert_pallet_prefix::<Multisig>("Multisig");
assert_pallet_prefix::<XcmpQueue>("XcmpQueue");
assert_pallet_prefix::<PolkadotXcm>("PolkadotXcm");
assert_pallet_prefix::<CumulusXcm>("CumulusXcm");
assert_pallet_prefix::<MessageQueue>("MessageQueue");
fn verify_pezpallet_prefixes() {
assert_pezpallet_prefix::<System>("System");
assert_pezpallet_prefix::<TeyrChainSystem>("TeyrChainSystem");
assert_pezpallet_prefix::<Timestamp>("Timestamp");
assert_pezpallet_prefix::<TeyrChainInfo>("TeyrChainInfo");
assert_pezpallet_prefix::<Proxy>("Proxy");
assert_pezpallet_prefix::<Balances>("Balances");
assert_pezpallet_prefix::<TransactionPayment>("TransactionPayment");
assert_pezpallet_prefix::<Sudo>("Sudo");
assert_pezpallet_prefix::<Multisig>("Multisig");
assert_pezpallet_prefix::<XcmpQueue>("XcmpQueue");
assert_pezpallet_prefix::<PezkuwiXcm>("PezkuwiXcm");
assert_pezpallet_prefix::<CumulusXcm>("CumulusXcm");
assert_pezpallet_prefix::<MessageQueue>("MessageQueue");
#[cfg(not(feature = "tanssi"))]
{
assert_pallet_prefix::<Authorship>("Authorship");
assert_pallet_prefix::<CollatorSelection>("CollatorSelection");
assert_pallet_prefix::<Session>("Session");
assert_pallet_prefix::<Aura>("Aura");
assert_pallet_prefix::<AuraExt>("AuraExt");
assert_pezpallet_prefix::<Authorship>("Authorship");
assert_pezpallet_prefix::<CollatorSelection>("CollatorSelection");
assert_pezpallet_prefix::<Session>("Session");
assert_pezpallet_prefix::<Aura>("Aura");
assert_pezpallet_prefix::<AuraExt>("AuraExt");
}
}
+27 -27
View File
@@ -1,30 +1,30 @@
pub mod parachain;
pub mod teyrchain;
pub mod relay_chain;
use sp_runtime::BuildStorage;
use sp_tracing;
use xcm::prelude::*;
use xcm_executor::traits::ConvertLocation;
use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt};
use xcm_simulator::{decl_test_network, decl_test_teyrchain, decl_test_relay_chain, TestExt};
pub const PARA_ALICE: [u8; 20] = [1u8; 20];
pub const ALICE: sp_runtime::AccountId32 = sp_runtime::AccountId32::new([1u8; 32]);
pub const INITIAL_BALANCE: u128 = 1_000_000_000;
decl_test_parachain! {
decl_test_teyrchain! {
pub struct ParaA {
Runtime = parachain::Runtime,
XcmpMessageHandler = parachain::MsgQueue,
DmpMessageHandler = parachain::MsgQueue,
Runtime = teyrchain::Runtime,
XcmpMessageHandler = teyrchain::MsgQueue,
DmpMessageHandler = teyrchain::MsgQueue,
new_ext = para_ext(1),
}
}
decl_test_parachain! {
decl_test_teyrchain! {
pub struct ParaB {
Runtime = parachain::Runtime,
XcmpMessageHandler = parachain::MsgQueue,
DmpMessageHandler = parachain::MsgQueue,
Runtime = teyrchain::Runtime,
XcmpMessageHandler = teyrchain::MsgQueue,
DmpMessageHandler = teyrchain::MsgQueue,
new_ext = para_ext(2),
}
}
@@ -44,44 +44,44 @@ decl_test_relay_chain! {
decl_test_network! {
pub struct MockNet {
relay_chain = Relay,
parachains = vec![
teyrchains = vec![
(1, ParaA),
(2, ParaB),
],
}
}
pub fn parent_account_id() -> parachain::AccountId {
pub fn parent_account_id() -> teyrchain::AccountId {
let location = (Parent,);
parachain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn child_account_id(para: u32) -> relay_chain::AccountId {
let location = (Parachain(para),);
let location = (TeyrChain(para),);
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn child_account_account_id(para: u32, who: sp_runtime::AccountId32) -> relay_chain::AccountId {
let location = (Parachain(para), AccountId32 { network: None, id: who.into() });
let location = (TeyrChain(para), AccountId32 { network: None, id: who.into() });
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn sibling_account_account_id(para: u32, who: sp_runtime::AccountId32) -> parachain::AccountId {
let location = (Parent, Parachain(para), AccountId32 { network: None, id: who.into() });
parachain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
pub fn sibling_account_account_id(para: u32, who: sp_runtime::AccountId32) -> teyrchain::AccountId {
let location = (Parent, TeyrChain(para), AccountId32 { network: None, id: who.into() });
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn parent_account_account_id(who: sp_runtime::AccountId32) -> parachain::AccountId {
pub fn parent_account_account_id(who: sp_runtime::AccountId32) -> teyrchain::AccountId {
let location = (Parent, AccountId32 { network: None, id: who.into() });
parachain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
use parachain::{MsgQueue, Runtime, System};
use teyrchain::{MsgQueue, Runtime, System};
let mut t = frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
pallet_balances::GenesisConfig::<Runtime> {
pezpallet_balances::GenesisConfig::<Runtime> {
balances: vec![
(PARA_ALICE.into(), INITIAL_BALANCE),
(parent_account_id(), INITIAL_BALANCE),
@@ -103,9 +103,9 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
pub fn relay_ext() -> sp_io::TestExternalities {
use relay_chain::{Runtime, System};
let mut t = frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
pallet_balances::GenesisConfig::<Runtime> {
pezpallet_balances::GenesisConfig::<Runtime> {
balances: vec![
(ALICE, INITIAL_BALANCE),
(child_account_id(1), INITIAL_BALANCE),
@@ -123,5 +123,5 @@ pub fn relay_ext() -> sp_io::TestExternalities {
ext
}
pub type RelayChainPalletXcm = pallet_xcm::Pallet<relay_chain::Runtime>;
pub type ParachainPalletXcm = pallet_xcm::Pallet<parachain::Runtime>;
pub type RelayChainPezpalletXcm = pezpallet_xcm::Pallet<relay_chain::Runtime>;
pub type TeyrChainPezpalletXcm = pezpallet_xcm::Pallet<teyrchain::Runtime>;
@@ -1,11 +1,11 @@
mod xcm_config;
use frame_support::{
use pezframe_support::{
construct_runtime, derive_impl, parameter_types,
traits::{ConstU128, Disabled, Everything, Nothing, ProcessMessage, ProcessMessageError},
weights::{Weight, WeightMeter},
};
use frame_system::EnsureRoot;
use polkadot_runtime_parachains::{
use pezframe_system::EnsureRoot;
use pezkuwi_runtime_teyrchains::{
configuration,
inclusion::{AggregateMessageOrigin, UmpQueueId},
origin, shared,
@@ -24,16 +24,16 @@ parameter_types! {
pub const BlockHashCount: u64 = 250;
}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for Runtime {
type AccountData = pezpallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type Block = Block;
type Lookup = IdentityLookup<Self::AccountId>;
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for Runtime {
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
impl pezpallet_balances::Config for Runtime {
type AccountStore = System;
type Balance = Balance;
type ExistentialDeposit = ConstU128<1>;
@@ -50,9 +50,9 @@ impl configuration::Config for Runtime {
pub type LocalOriginToLocation =
SignedToAccountId32<RuntimeOrigin, AccountId, constants::RelayNetwork>;
impl pallet_xcm::Config for Runtime {
impl pezpallet_xcm::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
// Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`.
type AuthorizedAliasConsideration = Disabled;
type Currency = Balances;
@@ -70,7 +70,7 @@ impl pallet_xcm::Config for Runtime {
type TrustedLockers = ();
type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher;
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = pezpallet_xcm::TestWeightInfo;
type XcmExecuteFilter = Nothing;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmReserveTransferFilter = Everything;
@@ -82,7 +82,7 @@ impl pallet_xcm::Config for Runtime {
impl origin::Config for Runtime {}
type Block = frame_system::mocking::MockBlock<Runtime>;
type Block = pezframe_system::mocking::MockBlock<Runtime>;
parameter_types! {
/// Amount of weight that can be spent per block to service messages.
@@ -91,7 +91,7 @@ parameter_types! {
pub const MessageQueueMaxStale: u32 = 16;
}
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet.
/// Message processor to handle any messages that were enqueued into the `MessageQueue` pezpallet.
pub struct MessageProcessor;
impl ProcessMessage for MessageProcessor {
type Origin = AggregateMessageOrigin;
@@ -109,11 +109,11 @@ impl ProcessMessage for MessageProcessor {
Junction,
xcm_executor::XcmExecutor<XcmConfig>,
RuntimeCall,
>::process_message(message, Junction::Parachain(para.into()), meter, id)
>::process_message(message, Junction::TeyrChain(para.into()), meter, id)
}
}
impl pallet_message_queue::Config for Runtime {
impl pezpallet_message_queue::Config for Runtime {
type HeapSize = MessageQueueHeapSize;
type IdleMaxServiceWeight = ();
type MaxStale = MessageQueueMaxStale;
@@ -129,10 +129,10 @@ impl pallet_message_queue::Config for Runtime {
construct_runtime!(
pub enum Runtime
{
System: frame_system,
Balances: pallet_balances,
System: pezframe_system,
Balances: pezpallet_balances,
ParasOrigin: origin,
XcmPallet: pallet_xcm,
MessageQueue: pallet_message_queue,
XcmPezpallet: pezpallet_xcm,
MessageQueue: pezpallet_message_queue,
}
);
@@ -1,4 +1,4 @@
use frame_support::traits::Everything;
use pezframe_support::traits::Everything;
use xcm_builder::AllowUnpaidExecutionFrom;
pub type Barrier = AllowUnpaidExecutionFrom<Everything>;
@@ -1,4 +1,4 @@
use frame_support::parameter_types;
use pezframe_support::parameter_types;
use xcm::latest::prelude::*;
parameter_types! {
@@ -5,11 +5,11 @@ pub mod location_converter;
pub mod origin_converter;
pub mod weigher;
use frame_support::traits::{Everything, Nothing};
use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, FrameTransactionalProcessor};
use pezframe_support::traits::{Everything, Nothing};
use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, PezframeTransactionalProcessor};
use xcm_executor::Config;
use crate::xcm_mock::relay_chain::{RuntimeCall, XcmPallet};
use crate::xcm_mock::relay_chain::{RuntimeCall, XcmPezpallet};
// Generated from `decl_test_network!`
pub type XcmRouter = EnsureDecodableXcm<crate::xcm_mock::RelayChainXcmRouter>;
@@ -19,7 +19,7 @@ impl Config for XcmConfig {
type Aliasers = Nothing;
type AssetClaims = ();
type AssetExchanger = ();
type AssetLocker = XcmPallet;
type AssetLocker = XcmPezpallet;
type AssetTransactor = asset_transactor::AssetTransactor;
type AssetTrap = ();
type Barrier = barrier::Barrier;
@@ -33,17 +33,17 @@ impl Config for XcmConfig {
type MaxAssetsIntoHolding = constants::MaxAssetsIntoHolding;
type MessageExporter = ();
type OriginConverter = origin_converter::OriginConverter;
type PalletInstancesInfo = ();
type PezpalletInstancesInfo = ();
type ResponseHandler = ();
type RuntimeCall = RuntimeCall;
type SafeCallFilter = Everything;
type SubscriptionService = ();
type Trader = FixedRateOfFungible<constants::TokensPerSecondPerByte, ()>;
type TransactionalProcessor = FrameTransactionalProcessor;
type TransactionalProcessor = PezframeTransactionalProcessor;
type UniversalAliases = Nothing;
type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher;
type XcmEventEmitter = XcmPallet;
type XcmRecorder = XcmPallet;
type XcmEventEmitter = XcmPezpallet;
type XcmRecorder = XcmPezpallet;
type XcmSender = XcmRouter;
}
@@ -1,7 +1,7 @@
use polkadot_parachain_primitives::primitives::Id as ParaId;
use polkadot_runtime_parachains::origin;
use pezkuwi_teyrchain_primitives::primitives::Id as ParaId;
use pezkuwi_runtime_teyrchains::origin;
use xcm_builder::{
ChildParachainAsNative, ChildSystemParachainAsSuperuser, SignedAccountId32AsNative,
ChildTeyrChainAsNative, ChildSystemTeyrChainAsSuperuser, SignedAccountId32AsNative,
SovereignSignedViaLocation,
};
@@ -11,9 +11,9 @@ use crate::xcm_mock::relay_chain::{
type LocalOriginConverter = (
SovereignSignedViaLocation<LocationConverter, RuntimeOrigin>,
ChildParachainAsNative<origin::Origin, RuntimeOrigin>,
ChildTeyrChainAsNative<origin::Origin, RuntimeOrigin>,
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
ChildSystemParachainAsSuperuser<ParaId, RuntimeOrigin>,
ChildSystemTeyrChainAsSuperuser<ParaId, RuntimeOrigin>,
);
pub type OriginConverter = LocalOriginConverter;
@@ -1,4 +1,4 @@
use frame_support::parameter_types;
use pezframe_support::parameter_types;
use xcm::latest::prelude::*;
use xcm_builder::FixedWeightBounds;
@@ -2,12 +2,12 @@ mod xcm_config;
use core::marker::PhantomData;
use evm_runtime_template::configs::xcm_config::SignedToAccountId20;
use frame_support::{
use pezframe_support::{
construct_runtime, derive_impl, parameter_types,
traits::{ConstU128, ContainsPair, Disabled, Everything, Nothing},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
use frame_system::EnsureRoot;
use pezframe_system::EnsureRoot;
use sp_core::ConstU32;
use sp_runtime::traits::{Get, IdentityLookup};
use xcm::latest::prelude::*;
@@ -23,16 +23,16 @@ parameter_types! {
pub const BlockHashCount: u64 = 250;
}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for Runtime {
type AccountData = pezpallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type Block = Block;
type Lookup = IdentityLookup<Self::AccountId>;
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for Runtime {
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
impl pezpallet_balances::Config for Runtime {
type AccountStore = System;
type Balance = Balance;
type ExistentialDeposit = ConstU128<1>;
@@ -65,9 +65,9 @@ parameter_types! {
pub type TrustedLockers = TrustedLockerCase<RelayTokenForRelay>;
impl pallet_xcm::Config for Runtime {
impl pezpallet_xcm::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
// Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`.
type AuthorizedAliasConsideration = Disabled;
type Currency = Balances;
@@ -84,7 +84,7 @@ impl pallet_xcm::Config for Runtime {
type TrustedLockers = TrustedLockers;
type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher;
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = pezpallet_xcm::TestWeightInfo;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmReserveTransferFilter = Everything;
@@ -94,13 +94,13 @@ impl pallet_xcm::Config for Runtime {
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
}
type Block = frame_system::mocking::MockBlock<Runtime>;
type Block = pezframe_system::mocking::MockBlock<Runtime>;
construct_runtime!(
pub struct Runtime {
System: frame_system,
Balances: pallet_balances,
System: pezframe_system,
Balances: pezpallet_balances,
MsgQueue: mock_message_queue,
PolkadotXcm: pallet_xcm,
PezkuwiXcm: pezpallet_xcm,
}
);
@@ -1,6 +1,6 @@
use xcm_builder::{FungibleAdapter, IsConcrete};
use crate::parachain::{
use crate::teyrchain::{
constants::KsmLocation, location_converter::LocationConverter, AccountId, Balances,
};
@@ -1,4 +1,4 @@
use frame_support::traits::Everything;
use pezframe_support::traits::Everything;
use xcm_builder::AllowUnpaidExecutionFrom;
pub type Barrier = AllowUnpaidExecutionFrom<Everything>;
@@ -1,8 +1,8 @@
use frame_support::parameter_types;
use pezframe_support::parameter_types;
use xcm::latest::prelude::*;
use xcm_simulator::mock_message_queue::ParachainId;
use xcm_simulator::mock_message_queue::TeyrChainId;
use crate::xcm_mock::parachain::Runtime;
use crate::xcm_mock::teyrchain::Runtime;
parameter_types! {
pub KsmPerSecondPerByte: (AssetId, u128, u128) = (AssetId(Parent.into()), 1, 1);
@@ -12,5 +12,5 @@ parameter_types! {
parameter_types! {
pub const KsmLocation: Location = Location::parent();
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainId::<Runtime>::get().into())].into();
pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), TeyrChain(TeyrChainId::<Runtime>::get().into())].into();
}
@@ -1,6 +1,6 @@
use xcm_builder::{AccountKey20Aliases, DescribeAllTerminal, DescribeFamily, HashedDescription};
use crate::xcm_mock::parachain::{constants::RelayNetwork, AccountId};
use crate::xcm_mock::teyrchain::{constants::RelayNetwork, AccountId};
type LocationToAccountId = (
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
@@ -5,20 +5,20 @@ pub mod location_converter;
pub mod origin_converter;
pub mod weigher;
use frame_support::traits::{Everything, Nothing};
use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, FrameTransactionalProcessor};
use pezframe_support::traits::{Everything, Nothing};
use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, PezframeTransactionalProcessor};
use crate::xcm_mock::parachain::{MsgQueue, PolkadotXcm, RuntimeCall};
use crate::xcm_mock::teyrchain::{MsgQueue, PezkuwiXcm, RuntimeCall};
// Generated from `decl_test_network!`
pub type XcmRouter = EnsureDecodableXcm<crate::xcm_mock::ParachainXcmRouter<MsgQueue>>;
pub type XcmRouter = EnsureDecodableXcm<crate::xcm_mock::TeyrChainXcmRouter<MsgQueue>>;
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type Aliasers = Nothing;
type AssetClaims = ();
type AssetExchanger = ();
type AssetLocker = PolkadotXcm;
type AssetLocker = PezkuwiXcm;
type AssetTransactor = asset_transactor::AssetTransactor;
type AssetTrap = ();
type Barrier = barrier::Barrier;
@@ -32,17 +32,17 @@ impl xcm_executor::Config for XcmConfig {
type MaxAssetsIntoHolding = constants::MaxAssetsIntoHolding;
type MessageExporter = ();
type OriginConverter = origin_converter::OriginConverter;
type PalletInstancesInfo = ();
type PezpalletInstancesInfo = ();
type ResponseHandler = ();
type RuntimeCall = RuntimeCall;
type SafeCallFilter = Everything;
type SubscriptionService = ();
type Trader = FixedRateOfFungible<constants::KsmPerSecondPerByte, ()>;
type TransactionalProcessor = FrameTransactionalProcessor;
type TransactionalProcessor = PezframeTransactionalProcessor;
type UniversalAliases = Nothing;
type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher;
type XcmEventEmitter = PolkadotXcm;
type XcmRecorder = PolkadotXcm;
type XcmEventEmitter = PezkuwiXcm;
type XcmRecorder = PezkuwiXcm;
type XcmSender = XcmRouter;
}
@@ -1,7 +1,7 @@
use pallet_xcm::XcmPassthrough;
use pezpallet_xcm::XcmPassthrough;
use xcm_builder::{SignedAccountKey20AsNative, SovereignSignedViaLocation};
use crate::xcm_mock::parachain::{
use crate::xcm_mock::teyrchain::{
constants::RelayNetwork, location_converter::LocationConverter, RuntimeOrigin,
};
@@ -1,8 +1,8 @@
use frame_support::parameter_types;
use pezframe_support::parameter_types;
use xcm::latest::prelude::*;
use xcm_builder::FixedWeightBounds;
use crate::xcm_mock::parachain::RuntimeCall;
use crate::xcm_mock::teyrchain::RuntimeCall;
parameter_types! {
pub const UnitWeightCost: Weight = Weight::from_parts(1, 1);
+32 -32
View File
@@ -2,7 +2,7 @@
pub mod xcm_mock;
use frame_support::{assert_ok, weights::Weight};
use pezframe_support::{assert_ok, weights::Weight};
use parity_scale_codec::Encode;
use xcm::prelude::*;
use xcm_mock::*;
@@ -24,13 +24,13 @@ fn remote_account_ids_work() {
fn dmp() {
MockNet::reset();
let remark = parachain::RuntimeCall::System(
frame_system::Call::<parachain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
let remark = teyrchain::RuntimeCall::System(
pezframe_system::Call::<teyrchain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
);
Relay::execute_with(|| {
assert_ok!(RelayChainPalletXcm::send_xcm(
assert_ok!(RelayChainPezpalletXcm::send_xcm(
Here,
Parachain(1),
TeyrChain(1),
Xcm(vec![Transact {
origin_kind: OriginKind::SovereignAccount,
fallback_max_weight: Some(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
@@ -40,10 +40,10 @@ fn dmp() {
});
ParaA::execute_with(|| {
use parachain::{RuntimeEvent, System};
use teyrchain::{RuntimeEvent, System};
assert!(System::events().iter().any(|r| matches!(
r.event,
RuntimeEvent::System(frame_system::Event::Remarked { .. })
RuntimeEvent::System(pezframe_system::Event::Remarked { .. })
)));
});
}
@@ -53,10 +53,10 @@ fn ump() {
MockNet::reset();
let remark = relay_chain::RuntimeCall::System(
frame_system::Call::<relay_chain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
pezframe_system::Call::<relay_chain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
);
ParaA::execute_with(|| {
assert_ok!(ParachainPalletXcm::send_xcm(
assert_ok!(TeyrChainPezpalletXcm::send_xcm(
Here,
Parent,
Xcm(vec![Transact {
@@ -71,7 +71,7 @@ fn ump() {
use relay_chain::{RuntimeEvent, System};
assert!(System::events().iter().any(|r| matches!(
r.event,
RuntimeEvent::System(frame_system::Event::Remarked { .. })
RuntimeEvent::System(pezframe_system::Event::Remarked { .. })
)));
});
}
@@ -80,13 +80,13 @@ fn ump() {
fn xcmp() {
MockNet::reset();
let remark = parachain::RuntimeCall::System(
frame_system::Call::<parachain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
let remark = teyrchain::RuntimeCall::System(
pezframe_system::Call::<teyrchain::Runtime>::remark_with_event { remark: vec![1, 2, 3] },
);
ParaA::execute_with(|| {
assert_ok!(ParachainPalletXcm::send_xcm(
assert_ok!(TeyrChainPezpalletXcm::send_xcm(
Here,
(Parent, Parachain(2)),
(Parent, TeyrChain(2)),
Xcm(vec![Transact {
origin_kind: OriginKind::SovereignAccount,
fallback_max_weight: Some(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
@@ -96,10 +96,10 @@ fn xcmp() {
});
ParaB::execute_with(|| {
use parachain::{RuntimeEvent, System};
use teyrchain::{RuntimeEvent, System};
assert!(System::events().iter().any(|r| matches!(
r.event,
RuntimeEvent::System(frame_system::Event::Remarked { .. })
RuntimeEvent::System(pezframe_system::Event::Remarked { .. })
)));
});
}
@@ -113,13 +113,13 @@ fn remote_locking_and_unlocking() {
ParaB::execute_with(|| {
let message = Xcm(vec![LockAsset {
asset: (Here, locked_amount).into(),
unlocker: Parachain(1).into(),
unlocker: TeyrChain(1).into(),
}]);
assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));
assert_ok!(TeyrChainPezpalletXcm::send_xcm(Here, Parent, message.clone()));
});
Relay::execute_with(|| {
use pallet_balances::{BalanceLock, Reasons};
use pezpallet_balances::{BalanceLock, Reasons};
assert_eq!(
relay_chain::Balances::locks(&child_account_id(2)),
vec![BalanceLock { id: *b"py/xcmlk", amount: locked_amount, reasons: Reasons::All }]
@@ -128,9 +128,9 @@ fn remote_locking_and_unlocking() {
ParaA::execute_with(|| {
assert_eq!(
ReceivedDmp::<parachain::Runtime>::get(),
ReceivedDmp::<teyrchain::Runtime>::get(),
vec![Xcm(vec![NoteUnlockable {
owner: (Parent, Parachain(2)).into(),
owner: (Parent, TeyrChain(2)).into(),
asset: (Parent, locked_amount).into()
}])]
);
@@ -142,11 +142,11 @@ fn remote_locking_and_unlocking() {
asset: (Parent, locked_amount - 50).into(),
locker: Parent.into(),
}]);
assert_ok!(ParachainPalletXcm::send_xcm(Here, (Parent, Parachain(1)), message));
assert_ok!(TeyrChainPezpalletXcm::send_xcm(Here, (Parent, TeyrChain(1)), message));
});
Relay::execute_with(|| {
use pallet_balances::{BalanceLock, Reasons};
use pezpallet_balances::{BalanceLock, Reasons};
// Lock is reduced
assert_eq!(
relay_chain::Balances::locks(&child_account_id(2)),
@@ -160,9 +160,9 @@ fn remote_locking_and_unlocking() {
}
/// Scenario:
/// A parachain transfers funds on the relay chain to another parachain account.
/// A teyrchain transfers funds on the relay chain to another teyrchain account.
///
/// Asserts that the parachain accounts are updated as expected.
/// Asserts that the teyrchain accounts are updated as expected.
#[test]
fn withdraw_and_deposit() {
MockNet::reset();
@@ -173,10 +173,10 @@ fn withdraw_and_deposit() {
let message = Xcm(vec![
WithdrawAsset((Here, send_amount).into()),
buy_execution((Here, send_amount)),
DepositAsset { assets: AllCounted(1).into(), beneficiary: Parachain(2).into() },
DepositAsset { assets: AllCounted(1).into(), beneficiary: TeyrChain(2).into() },
]);
// Send withdraw and deposit
assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));
assert_ok!(TeyrChainPezpalletXcm::send_xcm(Here, Parent, message.clone()));
});
Relay::execute_with(|| {
@@ -192,7 +192,7 @@ fn withdraw_and_deposit() {
}
/// Scenario:
/// A parachain wants to be notified that a transfer worked correctly.
/// A teyrchain wants to be notified that a transfer worked correctly.
/// It sends a `QueryHolding` after the deposit to get notified on success.
///
/// Asserts that the balances are updated correctly and the expected XCM is sent.
@@ -208,10 +208,10 @@ fn query_holding() {
let message = Xcm(vec![
WithdrawAsset((Here, send_amount).into()),
buy_execution((Here, send_amount)),
DepositAsset { assets: AllCounted(1).into(), beneficiary: Parachain(2).into() },
DepositAsset { assets: AllCounted(1).into(), beneficiary: TeyrChain(2).into() },
ReportHolding {
response_info: QueryResponseInfo {
destination: Parachain(1).into(),
destination: TeyrChain(1).into(),
query_id: query_id_set,
max_weight: Weight::from_parts(1_000_000_000, 1024 * 1024),
},
@@ -219,7 +219,7 @@ fn query_holding() {
},
]);
// Send withdraw and deposit with query holding
assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone(),));
assert_ok!(TeyrChainPezpalletXcm::send_xcm(Here, Parent, message.clone(),));
});
// Check that transfer was executed
@@ -239,7 +239,7 @@ fn query_holding() {
// Check that QueryResponse message was received
ParaA::execute_with(|| {
assert_eq!(
ReceivedDmp::<parachain::Runtime>::get(),
ReceivedDmp::<teyrchain::Runtime>::get(),
vec![Xcm(vec![QueryResponse {
query_id: query_id_set,
response: Response::Assets(Assets::new()),
+30 -30
View File
@@ -19,43 +19,43 @@ quinn-proto = { version = "0.9.6", features = [ "arbitrary" ] }
ziggy = { workspace = true }
evm-runtime-template = { path = "../runtime" }
parachains-common = { workspace = true }
teyrchains-common = { workspace = true }
parity-scale-codec = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-runtime = { workspace = true }
sp-state-machine = { workspace = true }
pallet-balances = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-multisig = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-utility = { workspace = true }
pallet-whitelist = { workspace = true }
pezpallet-balances = { workspace = true }
pezpallet-collator-selection = { workspace = true }
pezpallet-multisig = { workspace = true }
pezpallet-scheduler = { workspace = true }
pezpallet-sudo = { workspace = true }
pezpallet-timestamp = { workspace = true }
pezpallet-utility = { workspace = true }
pezpallet-whitelist = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pezpallet-teyrchain-system = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-primitives-teyrchain-inherent = { workspace = true }
cumulus-test-relay-sproof-builder = { workspace = true }
[features]
default = [ "std", "try-runtime" ]
std = [
"evm-runtime-template/std",
"frame-support/std",
"pallet-collator-selection/std",
"pallet-multisig/std",
"pallet-scheduler/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-utility/std",
"pallet-whitelist/std",
"pezframe-support/std",
"pezpallet-collator-selection/std",
"pezpallet-multisig/std",
"pezpallet-scheduler/std",
"pezpallet-sudo/std",
"pezpallet-timestamp/std",
"pezpallet-utility/std",
"pezpallet-whitelist/std",
"parity-scale-codec/std",
"sp-consensus-aura/std",
"sp-runtime/std",
@@ -63,15 +63,15 @@ std = [
tanssi = []
try-runtime = [
"evm-runtime-template/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-multisig/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-utility/try-runtime",
"pallet-whitelist/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezpallet-collator-selection/try-runtime",
"pezpallet-multisig/try-runtime",
"pezpallet-scheduler/try-runtime",
"pezpallet-sudo/try-runtime",
"pezpallet-timestamp/try-runtime",
"pezpallet-utility/try-runtime",
"pezpallet-whitelist/try-runtime",
"sp-runtime/try-runtime",
]
+36 -36
View File
@@ -5,18 +5,18 @@ use std::{
// Local Imports
use evm_runtime_template::{
constants::SLOT_DURATION, AccountId, AllPalletsWithSystem, Balance, Balances, EVMChainIdConfig,
constants::SLOT_DURATION, AccountId, AllPezpalletsWithSystem, Balance, Balances, EVMChainIdConfig,
Executive, Runtime, RuntimeCall, RuntimeOrigin, SudoConfig, UncheckedExtrinsic,
};
#[cfg(not(feature = "tanssi"))]
use frame_support::traits::Get;
use frame_support::{
use pezframe_support::traits::Get;
use pezframe_support::{
dispatch::GetDispatchInfo,
traits::{IntegrityTest, TryState, TryStateSelect},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
use frame_system::Account;
use pallet_balances::{Holds, TotalIssuance};
use pezframe_system::Account;
use pezpallet_balances::{Holds, TotalIssuance};
use parity_scale_codec::{DecodeLimit, Encode};
use sp_consensus_aura::{Slot, AURA_ENGINE_ID};
use sp_runtime::{
@@ -59,9 +59,9 @@ fn generate_genesis(accounts: &[AccountId]) -> Storage {
candidacy_bond: 1 << 57,
desired_candidates: 1,
},
parachain_info: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: Default::default(),
teyrchain_info: Default::default(),
teyrchain_system: Default::default(),
pezkuwi_xcm: Default::default(),
assets: Default::default(),
transaction_payment: Default::default(),
sudo: SudoConfig { key: Some(root) },
@@ -171,14 +171,14 @@ fn initialize_block(block: u32) {
// We apply the timestamp extrinsic for the current block.
Executive::apply_extrinsic(UncheckedExtrinsic::new_bare(RuntimeCall::Timestamp(
pallet_timestamp::Call::set { now: current_timestamp },
pezpallet_timestamp::Call::set { now: current_timestamp },
)))
.unwrap()
.unwrap();
let parachain_validation_data = {
let teyrchain_validation_data = {
use cumulus_primitives_core::{relay_chain::HeadData, PersistedValidationData};
use cumulus_primitives_parachain_inherent::ParachainInherentData;
use cumulus_primitives_teyrchain_inherent::TeyrChainInherentData;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
let parent_head = HeadData(prev_header.clone().unwrap_or(parent_header.clone()).encode());
@@ -191,7 +191,7 @@ fn initialize_block(block: u32) {
let (relay_parent_storage_root, relay_chain_state) =
sproof_builder.into_state_root_and_proof();
let data = ParachainInherentData {
let data = TeyrChainInherentData {
validation_data: PersistedValidationData {
parent_head,
relay_parent_number: block,
@@ -202,11 +202,11 @@ fn initialize_block(block: u32) {
downward_messages: Default::default(),
horizontal_messages: Default::default(),
};
cumulus_pallet_parachain_system::Call::set_validation_data { data }
cumulus_pezpallet_teyrchain_system::Call::set_validation_data { data }
};
Executive::apply_extrinsic(UncheckedExtrinsic::new_bare(RuntimeCall::ParachainSystem(
parachain_validation_data,
Executive::apply_extrinsic(UncheckedExtrinsic::new_bare(RuntimeCall::TeyrChainSystem(
teyrchain_validation_data,
)))
.unwrap()
.unwrap();
@@ -218,36 +218,36 @@ fn recursive_call_filter(call: &RuntimeCall, origin: usize) -> bool {
match call {
//recursion
RuntimeCall::Sudo(
pallet_sudo::Call::sudo { call }
| pallet_sudo::Call::sudo_unchecked_weight { call, weight: _ },
pezpallet_sudo::Call::sudo { call }
| pezpallet_sudo::Call::sudo_unchecked_weight { call, weight: _ },
) if origin == 0 => recursive_call_filter(call, origin),
RuntimeCall::Utility(
pallet_utility::Call::with_weight { call, weight: _ }
| pallet_utility::Call::dispatch_as { as_origin: _, call }
| pallet_utility::Call::as_derivative { index: _, call },
pezpallet_utility::Call::with_weight { call, weight: _ }
| pezpallet_utility::Call::dispatch_as { as_origin: _, call }
| pezpallet_utility::Call::as_derivative { index: _, call },
) => recursive_call_filter(call, origin),
RuntimeCall::Utility(
pallet_utility::Call::force_batch { calls }
| pallet_utility::Call::batch { calls }
| pallet_utility::Call::batch_all { calls },
pezpallet_utility::Call::force_batch { calls }
| pezpallet_utility::Call::batch { calls }
| pezpallet_utility::Call::batch_all { calls },
) => calls.iter().all(|call| recursive_call_filter(call, origin)),
RuntimeCall::Scheduler(
pallet_scheduler::Call::schedule_named_after {
pezpallet_scheduler::Call::schedule_named_after {
id: _,
after: _,
maybe_periodic: _,
priority: _,
call,
}
| pallet_scheduler::Call::schedule { when: _, maybe_periodic: _, priority: _, call }
| pallet_scheduler::Call::schedule_named {
| pezpallet_scheduler::Call::schedule { when: _, maybe_periodic: _, priority: _, call }
| pezpallet_scheduler::Call::schedule_named {
when: _,
id: _,
maybe_periodic: _,
priority: _,
call,
}
| pallet_scheduler::Call::schedule_after {
| pezpallet_scheduler::Call::schedule_after {
after: _,
maybe_periodic: _,
priority: _,
@@ -255,8 +255,8 @@ fn recursive_call_filter(call: &RuntimeCall, origin: usize) -> bool {
},
) => recursive_call_filter(call, origin),
RuntimeCall::Multisig(
pallet_multisig::Call::as_multi_threshold_1 { other_signatories: _, call }
| pallet_multisig::Call::as_multi {
pezpallet_multisig::Call::as_multi_threshold_1 { other_signatories: _, call }
| pezpallet_multisig::Call::as_multi {
threshold: _,
other_signatories: _,
maybe_timepoint: _,
@@ -265,21 +265,21 @@ fn recursive_call_filter(call: &RuntimeCall, origin: usize) -> bool {
},
) => recursive_call_filter(call, origin),
RuntimeCall::Whitelist(
pallet_whitelist::Call::dispatch_whitelisted_call_with_preimage { call },
pezpallet_whitelist::Call::dispatch_whitelisted_call_with_preimage { call },
) => recursive_call_filter(call, origin),
// restrictions
RuntimeCall::Sudo(_) if origin != 0 => false,
RuntimeCall::System(
frame_system::Call::set_code { .. } | frame_system::Call::kill_prefix { .. },
pezframe_system::Call::set_code { .. } | pezframe_system::Call::kill_prefix { .. },
) => false,
#[cfg(not(feature = "tanssi"))]
RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max },
pezpallet_collator_selection::Call::set_desired_candidates { max },
) =>
*max < <<Runtime as pallet_collator_selection::Config>::MaxCandidates as Get<u32>>::get(
*max < <<Runtime as pezpallet_collator_selection::Config>::MaxCandidates as Get<u32>>::get(
),
RuntimeCall::Balances(pallet_balances::Call::force_adjust_total_issuance { .. }) => false,
RuntimeCall::Balances(pezpallet_balances::Call::force_adjust_total_issuance { .. }) => false,
_ => true,
}
@@ -309,8 +309,8 @@ fn check_invariants(block: u32, initial_total_issuance: Balance) {
assert_eq!(total_issuance, counted_issuance);
assert!(total_issuance <= initial_total_issuance);
// We run all developer-defined integrity tests
AllPalletsWithSystem::integrity_test();
AllPalletsWithSystem::try_state(block, TryStateSelect::All).unwrap();
AllPezpalletsWithSystem::integrity_test();
AllPezpalletsWithSystem::try_state(block, TryStateSelect::All).unwrap();
}
fn main() {