mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
Migrate away from SimpleDispatchInfo (#5686)
* Migrate away from SimpleDispatchInfo * Fix imports * Better doc * Update lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -29,7 +29,6 @@ use frame_support::weights::{Weight, MINIMUM_WEIGHT, DispatchClass, FunctionOf};
|
||||
use frame_support::traits::{Currency, WithdrawReason, ExistenceRequirement};
|
||||
use frame_system::{self as system, ensure_signed};
|
||||
use sp_runtime::ModuleId;
|
||||
use frame_support::weights::SimpleDispatchInfo;
|
||||
use sp_core::{U256, H256, H160, Hasher};
|
||||
use sp_runtime::{
|
||||
DispatchResult, traits::{UniqueSaturatedInto, AccountIdConversion, SaturatedConversion},
|
||||
@@ -191,7 +190,7 @@ decl_module! {
|
||||
fn deposit_event() = default;
|
||||
|
||||
/// Deposit balance from currency/balances module into EVM.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
|
||||
#[weight = MINIMUM_WEIGHT]
|
||||
fn deposit_balance(origin, value: BalanceOf<T>) {
|
||||
let sender = ensure_signed(origin)?;
|
||||
|
||||
@@ -212,7 +211,7 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Withdraw balance from EVM into currency/balances module.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
|
||||
#[weight = MINIMUM_WEIGHT]
|
||||
fn withdraw_balance(origin, value: BalanceOf<T>) {
|
||||
let sender = ensure_signed(origin)?;
|
||||
let address = T::ConvertAccountId::convert_account_id(&sender);
|
||||
|
||||
Reference in New Issue
Block a user