Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove some seemingly-unnecessary trait bounds
  • Loading branch information
JoshOrndorff committed Aug 23, 2021
commit 15f1f93c9a2d0c3dbc7add23bd13d852d13538b5
19 changes: 4 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ pub mod pallet {
use crate::weights::WeightInfo;
use frame_support::traits::WithdrawReasons;
use frame_support::{
dispatch::fmt::Debug,
pallet_prelude::*,
traits::{Currency, ExistenceRequirement::AllowDeath},
PalletId,
};
use frame_system::pallet_prelude::*;
use sp_core::crypto::AccountId32;
use sp_runtime::traits::{AccountIdConversion, BlockNumberProvider, Saturating, Verify};
use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned, BlockNumberProvider, Saturating, Verify};
use sp_runtime::{MultiSignature, Perbill};
use sp_std::vec::Vec;
use sp_std::vec;
Expand Down Expand Up @@ -113,26 +112,16 @@ pub mod pallet {
type MinimumReward: Get<BalanceOf<Self>>;
/// The currency in which the rewards will be paid (probably the parachain native currency)
type RewardCurrency: Currency<Self::AccountId>;
// TODO What trait bounds do I need here? I think concretely we would
// be using MultiSigner? Or maybe MultiAccount? I copied these from frame_system
/// The AccountId type contributors used on the relay chain.
type RelayChainAccountId: Parameter
+ Member
+ MaybeSerializeDeserialize
+ Ord
+ Default
+ Debug
//TODO these AccountId32 bounds feel a little extraneous. I wonder if we can remove them.
+ Into<AccountId32>
+ From<AccountId32>;

//TODO do we need at least 32 bit unsigned
/// The type that will be used to track vesting progress
type VestingBlockNumber: sp_runtime::traits::AtLeast32BitUnsigned + Parameter
+ Member
+ MaybeSerializeDeserialize
+ Ord
type VestingBlockNumber: AtLeast32BitUnsigned
+ Parameter
+ Default
+ Debug
+ Into<BalanceOf<Self>>;

/// The notion of time that will be used for vesting. Probably
Expand Down