@@ -71,7 +71,7 @@ impl Default for TransferInstructionData {
7171
7272#[ derive( BorshSerialize , BorshDeserialize , Clone , Debug , Eq , PartialEq ) ]
7373pub struct TransferInstructionArgs {
74- pub amount : u64 ,
74+ pub lamports : u64 ,
7575}
7676
7777impl TransferInstructionArgs {
@@ -90,7 +90,7 @@ impl TransferInstructionArgs {
9090pub struct TransferBuilder {
9191 source : Option < solana_address:: Address > ,
9292 destination : Option < solana_address:: Address > ,
93- amount : Option < u64 > ,
93+ lamports : Option < u64 > ,
9494 __remaining_accounts : Vec < solana_instruction:: AccountMeta > ,
9595}
9696
@@ -109,8 +109,8 @@ impl TransferBuilder {
109109 self
110110 }
111111 #[ inline( always) ]
112- pub fn amount ( & mut self , amount : u64 ) -> & mut Self {
113- self . amount = Some ( amount ) ;
112+ pub fn lamports ( & mut self , lamports : u64 ) -> & mut Self {
113+ self . lamports = Some ( lamports ) ;
114114 self
115115 }
116116 /// Add an additional account to the instruction.
@@ -135,7 +135,7 @@ impl TransferBuilder {
135135 destination : self . destination . expect ( "destination is not set" ) ,
136136 } ;
137137 let args = TransferInstructionArgs {
138- amount : self . amount . clone ( ) . expect ( "amount is not set" ) ,
138+ lamports : self . lamports . clone ( ) . expect ( "lamports is not set" ) ,
139139 } ;
140140
141141 accounts. instruction_with_remaining_accounts ( args, & self . __remaining_accounts )
@@ -252,7 +252,7 @@ impl<'a, 'b> TransferCpiBuilder<'a, 'b> {
252252 __program : program,
253253 source : None ,
254254 destination : None ,
255- amount : None ,
255+ lamports : None ,
256256 __remaining_accounts : Vec :: new ( ) ,
257257 } ) ;
258258 Self { instruction }
@@ -271,8 +271,8 @@ impl<'a, 'b> TransferCpiBuilder<'a, 'b> {
271271 self
272272 }
273273 #[ inline( always) ]
274- pub fn amount ( & mut self , amount : u64 ) -> & mut Self {
275- self . instruction . amount = Some ( amount ) ;
274+ pub fn lamports ( & mut self , lamports : u64 ) -> & mut Self {
275+ self . instruction . lamports = Some ( lamports ) ;
276276 self
277277 }
278278 /// Add an additional account to the instruction.
@@ -310,7 +310,11 @@ impl<'a, 'b> TransferCpiBuilder<'a, 'b> {
310310 #[ allow( clippy:: vec_init_then_push) ]
311311 pub fn invoke_signed ( & self , signers_seeds : & [ & [ & [ u8 ] ] ] ) -> solana_program_error:: ProgramResult {
312312 let args = TransferInstructionArgs {
313- amount : self . instruction . amount . clone ( ) . expect ( "amount is not set" ) ,
313+ lamports : self
314+ . instruction
315+ . lamports
316+ . clone ( )
317+ . expect ( "lamports is not set" ) ,
314318 } ;
315319 let instruction = TransferCpi {
316320 __program : self . instruction . __program ,
@@ -335,7 +339,7 @@ struct TransferCpiBuilderInstruction<'a, 'b> {
335339 __program : & ' b solana_account_info:: AccountInfo < ' a > ,
336340 source : Option < & ' b solana_account_info:: AccountInfo < ' a > > ,
337341 destination : Option < & ' b solana_account_info:: AccountInfo < ' a > > ,
338- amount : Option < u64 > ,
342+ lamports : Option < u64 > ,
339343 /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
340344 __remaining_accounts : Vec < ( & ' b solana_account_info:: AccountInfo < ' a > , bool , bool ) > ,
341345}
0 commit comments