File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
crates/starknet_os_flow_tests/src Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1917,6 +1917,35 @@ async fn test_deprecated_tx_info() {
19171917 test_output. expect_hint_coverage ( "test_deprecated_tx_info" ) ;
19181918}
19191919
1920+ #[ rstest]
1921+ #[ tokio:: test]
1922+ async fn test_deprecated_send_to_l1 ( ) {
1923+ let ( mut test_manager, [ test_contract_address] ) =
1924+ TestManager :: < DictStateReader > :: new_with_default_initial_state ( [ (
1925+ FeatureContract :: TestContract ( CairoVersion :: Cairo0 ) ,
1926+ calldata ! [ Felt :: ZERO , Felt :: ZERO ] ,
1927+ ) ] )
1928+ . await ;
1929+
1930+ let to_address = Felt :: from ( 85 ) ;
1931+ let calldata = create_calldata ( test_contract_address, "send_message" , & [ to_address] ) ;
1932+ test_manager. add_funded_account_invoke ( invoke_tx_args ! { calldata } ) ;
1933+
1934+ let expected_messages_to_l1 = vec ! [ MessageToL1 {
1935+ from_address: test_contract_address,
1936+ to_address: to_address. try_into( ) . unwrap( ) ,
1937+ payload: L2ToL1Payload ( vec![ Felt :: from( 12 ) , Felt :: from( 34 ) ] ) ,
1938+ } ] ;
1939+
1940+ let test_output = test_manager
1941+ . execute_test_with_default_block_contexts ( & TestParameters {
1942+ messages_to_l1 : expected_messages_to_l1,
1943+ ..Default :: default ( )
1944+ } )
1945+ . await ;
1946+ test_output. perform_default_validations ( ) ;
1947+ }
1948+
19201949#[ rstest]
19211950#[ tokio:: test]
19221951async fn test_deploy_syscall ( ) {
You can’t perform that action at this time.
0 commit comments