@@ -30,7 +30,7 @@ use codec::{Encode, Decode};
3030#[ cfg( feature = "std" ) ]
3131use serde:: { Serialize , Deserialize } ;
3232use 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 ;
3434use frame_support:: traits:: { Currency , WithdrawReason , ExistenceRequirement , Get } ;
3535use frame_system:: { self as system, ensure_signed} ;
3636use sp_runtime:: ModuleId ;
@@ -273,12 +273,7 @@ decl_module! {
273273 }
274274
275275 /// 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 ) ]
282277 fn call(
283278 origin,
284279 target: H160 ,
@@ -306,12 +301,7 @@ decl_module! {
306301
307302 /// Issue an EVM create operation. This is similar to a contract creation transaction in
308303 /// 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 ) ]
315305 fn create(
316306 origin,
317307 init: Vec <u8 >,
@@ -339,12 +329,7 @@ decl_module! {
339329 }
340330
341331 /// 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 ) ]
348333 fn create2(
349334 origin,
350335 init: Vec <u8 >,
0 commit comments