Skip to content

Commit 4ce5c42

Browse files
author
Edward (Mike's bot)
committed
docs(token-swap/quasar): drop redundant 'Accounts for X' doc-comments
The opening line of each instruction's account-struct doc-comment was paraphrasing the struct name (e.g. "Accounts for sweeping the admin's trading-fee claim" above `ClaimAdminFeesAccounts`). Dropped those lines and kept only the substantive notes (auth model, mut rationale, seed quirks). Also fixed a stray literal \u2014 sequence in create_config.rs that should have been an em-dash.
1 parent 9be8bc5 commit 4ce5c42

6 files changed

Lines changed: 10 additions & 22 deletions

File tree

tokens/token-swap/quasar/src/instructions/claim_admin_fees.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ use {
77
quasar_spl::prelude::*,
88
};
99

10-
/// Accounts for sweeping the admin's accumulated trading-fee claim out of a
11-
/// pool.
12-
///
1310
/// Authorisation: `admin` is a `Signer` and must match `Config.admin`. We
1411
/// enforce that explicitly in the handler since quasar doesn't have an
1512
/// Anchor-style `has_one` constraint.

tokens/token-swap/quasar/src/instructions/create_config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ use {
33
quasar_lang::prelude::*,
44
};
55

6-
/// Accounts for creating the singleton AMM config.
7-
///
86
/// `Config` is a global singleton: one account per deployed program, derived
9-
/// at the fixed seed `b"config"`. There is no `id` parameter \u2014 calling this
7+
/// at the fixed seed `b"config"`. There is no `id` parameter calling this
108
/// twice for the same program will fail because the account already exists.
119
#[derive(Accounts)]
1210
pub struct CreateConfigAccounts {

tokens/token-swap/quasar/src/instructions/create_pool.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ use {
77
quasar_spl::prelude::*,
88
};
99

10-
/// Accounts for creating a new liquidity pool.
10+
/// Seeds:
11+
/// - `pool_config = [config, mint_a, mint_b]`
12+
/// - `pool_authority = [b"authority", config, mint_a, mint_b]`
13+
/// - `liquidity_provider_mint = [b"liquidity", config, mint_a, mint_b]`
1114
///
12-
/// Seeds are based on account addresses: pool_config = [config, mint_a, mint_b],
13-
/// pool_authority = [b"authority", config, mint_a, mint_b],
14-
/// liquidity_provider_mint = [b"liquidity", config, mint_a, mint_b].
15-
///
16-
/// Note: post-PR-#195 the seed prefix is always emitted first by
17-
/// `#[derive(Seeds)]`, so pool_authority/liquidity_provider_mint now derive with
18-
/// the literal prefix in front (different on-chain addresses than the
19-
/// Anchor sibling, but internally consistent within this program).
15+
/// `pool_authority` and `liquidity_provider_mint` derive at different
16+
/// on-chain addresses than the Anchor sibling because `#[derive(Seeds)]`
17+
/// emits the literal prefix first. Internally consistent within this program.
2018
#[derive(Accounts)]
2119
pub struct CreatePoolAccounts {
2220
#[account(address = ConfigPda::seeds())]

tokens/token-swap/quasar/src/instructions/deposit_liquidity.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ use {
77
quasar_spl::prelude::*,
88
};
99

10-
/// Accounts for depositing liquidity into a pool.
11-
///
12-
/// Seeds reference the config, mint_a, and mint_b account addresses — these
13-
/// must be provided as separate account inputs.
10+
/// Seeds reference the `config`, `mint_a`, and `mint_b` account addresses,
11+
/// which must be provided as separate account inputs.
1412
#[derive(Accounts)]
1513
pub struct DepositLiquidityAccounts {
1614
#[account(address = ConfigPda::seeds())]

tokens/token-swap/quasar/src/instructions/swap_tokens.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ use {
77
quasar_spl::prelude::*,
88
};
99

10-
/// Accounts for swapping tokens using the constant-product formula.
11-
///
1210
/// `pool_config` is mutable because each swap accumulates the admin's slice
1311
/// of the trading fee into `admin_fees_owed_a` / `admin_fees_owed_b`.
1412
#[derive(Accounts)]

tokens/token-swap/quasar/src/instructions/withdraw_liquidity.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use {
77
quasar_spl::prelude::*,
88
};
99

10-
/// Accounts for withdrawing liquidity from a pool.
1110
#[derive(Accounts)]
1211
pub struct WithdrawLiquidityAccounts {
1312
#[account(address = ConfigPda::seeds())]

0 commit comments

Comments
 (0)