@@ -286,116 +286,17 @@ pub fn create_cctp_accounts(
286
286
)
287
287
. 0 ;
288
288
let token_messenger_minter_event_authority =
289
- & Pubkey :: find_program_address ( & [ EVENT_AUTHORITY_SEED ] , & TOKEN_MESSENGER_MINTER_PROGRAM_ID )
290
- . 0 ;
291
- let post_message_sequence = wormhole_svm_definitions:: find_emitter_sequence_address (
292
- & execute_order_fallback_accounts. custodian ,
293
- & CORE_BRIDGE_PROGRAM_ID ,
294
- )
295
- . 0 ;
296
- let post_message_message = wormhole_svm_definitions:: find_shim_message_address (
297
- & execute_order_fallback_accounts. custodian ,
298
- & POST_MESSAGE_SHIM_PROGRAM_ID ,
299
- )
300
- . 0 ;
301
- let solver = config. actor_enum . get_actor ( & testing_context. testing_actors ) ;
302
- let executor_token = solver. token_account_address ( & config. token_enum ) . unwrap ( ) ;
303
- ExecuteOrderFallbackFixture {
304
- cctp_message,
305
- post_message_sequence,
306
- post_message_message,
307
- accounts : ExecuteOrderFallbackFixtureAccounts {
308
- local_token,
309
- token_messenger,
310
- remote_token_messenger,
311
- token_messenger_minter_sender_authority,
312
- token_messenger_minter_event_authority : * token_messenger_minter_event_authority,
313
- messenger_transmitter_config,
314
- token_minter,
315
- executor_token,
316
- } ,
317
- }
318
- }
319
-
320
- pub fn create_execute_order_shim_accounts < ' ix > (
321
- execute_order_fallback_accounts : & ' ix ExecuteOrderFallbackAccounts ,
322
- execute_order_fallback_fixture : & ' ix ExecuteOrderFallbackFixture ,
323
- clock_id : & ' ix Pubkey ,
324
- ) -> ExecuteOrderShimAccounts < ' ix > {
325
- ExecuteOrderShimAccounts {
326
- signer : & execute_order_fallback_accounts. signer , // 0
327
- cctp_message : & execute_order_fallback_fixture. cctp_message , // 1
328
- custodian : & execute_order_fallback_accounts. custodian , // 2
329
- fast_market_order : & execute_order_fallback_accounts. fast_market_order_address , // 3
330
- active_auction : & execute_order_fallback_accounts. active_auction , // 4
331
- active_auction_custody_token : & execute_order_fallback_accounts. active_auction_custody_token , // 5
332
- active_auction_config : & execute_order_fallback_accounts. active_auction_config , // 6
333
- active_auction_best_offer_token : & execute_order_fallback_accounts
334
- . active_auction_best_offer_token , // 7
335
- executor_token : & execute_order_fallback_fixture. accounts . executor_token , // 8
336
- initial_offer_token : & execute_order_fallback_accounts. initial_offer_token , // 9
337
- initial_participant : & execute_order_fallback_accounts. initial_participant , // 10
338
- to_router_endpoint : & execute_order_fallback_accounts. to_router_endpoint , // 11
339
- post_message_shim_program : & POST_MESSAGE_SHIM_PROGRAM_ID , // 12
340
- core_bridge_emitter_sequence : & execute_order_fallback_fixture. post_message_sequence , // 13
341
- post_shim_message : & execute_order_fallback_fixture. post_message_message , // 14
342
- cctp_deposit_for_burn_mint : & USDC_MINT , // 15
343
- cctp_deposit_for_burn_token_messenger_minter_sender_authority :
344
- & execute_order_fallback_fixture
345
- . accounts
346
- . token_messenger_minter_sender_authority , // 16
347
- cctp_deposit_for_burn_message_transmitter_config : & execute_order_fallback_fixture
348
- . accounts
349
- . messenger_transmitter_config , // 17
350
- cctp_deposit_for_burn_token_messenger : & execute_order_fallback_fixture
351
- . accounts
352
- . token_messenger , // 18
353
- cctp_deposit_for_burn_remote_token_messenger : & execute_order_fallback_fixture
354
- . accounts
355
- . remote_token_messenger , // 19
356
- cctp_deposit_for_burn_token_minter : & execute_order_fallback_fixture. accounts . token_minter , // 20
357
- cctp_deposit_for_burn_local_token : & execute_order_fallback_fixture. accounts . local_token , // 21
358
- cctp_deposit_for_burn_token_messenger_minter_event_authority :
359
- & execute_order_fallback_fixture
360
- . accounts
361
- . token_messenger_minter_event_authority , // 22
362
- cctp_deposit_for_burn_token_messenger_minter_program : & TOKEN_MESSENGER_MINTER_PROGRAM_ID , // 23
363
- cctp_deposit_for_burn_message_transmitter_program : & MESSAGE_TRANSMITTER_PROGRAM_ID , // 24
364
- core_bridge_program : & CORE_BRIDGE_PROGRAM_ID , // 25
365
- core_bridge_config : & CORE_BRIDGE_CONFIG , // 26
366
- core_bridge_fee_collector : & CORE_BRIDGE_FEE_COLLECTOR , // 27
367
- post_message_shim_event_authority : & POST_MESSAGE_SHIM_EVENT_AUTHORITY , // 28
368
- system_program : & solana_program:: system_program:: ID , // 29
369
- token_program : & spl_token:: ID , // 30
370
- clock : clock_id, // 31
289
+ Pubkey :: find_program_address ( & [ EVENT_AUTHORITY_SEED ] , & TOKEN_MESSENGER_MINTER_PROGRAM_ID ) . 0 ;
290
+ CctpAccounts {
291
+ mint : utils:: constants:: USDC_MINT ,
292
+ token_messenger,
293
+ token_messenger_minter_sender_authority,
294
+ token_messenger_minter_event_authority,
295
+ message_transmitter_config,
296
+ token_minter,
297
+ local_token,
298
+ remote_token_messenger,
299
+ token_messenger_minter_program : TOKEN_MESSENGER_MINTER_PROGRAM_ID ,
300
+ message_transmitter_program : MESSAGE_TRANSMITTER_PROGRAM_ID ,
371
301
}
372
302
}
373
-
374
- pub async fn execute_order_shimful_test (
375
- testing_context : & TestingContext ,
376
- test_context : & mut ProgramTestContext ,
377
- current_state : & TestingEngineState ,
378
- config : & ExecuteOrderInstructionConfig ,
379
- ) -> Option < ExecuteOrderFallbackFixture > {
380
- let expected_error = config. expected_error ( ) ;
381
- let fixture_accounts = testing_context
382
- . get_fixture_accounts ( )
383
- . expect ( "Pre-made fixture accounts not found" ) ;
384
- let payer_signer = config
385
- . payer_signer
386
- . clone ( )
387
- . unwrap_or_else ( || testing_context. testing_actors . payer_signer . clone ( ) ) ;
388
- let execute_order_fallback_accounts = ExecuteOrderFallbackAccounts :: new (
389
- current_state,
390
- & payer_signer. pubkey ( ) ,
391
- & fixture_accounts,
392
- config. fast_market_order_address ,
393
- ) ;
394
- execute_order_shimful (
395
- testing_context,
396
- test_context,
397
- current_state,
398
- config,
399
- )
400
- . await
401
- }
0 commit comments