docs: Update install commands
This commit is contained in:
parent
f7b92e2e7c
commit
3f31be2bea
|
@ -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
|
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
|
```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.
|
To install the JavaScript package.
|
||||||
|
|
|
@ -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
|
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
|
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(cpi_accounts, cpi_program)` to
|
||||||
`CpiContext::new_with_signer(cpi_accounts, cpi_program, signer_seeds)`.
|
`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
|
## Return values
|
||||||
|
|
||||||
Solana currently has no way to return values from CPI, alas. However, one can approximate this
|
Solana currently has no way to return values from CPI, alas. However, one can approximate this
|
||||||
|
|
Loading…
Reference in New Issue