@@ -30,7 +30,7 @@ use codec::{Encode, Decode};
30
30
#[ cfg( feature = "std" ) ]
31
31
use serde:: { Serialize , Deserialize } ;
32
32
use frame_support:: { ensure, decl_module, decl_storage, decl_event, decl_error} ;
33
- use frame_support:: weights:: { Weight , DispatchClass , FunctionOf , Pays } ;
33
+ use frame_support:: weights:: Weight ;
34
34
use frame_support:: traits:: { Currency , WithdrawReason , ExistenceRequirement , Get } ;
35
35
use frame_system:: { self as system, ensure_signed} ;
36
36
use sp_runtime:: ModuleId ;
@@ -273,12 +273,7 @@ decl_module! {
273
273
}
274
274
275
275
/// Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
276
- #[ weight = FunctionOf (
277
- |( _, _, _, gas_limit, gas_price, _) : ( & H160 , & Vec <u8 >, & U256 , & u32 , & U256 , & Option <U256 >) |
278
- ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
279
- DispatchClass :: Normal ,
280
- Pays :: Yes ,
281
- ) ]
276
+ #[ weight = ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ]
282
277
fn call(
283
278
origin,
284
279
target: H160 ,
@@ -306,12 +301,7 @@ decl_module! {
306
301
307
302
/// Issue an EVM create operation. This is similar to a contract creation transaction in
308
303
/// Ethereum.
309
- #[ weight = FunctionOf (
310
- |( _, _, gas_limit, gas_price, _) : ( & Vec <u8 >, & U256 , & u32 , & U256 , & Option <U256 >) |
311
- ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
312
- DispatchClass :: Normal ,
313
- Pays :: Yes ,
314
- ) ]
304
+ #[ weight = ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ]
315
305
fn create(
316
306
origin,
317
307
init: Vec <u8 >,
@@ -339,12 +329,7 @@ decl_module! {
339
329
}
340
330
341
331
/// Issue an EVM create2 operation.
342
- #[ weight = FunctionOf (
343
- |( _, _, _, gas_limit, gas_price, _) : ( & Vec <u8 >, & H256 , & U256 , & u32 , & U256 , & Option <U256 >) |
344
- ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ,
345
- DispatchClass :: Normal ,
346
- Pays :: Yes ,
347
- ) ]
332
+ #[ weight = ( * gas_price) . saturated_into:: <Weight >( ) . saturating_mul( * gas_limit as Weight ) ]
348
333
fn create2(
349
334
origin,
350
335
init: Vec <u8 >,
0 commit comments