Skip to content

Commit

Permalink
keystore: Rename pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Jun 21, 2022
1 parent efe69b9 commit 5b243c3
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 44 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ members = [
"pallets/pools",
"pallets/loans",
"pallets/permissions",
"pallets/proxy-keystore",
"pallets/keystore",
"libs/common-traits",
"libs/common-types",
"libs/proofs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = 'pallet-proxy-keystore'
name = 'pallet-keystore'
authors = ["Centrifuge <[email protected]>"]
description = 'Proxy keystore pallet for runtime'
description = 'Keystore pallet for runtime'
edition = '2018'
license = "LGPL-3.0"
repository = "https://github.com/centrifuge/centrifuge-chain/pallets/proxy-keystore"
repository = "https://github.com/centrifuge/centrifuge-chain/pallets/keystore"
version = '1.0.0'

[package.metadata.docs.rs]
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use crate::{self as pallet_proxy_keystore, Config};
use crate::{self as pallet_keystore, Config};

use frame_support::parameter_types;
use frame_support::traits::EnsureOneOf;
Expand All @@ -33,7 +33,7 @@ frame_support::construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
ProxyKeystore: pallet_proxy_keystore::{Pallet, Call, Storage, Event<T>},
ProxyKeystore: pallet_keystore::{Pallet, Call, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Storage, Event<T>},
}
);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Autogenerated weights for pallet_proxy_keystore
//! Autogenerated weights for pallet_keystore
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
Expand All @@ -11,12 +11,12 @@
// --chain=development
// --steps=50
// --repeat=20
// --pallet=pallet-proxy-keystore
// --pallet=pallet-keystore
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./pallets/proxy-keystore/src/weights.rs
// --output=./pallets/keystore/src/weights.rs
// --template=./scripts/frame-weight-template.hbs

#![allow(unused_parens)]
Expand All @@ -28,14 +28,14 @@ use frame_support::{
};
use sp_std::marker::PhantomData;

/// Weight functions needed for pallet_proxy_keystore.
/// Weight functions needed for pallet_keystore.
pub trait WeightInfo {
fn add_keys(n: u32) -> Weight;
fn revoke_keys(n: u32) -> Weight;
fn set_deposit() -> Weight;
}

/// Weights for pallet_proxy_keystore using the Substrate node and recommended hardware.
/// Weights for pallet_keystore using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn add_keys(n: u32) -> Weight {
Expand Down
6 changes: 3 additions & 3 deletions runtime/development/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pallet-permissions = { path = "../../pallets/permissions", default-features = fa
pallet-nft-sales = { path = "../../pallets/nft-sales", default-features = false }
pallet-bridge = { path = "../../pallets/bridge", default-features = false }
pallet-nft = { path = "../../pallets/nft", default-features = false }
pallet-proxy-keystore = { path = "../../pallets/proxy-keystore", default-features = false }
pallet-keystore = { path = "../../pallets/keystore", default-features = false }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
Expand Down Expand Up @@ -221,7 +221,7 @@ std = [
"chainbridge/std",
"pallet-nft/std",
"pallet-bridge/std",
"pallet-proxy-keystore/std",
"pallet-keystore/std",
]

runtime-benchmarks = [
Expand Down Expand Up @@ -249,7 +249,7 @@ runtime-benchmarks = [
"chainbridge/runtime-benchmarks",
"pallet-uniques/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"pallet-proxy-keystore/runtime-benchmarks",
"pallet-keystore/runtime-benchmarks",
]

# A feature that should be enabled when the runtime should be build for on-chain
Expand Down
14 changes: 7 additions & 7 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pub enum ProxyType {
Price,
Invest,
ProxyManagement,
ProxyKeystoreManagement,
KeystoreManagement,
NFTMint,
NFTTransfer,
NFTManagement,
Expand Down Expand Up @@ -415,10 +415,10 @@ impl InstanceFilter<Call> for ProxyType {
c,
Call::Proxy(..)
),
ProxyType::ProxyKeystoreManagement => matches!(
ProxyType::KeystoreManagement => matches!(
c,
Call::ProxyKeystore(pallet_proxy_keystore::Call::add_keys{..}) |
Call::ProxyKeystore(pallet_proxy_keystore::Call::revoke_keys{..})
Call::Keystore(pallet_keystore::Call::add_keys{..}) |
Call::Keystore(pallet_keystore::Call::revoke_keys{..})
),
ProxyType::NFTMint => matches!(
c,
Expand Down Expand Up @@ -1290,14 +1290,14 @@ parameter_types! {
pub const DefaultKeyDeposit: Balance = 100 * CFG;
}

impl pallet_proxy_keystore::pallet::Config for Runtime {
impl pallet_keystore::pallet::Config for Runtime {
type Event = Event;
type Balance = Balance;
type Currency = Balances;
type MaxKeys = MaxKeys;
type DefaultKeyDeposit = DefaultKeyDeposit;
type AdminOrigin = EnsureRootOr<AllOfCouncil>;
type WeightInfo = weights::pallet_proxy_keystore::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_keystore::SubstrateWeight<Runtime>;
}

// Frame Order in this block dictates the index of each one in the metadata
Expand Down Expand Up @@ -1356,7 +1356,7 @@ construct_runtime!(
NftSales: pallet_nft_sales::{Pallet, Call, Storage, Event<T>} = 100,
Nfts: pallet_nft::{Pallet, Call, Event<T>} = 103,
Bridge: pallet_bridge::{Pallet, Call, Storage, Config<T>, Event<T>} = 101,
ProxyKeystore: pallet_proxy_keystore::{Pallet, Call, Storage, Event<T>} = 102,
Keystore: pallet_keystore::{Pallet, Call, Storage, Event<T>} = 102,

// XCM
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 120,
Expand Down
2 changes: 1 addition & 1 deletion runtime/development/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ pub mod pallet_migration_manager;
pub mod pallet_nft_sales;
pub mod pallet_permissions;
pub mod pallet_pools;
pub mod pallet_proxy_keystore;
pub mod pallet_keystore;
pub mod pallet_restricted_tokens;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Autogenerated weights for pallet_proxy_keystore
//! Autogenerated weights for pallet_keystore
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
Expand All @@ -11,12 +11,12 @@
// --chain=development
// --steps=50
// --repeat=20
// --pallet=pallet-proxy-keystore
// --pallet=pallet-keystore
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./runtime/development/src/weights/pallet_proxy_keystore.rs
// --output=./runtime/development/src/weights/pallet_keystore.rs
// --template=./scripts/frame-weight-template.hbs

#![allow(unused_parens)]
Expand All @@ -26,7 +26,7 @@ use frame_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
};
use pallet_proxy_keystore::weights::WeightInfo;
use pallet_keystore::weights::WeightInfo;
use sp_std::marker::PhantomData;

/// Weights for pallet_proxy_keystore using the Substrate node and recommended hardware.
Expand Down

0 comments on commit 5b243c3

Please sign in to comment.