diff --git a/Cargo.toml b/Cargo.toml index a7aa62f734..fb9adb372e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,3 +63,21 @@ substrate-subxt-client = { version = "0.3.0", path = "client" } tempdir = "0.3.7" test-node = { path = "test-node" } wabt = "0.10.0" + +[patch.crates-io] +frame-metadata = { git = "https://github.com/paritytech/substrate" } +frame-support = { git = "https://github.com/paritytech/substrate" } +sp-runtime = { git = "https://github.com/paritytech/substrate" } +sp-version = { git = "https://github.com/paritytech/substrate" } +pallet-indices = { git = "https://github.com/paritytech/substrate" } +sp-rpc = { git = "https://github.com/paritytech/substrate" } +sp-core = { git = "https://github.com/paritytech/substrate" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate" } +sp-std = { git = "https://github.com/paritytech/substrate" } +application-crypto = { git = "https://github.com/paritytech/substrate", package = "sp-application-crypto", default-features = false } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate" } +pallet-im-online = { git = "https://github.com/paritytech/substrate" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate" } +pallet-staking = { git = "https://github.com/paritytech/substrate" } diff --git a/src/frame/staking.rs b/src/frame/staking.rs index 8df4bc7491..25a4d4e7cf 100644 --- a/src/frame/staking.rs +++ b/src/frame/staking.rs @@ -76,7 +76,7 @@ pub struct ErasRewardPointsStore { #[derive(Clone, Encode, Decode, Debug, Call)] pub struct SetPayeeCall { /// The payee - pub payee: RewardDestination, + pub payee: RewardDestination, /// Marker for the runtime pub _runtime: PhantomData, } @@ -183,7 +183,7 @@ pub struct LedgerStore { /// Where the reward payment should be made. Keyed by stash. #[derive(Encode, Copy, Clone, Debug, Hash, PartialEq, Eq, Ord, PartialOrd, Store)] pub struct PayeeStore { - #[store(returns = RewardDestination)] + #[store(returns = RewardDestination)] /// Tٗhe stash account pub stash: T::AccountId, } @@ -257,6 +257,45 @@ pub struct ActiveEraStore { pub _runtime: PhantomData, } +/// Declare no desire to either validate or nominate. +/// +/// Effects will be felt at the beginning of the next era. +/// +/// The dispatch origin for this call must be _Signed_ by the controller, not the stash. +/// And, it can be only called when [`EraElectionStatus`] is `Closed`. +/// +/// # +/// - Independent of the arguments. Insignificant complexity. +/// - Contains one read. +/// - Writes are limited to the `origin` account key. +/// -------- +/// Base Weight: 16.53 µs +/// DB Weight: +/// - Read: EraElectionStatus, Ledger +/// - Write: Validators, Nominators +/// # +#[derive(Debug, Call, Encode)] +pub struct ChillCall { + /// Runtime marker + pub _runtime: PhantomData, +} + +impl Default for ChillCall { + fn default() -> Self { + Self { + _runtime: PhantomData, + } + } +} +impl Clone for ChillCall { + fn clone(&self) -> Self { + Self { + _runtime: self._runtime, + } + } +} +impl Copy for ChillCall {} + /// Declare the desire to validate for the origin controller. /// /// Effects will be felt at the beginning of the next era. @@ -276,9 +315,9 @@ pub struct ActiveEraStore { /// # #[derive(Clone, Debug, PartialEq, Call, Encode)] pub struct ValidateCall { - /// Runtime marker. + /// Runtime marker pub _runtime: PhantomData, - /// Validation preferences. + /// Validation preferences pub prefs: ValidatorPrefs, }