@@ -25,7 +25,7 @@ pub use crate::backend::{Account, Log, Vicinity, Backend};
25
25
26
26
use sp_std:: { vec:: Vec , marker:: PhantomData } ;
27
27
use frame_support:: { ensure, decl_module, decl_storage, decl_event, decl_error} ;
28
- use frame_support:: weights:: { Weight , MINIMUM_WEIGHT , DispatchClass , FunctionOf } ;
28
+ use frame_support:: weights:: { Weight , MINIMUM_WEIGHT , DispatchClass , FunctionOf , Pays } ;
29
29
use frame_support:: traits:: { Currency , WithdrawReason , ExistenceRequirement } ;
30
30
use frame_system:: { self as system, ensure_signed} ;
31
31
use sp_runtime:: ModuleId ;
@@ -235,7 +235,12 @@ decl_module! {
235
235
}
236
236
237
237
/// Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
238
- #[ 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 ) ]
238
+ #[ weight = FunctionOf (
239
+ |( _, _, _, gas_limit, gas_price, _) : ( & H160 , & Vec <u8 >, & U256 , & u32 , & U256 , & Option <U256 >) |
240
+ ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
241
+ DispatchClass :: Normal ,
242
+ Pays :: Yes ,
243
+ ) ]
239
244
fn call(
240
245
origin,
241
246
target: H160 ,
@@ -266,7 +271,12 @@ decl_module! {
266
271
267
272
/// Issue an EVM create operation. This is similar to a contract creation transaction in
268
273
/// Ethereum.
269
- #[ 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 ) ]
274
+ #[ weight = FunctionOf (
275
+ |( _, _, gas_limit, gas_price, _) : ( & Vec <u8 >, & U256 , & u32 , & U256 , & Option <U256 >) |
276
+ ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
277
+ DispatchClass :: Normal ,
278
+ Pays :: Yes ,
279
+ ) ]
270
280
fn create(
271
281
origin,
272
282
init: Vec <u8 >,
@@ -301,7 +311,12 @@ decl_module! {
301
311
}
302
312
303
313
/// Issue an EVM create2 operation.
304
- #[ 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 ) ]
314
+ #[ weight = FunctionOf (
315
+ |( _, _, _, gas_limit, gas_price, _) : ( & Vec <u8 >, & H256 , & U256 , & u32 , & U256 , & Option <U256 >) |
316
+ ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
317
+ DispatchClass :: Normal ,
318
+ Pays :: Yes ,
319
+ ) ]
305
320
fn create2(
306
321
origin,
307
322
init: Vec <u8 >,
0 commit comments