File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
revive-strategy/src/cheatcodes Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -50,3 +50,4 @@ revive_cheat_test!(test_coinbase, "CoinBase");
5050revive_cheat_test ! ( test_set_custom_blockhash, "SetBlockhash" ) ;
5151revive_cheat_test_original ! ( test_set_blockhash, "SetBlockhash" ) ;
5252revive_cheat_test ! ( test_roll, "Roll" ) ;
53+ revive_cheat_test_original ! ( test_etch, "Etch" ) ;
Original file line number Diff line number Diff line change @@ -442,10 +442,15 @@ impl CheatcodeInspectorStrategyRunner for PvmCheatcodeInspectorStrategyRunner {
442442 t if using_revive && is :: < etchCall > ( t) => {
443443 let etchCall { target, newRuntimeBytecode } =
444444 cheatcode. as_any ( ) . downcast_ref ( ) . unwrap ( ) ;
445- let ctx = get_context_ref_mut ( ccx. state . strategy . context . as_mut ( ) ) ;
446445
446+ if ccx. is_precompile ( target) {
447+ return Err ( precompile_error ( target) ) ;
448+ }
449+
450+ let ctx = get_context_ref_mut ( ccx. state . strategy . context . as_mut ( ) ) ;
447451 ctx. externalities . etch_call ( target, newRuntimeBytecode, ccx. ecx ) ?;
448- Ok ( Default :: default ( ) )
452+
453+ cheatcode. dyn_apply ( ccx, executor)
449454 }
450455
451456 t if is :: < etchCall > ( t) => {
You can’t perform that action at this time.
0 commit comments