Skip to content

Commit a6effcd

Browse files
author
Bengt Lofgren
committed
program docs
1 parent bfdbb9f commit a6effcd

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

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

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,63 @@ impl SettleAuctionNoneCctpShimData {
3737
}
3838

3939
pub struct SettleAuctionNoneCctpShimAccounts<'ix> {
40+
/// Payer of the account
4041
pub payer: &'ix Pubkey, // 0
42+
/// Post message message account
4143
pub post_message_message: &'ix Pubkey, // 1
44+
/// Post message sequence account
4245
pub post_message_sequence: &'ix Pubkey, // 2
46+
/// Post message shim event authority CHECK: Mutable. Seeds must be \["core-msg", payer, payer_sequence.value\].
4347
pub post_message_shim_event_authority: &'ix Pubkey, // 3
48+
/// Post message shim program
4449
pub post_message_shim_program: &'ix Pubkey, // 4
50+
/// Cctp message
4551
pub cctp_message: &'ix Pubkey, // 5
52+
/// Custodian account
4653
pub custodian: &'ix Pubkey, // 6
54+
/// Fee recipient token
4755
pub fee_recipient_token: &'ix Pubkey, // 7
56+
/// Closed prepared order response actor (closed_by)
4857
pub closed_prepared_order_response_actor: &'ix Pubkey, // 8
58+
/// Closed prepared order response
4959
pub closed_prepared_order_response: &'ix Pubkey, // 9
60+
/// Closed prepared order response custody token
5061
pub closed_prepared_order_response_custody_token: &'ix Pubkey, // 10
62+
/// Auction account
5163
pub auction: &'ix Pubkey, // 11
64+
/// Cctp mint (must be USDC mint)
5265
pub cctp_mint: &'ix Pubkey, // 12
66+
/// Cctp token messenger minter sender authority
5367
pub cctp_token_messenger_minter_sender_authority: &'ix Pubkey, // 13
68+
/// Cctp message transmitter config
5469
pub cctp_message_transmitter_config: &'ix Pubkey, // 14
70+
/// Cctp token messenger
5571
pub cctp_token_messenger: &'ix Pubkey, // 15
72+
/// Cctp remote token messenger
5673
pub cctp_remote_token_messenger: &'ix Pubkey, // 16
74+
/// Cctp token minter
5775
pub cctp_token_minter: &'ix Pubkey, // 17
76+
/// Cctp local token
5877
pub cctp_local_token: &'ix Pubkey, // 18
78+
/// Cctp token messenger minter event authority
5979
pub cctp_token_messenger_minter_event_authority: &'ix Pubkey, // 19
80+
/// Cctp token messenger minter program
6081
pub cctp_token_messenger_minter_program: &'ix Pubkey, // 20
82+
/// Cctp message transmitter program
6183
pub cctp_message_transmitter_program: &'ix Pubkey, // 21
84+
/// Core bridge program
6285
pub core_bridge_program: &'ix Pubkey, // 22
86+
/// Core bridge fee collector
6387
pub core_bridge_fee_collector: &'ix Pubkey, // 23
88+
/// Core bridge config
6489
pub core_bridge_config: &'ix Pubkey, // 24
90+
/// Token program
6591
pub token_program: &'ix Pubkey, // 25
92+
/// System program
6693
pub system_program: &'ix Pubkey, // 26
94+
/// Clock
6795
pub clock: &'ix Pubkey, // 27
96+
/// Rent
6897
pub rent: &'ix Pubkey, // 28
6998
}
7099

@@ -179,7 +208,6 @@ pub fn settle_auction_none_cctp_shim(
179208
let auction_pda = Pubkey::create_program_address(&auction_seeds, program_id)
180209
.map_err(|_| MatchingEngineError::InvalidPda)?;
181210
if auction_pda != auction.key() {
182-
msg!("Auction pda is invalid");
183211
return Err(MatchingEngineError::InvalidPda.into());
184212
}
185213
let auction_signer_seeds = &[&auction_seeds[..]];
@@ -275,7 +303,6 @@ pub fn settle_auction_none_cctp_shim(
275303
post_message_accounts,
276304
accounts,
277305
)?;
278-
msg!("Got here 17");
279306
// TODO: Emit event?
280307
let close_token_account_ix = spl_token::instruction::close_account(
281308
&spl_token::ID,
@@ -284,13 +311,11 @@ pub fn settle_auction_none_cctp_shim(
284311
&custodian.key(),
285312
&[],
286313
)?;
287-
msg!("Got here 18");
288314
invoke_signed_unchecked(
289315
&close_token_account_ix,
290316
accounts,
291317
&[&Custodian::SIGNER_SEEDS],
292318
)?;
293-
msg!("Got here 19");
294319
Ok(())
295320
}
296321

0 commit comments

Comments
 (0)