Skip to content

Commit 27ecada

Browse files
authored
fix(svm): format docstrings (#853)
1 parent 820157d commit 27ecada

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

programs/svm-spoke/src/instructions/token_bridge.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,28 @@ pub struct BridgeTokensToHubPool<'info> {
4040
pub token_messenger_minter_sender_authority: UncheckedAccount<'info>,
4141

4242
/// CHECK: MessageTransmitter is checked in CCTP. Seeds must be \["message_transmitter"\] (CCTP Message Transmitter
43-
/// program).
43+
// program).
4444
#[account(mut)]
4545
pub message_transmitter: UncheckedAccount<'info>,
4646

4747
/// CHECK: TokenMessenger is checked in CCTP. Seeds must be \["token_messenger"\] (CCTP Token Messenger Minter
48-
/// program).
48+
// program).
4949
pub token_messenger: UncheckedAccount<'info>,
5050

5151
/// CHECK: RemoteTokenMessenger is checked in CCTP. Seeds must be \["remote_token_messenger"\,
52-
/// remote_domain.to_string()] (CCTP Token Messenger Minter program).
52+
// remote_domain.to_string()] (CCTP Token Messenger Minter program).
5353
pub remote_token_messenger: UncheckedAccount<'info>,
5454

5555
/// CHECK: TokenMinter is checked in CCTP. Seeds must be \["token_minter"\] (CCTP Token Messenger Minter program).
5656
pub token_minter: UncheckedAccount<'info>,
5757

5858
/// CHECK: LocalToken is checked in CCTP. Seeds must be \["local_token", mint\] (CCTP Token Messenger Minter
59-
/// program).
59+
// program).
6060
#[account(mut)]
6161
pub local_token: UncheckedAccount<'info>,
6262

6363
/// CHECK: EventAuthority is checked in CCTP. Seeds must be \["__event_authority"\] (CCTP Token Messenger Minter
64-
/// program).
64+
// program).
6565
pub cctp_event_authority: UncheckedAccount<'info>,
6666

6767
#[account(mut)]

programs/svm-spoke/src/lib.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ use utils::*;
4646
pub mod svm_spoke {
4747
use super::*;
4848

49-
/// **************************************
50-
/// ADMIN FUNCTIONS *
51-
/// *************************************
49+
// **************************************
50+
// ADMIN FUNCTIONS *
51+
// *************************************
5252

5353
/// Initializes the state for the SVM Spoke Pool. Only callable once.
5454
///
@@ -208,16 +208,16 @@ pub mod svm_spoke {
208208
instructions::emergency_delete_root_bundle(ctx, root_bundle_id)
209209
}
210210

211-
/// **************************************
212-
/// DEPOSIT FUNCTIONS *
213-
/// *************************************
211+
// **************************************
212+
// DEPOSIT FUNCTIONS *
213+
// *************************************
214214

215215
/// Request to bridge input_token to a target chain and receive output_token.
216216
///
217217
/// The fee paid to relayers and the system is captured in the spread between the input and output amounts,
218218
/// denominated in the input token. A relayer on the destination chain will send `output_amount` of `output_token`
219219
/// to the recipient and receive `input_token` on a repayment chain of their choice. The fee accounts for:
220-
/// Destination transaction costs, relayer's opportunity cost of capital while waiting for a refund during the
220+
/// destination transaction costs, relayer's opportunity cost of capital while waiting for a refund during the
221221
/// optimistic challenge window in the HubPool, and the system fee charged to the relayer.
222222
///
223223
/// On the destination chain, a unique hash of the deposit data is used to identify this deposit. Modifying any
@@ -239,7 +239,7 @@ pub mod svm_spoke {
239239
/// ### Parameters
240240
/// - depositor: The account credited with the deposit. Can be different from the signer.
241241
/// - recipient: The account receiving funds on the destination chain. Depending on the output chain can be an ETH
242-
/// address or a contract address or any other address type encoded as a bytes32 field.
242+
/// address or a contract address or any other address type encoded as a bytes32 field.
243243
/// - input_token: The token pulled from the caller's account and locked into this program's vault on deposit.
244244
/// - output_token: The token that the relayer will send to the recipient on the destination chain.
245245
/// - input_amount: The amount of input tokens to pull from the caller's account and lock into the vault. This
@@ -293,8 +293,8 @@ pub mod svm_spoke {
293293
)
294294
}
295295

296-
// Equivalent to deposit_v3 except quote_timestamp is set to the current time.
297-
// The deposit `fill_deadline` is calculated as the current time plus `fill_deadline_offset`.
296+
/// Equivalent to deposit_v3 except quote_timestamp is set to the current time.
297+
/// The deposit `fill_deadline` is calculated as the current time plus `fill_deadline_offset`.
298298
pub fn deposit_v3_now(
299299
ctx: Context<DepositV3>,
300300
depositor: Pubkey,
@@ -381,9 +381,9 @@ pub mod svm_spoke {
381381
Ok(utils::get_unsafe_deposit_id(signer, depositor, deposit_nonce))
382382
}
383383

384-
/// **************************************
385-
/// RELAYER FUNCTIONS *
386-
/// *************************************
384+
// **************************************
385+
// RELAYER FUNCTIONS *
386+
// *************************************
387387

388388
/// Fulfill request to bridge cross chain by sending specified output tokens to recipient.
389389
///
@@ -434,7 +434,7 @@ pub mod svm_spoke {
434434
/// - message: The message to send to the recipient if the recipient is a contract that implements a
435435
/// handle_v3_across_message() public function.
436436
/// - repayment_chain_id: Chain of SpokePool where relayer wants to be refunded after the challenge window has
437-
/// passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.
437+
/// passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.
438438
/// - repayment_address: The address of the recipient on the repayment chain that they want to be refunded to.
439439
/// Note: relay_data, repayment_chain_id, and repayment_address are optional parameters. If None for any of these
440440
/// is passed, the caller must load them via the instruction_params account.
@@ -497,9 +497,9 @@ pub mod svm_spoke {
497497
instructions::create_token_accounts(ctx)
498498
}
499499

500-
/// **************************************
501-
/// BUNDLE FUNCTIONS *
502-
/// *************************************
500+
// **************************************
501+
// BUNDLE FUNCTIONS *
502+
// *************************************
503503

504504
/// Executes relayer refund leaf.
505505
///
@@ -536,8 +536,7 @@ pub mod svm_spoke {
536536
/// - token_program: The token program.
537537
/// - system_program: The system program required for account creation.
538538
///
539-
/// execute_relayer_refund_leaf executes in mode (a) where refunds are sent to ATA directly.
540-
/// execute_relayer_refund_leaf_deferred executes in mode (b) where refunds are allocated to the claim_account PDA.
539+
/// execute_relayer_refund_leaf executes in mode where refunds are sent to ATA directly.
541540
pub fn execute_relayer_refund_leaf<'c, 'info>(
542541
ctx: Context<'_, '_, 'c, 'info, ExecuteRelayerRefundLeaf<'info>>,
543542
) -> Result<()>
@@ -547,6 +546,7 @@ pub mod svm_spoke {
547546
instructions::execute_relayer_refund_leaf(ctx, false)
548547
}
549548

549+
/// Similar to execute_relayer_refund_leaf, but executes in mode where refunds are allocated to claim_account PDAs.
550550
pub fn execute_relayer_refund_leaf_deferred<'c, 'info>(
551551
ctx: Context<'_, '_, 'c, 'info, ExecuteRelayerRefundLeaf<'info>>,
552552
) -> Result<()>
@@ -672,9 +672,9 @@ pub mod svm_spoke {
672672
instructions::close_claim_account(ctx)
673673
}
674674

675-
/// **************************************
676-
/// SLOW FILL FUNCTIONS *
677-
/// *************************************
675+
// **************************************
676+
// SLOW FILL FUNCTIONS *
677+
// *************************************
678678

679679
/// Requests Across to send LP funds to this program to fulfill a slow fill.
680680
///
@@ -757,9 +757,9 @@ pub mod svm_spoke {
757757
instructions::execute_v3_slow_relay_leaf(ctx, slow_fill_leaf, proof)
758758
}
759759

760-
/// **************************************
761-
/// CCTP FUNCTIONS FUNCTIONS *
762-
/// *************************************
760+
// **************************************
761+
// CCTP FUNCTIONS FUNCTIONS *
762+
// *************************************
763763

764764
/// Handles cross-chain messages received from L1 Ethereum over CCTP.
765765
///

0 commit comments

Comments
 (0)