Skip to content

Commit c2c8eb6

Browse files
authored
typos and grammar fixes (solana-labs#116)
1 parent 2bcd4cf commit c2c8eb6

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Success
123123
124124
- Ensure you've [started the local cluster](#start-local-solana-cluster) and [built the on-chain program](#build-the-on-chain-program).
125125
- Ensure Docker is running. You might try bumping up its resource settings, 8 GB of memory and 3 GB of swap should help.
126-
- The client output should include program log messages that indicate why the program filed.
126+
- The client output should include program log messages that indicate why the program failed.
127127
- `program log: <message>`
128128
- Inspect the Solana cluster logs looking for any failed transactions or failed on-chain programs
129129
- Expand the log filter and restart the cluster to see more detail
@@ -142,7 +142,7 @@ Now when you rerun `npm run start`, you should see the results of your changes.
142142
143143
More information about how Solana works is available in the [Solana documentation](https://docs.solana.com/) and all the source code is available on [github](https://github.com/solana-labs/solana)
144144
145-
Futher questions? Visit us on [Discord](https://discordapp.com/invite/pquxPsq)
145+
Further questions? Visit us on [Discord](https://discordapp.com/invite/pquxPsq)
146146
147147
## Learn about the client
148148
@@ -156,15 +156,15 @@ The [client's entrypoint](https://github.com/solana-labs/example-helloworld/blob
156156
157157
### Establish a connection to the cluster
158158
159-
The client establishes a connection with the client by calling [`establishConnection`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L45).
159+
The client establishes a connection with the cluster by calling [`establishConnection`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L45).
160160
161161
### Load the helloworld on-chain program if not already loaded
162162
163163
The process of loading a program on the cluster includes storing the shared object's bytes in a Solana account's data vector and marking the account executable.
164164
165-
The client loads the program by calling [`loadProgram`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L54). The first time `loadProgram` is called the client:
165+
The client loads the program by calling [`loadProgram`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L54). The first time `loadProgram` is called, the client:
166166
167-
- Read the shared object from the file system
167+
- Reads the shared object from the file system
168168
- Calculates the fees associated with loading the program
169169
- Airdrops lamports to a payer account to pay for the load
170170
- Loads the program via the Solana web3.js function ['BPFLoader.load']([TODO](https://github.com/solana-labs/solana-web3.js/blob/37d57926b9dba05d1ad505d4fd39d061030e2e87/src/bpf-loader.js#L36))
@@ -173,7 +173,7 @@ The client loads the program by calling [`loadProgram`](https://github.com/solan
173173
174174
### Send a "Hello" transaction to the on-chain program
175175
176-
The client then constructs and sends a "Hello" transaction to the program by calling [`sayHello`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L121). The transaction contains a single very simple instruction that primarily caries the public key of the helloworld program account to call and the "greeter" account to which the client wishes to say "Hello" to.
176+
The client then constructs and sends a "Hello" transaction to the program by calling [`sayHello`](https://github.com/solana-labs/example-helloworld/blob/e936ab42e168f1939df0164d5996adf9ca635bd0/src/client/hello_world.js#L121). The transaction contains a single very simple instruction that primarily carries the public key of the helloworld program account to call and the "greeter" account to which the client wishes to say "Hello" to.
177177
178178
### Query the Solana account used in the "Hello" transaction
179179
@@ -200,7 +200,7 @@ fn process_instruction<'a>(
200200
201201
- `program_id` is the public key of the currently executing program. The same program can be uploaded to the cluster under different accounts, and a program can use `program_id` to determine which instance of the program is currently executing.
202202
- `accounts` is a slice of [`Account Info's](https://github.com/solana-labs/solana/blob/b4e00275b2da6028cc839a79cdc4453d4c9aca13/sdk/src/account_info.rs#L10) representing each account included in the instruction being processed.
203-
- `_instruction_data` is a data vector containing the [data passed as part of the instruction](https://github.com/solana-labs/solana-web3.js/blob/37d57926b9dba05d1ad505d4fd39d061030e2e87/src/transaction.js#L46). In the case of helloworld no instruction data is passed and thus ignored (all instructions are treated as a "Hello" instruction). Typically the instruction data would contain information about what kind of command the program should process and details about that particular command.
203+
- `_instruction_data` is a data vector containing the [data passed as part of the instruction](https://github.com/solana-labs/solana-web3.js/blob/37d57926b9dba05d1ad505d4fd39d061030e2e87/src/transaction.js#L46). In the case of helloworld, no instruction data is passed and thus ignored (all instructions are treated as a "Hello" instruction). Typically the instruction data would contain information about what kind of command the program should process and details about that particular command.
204204
205205
### Processing an instruction
206206
@@ -226,7 +226,6 @@ There are some limitations since these programs run in a resource-constrained, s
226226
- `std::net`
227227
- `std::os`
228228
- `std::future`
229-
- `std::net`
230229
- `std::process`
231230
- `std::sync`
232231
- `std::task`
@@ -235,8 +234,8 @@ There are some limitations since these programs run in a resource-constrained, s
235234
- Limited access to:
236235
- `std::hash`
237236
- `std::os`
238-
- Bincode is extreamly computationally expensive in both cycles and call depth and should be avoided
239-
- String formating should be avoided since it is also computationaly expensive
237+
- Bincode is extremely computationally expensive in both cycles and call depth and should be avoided
238+
- String formatting should be avoided since it is also computationally expensive
240239
- No support for `println!`, `print!`, the Solana SDK helpers in `src/log.rs` should be used instead
241240
- The runtime enforces a limit on the number of instructions a program can execute during the processing of one instruction
242241
@@ -261,7 +260,7 @@ $ npm run cluster:localnet
261260
262261
## Expand your skills with advanced examples
263262
264-
There is lots more to learn; The following examples demonstrate more advanced features like custom errors, advanced account handling, suggestions for data serialization, benchmarking, etc..
263+
There is lots more to learn; The following examples demonstrate more advanced features like custom errors, advanced account handling, suggestions for data serialization, benchmarking, etc...
265264
266265
- [ERC-20-like Token](https://github.com/solana-labs/example-token)
267266
- [TicTacToe](https://github.com/solana-labs/example-tictactoe)

0 commit comments

Comments
 (0)