@@ -14,6 +14,16 @@ module executor_requests::executor_requests_tests {
14
14
assert !(res == x"455256312712000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76000000000000001d ", 0 );
15
15
}
16
16
17
+ #[test]
18
+ fun test_make_ntt_v1_request () {
19
+ let res = executor_requests::make_ntt_v1_request (
20
+ 10002 ,
21
+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76 ",
22
+ x"0000000000000000000000000000000000000000000000000000000000000001 ",
23
+ );
24
+ assert !(res == x"45524E312712000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c760000000000000000000000000000000000000000000000000000000000000001 ", 0 );
25
+ }
26
+
17
27
#[test]
18
28
fun test_make_cctp_v1_request () {
19
29
let res = executor_requests::make_cctp_v1_request (
@@ -23,6 +33,12 @@ module executor_requests::executor_requests_tests {
23
33
assert !(res == x"455243310000000600000000000018c8 ", 0 );
24
34
}
25
35
36
+ #[test]
37
+ fun test_make_cctp_v2_request () {
38
+ let res = executor_requests::make_cctp_v2_request ();
39
+ assert !(res == x"4552433201 ", 0 );
40
+ }
41
+
26
42
#[test]
27
43
#[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
28
44
fun test_make_vaa_v1_request_fail_with_emitter_too_short () {
@@ -42,5 +58,45 @@ module executor_requests::executor_requests_tests {
42
58
29
43
59
);
44
60
}
61
+
62
+ #[test]
63
+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
64
+ fun test_make_ntt_v1_request_fail_with_address_too_short () {
65
+ executor_requests::make_ntt_v1_request (
66
+ 10002 ,
67
+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c ",
68
+ x"0000000000000000000000000000000000000000000000000000000000000001 "
69
+ );
70
+ }
71
+
72
+ #[test]
73
+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
74
+ fun test_make_ntt_v1_request_fail_with_address_too_long () {
75
+ executor_requests::make_ntt_v1_request (
76
+ 10002 ,
77
+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c7600 ",
78
+ x"0000000000000000000000000000000000000000000000000000000000000001 "
79
+ );
80
+ }
81
+
82
+ #[test]
83
+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
84
+ fun test_make_ntt_v1_request_fail_with_message_id_too_short () {
85
+ executor_requests::make_ntt_v1_request (
86
+ 10002 ,
87
+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76 ",
88
+ x"00000000000000000000000000000000000000000000000000000000000000 "
89
+ );
90
+ }
91
+
92
+ #[test]
93
+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
94
+ fun test_make_ntt_v1_request_fail_with_message_id_too_long () {
95
+ executor_requests::make_ntt_v1_request (
96
+ 10002 ,
97
+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76 ",
98
+ x"000000000000000000000000000000000000000000000000000000000000000100 "
99
+ );
100
+ }
45
101
46
102
}
0 commit comments