mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Replace T::AccountId with <T::Lookup as StaticLookup>::Source (#11670)
* initial * update * update * update * cargo fmt * update * update benchmarks * AccountIdLookupOf<T> * cargo fmt * fix conflits * cargo fmt * update Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -62,7 +62,7 @@ fn setup_bounty<T: Config<I>, I: 'static>(
|
||||
}
|
||||
|
||||
fn create_bounty<T: Config<I>, I: 'static>(
|
||||
) -> Result<(<T::Lookup as StaticLookup>::Source, BountyIndex), &'static str> {
|
||||
) -> Result<(AccountIdLookupOf<T>, BountyIndex), &'static str> {
|
||||
let (caller, curator, fee, value, reason) =
|
||||
setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
|
||||
let curator_lookup = T::Lookup::unlookup(curator.clone());
|
||||
|
||||
@@ -114,6 +114,8 @@ type PositiveImbalanceOf<T, I = ()> = pallet_treasury::PositiveImbalanceOf<T, I>
|
||||
/// An index of a bounty. Just a `u32`.
|
||||
pub type BountyIndex = u32;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
/// A bounty proposal.
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
||||
pub struct Bounty<AccountId, Balance, BlockNumber> {
|
||||
@@ -381,7 +383,7 @@ pub mod pallet {
|
||||
pub fn propose_curator(
|
||||
origin: OriginFor<T>,
|
||||
#[pallet::compact] bounty_id: BountyIndex,
|
||||
curator: <T::Lookup as StaticLookup>::Source,
|
||||
curator: AccountIdLookupOf<T>,
|
||||
#[pallet::compact] fee: BalanceOf<T, I>,
|
||||
) -> DispatchResult {
|
||||
T::ApproveOrigin::ensure_origin(origin)?;
|
||||
@@ -553,7 +555,7 @@ pub mod pallet {
|
||||
pub fn award_bounty(
|
||||
origin: OriginFor<T>,
|
||||
#[pallet::compact] bounty_id: BountyIndex,
|
||||
beneficiary: <T::Lookup as StaticLookup>::Source,
|
||||
beneficiary: AccountIdLookupOf<T>,
|
||||
) -> DispatchResult {
|
||||
let signer = ensure_signed(origin)?;
|
||||
let beneficiary = T::Lookup::lookup(beneficiary)?;
|
||||
|
||||
Reference in New Issue
Block a user