Skip to content

Commit 6f9d697

Browse files
committed
Fix spelling
1 parent 01fe6c8 commit 6f9d697

File tree

3 files changed

+30
-32
lines changed

3 files changed

+30
-32
lines changed

Diff for: interface/src/instruction.rs

+28-30
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub enum TokenInstruction<'a> {
3636
/// associated with another mint, that mint must be initialized before this
3737
/// command can succeed.
3838
///
39-
/// The `InitializeAccount` instruction requires no signers and MUST be
39+
/// The [`InitializeAccount`] instruction requires no signers and MUST be
4040
/// included within the same Transaction as the system program's
4141
/// `CreateAccount` instruction that creates the account being initialized.
4242
/// Otherwise another party can acquire ownership of the uninitialized
@@ -57,7 +57,7 @@ pub enum TokenInstruction<'a> {
5757
/// present. The variant field represents the number of signers (M)
5858
/// required to validate this multisignature account.
5959
///
60-
/// The `InitializeMultisig` instruction requires no signers and MUST be
60+
/// The [`InitializeMultisig`] instruction requires no signers and MUST be
6161
/// included within the same Transaction as the system program's
6262
/// `CreateAccount` instruction that creates the account being initialized.
6363
/// Otherwise another party can acquire ownership of the uninitialized
@@ -67,8 +67,7 @@ pub enum TokenInstruction<'a> {
6767
///
6868
/// 0. `[writable]` The multisignature account to initialize.
6969
/// 1. `[]` Rent sysvar
70-
/// 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <=
71-
/// 11.
70+
/// 2+N. `[signer]` The signer accounts, must equal to N where `1 <= N <= 11`.
7271
InitializeMultisig {
7372
/// The number of signers (M) required to validate this multisignature
7473
/// account.
@@ -91,7 +90,7 @@ pub enum TokenInstruction<'a> {
9190
/// 0. `[writable]` The source account.
9291
/// 1. `[writable]` The destination account.
9392
/// 2. `[]` The source account's multisignature owner/delegate.
94-
/// 3. ..3+M `[signer]` M signer accounts.
93+
/// 3+M. `[signer]` M signer accounts.
9594
Transfer {
9695
/// The amount of tokens to transfer.
9796
amount: u64,
@@ -111,7 +110,7 @@ pub enum TokenInstruction<'a> {
111110
/// 0. `[writable]` The source account.
112111
/// 1. `[]` The delegate.
113112
/// 2. `[]` The source account's multisignature owner.
114-
/// 3. ..3+M `[signer]` M signer accounts
113+
/// 3+M. `[signer]` M signer accounts
115114
Approve {
116115
/// The amount of tokens the delegate is approved for.
117116
amount: u64,
@@ -128,7 +127,7 @@ pub enum TokenInstruction<'a> {
128127
/// * Multisignature owner
129128
/// 0. `[writable]` The source account.
130129
/// 1. `[]` The source account's multisignature owner.
131-
/// 2. ..2+M `[signer]` M signer accounts
130+
/// 2+M. `[signer]` M signer accounts
132131
Revoke,
133132

134133
/// Sets a new authority of a mint or account.
@@ -142,7 +141,7 @@ pub enum TokenInstruction<'a> {
142141
/// * Multisignature authority
143142
/// 0. `[writable]` The mint or account to change the authority of.
144143
/// 1. `[]` The mint's or account's current multisignature authority.
145-
/// 2. ..2+M `[signer]` M signer accounts
144+
/// 2+M. `[signer]` M signer accounts
146145
SetAuthority {
147146
/// The type of authority to update.
148147
authority_type: AuthorityType,
@@ -164,7 +163,7 @@ pub enum TokenInstruction<'a> {
164163
/// 0. `[writable]` The mint.
165164
/// 1. `[writable]` The account to mint tokens to.
166165
/// 2. `[]` The mint's multisignature mint-tokens authority.
167-
/// 3. ..3+M `[signer]` M signer accounts.
166+
/// 3+M. `[signer]` M signer accounts.
168167
MintTo {
169168
/// The amount of new tokens to mint.
170169
amount: u64,
@@ -184,7 +183,7 @@ pub enum TokenInstruction<'a> {
184183
/// 0. `[writable]` The account to burn from.
185184
/// 1. `[writable]` The token mint.
186185
/// 2. `[]` The account's multisignature owner/delegate.
187-
/// 3. ..3+M `[signer]` M signer accounts.
186+
/// 3+M. `[signer]` M signer accounts.
188187
Burn {
189188
/// The amount of tokens to burn.
190189
amount: u64,
@@ -204,10 +203,10 @@ pub enum TokenInstruction<'a> {
204203
/// 0. `[writable]` The account to close.
205204
/// 1. `[writable]` The destination account.
206205
/// 2. `[]` The account's multisignature owner.
207-
/// 3. ..3+M `[signer]` M signer accounts.
206+
/// 3+M. `[signer]` M signer accounts.
208207
CloseAccount,
209208

210-
/// Freeze an Initialized account using the Mint's freeze_authority (if
209+
/// Freeze an Initialized account using the Mint's [`freeze_authority`] (if
211210
/// set).
212211
///
213212
/// Accounts expected by this instruction:
@@ -221,10 +220,10 @@ pub enum TokenInstruction<'a> {
221220
/// 0. `[writable]` The account to freeze.
222221
/// 1. `[]` The token mint.
223222
/// 2. `[]` The mint's multisignature freeze authority.
224-
/// 3. ..3+M `[signer]` M signer accounts.
223+
/// 3+M. `[signer]` M signer accounts.
225224
FreezeAccount,
226225

227-
/// Thaw a Frozen account using the Mint's freeze_authority (if set).
226+
/// Thaw a Frozen account using the Mint's [`freeze_authority`] (if set).
228227
///
229228
/// Accounts expected by this instruction:
230229
///
@@ -237,7 +236,7 @@ pub enum TokenInstruction<'a> {
237236
/// 0. `[writable]` The account to freeze.
238237
/// 1. `[]` The token mint.
239238
/// 2. `[]` The mint's multisignature freeze authority.
240-
/// 3. ..3+M `[signer]` M signer accounts.
239+
/// 3+M. `[signer]` M signer accounts.
241240
ThawAccount,
242241

243242
/// Transfers tokens from one account to another either directly or via a
@@ -262,7 +261,7 @@ pub enum TokenInstruction<'a> {
262261
/// 1. `[]` The token mint.
263262
/// 2. `[writable]` The destination account.
264263
/// 3. `[]` The source account's multisignature owner/delegate.
265-
/// 4. ..4+M `[signer]` M signer accounts.
264+
/// 4+M. `[signer]` M signer accounts.
266265
TransferChecked {
267266
/// The amount of tokens to transfer.
268267
amount: u64,
@@ -290,7 +289,7 @@ pub enum TokenInstruction<'a> {
290289
/// 1. `[]` The token mint.
291290
/// 2. `[]` The delegate.
292291
/// 3. `[]` The source account's multisignature owner.
293-
/// 4. ..4+M `[signer]` M signer accounts
292+
/// 4+M. `[signer]` M signer accounts
294293
ApproveChecked {
295294
/// The amount of tokens the delegate is approved for.
296295
amount: u64,
@@ -301,7 +300,7 @@ pub enum TokenInstruction<'a> {
301300
/// Mints new tokens to an account. The native mint does not support
302301
/// minting.
303302
///
304-
/// This instruction differs from MintTo in that the decimals value is
303+
/// This instruction differs from [`MintTo`] in that the decimals value is
305304
/// checked by the caller. This may be useful when creating transactions
306305
/// offline or within a hardware wallet.
307306
///
@@ -316,15 +315,15 @@ pub enum TokenInstruction<'a> {
316315
/// 0. `[writable]` The mint.
317316
/// 1. `[writable]` The account to mint tokens to.
318317
/// 2. `[]` The mint's multisignature mint-tokens authority.
319-
/// 3. ..3+M `[signer]` M signer accounts.
318+
/// 3+M. `[signer]` M signer accounts.
320319
MintToChecked {
321320
/// The amount of new tokens to mint.
322321
amount: u64,
323322
/// Expected number of base 10 digits to the right of the decimal place.
324323
decimals: u8,
325324
},
326325

327-
/// Burns tokens by removing them from an account. `BurnChecked` does not
326+
/// Burns tokens by removing them from an account. [`BurnChecked`] does not
328327
/// support accounts associated with the native mint, use `CloseAccount`
329328
/// instead.
330329
///
@@ -343,15 +342,15 @@ pub enum TokenInstruction<'a> {
343342
/// 0. `[writable]` The account to burn from.
344343
/// 1. `[writable]` The token mint.
345344
/// 2. `[]` The account's multisignature owner/delegate.
346-
/// 3. ..3+M `[signer]` M signer accounts.
345+
/// 3+M. `[signer]` M signer accounts.
347346
BurnChecked {
348347
/// The amount of tokens to burn.
349348
amount: u64,
350349
/// Expected number of base 10 digits to the right of the decimal place.
351350
decimals: u8,
352351
},
353352

354-
/// Like InitializeAccount, but the owner pubkey is passed via instruction
353+
/// Like [`InitializeAccount`], but the owner pubkey is passed via instruction
355354
/// data rather than the accounts list. This variant may be preferable
356355
/// when using Cross Program Invocation from an instruction that does
357356
/// not need the owner's `AccountInfo` otherwise.
@@ -378,7 +377,7 @@ pub enum TokenInstruction<'a> {
378377
/// lamports.
379378
SyncNative,
380379

381-
/// Like InitializeAccount2, but does not require the Rent sysvar to be
380+
/// Like [`InitializeAccount2`], but does not require the Rent sysvar to be
382381
/// provided
383382
///
384383
/// Accounts expected by this instruction:
@@ -390,14 +389,13 @@ pub enum TokenInstruction<'a> {
390389
owner: Pubkey,
391390
},
392391

393-
/// Like InitializeMultisig, but does not require the Rent sysvar to be
392+
/// Like [`InitializeMultisig`], but does not require the Rent sysvar to be
394393
/// provided
395394
///
396395
/// Accounts expected by this instruction:
397396
///
398397
/// 0. `[writable]` The multisignature account to initialize.
399-
/// 1. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <=
400-
/// 11.
398+
/// 1+N. `[signer]` The signer accounts, must equal to N where `1 <= N <= 11`.
401399
InitializeMultisig2 {
402400
/// The number of signers (M) required to validate this multisignature
403401
/// account.
@@ -433,7 +431,7 @@ pub enum TokenInstruction<'a> {
433431
/// Initialize the Immutable Owner extension for the given token account
434432
///
435433
/// Fails if the account has already been initialized, so must be called
436-
/// before `InitializeAccount`.
434+
/// before [`InitializeAccount`].
437435
///
438436
/// No-ops in this version of the program, but is included for compatibility
439437
/// with the Associated Token Account program.
@@ -446,7 +444,7 @@ pub enum TokenInstruction<'a> {
446444
/// None
447445
InitializeImmutableOwner,
448446

449-
/// Convert an Amount of tokens to a UiAmount `string`, using the given
447+
/// Convert an Amount of tokens to a `UiAmount` `string`, using the given
450448
/// mint. In this version of the program, the mint can only specify the
451449
/// number of decimals.
452450
///
@@ -463,7 +461,7 @@ pub enum TokenInstruction<'a> {
463461
amount: u64,
464462
},
465463

466-
/// Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using
464+
/// Convert a `UiAmount` of tokens to a little-endian `u64` raw Amount, using
467465
/// the given mint. In this version of the program, the mint can only
468466
/// specify the number of decimals.
469467
///
@@ -474,7 +472,7 @@ pub enum TokenInstruction<'a> {
474472
///
475473
/// 0. `[]` The mint to calculate for
476474
UiAmountToAmount {
477-
/// The ui_amount of tokens to reformat.
475+
/// The `ui_amount` of tokens to reformat.
478476
ui_amount: &'a str,
479477
},
480478
// Any new variants also need to be added to program-2022 `TokenInstruction`, so that the

Diff for: interface/src/native_mint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use pinocchio::pubkey::Pubkey;
44

5-
/// There are 10^9 lamports in one SOL
5+
/// There are `10^9` lamports in one SOL
66
pub const DECIMALS: u8 = 9;
77

88
// The Mint for native SOL Token accounts

Diff for: interface/src/state/account.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct Account {
3131
/// Indicates whether this account represents a native token or not.
3232
is_native: [u8; 4],
3333

34-
/// If is_native.is_some, this is a native token, and the value logs the
34+
/// If `is_native.is_some`, this is a native token, and the value logs the
3535
/// rent-exempt reserve. An Account is required to be rent-exempt, so
3636
/// the value is used by the Processor to ensure that wrapped SOL
3737
/// accounts do not drop below this threshold.

0 commit comments

Comments
 (0)