Skip to content

Commit

Permalink
Fix typos in comments (#2830)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Mar 5, 2024
1 parent 2f552a1 commit 3e2cd00
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@ fn account(
idl_filepath: Option<String>,
) -> Result<()> {
let (program_name, account_type_name) = account_type
.split_once('.') // Split at first occurance of dot
.split_once('.') // Split at first occurrence of dot
.and_then(|(x, y)| y.find('.').map_or_else(|| Some((x, y)), |_| None)) // ensures no dots in second substring
.ok_or_else(|| {
anyhow!(
Expand Down
4 changes: 2 additions & 2 deletions lang/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub trait Lamports<'info>: AsRef<AccountInfo<'info>> {

/// Add lamports to the account.
///
/// This method is useful for transfering lamports from a PDA.
/// This method is useful for transferring lamports from a PDA.
///
/// # Requirements
///
Expand All @@ -203,7 +203,7 @@ pub trait Lamports<'info>: AsRef<AccountInfo<'info>> {

/// Subtract lamports from the account.
///
/// This method is useful for transfering lamports from a PDA.
/// This method is useful for transferring lamports from a PDA.
///
/// # Requirements
///
Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/accounts/__client_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
// Re-export all composite account structs (i.e. other structs deriving
// accounts embedded into this struct. Required because, these embedded
// structs are *not* visible from the #[program] macro, which is responsible
// for generating the `accounts` mod, which aggregates all the the generated
// for generating the `accounts` mod, which aggregates all the generated
// accounts used for structs.
let re_exports: Vec<proc_macro2::TokenStream> = {
// First, dedup the exports.
Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/accounts/__cpi_client_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
// Re-export all composite account structs (i.e. other structs deriving
// accounts embedded into this struct. Required because, these embedded
// structs are *not* visible from the #[program] macro, which is responsible
// for generating the `accounts` mod, which aggregates all the the generated
// for generating the `accounts` mod, which aggregates all the generated
// accounts used for structs.
let re_exports: Vec<proc_macro2::TokenStream> = {
// First, dedup the exports.
Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/accounts/try_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub fn generate_constraints(accs: &AccountsStruct) -> proc_macro2::TokenStream {
accs.fields.iter().filter(|af| !is_init(af)).collect();

// Deserialization for each pda init field. This must be after
// the inital extraction from the accounts slice and before access_checks.
// the initial extraction from the accounts slice and before access_checks.
let init_fields: Vec<proc_macro2::TokenStream> = accs
.fields
.iter()
Expand Down
4 changes: 2 additions & 2 deletions tests/lockup/docs/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ to understand, contribute to, or modify the code.
Accounts are the pieces of state owned by a Solana program. For reference while reading, here are all
accounts used by the **Registry** program.

* `Registrar` - Analagous to an SPL token `Mint`, the `Registrar` defines a staking instance. It has its own pool, and it's own set of rewards distributed amongst its own set of stakers.
* `Registrar` - Analogous to an SPL token `Mint`, the `Registrar` defines a staking instance. It has its own pool, and it's own set of rewards distributed amongst its own set of stakers.
* `Member` - Analogous to an SPL token `Account`, `Member` accounts represent a **beneficiary**'s (i.e. a wallet's) stake state. This account has several vaults, all of which represent the funds belonging to an individual user.
* `PendingWithdrawal` - A transfer out of the staking pool (poorly named since it's not a withdrawal out of the program. But a withdrawal out of the staking pool and into a `Member`'s freely available balances).
* `RewardVendor` - A reward that has been dropped onto stakers and is distributed pro rata to staked `Member` beneficiaries.
Expand Down Expand Up @@ -118,7 +118,7 @@ recreating a BFT system off chain.

Another solution considerered was to use a uniswap-style AMM pool (without the swapping).
This has a lot of advantages. First it's easy to reason about and implement in a single transaction.
To drop rewards gloablly onto the pool, one can deposit funds directly into the pool, in which case
To drop rewards globally onto the pool, one can deposit funds directly into the pool, in which case
the reward is automatically received by owners of the staking pool token upon redemption, a process
known as "gulping"--since dropping rewards increases the total value of the pool
while their proportion of the pool remained constant.
Expand Down
4 changes: 2 additions & 2 deletions ts/packages/spl-governance/program/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ pub struct ProposalV1 {
/// The number of instructions included in the proposal
pub instructions_count: u16,

/// The index of the the next instruction to be added
/// The index of the next instruction to be added
pub instructions_next_index: u16,

/// When the Proposal was created and entered Draft state
Expand Down Expand Up @@ -1232,7 +1232,7 @@ pub struct ProposalOption {
/// The number of transactions included in the option
pub transactions_count: u16,

/// The index of the the next transaction to be added
/// The index of the next transaction to be added
pub transactions_next_index: u16,
}

Expand Down

0 comments on commit 3e2cd00

Please sign in to comment.