@@ -51,28 +51,27 @@ contract TestCallInputs is Assertion, Test {
5151 param = abi.decode (callInput.input, (uint256 ));
5252 require (param == 2 , "Second writeStorage param should be 2 " );
5353 require (callInput.value == 0 , "callInput.value != 0 " );
54-
55- callInputs = ph.getCallInputs (address (TARGET), bytes4 (0 ));
56- require (callInputs.length == 0 , "callInputs.length != 0 " );
5754 }
5855 function testCallInputsWrongTarget () external view {
5956 PhEvm.CallInputs[] memory callInputs = ph.getCallInputs (
6057 address (0x000000000000000000000000000000000000dEaD ),
6158 Target.readStorage.selector
6259 );
63- require (callInputs.length == 0 , "callInputs.length != 0 " );
60+ require (callInputs.length == 1 , "Wrong target: callInputs.length != 1 " );
6461 }
6562
6663 function testCallNoSelector () external view {
6764 PhEvm.CallInputs[] memory callInputs = ph.getCallInputs (
6865 address (TARGET),
6966 bytes4 (0 )
7067 );
71- require (callInputs.length == 0 , "callInputs.length != 0 " );
68+ require (callInputs.length == 1 , "No selector: callInputs.length != 1 " );
7269 }
7370
7471 function triggers () external view override {
7572 registerCallTrigger (this .testGetCallInputs.selector );
73+ registerCallTrigger (this .testCallInputsWrongTarget.selector );
74+ registerCallTrigger (this .testCallNoSelector.selector );
7675 }
7776}
7877
@@ -82,7 +81,9 @@ contract TriggeringTx {
8281 TARGET.writeStorage (2 );
8382 TARGET.readStorage ();
8483
85- address fallbackTarget = address (0x000000000000000000000000000000000000dEaD );
84+ address fallbackTarget = address (
85+ 0x000000000000000000000000000000000000dEaD
86+ );
8687 (bool success , ) = fallbackTarget.call (
8788 abi.encodeWithSelector (TARGET.readStorage.selector )
8889 );
@@ -91,5 +92,4 @@ contract TriggeringTx {
9192 (success, ) = address (TARGET).call ("" );
9293 require (success, "call failed " );
9394 }
94- }
95-
95+ }
0 commit comments