mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 14:01:06 +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:
@@ -192,6 +192,8 @@ pub use weights::WeightInfo;
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::*;
|
||||
@@ -275,7 +277,7 @@ pub mod pallet {
|
||||
#[pallet::weight(T::WeightInfo::transfer())]
|
||||
pub fn transfer(
|
||||
origin: OriginFor<T>,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
#[pallet::compact] value: T::Balance,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
let transactor = ensure_signed(origin)?;
|
||||
@@ -303,7 +305,7 @@ pub mod pallet {
|
||||
)]
|
||||
pub fn set_balance(
|
||||
origin: OriginFor<T>,
|
||||
who: <T::Lookup as StaticLookup>::Source,
|
||||
who: AccountIdLookupOf<T>,
|
||||
#[pallet::compact] new_free: T::Balance,
|
||||
#[pallet::compact] new_reserved: T::Balance,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
@@ -353,8 +355,8 @@ pub mod pallet {
|
||||
#[pallet::weight(T::WeightInfo::force_transfer())]
|
||||
pub fn force_transfer(
|
||||
origin: OriginFor<T>,
|
||||
source: <T::Lookup as StaticLookup>::Source,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
source: AccountIdLookupOf<T>,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
#[pallet::compact] value: T::Balance,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
ensure_root(origin)?;
|
||||
@@ -378,7 +380,7 @@ pub mod pallet {
|
||||
#[pallet::weight(T::WeightInfo::transfer_keep_alive())]
|
||||
pub fn transfer_keep_alive(
|
||||
origin: OriginFor<T>,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
#[pallet::compact] value: T::Balance,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
let transactor = ensure_signed(origin)?;
|
||||
@@ -407,7 +409,7 @@ pub mod pallet {
|
||||
#[pallet::weight(T::WeightInfo::transfer_all())]
|
||||
pub fn transfer_all(
|
||||
origin: OriginFor<T>,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
keep_alive: bool,
|
||||
) -> DispatchResult {
|
||||
use fungible::Inspect;
|
||||
@@ -425,7 +427,7 @@ pub mod pallet {
|
||||
#[pallet::weight(T::WeightInfo::force_unreserve())]
|
||||
pub fn force_unreserve(
|
||||
origin: OriginFor<T>,
|
||||
who: <T::Lookup as StaticLookup>::Source,
|
||||
who: AccountIdLookupOf<T>,
|
||||
amount: T::Balance,
|
||||
) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
|
||||
Reference in New Issue
Block a user