Skip to content

Commit

Permalink
Rename pallet-oracle-data-collection to pallet-oracle-collection (#1671)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm authored Jan 3, 2024
1 parent f967ff6 commit 3f0ca0c
Show file tree
Hide file tree
Showing 25 changed files with 63 additions and 63 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>;
type Block = frame_system::mocking::MockBlock<Runtime>;
Expand Down Expand Up @@ -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,
}
);

Expand Down Expand Up @@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions runtime/altair/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,8 +1340,8 @@ impl pallet_oracle_feed::Config for Runtime {
type WeightInfo = weights::pallet_oracle_feed::WeightInfo<Self>;
}

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<RuntimeOrigin>;
Expand All @@ -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<Self>;
type WeightInfo = weights::pallet_oracle_collection::WeightInfo<Self>;
}

impl pallet_interest_accrual::Config for Runtime {
Expand Down Expand Up @@ -1792,7 +1792,7 @@ construct_runtime!(
ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event<T>} = 114,
TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event<T>} = 115,
OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event<T>} = 116,
OraclePriceCollection: pallet_oracle_data_collection::{Pallet, Call, Storage, Event<T>} = 117,
OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event<T>} = 117,

// XCM
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 120,
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion runtime/altair/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::marker::PhantomData;
use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_oracle_data_collection::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_oracle_collection::WeightInfo for WeightInfo<T> {
fn propose_update_feeders(_: u32) -> Weight {
Weight::zero()
}
Expand Down
8 changes: 4 additions & 4 deletions runtime/centrifuge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1697,8 +1697,8 @@ impl pallet_oracle_feed::Config for Runtime {
type WeightInfo = weights::pallet_oracle_feed::WeightInfo<Self>;
}

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<RuntimeOrigin>;
Expand All @@ -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<Self>;
type WeightInfo = weights::pallet_oracle_collection::WeightInfo<Self>;
}

impl pallet_interest_accrual::Config for Runtime {
Expand Down Expand Up @@ -1898,7 +1898,7 @@ construct_runtime!(
ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event<T>} = 109,
TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event<T>} = 110,
OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event<T>} = 111,
OraclePriceCollection: pallet_oracle_data_collection::{Pallet, Call, Storage, Event<T>} = 112,
OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event<T>} = 112,

// XCM
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 120,
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion runtime/centrifuge/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::marker::PhantomData;
use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_oracle_data_collection::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_oracle_collection::WeightInfo for WeightInfo<T> {
fn propose_update_feeders(_: u32) -> Weight {
Weight::zero()
}
Expand Down
8 changes: 4 additions & 4 deletions runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions runtime/common/src/changes.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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;
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<T: pallet_loans::Config + pallet_oracle_data_collection::Config> Changeable for T {}
pub trait Changeable: pallet_loans::Config + pallet_oracle_collection::Config {}
impl<T: pallet_loans::Config + pallet_oracle_collection::Config> Changeable for T {}

/// A change done in the runtime, shared between pallets
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
Expand Down
8 changes: 4 additions & 4 deletions runtime/development/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 3f0ca0c

Please sign in to comment.