Skip to content
Snippets Groups Projects
Unverified Commit a814f557 authored by Oliver Tale-Yazdi's avatar Oliver Tale-Yazdi Committed by GitHub
Browse files

[AHM] Make more stuff public (#7802)


Make some more stuff public that will be useful for AHM to reduce code
duplication.

---------

Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
parent 9a8061e6
No related merge requests found
Pipeline #517943 waiting for manual action with stages
in 1 hour, 7 minutes, and 59 seconds
title: '[AHM] child bounties and recovery: make more stuff public'
doc:
- audience: Runtime Dev
description: |
Make some items in the child-bounties and recovery pallet public to reduce code-duplication for
the Asset Hub migration.
crates:
- name: pallet-child-bounties
bump: minor
- name: pallet-recovery
bump: minor
......@@ -88,26 +88,26 @@ pub use weights::WeightInfo;
pub use pallet::*;
type BalanceOf<T> = pallet_treasury::BalanceOf<T>;
type BountiesError<T> = pallet_bounties::Error<T>;
type BountyIndex = pallet_bounties::BountyIndex;
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
type BlockNumberFor<T> =
pub type BalanceOf<T> = pallet_treasury::BalanceOf<T>;
pub type BountiesError<T> = pallet_bounties::Error<T>;
pub type BountyIndex = pallet_bounties::BountyIndex;
pub type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
pub type BlockNumberFor<T> =
<<T as pallet_treasury::Config>::BlockNumberProvider as BlockNumberProvider>::BlockNumber;
/// A child bounty proposal.
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub struct ChildBounty<AccountId, Balance, BlockNumber> {
/// The parent of this child-bounty.
parent_bounty: BountyIndex,
pub parent_bounty: BountyIndex,
/// The (total) amount that should be paid if this child-bounty is rewarded.
value: Balance,
pub value: Balance,
/// The child bounty curator fee.
fee: Balance,
pub fee: Balance,
/// The deposit of child-bounty curator.
curator_deposit: Balance,
pub curator_deposit: Balance,
/// The status of this child-bounty.
status: ChildBountyStatus<AccountId, BlockNumber>,
pub status: ChildBountyStatus<AccountId, BlockNumber>,
}
/// The status of a child-bounty.
......
......@@ -181,23 +181,24 @@ mod mock;
mod tests;
pub mod weights;
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
type BalanceOf<T> =
pub type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
pub type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
type BlockNumberFromProviderOf<T> =
pub type BlockNumberFromProviderOf<T> =
<<T as Config>::BlockNumberProvider as BlockNumberProvider>::BlockNumber;
type FriendsOf<T> = BoundedVec<<T as frame_system::Config>::AccountId, <T as Config>::MaxFriends>;
pub type FriendsOf<T> =
BoundedVec<<T as frame_system::Config>::AccountId, <T as Config>::MaxFriends>;
/// An active recovery process.
#[derive(Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub struct ActiveRecovery<BlockNumber, Balance, Friends> {
/// The block number when the recovery process started.
created: BlockNumber,
pub created: BlockNumber,
/// The amount held in reserve of the `depositor`,
/// to be returned once this recovery process is closed.
deposit: Balance,
pub deposit: Balance,
/// The friends which have vouched so far. Always sorted.
friends: Friends,
pub friends: Friends,
}
/// Configuration for recovering an account.
......@@ -205,14 +206,14 @@ pub struct ActiveRecovery<BlockNumber, Balance, Friends> {
pub struct RecoveryConfig<BlockNumber, Balance, Friends> {
/// The minimum number of blocks since the start of the recovery process before the account
/// can be recovered.
delay_period: BlockNumber,
pub delay_period: BlockNumber,
/// The amount held in reserve of the `depositor`,
/// to be returned once this configuration is removed.
deposit: Balance,
pub deposit: Balance,
/// The list of friends which can help recover an account. Always sorted.
friends: Friends,
pub friends: Friends,
/// The number of approving friends needed to recover an account.
threshold: u16,
pub threshold: u16,
}
#[frame_support::pallet]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment