Skip to content

Commit e47fcd8

Browse files
committed
change account names
1 parent e73eeeb commit e47fcd8

File tree

2 files changed

+36
-45
lines changed

2 files changed

+36
-45
lines changed

solana/modules/matching-engine-testing/tests/shimful/shims_execute_order.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,22 +263,22 @@ fn create_execute_order_shim_accounts<'ix>(
263263
clock_id: &'ix Pubkey,
264264
) -> ExecuteOrderShimAccounts<'ix> {
265265
ExecuteOrderShimAccounts {
266-
signer: &execute_order_fallback_accounts.signer, // 0
267-
cctp_message: &execute_order_fallback_accounts.cctp_message, // 1
266+
payer: &execute_order_fallback_accounts.signer, // 0
267+
new_cctp_message: &execute_order_fallback_accounts.cctp_message, // 1
268268
custodian: &execute_order_fallback_accounts.custodian, // 2
269269
fast_market_order: &execute_order_fallback_accounts.fast_market_order_address, // 3
270270
active_auction: &execute_order_fallback_accounts.active_auction, // 4
271-
active_auction_custody_token: &execute_order_fallback_accounts.active_auction_custody_token, // 5
272-
active_auction_config: &execute_order_fallback_accounts.active_auction_config, // 6
273-
active_auction_best_offer_token: &execute_order_fallback_accounts
271+
auction_custody: &execute_order_fallback_accounts.active_auction_custody_token, // 5
272+
auction_config: &execute_order_fallback_accounts.active_auction_config, // 6
273+
auction_best_offer_token: &execute_order_fallback_accounts
274274
.active_auction_best_offer_token, // 7
275275
executor_token: &execute_order_fallback_accounts.executor_token, // 8
276-
initial_offer_token: &execute_order_fallback_accounts.initial_offer_token, // 9
277-
initial_participant: &execute_order_fallback_accounts.initial_participant, // 10
278-
to_router_endpoint: &execute_order_fallback_accounts.to_router_endpoint, // 11
276+
auction_initial_offer_token: &execute_order_fallback_accounts.initial_offer_token, // 9
277+
auction_initial_participant: &execute_order_fallback_accounts.initial_participant, // 10
278+
to_endpoint: &execute_order_fallback_accounts.to_router_endpoint, // 11
279279
post_message_shim_program: &POST_MESSAGE_SHIM_PROGRAM_ID, // 12
280280
core_bridge_emitter_sequence: &execute_order_fallback_accounts.post_message_sequence, // 13
281-
post_shim_message: &execute_order_fallback_accounts.post_message_message, // 14
281+
shim_message: &execute_order_fallback_accounts.post_message_message, // 14
282282
cctp_deposit_for_burn_mint: &USDC_MINT, // 15
283283
cctp_deposit_for_burn_token_messenger_minter_sender_authority:
284284
&execute_order_fallback_accounts.token_messenger_minter_sender_authority, // 16

solana/programs/matching-engine/src/fallback/processor/execute_order.rs

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,34 @@ const NUM_ACCOUNTS: usize = 32;
2222
#[derive(Debug, Clone, PartialEq, Eq, Copy)]
2323
pub struct ExecuteOrderShimAccounts<'ix> {
2424
/// The signer account.
25-
// TODO: Rename to "payer".
26-
pub signer: &'ix Pubkey, // 0
25+
pub payer: &'ix Pubkey, // 0
2726
/// The cctp message account. Seeds must be \["cctp-msg", auction_address.as_ref()\].
28-
// TODO: Rename to "new_cctp_message".
29-
pub cctp_message: &'ix Pubkey, // 1
27+
pub new_cctp_message: &'ix Pubkey, // 1
3028
pub custodian: &'ix Pubkey, // 2
3129
/// Seeds must be \["fast_market_order", auction_address.as_ref()\].
3230
pub fast_market_order: &'ix Pubkey, // 3
3331
/// The auction account created from the place initial offer instruction.
3432
pub active_auction: &'ix Pubkey, // 4
3533
/// The associated token address of the auction's custody token.
36-
// TODO: Rename to "auction_custody".
37-
pub active_auction_custody_token: &'ix Pubkey, // 5
34+
pub auction_custody: &'ix Pubkey, // 5
3835
/// The auction config account created from the place initial offer instruction.
39-
// TODO: Rename to "auction_config".
40-
pub active_auction_config: &'ix Pubkey, // 6
36+
pub auction_config: &'ix Pubkey, // 6
4137
/// The token account of the auction's best offer
42-
// TODO: Rename to "auction_best_offer_token".
43-
pub active_auction_best_offer_token: &'ix Pubkey, // 7
38+
pub auction_best_offer_token: &'ix Pubkey, // 7
4439
/// The token account of the executor
4540
pub executor_token: &'ix Pubkey, // 8
4641
/// The token account of the auction's initial offer
47-
// TODO: Rename to "auction_initial_offer_token".
48-
pub initial_offer_token: &'ix Pubkey, // 9
42+
pub auction_initial_offer_token: &'ix Pubkey, // 9
4943
/// The account that signed the creation of the auction when placing the initial offer.
50-
// TODO: Rename to "auction_initial_participant".
51-
pub initial_participant: &'ix Pubkey, // 10
44+
pub auction_initial_participant: &'ix Pubkey, // 10
5245
/// The router endpoint account of the auction's target chain
53-
// TODO: Rename to "to_endpoint".
54-
pub to_router_endpoint: &'ix Pubkey, // 11
46+
pub to_endpoint: &'ix Pubkey, // 11
5547
/// The program id of the post message shim program
5648
pub post_message_shim_program: &'ix Pubkey, // 12
5749
/// The emitter sequence of the core bridge program (can be derived)
5850
pub core_bridge_emitter_sequence: &'ix Pubkey, // 13
5951
/// The message account of the post message shim program (can be derived)
60-
// TODO: Rename to "shim_message".
61-
pub post_shim_message: &'ix Pubkey, // 14
52+
pub shim_message: &'ix Pubkey, // 14
6253
pub cctp_deposit_for_burn_token_messenger_minter_program: &'ix Pubkey, // 15
6354
/// The mint account of the CCTP token to be burned
6455
pub cctp_deposit_for_burn_mint: &'ix Pubkey, // 16
@@ -107,21 +98,21 @@ pub struct ExecuteOrderCctpShim<'ix> {
10798
impl ExecuteOrderCctpShim<'_> {
10899
pub fn instruction(&self) -> Instruction {
109100
let ExecuteOrderShimAccounts {
110-
signer: payer,
111-
cctp_message: new_cctp_message,
101+
payer,
102+
new_cctp_message,
112103
custodian,
113104
fast_market_order,
114105
active_auction,
115-
active_auction_custody_token: auction_custody,
116-
active_auction_config: auction_config,
117-
active_auction_best_offer_token: auction_best_offer_token,
106+
auction_custody,
107+
auction_config,
108+
auction_best_offer_token,
118109
executor_token,
119-
initial_offer_token: auction_initial_offer_token,
120-
initial_participant: auction_initial_participant,
121-
to_router_endpoint: to_endpoint,
110+
auction_initial_offer_token,
111+
auction_initial_participant,
112+
to_endpoint,
122113
post_message_shim_program,
123114
core_bridge_emitter_sequence,
124-
post_shim_message: shim_message,
115+
shim_message,
125116
cctp_deposit_for_burn_mint: cctp_mint,
126117
cctp_deposit_for_burn_token_messenger_minter_sender_authority:
127118
cctp_token_messenger_minter_sender_authority,
@@ -480,21 +471,21 @@ mod test {
480471
ExecuteOrderCctpShim {
481472
program_id: &Default::default(),
482473
accounts: ExecuteOrderShimAccounts {
483-
signer: &Default::default(),
484-
cctp_message: &Default::default(),
474+
payer: &Default::default(),
475+
new_cctp_message: &Default::default(),
485476
custodian: &Default::default(),
486477
fast_market_order: &Default::default(),
487478
active_auction: &Default::default(),
488-
active_auction_custody_token: &Default::default(),
489-
active_auction_config: &Default::default(),
490-
active_auction_best_offer_token: &Default::default(),
479+
auction_custody: &Default::default(),
480+
auction_config: &Default::default(),
481+
auction_best_offer_token: &Default::default(),
491482
executor_token: &Default::default(),
492-
initial_offer_token: &Default::default(),
493-
initial_participant: &Default::default(),
494-
to_router_endpoint: &Default::default(),
483+
auction_initial_offer_token: &Default::default(),
484+
auction_initial_participant: &Default::default(),
485+
to_endpoint: &Default::default(),
495486
post_message_shim_program: &Default::default(),
496487
core_bridge_emitter_sequence: &Default::default(),
497-
post_shim_message: &Default::default(),
488+
shim_message: &Default::default(),
498489
cctp_deposit_for_burn_mint: &Default::default(),
499490
cctp_deposit_for_burn_token_messenger_minter_sender_authority: &Default::default(),
500491
cctp_deposit_for_burn_message_transmitter_config: &Default::default(),

0 commit comments

Comments
 (0)