@@ -327,8 +327,8 @@ fn encode_instruction<T: Pod>(
327
327
}
328
328
329
329
/// Create a `InitializeMint` instruction
330
- pub fn initialize_mint ( mint : Pubkey , auditor : & ConfidentialTransferMint ) -> Instruction {
331
- let accounts = vec ! [ AccountMeta :: new( mint, false ) ] ;
330
+ pub fn initialize_mint ( mint : & Pubkey , auditor : & ConfidentialTransferMint ) -> Instruction {
331
+ let accounts = vec ! [ AccountMeta :: new( * mint, false ) ] ;
332
332
encode_instruction (
333
333
accounts,
334
334
ConfidentialTransferInstruction :: InitializeMint ,
@@ -337,13 +337,13 @@ pub fn initialize_mint(mint: Pubkey, auditor: &ConfidentialTransferMint) -> Inst
337
337
}
338
338
/// Create a `UpdateMint` instruction
339
339
pub fn update_mint (
340
- mint : Pubkey ,
340
+ mint : & Pubkey ,
341
341
new_auditor : & ConfidentialTransferMint ,
342
- authority : Pubkey ,
342
+ authority : & Pubkey ,
343
343
) -> Instruction {
344
344
let accounts = vec ! [
345
- AccountMeta :: new( mint, false ) ,
346
- AccountMeta :: new_readonly( authority, true ) ,
345
+ AccountMeta :: new( * mint, false ) ,
346
+ AccountMeta :: new_readonly( * authority, true ) ,
347
347
AccountMeta :: new_readonly(
348
348
new_auditor. authority,
349
349
new_auditor. authority != Pubkey :: default ( ) ,
@@ -359,17 +359,17 @@ pub fn update_mint(
359
359
/// Create a `ConfigureAccount` instruction
360
360
#[ cfg( not( target_arch = "bpf" ) ) ]
361
361
pub fn configure_account (
362
- token_account : Pubkey ,
363
- mint : Pubkey ,
362
+ token_account : & Pubkey ,
363
+ mint : & Pubkey ,
364
364
elgamal_pk : ElGamalPubkey ,
365
365
decryptable_zero_balance : AeCiphertext ,
366
- authority : Pubkey ,
366
+ authority : & Pubkey ,
367
367
multisig_signers : & [ & Pubkey ] ,
368
368
) -> Vec < Instruction > {
369
369
let mut accounts = vec ! [
370
- AccountMeta :: new( token_account, false ) ,
371
- AccountMeta :: new_readonly( mint, false ) ,
372
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
370
+ AccountMeta :: new( * token_account, false ) ,
371
+ AccountMeta :: new_readonly( * mint, false ) ,
372
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
373
373
] ;
374
374
375
375
for multisig_signer in multisig_signers. iter ( ) {
@@ -387,11 +387,15 @@ pub fn configure_account(
387
387
}
388
388
389
389
/// Create an `ApproveAccount` instruction
390
- pub fn approve_account ( mint : Pubkey , account_to_approve : Pubkey , authority : Pubkey ) -> Instruction {
390
+ pub fn approve_account (
391
+ mint : & Pubkey ,
392
+ account_to_approve : & Pubkey ,
393
+ authority : & Pubkey ,
394
+ ) -> Instruction {
391
395
let accounts = vec ! [
392
- AccountMeta :: new( account_to_approve, false ) ,
393
- AccountMeta :: new_readonly( mint, false ) ,
394
- AccountMeta :: new_readonly( authority, true ) ,
396
+ AccountMeta :: new( * account_to_approve, false ) ,
397
+ AccountMeta :: new_readonly( * mint, false ) ,
398
+ AccountMeta :: new_readonly( * authority, true ) ,
395
399
] ;
396
400
encode_instruction (
397
401
accounts,
@@ -404,15 +408,15 @@ pub fn approve_account(mint: Pubkey, account_to_approve: Pubkey, authority: Pubk
404
408
///
405
409
/// This instruction is suitable for use with a cross-program `invoke`
406
410
pub fn inner_empty_account (
407
- token_account : Pubkey ,
408
- authority : Pubkey ,
411
+ token_account : & Pubkey ,
412
+ authority : & Pubkey ,
409
413
multisig_signers : & [ & Pubkey ] ,
410
414
proof_instruction_offset : i8 ,
411
415
) -> Instruction {
412
416
let mut accounts = vec ! [
413
- AccountMeta :: new_readonly( token_account, false ) ,
417
+ AccountMeta :: new_readonly( * token_account, false ) ,
414
418
AccountMeta :: new_readonly( sysvar:: instructions:: id( ) , false ) ,
415
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
419
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
416
420
] ;
417
421
418
422
for multisig_signer in multisig_signers. iter ( ) {
@@ -430,8 +434,8 @@ pub fn inner_empty_account(
430
434
431
435
/// Create a `EmptyAccount` instruction
432
436
pub fn empty_account (
433
- token_account : Pubkey ,
434
- authority : Pubkey ,
437
+ token_account : & Pubkey ,
438
+ authority : & Pubkey ,
435
439
multisig_signers : & [ & Pubkey ] ,
436
440
proof_data : & CloseAccountData ,
437
441
) -> Vec < Instruction > {
@@ -443,19 +447,19 @@ pub fn empty_account(
443
447
444
448
/// Create a `Deposit` instruction
445
449
pub fn deposit (
446
- source_token_account : Pubkey ,
447
- mint : Pubkey ,
448
- destination_token_account : Pubkey ,
450
+ source_token_account : & Pubkey ,
451
+ mint : & Pubkey ,
452
+ destination_token_account : & Pubkey ,
449
453
amount : u64 ,
450
454
decimals : u8 ,
451
- authority : Pubkey ,
455
+ authority : & Pubkey ,
452
456
multisig_signers : & [ & Pubkey ] ,
453
457
) -> Vec < Instruction > {
454
458
let mut accounts = vec ! [
455
- AccountMeta :: new( source_token_account, false ) ,
456
- AccountMeta :: new( destination_token_account, false ) ,
457
- AccountMeta :: new_readonly( mint, false ) ,
458
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
459
+ AccountMeta :: new( * source_token_account, false ) ,
460
+ AccountMeta :: new( * destination_token_account, false ) ,
461
+ AccountMeta :: new_readonly( * mint, false ) ,
462
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
459
463
] ;
460
464
461
465
for multisig_signer in multisig_signers. iter ( ) {
@@ -477,22 +481,22 @@ pub fn deposit(
477
481
/// This instruction is suitable for use with a cross-program `invoke`
478
482
#[ allow( clippy:: too_many_arguments) ]
479
483
pub fn inner_withdraw (
480
- source_token_account : Pubkey ,
481
- destination_token_account : Pubkey ,
484
+ source_token_account : & Pubkey ,
485
+ destination_token_account : & Pubkey ,
482
486
mint : & Pubkey ,
483
487
amount : u64 ,
484
488
decimals : u8 ,
485
489
new_decryptable_available_balance : pod:: AeCiphertext ,
486
- authority : Pubkey ,
490
+ authority : & Pubkey ,
487
491
multisig_signers : & [ & Pubkey ] ,
488
492
proof_instruction_offset : i8 ,
489
493
) -> Instruction {
490
494
let mut accounts = vec ! [
491
- AccountMeta :: new( source_token_account, false ) ,
492
- AccountMeta :: new( destination_token_account, false ) ,
495
+ AccountMeta :: new( * source_token_account, false ) ,
496
+ AccountMeta :: new( * destination_token_account, false ) ,
493
497
AccountMeta :: new_readonly( * mint, false ) ,
494
498
AccountMeta :: new_readonly( sysvar:: instructions:: id( ) , false ) ,
495
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
499
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
496
500
] ;
497
501
498
502
for multisig_signer in multisig_signers. iter ( ) {
@@ -515,13 +519,13 @@ pub fn inner_withdraw(
515
519
#[ allow( clippy:: too_many_arguments) ]
516
520
#[ cfg( not( target_arch = "bpf" ) ) ]
517
521
pub fn withdraw (
518
- source_token_account : Pubkey ,
519
- destination_token_account : Pubkey ,
522
+ source_token_account : & Pubkey ,
523
+ destination_token_account : & Pubkey ,
520
524
mint : & Pubkey ,
521
525
amount : u64 ,
522
526
decimals : u8 ,
523
527
new_decryptable_available_balance : AeCiphertext ,
524
- authority : Pubkey ,
528
+ authority : & Pubkey ,
525
529
multisig_signers : & [ & Pubkey ] ,
526
530
proof_data : & WithdrawData ,
527
531
) -> Vec < Instruction > {
@@ -546,20 +550,20 @@ pub fn withdraw(
546
550
/// This instruction is suitable for use with a cross-program `invoke`
547
551
#[ allow( clippy:: too_many_arguments) ]
548
552
pub fn inner_transfer (
549
- source_token_account : Pubkey ,
550
- destination_token_account : Pubkey ,
551
- mint : Pubkey ,
553
+ source_token_account : & Pubkey ,
554
+ destination_token_account : & Pubkey ,
555
+ mint : & Pubkey ,
552
556
new_source_decryptable_available_balance : pod:: AeCiphertext ,
553
- authority : Pubkey ,
557
+ authority : & Pubkey ,
554
558
multisig_signers : & [ & Pubkey ] ,
555
559
proof_instruction_offset : i8 ,
556
560
) -> Instruction {
557
561
let mut accounts = vec ! [
558
- AccountMeta :: new( source_token_account, false ) ,
559
- AccountMeta :: new( destination_token_account, false ) ,
560
- AccountMeta :: new_readonly( mint, false ) ,
562
+ AccountMeta :: new( * source_token_account, false ) ,
563
+ AccountMeta :: new( * destination_token_account, false ) ,
564
+ AccountMeta :: new_readonly( * mint, false ) ,
561
565
AccountMeta :: new_readonly( sysvar:: instructions:: id( ) , false ) ,
562
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
566
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
563
567
] ;
564
568
565
569
for multisig_signer in multisig_signers. iter ( ) {
@@ -580,11 +584,11 @@ pub fn inner_transfer(
580
584
#[ allow( clippy:: too_many_arguments) ]
581
585
#[ cfg( not( target_arch = "bpf" ) ) ]
582
586
pub fn transfer (
583
- source_token_account : Pubkey ,
584
- destination_token_account : Pubkey ,
585
- mint : Pubkey ,
587
+ source_token_account : & Pubkey ,
588
+ destination_token_account : & Pubkey ,
589
+ mint : & Pubkey ,
586
590
new_source_decryptable_available_balance : AeCiphertext ,
587
- authority : Pubkey ,
591
+ authority : & Pubkey ,
588
592
multisig_signers : & [ & Pubkey ] ,
589
593
proof_data : & TransferData ,
590
594
) -> Vec < Instruction > {
@@ -607,15 +611,15 @@ pub fn transfer(
607
611
/// This instruction is suitable for use with a cross-program `invoke`
608
612
#[ allow( clippy:: too_many_arguments) ]
609
613
pub fn inner_apply_pending_balance (
610
- token_account : Pubkey ,
614
+ token_account : & Pubkey ,
611
615
expected_pending_balance_credit_counter : u64 ,
612
616
new_decryptable_available_balance : pod:: AeCiphertext ,
613
- authority : Pubkey ,
617
+ authority : & Pubkey ,
614
618
multisig_signers : & [ & Pubkey ] ,
615
619
) -> Instruction {
616
620
let mut accounts = vec ! [
617
- AccountMeta :: new( token_account, false ) ,
618
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
621
+ AccountMeta :: new( * token_account, false ) ,
622
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
619
623
] ;
620
624
621
625
for multisig_signer in multisig_signers. iter ( ) {
@@ -635,10 +639,10 @@ pub fn inner_apply_pending_balance(
635
639
/// Create a `ApplyPendingBalance` instruction
636
640
#[ cfg( not( target_arch = "bpf" ) ) ]
637
641
pub fn apply_pending_balance (
638
- token_account : Pubkey ,
642
+ token_account : & Pubkey ,
639
643
pending_balance_instructions : u64 ,
640
644
new_decryptable_available_balance : AeCiphertext ,
641
- authority : Pubkey ,
645
+ authority : & Pubkey ,
642
646
multisig_signers : & [ & Pubkey ] ,
643
647
) -> Vec < Instruction > {
644
648
vec ! [ inner_apply_pending_balance(
@@ -652,13 +656,13 @@ pub fn apply_pending_balance(
652
656
653
657
/// Create a `EnableBalanceCredits` instruction
654
658
pub fn enable_balance_credits (
655
- token_account : Pubkey ,
656
- authority : Pubkey ,
659
+ token_account : & Pubkey ,
660
+ authority : & Pubkey ,
657
661
multisig_signers : & [ & Pubkey ] ,
658
662
) -> Vec < Instruction > {
659
663
let mut accounts = vec ! [
660
- AccountMeta :: new( token_account, false ) ,
661
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
664
+ AccountMeta :: new( * token_account, false ) ,
665
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
662
666
] ;
663
667
664
668
for multisig_signer in multisig_signers. iter ( ) {
@@ -675,13 +679,13 @@ pub fn enable_balance_credits(
675
679
/// Create a `DisableBalanceCredits` instruction
676
680
#[ cfg( not( target_arch = "bpf" ) ) ]
677
681
pub fn disable_balance_credits (
678
- token_account : Pubkey ,
679
- authority : Pubkey ,
682
+ token_account : & Pubkey ,
683
+ authority : & Pubkey ,
680
684
multisig_signers : & [ & Pubkey ] ,
681
685
) -> Vec < Instruction > {
682
686
let mut accounts = vec ! [
683
- AccountMeta :: new( token_account, false ) ,
684
- AccountMeta :: new_readonly( authority, multisig_signers. is_empty( ) ) ,
687
+ AccountMeta :: new( * token_account, false ) ,
688
+ AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
685
689
] ;
686
690
687
691
for multisig_signer in multisig_signers. iter ( ) {
0 commit comments