update cpi docs (#15494)
This commit is contained in:
@ -242,9 +242,8 @@ as if it had the private key to sign the transaction.
|
|||||||
```rust,ignore
|
```rust,ignore
|
||||||
fn transfer_one_token_from_escrow(
|
fn transfer_one_token_from_escrow(
|
||||||
program_id: &Pubkey,
|
program_id: &Pubkey,
|
||||||
keyed_accounts: &[KeyedAccount]
|
accounts: &[AccountInfo],
|
||||||
) -> Result<()> {
|
) -> ProgramResult {
|
||||||
|
|
||||||
// User supplies the destination
|
// User supplies the destination
|
||||||
let alice_pubkey = keyed_accounts[1].unsigned_key();
|
let alice_pubkey = keyed_accounts[1].unsigned_key();
|
||||||
|
|
||||||
@ -258,7 +257,7 @@ fn transfer_one_token_from_escrow(
|
|||||||
// executing program ID and the supplied keywords.
|
// executing program ID and the supplied keywords.
|
||||||
// If the derived address matches a key marked as signed in the instruction
|
// If the derived address matches a key marked as signed in the instruction
|
||||||
// then that key is accepted as signed.
|
// then that key is accepted as signed.
|
||||||
invoke_signed(&instruction, &[&["escrow"]])?
|
invoke_signed(&instruction, accounts, &[&["escrow"]])
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user