mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
enum Pays for PaysFee (#5733)
* enum Pays for PaysFee * Fix doc test * Update bin/node/executor/tests/basic.rs * Update bin/node/executor/tests/basic.rs
This commit is contained in:
@@ -25,7 +25,7 @@ pub use crate::backend::{Account, Log, Vicinity, Backend};
|
||||
|
||||
use sp_std::{vec::Vec, marker::PhantomData};
|
||||
use frame_support::{ensure, decl_module, decl_storage, decl_event, decl_error};
|
||||
use frame_support::weights::{Weight, MINIMUM_WEIGHT, DispatchClass, FunctionOf};
|
||||
use frame_support::weights::{Weight, MINIMUM_WEIGHT, DispatchClass, FunctionOf, Pays};
|
||||
use frame_support::traits::{Currency, WithdrawReason, ExistenceRequirement};
|
||||
use frame_system::{self as system, ensure_signed};
|
||||
use sp_runtime::ModuleId;
|
||||
@@ -235,7 +235,12 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
|
||||
#[weight = FunctionOf(|(_, _, _, gas_limit, gas_price, _): (&H160, &Vec<u8>, &U256, &u32, &U256, &Option<U256>)| (*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight), DispatchClass::Normal, true)]
|
||||
#[weight = FunctionOf(
|
||||
|(_, _, _, gas_limit, gas_price, _): (&H160, &Vec<u8>, &U256, &u32, &U256, &Option<U256>)|
|
||||
(*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight),
|
||||
DispatchClass::Normal,
|
||||
Pays::Yes,
|
||||
)]
|
||||
fn call(
|
||||
origin,
|
||||
target: H160,
|
||||
@@ -266,7 +271,12 @@ decl_module! {
|
||||
|
||||
/// Issue an EVM create operation. This is similar to a contract creation transaction in
|
||||
/// Ethereum.
|
||||
#[weight = FunctionOf(|(_, _, gas_limit, gas_price, _): (&Vec<u8>, &U256, &u32, &U256, &Option<U256>)| (*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight), DispatchClass::Normal, true)]
|
||||
#[weight = FunctionOf(
|
||||
|(_, _, gas_limit, gas_price, _): (&Vec<u8>, &U256, &u32, &U256, &Option<U256>)|
|
||||
(*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight),
|
||||
DispatchClass::Normal,
|
||||
Pays::Yes,
|
||||
)]
|
||||
fn create(
|
||||
origin,
|
||||
init: Vec<u8>,
|
||||
@@ -301,7 +311,12 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Issue an EVM create2 operation.
|
||||
#[weight = FunctionOf(|(_, _, _, gas_limit, gas_price, _): (&Vec<u8>, &H256, &U256, &u32, &U256, &Option<U256>)| (*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight), DispatchClass::Normal, true)]
|
||||
#[weight = FunctionOf(
|
||||
|(_, _, _, gas_limit, gas_price, _): (&Vec<u8>, &H256, &U256, &u32, &U256, &Option<U256>)|
|
||||
(*gas_price).saturated_into::<Weight>().saturating_mul(*gas_limit as Weight),
|
||||
DispatchClass::Normal,
|
||||
Pays::Yes,
|
||||
)]
|
||||
fn create2(
|
||||
origin,
|
||||
init: Vec<u8>,
|
||||
|
||||
Reference in New Issue
Block a user