This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
confidential-transfer/elgamal-registry/src Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pub enum RegistryInstruction {
1919 ///
2020 /// 0. `[writable, signer]` The funding account (must be a system account)
2121 /// 1. `[writable]` The account to be created
22- /// 2. `[]` The wallet address (will also be the owner address for the
22+ /// 2. `[signer ]` The wallet address (will also be the owner address for the
2323 /// registry account)
2424 /// 3. `[]` System program
2525 /// 4. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in the
@@ -110,7 +110,7 @@ pub fn create_registry(
110110 let mut accounts = vec ! [
111111 AccountMeta :: new( * funding_address, true ) ,
112112 AccountMeta :: new( elgamal_registry_address, false ) ,
113- AccountMeta :: new_readonly( * owner_address, false ) ,
113+ AccountMeta :: new_readonly( * owner_address, true ) ,
114114 AccountMeta :: new_readonly( system_program:: id( ) , false ) ,
115115 ] ;
116116 let proof_instruction_offset = proof_instruction_offset ( & mut accounts, proof_location) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ pub fn process_create_registry_account(
3535 let wallet_account_info = next_account_info ( account_info_iter) ?;
3636 let system_program_info = next_account_info ( account_info_iter) ?;
3737
38+ if !wallet_account_info. is_signer {
39+ return Err ( ProgramError :: MissingRequiredSignature ) ;
40+ }
41+
3842 // zero-knowledge proof certifies that the supplied ElGamal public key is valid
3943 let proof_context = verify_and_extract_context :: <
4044 PubkeyValidityProofData ,
Original file line number Diff line number Diff line change @@ -2862,7 +2862,7 @@ async fn confidential_transfer_configure_token_account_with_registry() {
28622862 let tx = Transaction :: new_signed_with_payer (
28632863 & instructions,
28642864 Some ( & ctx. payer . pubkey ( ) ) ,
2865- & [ & ctx. payer ] ,
2865+ & [ & ctx. payer , & alice ] ,
28662866 ctx. last_blockhash ,
28672867 ) ;
28682868 ctx. banks_client . process_transaction ( tx) . await . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments