From 0a1fcfa08b74d76f11bc6a45b37a304f41dcec88 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 17 Feb 2021 14:50:25 +0000 Subject: [PATCH] docs: Remove references to "create_address_with_seed" (#15339) (#15372) (cherry picked from commit 3ac7e09de66f8a38a4da30cc4470fe3c55cf605a) Co-authored-by: Jon Cinque --- .../programming-model/calling-between-programs.md | 4 ++-- programs/stake/src/stake_instruction.rs | 2 +- sdk/program/src/system_instruction.rs | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/src/developing/programming-model/calling-between-programs.md b/docs/src/developing/programming-model/calling-between-programs.md index fdb392ac48..5b37c9e6f8 100644 --- a/docs/src/developing/programming-model/calling-between-programs.md +++ b/docs/src/developing/programming-model/calling-between-programs.md @@ -182,12 +182,12 @@ off the curve. Deterministic program addresses for programs follow a similar derivation path as Accounts created with `SystemInstruction::CreateAccountWithSeed` which is -implemented with `system_instruction::create_address_with_seed`. +implemented with `Pubkey::create_with_seed`. For reference that implementation is as follows: ```rust,ignore -pub fn create_address_with_seed( +pub fn create_with_seed( base: &Pubkey, seed: &str, program_id: &Pubkey, diff --git a/programs/stake/src/stake_instruction.rs b/programs/stake/src/stake_instruction.rs index 5179fa5ba3..c85638c0fe 100644 --- a/programs/stake/src/stake_instruction.rs +++ b/programs/stake/src/stake_instruction.rs @@ -263,7 +263,7 @@ pub fn split_with_seed( stake_pubkey: &Pubkey, authorized_pubkey: &Pubkey, lamports: u64, - split_stake_pubkey: &Pubkey, // derived using create_address_with_seed() + split_stake_pubkey: &Pubkey, // derived using create_with_seed() base: &Pubkey, // base seed: &str, // seed ) -> Vec { diff --git a/sdk/program/src/system_instruction.rs b/sdk/program/src/system_instruction.rs index 7b1b803480..bc5db496b8 100644 --- a/sdk/program/src/system_instruction.rs +++ b/sdk/program/src/system_instruction.rs @@ -242,10 +242,10 @@ pub fn create_account( } // we accept `to` as a parameter so that callers do their own error handling when -// calling create_address_with_seed() +// calling create_with_seed() pub fn create_account_with_seed( from_pubkey: &Pubkey, - to_pubkey: &Pubkey, // must match create_address_with_seed(base, seed, owner) + to_pubkey: &Pubkey, // must match create_with_seed(base, seed, owner) base: &Pubkey, seed: &str, lamports: u64, @@ -281,7 +281,7 @@ pub fn assign(pubkey: &Pubkey, owner: &Pubkey) -> Instruction { } pub fn assign_with_seed( - address: &Pubkey, // must match create_address_with_seed(base, seed, owner) + address: &Pubkey, // must match create_with_seed(base, seed, owner) base: &Pubkey, seed: &str, owner: &Pubkey, @@ -314,7 +314,7 @@ pub fn transfer(from_pubkey: &Pubkey, to_pubkey: &Pubkey, lamports: u64) -> Inst } pub fn transfer_with_seed( - from_pubkey: &Pubkey, // must match create_address_with_seed(base, seed, owner) + from_pubkey: &Pubkey, // must match create_with_seed(base, seed, owner) from_base: &Pubkey, from_seed: String, from_owner: &Pubkey, @@ -347,7 +347,7 @@ pub fn allocate(pubkey: &Pubkey, space: u64) -> Instruction { } pub fn allocate_with_seed( - address: &Pubkey, // must match create_address_with_seed(base, seed, owner) + address: &Pubkey, // must match create_with_seed(base, seed, owner) base: &Pubkey, seed: &str, space: u64,