@@ -293,10 +293,7 @@ enum ContractRuntimePrecompile {
293293 /// Calling `validation_round` of `ContractRuntime`
294294 ValidationRound ,
295295 /// Calling `transfer` of `ContractRuntime`
296- Transfer {
297- account : Account ,
298- amount : Amount ,
299- } ,
296+ Transfer { account : Account , amount : Amount } ,
300297}
301298
302299/// Some functionalities from the ServiceRuntime not in BaseRuntime
@@ -502,7 +499,6 @@ fn get_evm_destination<Runtime: ContractRuntime>(
502499 Ok ( account. owner . to_evm_address ( ) )
503500}
504501
505-
506502/// If we are using the `None` case of `fn call` and `fn create` then the transfer
507503/// of ethers is done by REVM. On the other hand, if we are managing the call/create
508504/// by hand, then we need to do the transfers ourselves.
@@ -830,7 +826,10 @@ impl<'a, Runtime: ContractRuntime> Inspector<Ctx<'a, Runtime>>
830826
831827impl < Runtime : ContractRuntime > CallInterceptorContract < Runtime > {
832828 /// Gets the expected `ApplicationId`.
833- fn get_expected_application_id ( runtime : & mut Runtime , module_id : ModuleId ) -> Result < ApplicationId , ExecutionError > {
829+ fn get_expected_application_id (
830+ runtime : & mut Runtime ,
831+ module_id : ModuleId ,
832+ ) -> Result < ApplicationId , ExecutionError > {
834833 let chain_id = runtime. chain_id ( ) ?;
835834 let block_height = runtime. block_height ( ) ?;
836835 let application_index = runtime. application_index ( ) ?;
@@ -848,7 +847,10 @@ impl<Runtime: ContractRuntime> CallInterceptorContract<Runtime> {
848847 }
849848
850849 /// Publishes the `input`.
851- fn publish_create_inputs ( context : & mut Ctx < ' _ , Runtime > , inputs : & mut CreateInputs ) -> Result < ModuleId , ExecutionError > {
850+ fn publish_create_inputs (
851+ context : & mut Ctx < ' _ , Runtime > ,
852+ inputs : & mut CreateInputs ,
853+ ) -> Result < ModuleId , ExecutionError > {
852854 let contract = linera_base:: data_types:: Bytecode :: new ( inputs. init_code . to_vec ( ) ) ;
853855 let service = linera_base:: data_types:: Bytecode :: new ( vec ! [ ] ) ;
854856 let mut runtime = context. db ( ) . 0 . runtime . lock ( ) . unwrap ( ) ;
@@ -972,7 +974,8 @@ impl<Runtime: ContractRuntime> CallInterceptorContract<Runtime> {
972974 let mut runtime = context. db ( ) . 0 . runtime . lock ( ) . unwrap ( ) ;
973975 let chain_id = runtime. chain_id ( ) ?;
974976 let application_id = runtime. application_id ( ) ?;
975- let expected_application_id = Self :: get_expected_application_id ( & mut runtime, module_id) ?;
977+ let expected_application_id =
978+ Self :: get_expected_application_id ( & mut runtime, module_id) ?;
976979 if inputs. value != U256 :: ZERO {
977980 let amount = Amount :: try_from ( inputs. value ) . map_err ( EvmExecutionError :: from) ?;
978981 let destination = Account {
0 commit comments