From 97c01673e59a2c36ff52ab11bc6d05b0d7e92b92 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 3 Jan 2024 16:14:02 +0100 Subject: [PATCH] Rename pallet-oracle-data-collection to pallet-oracle-collection --- Cargo.lock | 12 ++++++------ Cargo.toml | 4 ++-- .../Cargo.toml | 2 +- .../src/benchmarking.rs | 0 .../src/lib.rs | 0 .../src/mock.rs | 6 +++--- .../src/tests.rs | 0 .../src/weights.rs | 0 runtime/altair/Cargo.toml | 8 ++++---- runtime/altair/src/lib.rs | 12 ++++++------ runtime/altair/src/weights/mod.rs | 2 +- ...ata_collection.rs => pallet_oracle_collection.rs} | 2 +- runtime/centrifuge/Cargo.toml | 8 ++++---- runtime/centrifuge/src/lib.rs | 12 ++++++------ runtime/centrifuge/src/weights/mod.rs | 2 +- ...ata_collection.rs => pallet_oracle_collection.rs} | 2 +- runtime/common/Cargo.toml | 8 ++++---- runtime/common/src/changes.rs | 6 +++--- runtime/development/Cargo.toml | 8 ++++---- runtime/development/src/lib.rs | 12 ++++++------ runtime/development/src/weights/mod.rs | 2 +- ...ata_collection.rs => pallet_oracle_collection.rs} | 2 +- runtime/integration-tests/Cargo.toml | 2 +- runtime/integration-tests/src/generic/config.rs | 6 +++--- runtime/integration-tests/src/generic/utils/mod.rs | 8 ++++---- 25 files changed, 63 insertions(+), 63 deletions(-) rename pallets/{oracle-data-collection => oracle-collection}/Cargo.toml (97%) rename pallets/{oracle-data-collection => oracle-collection}/src/benchmarking.rs (100%) rename pallets/{oracle-data-collection => oracle-collection}/src/lib.rs (100%) rename pallets/{oracle-data-collection => oracle-collection}/src/mock.rs (95%) rename pallets/{oracle-data-collection => oracle-collection}/src/tests.rs (100%) rename pallets/{oracle-data-collection => oracle-collection}/src/weights.rs (100%) rename runtime/altair/src/weights/{pallet_oracle_data_collection.rs => pallet_oracle_collection.rs} (81%) rename runtime/centrifuge/src/weights/{pallet_oracle_data_collection.rs => pallet_oracle_collection.rs} (81%) rename runtime/development/src/weights/{pallet_oracle_data_collection.rs => pallet_oracle_collection.rs} (81%) diff --git a/Cargo.lock b/Cargo.lock index fb53867692..90956be429 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,7 +262,7 @@ dependencies = [ "pallet-multisig", "pallet-nft", "pallet-nft-sales", - "pallet-oracle-data-collection", + "pallet-oracle-collection", "pallet-oracle-feed", "pallet-order-book", "pallet-permissions", @@ -1197,7 +1197,7 @@ dependencies = [ "pallet-multisig", "pallet-nft", "pallet-nft-sales", - "pallet-oracle-data-collection", + "pallet-oracle-collection", "pallet-oracle-feed", "pallet-order-book", "pallet-permissions", @@ -2804,7 +2804,7 @@ dependencies = [ "pallet-multisig", "pallet-nft", "pallet-nft-sales", - "pallet-oracle-data-collection", + "pallet-oracle-collection", "pallet-oracle-feed", "pallet-order-book", "pallet-permissions", @@ -8201,7 +8201,7 @@ dependencies = [ ] [[package]] -name = "pallet-oracle-data-collection" +name = "pallet-oracle-collection" version = "1.0.0" dependencies = [ "cfg-mocks", @@ -11427,7 +11427,7 @@ dependencies = [ "pallet-multisig", "pallet-nft", "pallet-nft-sales", - "pallet-oracle-data-collection", + "pallet-oracle-collection", "pallet-oracle-feed", "pallet-order-book", "pallet-permissions", @@ -11544,7 +11544,7 @@ dependencies = [ "pallet-multisig", "pallet-nft", "pallet-nft-sales", - "pallet-oracle-data-collection", + "pallet-oracle-collection", "pallet-oracle-feed", "pallet-order-book", "pallet-permissions", diff --git a/Cargo.toml b/Cargo.toml index 528399ae93..fc6eb1b9e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ members = [ "pallets/nft", "pallets/nft-sales", "pallets/oracle-feed", - "pallets/oracle-data-collection", + "pallets/oracle-collection", "pallets/order-book", "pallets/permissions", "pallets/pool-system", @@ -268,7 +268,7 @@ pallet-migration-manager = { path = "pallets/migration", default-features = fals pallet-nft = { path = "pallets/nft", default-features = false } pallet-nft-sales = { path = "pallets/nft-sales", default-features = false } pallet-oracle-feed = { path = "pallets/oracle-feed", default-features = false } -pallet-oracle-data-collection = { path = "pallets/oracle-data-collection", default-features = false } +pallet-oracle-collection = { path = "pallets/oracle-collection", default-features = false } pallet-order-book = { path = "pallets/order-book", default-features = false } pallet-permissions = { path = "pallets/permissions", default-features = false } pallet-pool-registry = { path = "pallets/pool-registry", default-features = false } diff --git a/pallets/oracle-data-collection/Cargo.toml b/pallets/oracle-collection/Cargo.toml similarity index 97% rename from pallets/oracle-data-collection/Cargo.toml rename to pallets/oracle-collection/Cargo.toml index dac0ced9a8..439e184592 100644 --- a/pallets/oracle-data-collection/Cargo.toml +++ b/pallets/oracle-collection/Cargo.toml @@ -1,6 +1,6 @@ [package] description = "Pallet to collect and aggregate oracle feed values into easy iterable collection" -name = "pallet-oracle-data-collection" +name = "pallet-oracle-collection" version = "1.0.0" authors.workspace = true edition.workspace = true diff --git a/pallets/oracle-data-collection/src/benchmarking.rs b/pallets/oracle-collection/src/benchmarking.rs similarity index 100% rename from pallets/oracle-data-collection/src/benchmarking.rs rename to pallets/oracle-collection/src/benchmarking.rs diff --git a/pallets/oracle-data-collection/src/lib.rs b/pallets/oracle-collection/src/lib.rs similarity index 100% rename from pallets/oracle-data-collection/src/lib.rs rename to pallets/oracle-collection/src/lib.rs diff --git a/pallets/oracle-data-collection/src/mock.rs b/pallets/oracle-collection/src/mock.rs similarity index 95% rename from pallets/oracle-data-collection/src/mock.rs rename to pallets/oracle-collection/src/mock.rs index edbc2de625..1774195efc 100644 --- a/pallets/oracle-data-collection/src/mock.rs +++ b/pallets/oracle-collection/src/mock.rs @@ -8,7 +8,7 @@ use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, }; -use crate::pallet as pallet_oracle_data_collection; +use crate::pallet as pallet_oracle_collection; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -38,7 +38,7 @@ frame_support::construct_runtime!( MockIsAdmin: cfg_mocks::pre_conditions::pallet, MockChangeGuard: cfg_mocks::change_guard::pallet, MockTime: cfg_mocks::time::pallet, - OracleCollection: pallet_oracle_data_collection, + OracleCollection: pallet_oracle_collection, } ); @@ -90,7 +90,7 @@ impl cfg_mocks::time::pallet::Config for Runtime { type Moment = Timestamp; } -impl pallet_oracle_data_collection::Config for Runtime { +impl pallet_oracle_collection::Config for Runtime { type AggregationProvider = crate::util::MedianAggregation; type ChangeGuard = MockChangeGuard; type CollectionId = CollectionId; diff --git a/pallets/oracle-data-collection/src/tests.rs b/pallets/oracle-collection/src/tests.rs similarity index 100% rename from pallets/oracle-data-collection/src/tests.rs rename to pallets/oracle-collection/src/tests.rs diff --git a/pallets/oracle-data-collection/src/weights.rs b/pallets/oracle-collection/src/weights.rs similarity index 100% rename from pallets/oracle-data-collection/src/weights.rs rename to pallets/oracle-collection/src/weights.rs diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index d56d6a6292..2189bd30f0 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -115,7 +115,7 @@ pallet-migration-manager = { workspace = true } pallet-multisig = { workspace = true } pallet-nft = { workspace = true } pallet-nft-sales = { workspace = true } -pallet-oracle-data-collection = { workspace = true } +pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } pallet-order-book = { workspace = true } pallet-permissions = { workspace = true } @@ -244,7 +244,7 @@ std = [ "pallet-multisig/std", "pallet-nft/std", "pallet-nft-sales/std", - "pallet-oracle-data-collection/std", + "pallet-oracle-collection/std", "pallet-oracle-feed/std", "pallet-order-book/std", "pallet-permissions/std", @@ -332,7 +332,7 @@ runtime-benchmarks = [ "pallet-multisig/runtime-benchmarks", "pallet-nft/runtime-benchmarks", "pallet-nft-sales/runtime-benchmarks", - "pallet-oracle-data-collection/runtime-benchmarks", + "pallet-oracle-collection/runtime-benchmarks", "pallet-oracle-feed/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", @@ -420,7 +420,7 @@ try-runtime = [ "pallet-multisig/try-runtime", "pallet-nft/try-runtime", "pallet-nft-sales/try-runtime", - "pallet-oracle-data-collection/try-runtime", + "pallet-oracle-collection/try-runtime", "pallet-oracle-feed/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index cc43b188f6..36dce4e9ce 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1340,8 +1340,8 @@ impl pallet_oracle_feed::Config for Runtime { type WeightInfo = weights::pallet_oracle_feed::WeightInfo; } -impl pallet_oracle_data_collection::Config for Runtime { - type AggregationProvider = pallet_oracle_data_collection::util::MedianAggregation; +impl pallet_oracle_collection::Config for Runtime { + type AggregationProvider = pallet_oracle_collection::util::MedianAggregation; type ChangeGuard = PoolSystem; type CollectionId = PoolId; type FeederId = Feeder; @@ -1356,7 +1356,7 @@ impl pallet_oracle_data_collection::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Time = Timestamp; type Timestamp = Millis; - type WeightInfo = weights::pallet_oracle_data_collection::WeightInfo; + type WeightInfo = weights::pallet_oracle_collection::WeightInfo; } impl pallet_interest_accrual::Config for Runtime { @@ -1792,7 +1792,7 @@ construct_runtime!( ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event} = 114, TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event} = 115, OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 116, - OraclePriceCollection: pallet_oracle_data_collection::{Pallet, Call, Storage, Event} = 117, + OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 117, // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, @@ -2466,7 +2466,7 @@ impl_runtime_apis! { list_benchmark!(list, extra, pallet_liquidity_rewards, LiquidityRewards); list_benchmark!(list, extra, pallet_transfer_allowlist, TransferAllowList); list_benchmark!(list, extra, pallet_oracle_feed, OraclePriceFeed); - list_benchmark!(list, extra, pallet_oracle_data_collection, OraclePriceCollection); + list_benchmark!(list, extra, pallet_oracle_collection, OraclePriceCollection); let storage_info = AllPalletsWithSystem::storage_info(); @@ -2545,7 +2545,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_liquidity_rewards, LiquidityRewards); add_benchmark!(params, batches, pallet_transfer_allowlist, TransferAllowList); add_benchmark!(params, batches, pallet_oracle_feed, OraclePriceFeed); - add_benchmark!(params, batches, pallet_oracle_data_collection, OraclePriceCollection); + add_benchmark!(params, batches, pallet_oracle_collection, OraclePriceCollection); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) diff --git a/runtime/altair/src/weights/mod.rs b/runtime/altair/src/weights/mod.rs index 829fb17c8e..ca250415ab 100644 --- a/runtime/altair/src/weights/mod.rs +++ b/runtime/altair/src/weights/mod.rs @@ -31,7 +31,7 @@ pub mod pallet_loans; pub mod pallet_migration_manager; pub mod pallet_multisig; pub mod pallet_nft_sales; -pub mod pallet_oracle_data_collection; +pub mod pallet_oracle_collection; pub mod pallet_oracle_feed; pub mod pallet_order_book; pub mod pallet_permissions; diff --git a/runtime/altair/src/weights/pallet_oracle_data_collection.rs b/runtime/altair/src/weights/pallet_oracle_collection.rs similarity index 81% rename from runtime/altair/src/weights/pallet_oracle_data_collection.rs rename to runtime/altair/src/weights/pallet_oracle_collection.rs index 980f9168a6..b3bba3c5f8 100644 --- a/runtime/altair/src/weights/pallet_oracle_data_collection.rs +++ b/runtime/altair/src/weights/pallet_oracle_collection.rs @@ -5,7 +5,7 @@ use core::marker::PhantomData; use frame_support::weights::Weight; pub struct WeightInfo(PhantomData); -impl pallet_oracle_data_collection::WeightInfo for WeightInfo { +impl pallet_oracle_collection::WeightInfo for WeightInfo { fn propose_update_feeders(_: u32) -> Weight { Weight::zero() } diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index d7b80cba4c..a2acc5558b 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -115,7 +115,7 @@ pallet-migration-manager = { workspace = true } pallet-multisig = { workspace = true } pallet-nft = { workspace = true } pallet-nft-sales = { workspace = true } -pallet-oracle-data-collection = { workspace = true } +pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } pallet-order-book = { workspace = true } pallet-permissions = { workspace = true } @@ -244,7 +244,7 @@ std = [ "pallet-multisig/std", "pallet-nft/std", "pallet-nft-sales/std", - "pallet-oracle-data-collection/std", + "pallet-oracle-collection/std", "pallet-oracle-feed/std", "pallet-order-book/std", "pallet-permissions/std", @@ -331,7 +331,7 @@ runtime-benchmarks = [ "pallet-multisig/runtime-benchmarks", "pallet-nft/runtime-benchmarks", "pallet-nft-sales/runtime-benchmarks", - "pallet-oracle-data-collection/runtime-benchmarks", + "pallet-oracle-collection/runtime-benchmarks", "pallet-oracle-feed/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", @@ -419,7 +419,7 @@ try-runtime = [ "pallet-multisig/try-runtime", "pallet-nft/try-runtime", "pallet-nft-sales/try-runtime", - "pallet-oracle-data-collection/try-runtime", + "pallet-oracle-collection/try-runtime", "pallet-oracle-feed/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 409dd4a155..0190b95f22 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -1697,8 +1697,8 @@ impl pallet_oracle_feed::Config for Runtime { type WeightInfo = weights::pallet_oracle_feed::WeightInfo; } -impl pallet_oracle_data_collection::Config for Runtime { - type AggregationProvider = pallet_oracle_data_collection::util::MedianAggregation; +impl pallet_oracle_collection::Config for Runtime { + type AggregationProvider = pallet_oracle_collection::util::MedianAggregation; type ChangeGuard = PoolSystem; type CollectionId = PoolId; type FeederId = Feeder; @@ -1713,7 +1713,7 @@ impl pallet_oracle_data_collection::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Time = Timestamp; type Timestamp = Millis; - type WeightInfo = weights::pallet_oracle_data_collection::WeightInfo; + type WeightInfo = weights::pallet_oracle_collection::WeightInfo; } impl pallet_interest_accrual::Config for Runtime { @@ -1898,7 +1898,7 @@ construct_runtime!( ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event} = 109, TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event} = 110, OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 111, - OraclePriceCollection: pallet_oracle_data_collection::{Pallet, Call, Storage, Event} = 112, + OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 112, // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, @@ -2512,7 +2512,7 @@ impl_runtime_apis! { list_benchmark!(list, extra, pallet_liquidity_rewards, LiquidityRewards); list_benchmark!(list, extra, pallet_transfer_allowlist, TransferAllowList); list_benchmark!(list, extra, pallet_oracle_feed, OraclePriceFeed); - list_benchmark!(list, extra, pallet_oracle_data_collection, OraclePriceCollection); + list_benchmark!(list, extra, pallet_oracle_collection, OraclePriceCollection); let storage_info = AllPalletsWithSystem::storage_info(); @@ -2589,7 +2589,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_liquidity_rewards, LiquidityRewards); add_benchmark!(params, batches, pallet_transfer_allowlist, TransferAllowList); add_benchmark!(params, batches, pallet_oracle_feed, OraclePriceFeed); - add_benchmark!(params, batches, pallet_oracle_data_collection, OraclePriceCollection); + add_benchmark!(params, batches, pallet_oracle_collection, OraclePriceCollection); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) diff --git a/runtime/centrifuge/src/weights/mod.rs b/runtime/centrifuge/src/weights/mod.rs index 71c8cfcef7..cffb3664ed 100644 --- a/runtime/centrifuge/src/weights/mod.rs +++ b/runtime/centrifuge/src/weights/mod.rs @@ -30,7 +30,7 @@ pub mod pallet_liquidity_rewards; pub mod pallet_loans; pub mod pallet_migration_manager; pub mod pallet_multisig; -pub mod pallet_oracle_data_collection; +pub mod pallet_oracle_collection; pub mod pallet_oracle_feed; pub mod pallet_order_book; pub mod pallet_permissions; diff --git a/runtime/centrifuge/src/weights/pallet_oracle_data_collection.rs b/runtime/centrifuge/src/weights/pallet_oracle_collection.rs similarity index 81% rename from runtime/centrifuge/src/weights/pallet_oracle_data_collection.rs rename to runtime/centrifuge/src/weights/pallet_oracle_collection.rs index 980f9168a6..b3bba3c5f8 100644 --- a/runtime/centrifuge/src/weights/pallet_oracle_data_collection.rs +++ b/runtime/centrifuge/src/weights/pallet_oracle_collection.rs @@ -5,7 +5,7 @@ use core::marker::PhantomData; use frame_support::weights::Weight; pub struct WeightInfo(PhantomData); -impl pallet_oracle_data_collection::WeightInfo for WeightInfo { +impl pallet_oracle_collection::WeightInfo for WeightInfo { fn propose_update_feeders(_: u32) -> Weight { Weight::zero() } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index b8c6c7a2d5..3e5e4ba914 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -93,7 +93,7 @@ pallet-migration-manager = { workspace = true } pallet-multisig = { workspace = true } pallet-nft = { workspace = true } pallet-nft-sales = { workspace = true } -pallet-oracle-data-collection = { workspace = true } +pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } pallet-order-book = { workspace = true } pallet-permissions = { workspace = true } @@ -230,7 +230,7 @@ std = [ "pallet-multisig/std", "pallet-nft/std", "pallet-nft-sales/std", - "pallet-oracle-data-collection/std", + "pallet-oracle-collection/std", "pallet-oracle-feed/std", "pallet-order-book/std", "pallet-permissions/std", @@ -310,7 +310,7 @@ runtime-benchmarks = [ "pallet-multisig/runtime-benchmarks", "pallet-nft/runtime-benchmarks", "pallet-nft-sales/runtime-benchmarks", - "pallet-oracle-data-collection/runtime-benchmarks", + "pallet-oracle-collection/runtime-benchmarks", "pallet-oracle-feed/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", @@ -387,7 +387,7 @@ try-runtime = [ "pallet-multisig/try-runtime", "pallet-nft/try-runtime", "pallet-nft-sales/try-runtime", - "pallet-oracle-data-collection/try-runtime", + "pallet-oracle-collection/try-runtime", "pallet-oracle-feed/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", diff --git a/runtime/common/src/changes.rs b/runtime/common/src/changes.rs index 3ac182e220..ed617e8567 100644 --- a/runtime/common/src/changes.rs +++ b/runtime/common/src/changes.rs @@ -1,6 +1,6 @@ use frame_support::RuntimeDebug; use pallet_loans::entities::changes::Change as LoansChange; -use pallet_oracle_data_collection::types::Change as OracleCollectionChange; +use pallet_oracle_collection::types::Change as OracleCollectionChange; use pallet_pool_system::pool_types::changes::{PoolChangeProposal, Requirement}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -8,8 +8,8 @@ use sp_runtime::DispatchError; use sp_std::{marker::PhantomData, vec::Vec}; /// Auxiliar type to carry all pallets bounds used by RuntimeChange -pub trait Changeable: pallet_loans::Config + pallet_oracle_data_collection::Config {} -impl Changeable for T {} +pub trait Changeable: pallet_loans::Config + pallet_oracle_collection::Config {} +impl Changeable for T {} /// A change done in the runtime, shared between pallets #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index ba850273cc..4e230ebeac 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -114,7 +114,7 @@ pallet-migration-manager = { workspace = true } pallet-multisig = { workspace = true } pallet-nft = { workspace = true } pallet-nft-sales = { workspace = true } -pallet-oracle-data-collection = { workspace = true } +pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } pallet-order-book = { workspace = true } pallet-permissions = { workspace = true } @@ -242,7 +242,7 @@ std = [ "pallet-multisig/std", "pallet-nft/std", "pallet-nft-sales/std", - "pallet-oracle-data-collection/std", + "pallet-oracle-collection/std", "pallet-oracle-feed/std", "pallet-order-book/std", "pallet-permissions/std", @@ -330,7 +330,7 @@ runtime-benchmarks = [ "pallet-multisig/runtime-benchmarks", "pallet-nft/runtime-benchmarks", "pallet-nft-sales/runtime-benchmarks", - "pallet-oracle-data-collection/runtime-benchmarks", + "pallet-oracle-collection/runtime-benchmarks", "pallet-oracle-feed/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", @@ -418,7 +418,7 @@ try-runtime = [ "pallet-multisig/try-runtime", "pallet-nft/try-runtime", "pallet-nft-sales/try-runtime", - "pallet-oracle-data-collection/try-runtime", + "pallet-oracle-collection/try-runtime", "pallet-oracle-feed/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index edebe5a8a3..b0eb967ff2 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1325,8 +1325,8 @@ impl pallet_oracle_feed::Config for Runtime { type WeightInfo = weights::pallet_oracle_feed::WeightInfo; } -impl pallet_oracle_data_collection::Config for Runtime { - type AggregationProvider = pallet_oracle_data_collection::util::MedianAggregation; +impl pallet_oracle_collection::Config for Runtime { + type AggregationProvider = pallet_oracle_collection::util::MedianAggregation; type ChangeGuard = PoolSystem; type CollectionId = PoolId; type FeederId = Feeder; @@ -1341,7 +1341,7 @@ impl pallet_oracle_data_collection::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Time = Timestamp; type Timestamp = Millis; - type WeightInfo = weights::pallet_oracle_data_collection::WeightInfo; + type WeightInfo = weights::pallet_oracle_collection::WeightInfo; } impl pallet_interest_accrual::Config for Runtime { @@ -1889,7 +1889,7 @@ construct_runtime!( OrderBook: pallet_order_book::{Pallet, Call, Storage, Event} = 116, ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event} = 117, OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 118, - OraclePriceCollection: pallet_oracle_data_collection::{Pallet, Call, Storage, Event} = 119, + OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 119, // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, @@ -2607,7 +2607,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_investments, Investments); add_benchmark!(params, batches, pallet_xcm, PolkadotXcm); add_benchmark!(params, batches, pallet_oracle_feed, OraclePriceFeed); - add_benchmark!(params, batches, pallet_oracle_data_collection, OraclePriceCollection); + add_benchmark!(params, batches, pallet_oracle_collection, OraclePriceCollection); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) @@ -2666,7 +2666,7 @@ impl_runtime_apis! { list_benchmark!(list, extra, pallet_investments, Investments); list_benchmark!(list, extra, pallet_xcm, PolkadotXcm); list_benchmark!(list, extra, pallet_oracle_feed, OraclePriceFeed); - list_benchmark!(list, extra, pallet_oracle_data_collection, OraclePriceCollection); + list_benchmark!(list, extra, pallet_oracle_collection, OraclePriceCollection); let storage_info = AllPalletsWithSystem::storage_info(); diff --git a/runtime/development/src/weights/mod.rs b/runtime/development/src/weights/mod.rs index d01e48c404..35dfe0dd1d 100644 --- a/runtime/development/src/weights/mod.rs +++ b/runtime/development/src/weights/mod.rs @@ -30,7 +30,7 @@ pub mod pallet_loans; pub mod pallet_migration_manager; pub mod pallet_multisig; pub mod pallet_nft_sales; -pub mod pallet_oracle_data_collection; +pub mod pallet_oracle_collection; pub mod pallet_oracle_feed; pub mod pallet_order_book; pub mod pallet_permissions; diff --git a/runtime/development/src/weights/pallet_oracle_data_collection.rs b/runtime/development/src/weights/pallet_oracle_collection.rs similarity index 81% rename from runtime/development/src/weights/pallet_oracle_data_collection.rs rename to runtime/development/src/weights/pallet_oracle_collection.rs index 980f9168a6..b3bba3c5f8 100644 --- a/runtime/development/src/weights/pallet_oracle_data_collection.rs +++ b/runtime/development/src/weights/pallet_oracle_collection.rs @@ -5,7 +5,7 @@ use core::marker::PhantomData; use frame_support::weights::Weight; pub struct WeightInfo(PhantomData); -impl pallet_oracle_data_collection::WeightInfo for WeightInfo { +impl pallet_oracle_collection::WeightInfo for WeightInfo { fn propose_update_feeders(_: u32) -> Weight { Weight::zero() } diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index c572e775ad..3cf7d7d2c4 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -128,7 +128,7 @@ pallet-migration-manager = { workspace = true, features = ["std"] } pallet-multisig = { workspace = true, features = ["std"] } pallet-nft = { workspace = true, features = ["std"] } pallet-nft-sales = { workspace = true, features = ["std"] } -pallet-oracle-data-collection = { workspace = true, features = ["std"] } +pallet-oracle-collection = { workspace = true, features = ["std"] } pallet-oracle-feed = { workspace = true, features = ["std"] } pallet-order-book = { workspace = true, features = ["std"] } pallet-permissions = { workspace = true, features = ["std"] } diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index 865f3a620d..a4728f8c70 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -104,7 +104,7 @@ pub trait Runtime: > + cumulus_pallet_parachain_system::Config + parachain_info::Config + pallet_oracle_feed::Config - + pallet_oracle_data_collection::Config< + + pallet_oracle_collection::Config< OracleKey = OracleKey, OracleValue = Balance, FeederId = Feeder, @@ -159,7 +159,7 @@ pub trait Runtime: + From> + From> + From> - + From> + + From> + From> + From> + From> @@ -189,7 +189,7 @@ pub trait Runtime: + From> + From> + From> - + From> + + From> + From> + From> + From> diff --git a/runtime/integration-tests/src/generic/utils/mod.rs b/runtime/integration-tests/src/generic/utils/mod.rs index 69deac0a7f..7ebeb638fe 100644 --- a/runtime/integration-tests/src/generic/utils/mod.rs +++ b/runtime/integration-tests/src/generic/utils/mod.rs @@ -219,17 +219,17 @@ pub mod oracle { price_id: OracleKey, feeders: impl IntoIterator>, ) { - pallet_oracle_data_collection::Pallet::::propose_update_feeders( + pallet_oracle_collection::Pallet::::propose_update_feeders( RawOrigin::Signed(admin.clone()).into(), pool_id, price_id, - pallet_oracle_data_collection::util::feeders_from(feeders).unwrap(), + pallet_oracle_collection::util::feeders_from(feeders).unwrap(), ) .unwrap(); let change_id = last_change_id::(); - pallet_oracle_data_collection::Pallet::::apply_update_feeders( + pallet_oracle_collection::Pallet::::apply_update_feeders( RawOrigin::Signed(admin).into(), //or any account pool_id, change_id, @@ -238,7 +238,7 @@ pub mod oracle { } pub fn update_collection(any: AccountId, pool_id: PoolId) { - pallet_oracle_data_collection::Pallet::::update_collection( + pallet_oracle_collection::Pallet::::update_collection( RawOrigin::Signed(any).into(), pool_id, )