1
1
use super :: close_fast_market_order:: close_fast_market_order;
2
- use super :: execute_order:: handle_execute_order_shim;
2
+ // use super::execute_order::handle_execute_order_shim;
3
3
use super :: initialise_fast_market_order:: {
4
4
initialise_fast_market_order, InitialiseFastMarketOrderData ,
5
5
} ;
6
- use super :: place_initial_offer:: place_initial_offer_cctp_shim;
7
- use super :: place_initial_offer:: PlaceInitialOfferCctpShimData ;
8
- use super :: prepare_order_response:: prepare_order_response_cctp_shim;
9
- use super :: prepare_order_response:: PrepareOrderResponseCctpShimData ;
6
+ use super :: place_initial_offer:: { place_initial_offer_cctp_shim, PlaceInitialOfferCctpShimData } ;
7
+ // use super::prepare_order_response::prepare_order_response_cctp_shim;
8
+ // use super::prepare_order_response::PrepareOrderResponseCctpShimData;
10
9
use crate :: ID ;
11
10
use anchor_lang:: prelude:: * ;
12
11
use wormhole_svm_definitions:: make_anchor_discriminator;
@@ -28,8 +27,8 @@ pub enum FallbackMatchingEngineInstruction<'ix> {
28
27
InitialiseFastMarketOrder ( & ' ix InitialiseFastMarketOrderData ) ,
29
28
CloseFastMarketOrder ,
30
29
PlaceInitialOfferCctpShim ( & ' ix PlaceInitialOfferCctpShimData ) ,
31
- ExecuteOrderCctpShim ,
32
- PrepareOrderResponseCctpShim ( PrepareOrderResponseCctpShimData ) ,
30
+ // ExecuteOrderCctpShim,
31
+ // PrepareOrderResponseCctpShim(PrepareOrderResponseCctpShimData),
33
32
}
34
33
35
34
pub fn process_instruction (
@@ -51,13 +50,12 @@ pub fn process_instruction(
51
50
}
52
51
FallbackMatchingEngineInstruction :: PlaceInitialOfferCctpShim ( data) => {
53
52
place_initial_offer_cctp_shim ( accounts, & data)
54
- }
55
- FallbackMatchingEngineInstruction :: ExecuteOrderCctpShim => {
56
- handle_execute_order_shim ( accounts)
57
- }
58
- FallbackMatchingEngineInstruction :: PrepareOrderResponseCctpShim ( data) => {
59
- prepare_order_response_cctp_shim ( accounts, data)
60
- }
53
+ } // FallbackMatchingEngineInstruction::ExecuteOrderCctpShim => {
54
+ // handle_execute_order_shim(accounts)
55
+ // }
56
+ // FallbackMatchingEngineInstruction::PrepareOrderResponseCctpShim(data) => {
57
+ // prepare_order_response_cctp_shim(accounts, data)
58
+ // }
61
59
}
62
60
}
63
61
@@ -73,20 +71,21 @@ impl<'ix> FallbackMatchingEngineInstruction<'ix> {
73
71
& PlaceInitialOfferCctpShimData :: from_bytes ( & instruction_data[ 8 ..] ) . unwrap ( ) ,
74
72
) )
75
73
}
76
- FallbackMatchingEngineInstruction :: EXECUTE_ORDER_CCTP_SHIM_SELECTOR => {
77
- Some ( Self :: ExecuteOrderCctpShim )
78
- }
74
+
79
75
FallbackMatchingEngineInstruction :: INITIALISE_FAST_MARKET_ORDER_SELECTOR => Some (
80
76
Self :: InitialiseFastMarketOrder ( & bytemuck:: from_bytes ( & instruction_data[ 8 ..] ) ) ,
81
77
) ,
82
78
FallbackMatchingEngineInstruction :: CLOSE_FAST_MARKET_ORDER_SELECTOR => {
83
79
Some ( Self :: CloseFastMarketOrder )
84
80
}
85
- FallbackMatchingEngineInstruction :: PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR => {
86
- Some ( Self :: PrepareOrderResponseCctpShim (
87
- PrepareOrderResponseCctpShimData :: from_bytes ( & instruction_data[ 8 ..] ) . unwrap ( ) ,
88
- ) )
89
- }
81
+ // FallbackMatchingEngineInstruction::EXECUTE_ORDER_CCTP_SHIM_SELECTOR => {
82
+ // Some(Self::ExecuteOrderCctpShim)
83
+ // }
84
+ // FallbackMatchingEngineInstruction::PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR => {
85
+ // Some(Self::PrepareOrderResponseCctpShim(
86
+ // PrepareOrderResponseCctpShimData::from_bytes(&instruction_data[8..]).unwrap(),
87
+ // ))
88
+ // }
90
89
_ => None ,
91
90
}
92
91
}
@@ -113,17 +112,17 @@ impl FallbackMatchingEngineInstruction<'_> {
113
112
114
113
out
115
114
}
116
- Self :: ExecuteOrderCctpShim => {
117
- let total_capacity = 8 ; // 8 for the selector (no data)
115
+ // Self::ExecuteOrderCctpShim => {
116
+ // let total_capacity = 8; // 8 for the selector (no data)
118
117
119
- let mut out = Vec :: with_capacity ( total_capacity) ;
118
+ // let mut out = Vec::with_capacity(total_capacity);
120
119
121
- out. extend_from_slice (
122
- & FallbackMatchingEngineInstruction :: EXECUTE_ORDER_CCTP_SHIM_SELECTOR ,
123
- ) ;
120
+ // out.extend_from_slice(
121
+ // &FallbackMatchingEngineInstruction::EXECUTE_ORDER_CCTP_SHIM_SELECTOR,
122
+ // );
124
123
125
- out
126
- }
124
+ // out
125
+ // }
127
126
Self :: InitialiseFastMarketOrder ( data) => {
128
127
let data_slice = bytemuck:: bytes_of ( * data) ;
129
128
let total_capacity = 8 + data_slice. len ( ) ; // 8 for the selector, plus the data length
@@ -147,21 +146,19 @@ impl FallbackMatchingEngineInstruction<'_> {
147
146
) ;
148
147
149
148
out
150
- }
151
-
152
- Self :: PrepareOrderResponseCctpShim ( data) => {
153
- let data_slice = data. to_bytes ( ) ;
154
- let total_capacity = 8 + data_slice. len ( ) ; // 8 for the selector, plus the data length
149
+ } // Self::PrepareOrderResponseCctpShim(data) => {
150
+ // let data_slice = data.to_bytes();
151
+ // let total_capacity = 8 + data_slice.len(); // 8 for the selector, plus the data length
155
152
156
- let mut out = Vec :: with_capacity ( total_capacity) ;
153
+ // let mut out = Vec::with_capacity(total_capacity);
157
154
158
- out. extend_from_slice (
159
- & FallbackMatchingEngineInstruction :: PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR ,
160
- ) ;
161
- out. extend_from_slice ( & data_slice) ;
155
+ // out.extend_from_slice(
156
+ // &FallbackMatchingEngineInstruction::PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR,
157
+ // );
158
+ // out.extend_from_slice(&data_slice);
162
159
163
- out
164
- }
160
+ // out
161
+ // }
165
162
}
166
163
}
167
164
}
0 commit comments