22
33use {
44 crate :: id,
5+ solana_address:: Address ,
56 solana_instruction:: { AccountMeta , Instruction } ,
67 solana_program_error:: ProgramError ,
7- solana_pubkey:: Pubkey ,
88 std:: mem:: size_of,
99} ;
1010
@@ -134,7 +134,7 @@ impl<'a> RecordInstruction<'a> {
134134}
135135
136136/// Create a `RecordInstruction::Initialize` instruction
137- pub fn initialize ( record_account : & Pubkey , authority : & Pubkey ) -> Instruction {
137+ pub fn initialize ( record_account : & Address , authority : & Address ) -> Instruction {
138138 Instruction {
139139 program_id : id ( ) ,
140140 accounts : vec ! [
@@ -146,7 +146,7 @@ pub fn initialize(record_account: &Pubkey, authority: &Pubkey) -> Instruction {
146146}
147147
148148/// Create a `RecordInstruction::Write` instruction
149- pub fn write ( record_account : & Pubkey , signer : & Pubkey , offset : u64 , data : & [ u8 ] ) -> Instruction {
149+ pub fn write ( record_account : & Address , signer : & Address , offset : u64 , data : & [ u8 ] ) -> Instruction {
150150 Instruction {
151151 program_id : id ( ) ,
152152 accounts : vec ! [
@@ -159,9 +159,9 @@ pub fn write(record_account: &Pubkey, signer: &Pubkey, offset: u64, data: &[u8])
159159
160160/// Create a `RecordInstruction::SetAuthority` instruction
161161pub fn set_authority (
162- record_account : & Pubkey ,
163- signer : & Pubkey ,
164- new_authority : & Pubkey ,
162+ record_account : & Address ,
163+ signer : & Address ,
164+ new_authority : & Address ,
165165) -> Instruction {
166166 Instruction {
167167 program_id : id ( ) ,
@@ -175,7 +175,11 @@ pub fn set_authority(
175175}
176176
177177/// Create a `RecordInstruction::CloseAccount` instruction
178- pub fn close_account ( record_account : & Pubkey , signer : & Pubkey , receiver : & Pubkey ) -> Instruction {
178+ pub fn close_account (
179+ record_account : & Address ,
180+ signer : & Address ,
181+ receiver : & Address ,
182+ ) -> Instruction {
179183 Instruction {
180184 program_id : id ( ) ,
181185 accounts : vec ! [
@@ -188,7 +192,7 @@ pub fn close_account(record_account: &Pubkey, signer: &Pubkey, receiver: &Pubkey
188192}
189193
190194/// Create a `RecordInstruction::Reallocate` instruction
191- pub fn reallocate ( record_account : & Pubkey , signer : & Pubkey , data_length : u64 ) -> Instruction {
195+ pub fn reallocate ( record_account : & Address , signer : & Address , data_length : u64 ) -> Instruction {
192196 Instruction {
193197 program_id : id ( ) ,
194198 accounts : vec ! [
0 commit comments