docs: Update install commands

This commit is contained in:
armaniferrante 2021-04-06 11:49:24 -07:00
parent f7b92e2e7c
commit 3f31be2bea
No known key found for this signature in database
GPG Key ID: 58BEF301E91F7828
2 changed files with 5 additions and 3 deletions

View File

@ -37,10 +37,10 @@ For now, we can use Cargo to install the CLI.
cargo install --git https://github.com/project-serum/anchor --tag v0.4.0 anchor-cli --locked
```
On Linux systems you may need to install additional dependencies. On Ubuntu,
On Linux systems you may need to install additional dependencies if `cargo install` fails. On Ubuntu,
```bash
sudo apt-get install -y pkg-config build-essential libudev-dev
sudo apt-get update && apt-get upgrade && apt-get install -y pkg-config build-essential libudev-dev
```
To install the JavaScript package.

View File

@ -57,10 +57,12 @@ If you look at the `Cargo.toml` for this example, you'll see
Often it's useful for a program to sign instructions. For example, if a program controls a token
account and wants to send tokens to another account, it must sign. In Solana, this is done by specifying
"signer seeds" on CPI (TODO: add link to docs). To do this using the example above, simply change
"signer seeds" on CPI. To do this using the example above, simply change
`CpiContext::new(cpi_accounts, cpi_program)` to
`CpiContext::new_with_signer(cpi_accounts, cpi_program, signer_seeds)`.
For more background on signing with program derived addresses, see the official Solana [documentation](https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts).
## Return values
Solana currently has no way to return values from CPI, alas. However, one can approximate this