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 {
19
19
///
20
20
/// 0. `[writable, signer]` The funding account (must be a system account)
21
21
/// 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
23
23
/// registry account)
24
24
/// 3. `[]` System program
25
25
/// 4. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in the
@@ -110,7 +110,7 @@ pub fn create_registry(
110
110
let mut accounts = vec ! [
111
111
AccountMeta :: new( * funding_address, true ) ,
112
112
AccountMeta :: new( elgamal_registry_address, false ) ,
113
- AccountMeta :: new_readonly( * owner_address, false ) ,
113
+ AccountMeta :: new_readonly( * owner_address, true ) ,
114
114
AccountMeta :: new_readonly( system_program:: id( ) , false ) ,
115
115
] ;
116
116
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(
35
35
let wallet_account_info = next_account_info ( account_info_iter) ?;
36
36
let system_program_info = next_account_info ( account_info_iter) ?;
37
37
38
+ if !wallet_account_info. is_signer {
39
+ return Err ( ProgramError :: MissingRequiredSignature ) ;
40
+ }
41
+
38
42
// zero-knowledge proof certifies that the supplied ElGamal public key is valid
39
43
let proof_context = verify_and_extract_context :: <
40
44
PubkeyValidityProofData ,
Original file line number Diff line number Diff line change @@ -2862,7 +2862,7 @@ async fn confidential_transfer_configure_token_account_with_registry() {
2862
2862
let tx = Transaction :: new_signed_with_payer (
2863
2863
& instructions,
2864
2864
Some ( & ctx. payer . pubkey ( ) ) ,
2865
- & [ & ctx. payer ] ,
2865
+ & [ & ctx. payer , & alice ] ,
2866
2866
ctx. last_blockhash ,
2867
2867
) ;
2868
2868
ctx. banks_client . process_transaction ( tx) . await . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments