examples: Spelling corrections (#315)
This commit is contained in:
parent
5b807d7804
commit
0d4a820231
|
@ -1,6 +1,6 @@
|
|||
# Examples
|
||||
|
||||
The examples presented here are for educatational purposes only. No program
|
||||
The examples presented here are for educational purposes only. No program
|
||||
here is guaranteed to be safe or secure in any way. In many cases, they are
|
||||
simply just simple integration tests to illustrate some particular functionality
|
||||
of the framework. If used, one should audit any programs used and take full
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
//! Pubkey can govern. One can use the multisig as a BPF program upgrade
|
||||
//! authority, a mint authority, etc.
|
||||
//!
|
||||
//! To use, one must first create a `Multisig` account, sepcifying two important
|
||||
//! To use, one must first create a `Multisig` account, specifying two important
|
||||
//! parameters:
|
||||
//!
|
||||
//! 1. Owners - the set of addresses that sign transactions for the multisig.
|
||||
//! 2. Threhsold - the number of signers required to execute a transaction.
|
||||
//! 2. Threshold - the number of signers required to execute a transaction.
|
||||
//!
|
||||
//! Once the `Multisig` account is created, once can create a `Transaction`
|
||||
//! Once the `Multisig` account is created, one can create a `Transaction`
|
||||
//! account, specifying the parameters for a normal solana transaction.
|
||||
//!
|
||||
//! To sign, owners shold invoke the `approve` instruction, and finally,
|
||||
//! the `execute_transaction`, once enough (i.e. `threhsold`) of the owners have
|
||||
//! To sign, owners should invoke the `approve` instruction, and finally,
|
||||
//! the `execute_transaction`, once enough (i.e. `threshold`) of the owners have
|
||||
//! signed.
|
||||
|
||||
use anchor_lang::prelude::*;
|
||||
|
@ -118,7 +118,7 @@ pub mod multisig {
|
|||
return Err(ErrorCode::AlreadyExecuted.into());
|
||||
}
|
||||
|
||||
// Do we have enough signers.
|
||||
// Do we have enough signers?
|
||||
let sig_count = ctx
|
||||
.accounts
|
||||
.transaction
|
||||
|
@ -226,7 +226,7 @@ pub struct Transaction {
|
|||
multisig: Pubkey,
|
||||
// Target program to execute against.
|
||||
program_id: Pubkey,
|
||||
// Accounts requried for the transaction.
|
||||
// Accounts required for the transaction.
|
||||
accounts: Vec<TransactionAccount>,
|
||||
// Instruction data for the transaction.
|
||||
data: Vec<u8>,
|
||||
|
|
|
@ -89,7 +89,7 @@ describe("multisig", () => {
|
|||
assert.ok(txAccount.multisig.equals(multisig.publicKey));
|
||||
assert.equal(txAccount.didExecute, false);
|
||||
|
||||
// Other owner approves transactoin.
|
||||
// Other owner approves transaction.
|
||||
await program.rpc.approve({
|
||||
accounts: {
|
||||
multisig: multisig.publicKey,
|
||||
|
@ -99,7 +99,7 @@ describe("multisig", () => {
|
|||
signers: [ownerB],
|
||||
});
|
||||
|
||||
// Now that we've reached the threshold, send the transactoin.
|
||||
// Now that we've reached the threshold, send the transaction.
|
||||
await program.rpc.executeTransaction({
|
||||
accounts: {
|
||||
multisig: multisig.publicKey,
|
||||
|
|
Loading…
Reference in New Issue