fix: Complete snowbridge pezpallet rebrand and critical bug fixes

- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs)
- pallet/ directories → pezpallet/ (4 locations)
- Fixed pezpallet.rs self-include recursion bug
- Fixed sc-chain-spec hardcoded crate name in derive macro
- Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API)
- Added BizinikiwiConfig type alias for zombienet tests
- Deleted obsolete session state files

Verified: pezsnowbridge-pezpallet-*, pezpallet-staking,
pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
+8 -8
View File
@@ -2,21 +2,21 @@
## Overview
The Oracle pallet provides a decentralized and trustworthy way to bring external, off-chain data onto the
The Oracle pezpallet provides a decentralized and trustworthy way to bring external, off-chain data onto the
blockchain. It allows a configurable set of oracle operators to feed data, such as prices, into the system.
This data can then be used by other pallets.
The pallet is designed to be flexible and can be configured to use different data sources and aggregation
The pezpallet is designed to be flexible and can be configured to use different data sources and aggregation
strategies.
## Key Concepts
- **Oracle Operators**: A set of trusted accounts that are authorized to submit data to the oracle. The pallet
- **Oracle Operators**: A set of trusted accounts that are authorized to submit data to the oracle. The pezpallet
uses the `frame_support::traits::SortedMembers` trait to manage the set of operators. This allows using pallets
like `pezpallet-membership` to manage the oracle members.
- **Data Feeds**: Operators feed data as key-value pairs. The `OracleKey` is used to identify the data being fed
(e.g., a specific currency pair), and the `OracleValue` is the data itself (e.g., the price).
- **Data Aggregation**: The pallet can be configured with a `CombineData` implementation to aggregate the raw
- **Data Aggregation**: The pezpallet can be configured with a `CombineData` implementation to aggregate the raw
values submitted by individual operators into a single, trusted value. A default implementation
`DefaultCombineData` is provided, which takes the median of the values.
- **Timestamped Data**: All data submitted to the oracle is timestamped, allowing consumers of the data to know
@@ -36,22 +36,22 @@ strategies.
### Data Providers
The pallet implements the `DataProvider` and `DataProviderExtended` traits, allowing other pallets to easily
The pezpallet implements the `DataProvider` and `DataProviderExtended` traits, allowing other pallets to easily
consume the oracle data.
## Usage
To use the oracle pallet, you need to:
To use the oracle pezpallet, you need to:
1. **Add it to your runtime's `Cargo.toml`**.
2. **Implement the `Config` trait** for the pallet in your runtime. This includes specifying:
2. **Implement the `Config` trait** for the pezpallet in your runtime. This includes specifying:
- `OnNewData`: A hook to perform actions when new data is received.
- `CombineData`: The data aggregation strategy.
- `Time`: The time provider.
- `OracleKey`, `OracleValue`: The types for the data key and value.
- `RootOperatorAccountId`: An account with sudo-like permissions for the oracle.
- `Members`: The source of oracle operators.
3. **Add the pallet to your runtime's `construct_runtime!` macro**.
3. **Add the pezpallet to your runtime's `construct_runtime!` macro**.
Once configured, authorized operators can call `feed_values` to submit data, and other pallets can use the
`DataProvider` trait to read the aggregated data.