File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
programs/pump-science/src Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -83,4 +83,7 @@ pub enum ContractError {
8383
8484 #[ msg( "Invalid Fee Receiver" ) ]
8585 InvalidFeeReceiver ,
86+
87+ #[ msg( "Invalid Migration Authority" ) ]
88+ InvalidMigrationAuthority ,
8689}
Original file line number Diff line number Diff line change @@ -105,8 +105,7 @@ pub struct InitializePoolWithConfig<'info> {
105105 /// CHECK: Protocol fee token b accounts
106106 pub protocol_token_b_fee : UncheckedAccount < ' info > ,
107107
108- #[ account( mut ) ]
109- /// CHECK: Admin account
108+ #[ account( mut , constraint = payer. key( ) == global. migration_authority @ ContractError :: InvalidMigrationAuthority ) ]
110109 pub payer : Signer < ' info > ,
111110
112111 #[ account( mut ) ]
Original file line number Diff line number Diff line change @@ -2,13 +2,21 @@ use anchor_lang::prelude::*;
22use anchor_lang:: solana_program:: { instruction:: Instruction , program:: invoke_signed} ;
33use anchor_spl:: associated_token;
44use crate :: constants:: { VAULT_SEED , METEORA_PROGRAM_KEY } ;
5+ use crate :: errors:: ContractError ;
6+ use crate :: Global ;
57use std:: str:: FromStr ;
68use crate :: state:: meteora:: { get_function_hash, get_lock_lp_ix_data} ;
79
8-
910#[ derive( Accounts ) ]
1011pub struct LockPool < ' info > {
11-
12+ #[ account(
13+ mut ,
14+ seeds = [ Global :: SEED_PREFIX . as_bytes( ) ] ,
15+ constraint = global. initialized == true @ ContractError :: NotInitialized ,
16+ bump,
17+ ) ]
18+ global : Box < Account < ' info , Global > > ,
19+
1220 #[ account(
1321 seeds = [ VAULT_SEED ] ,
1422 bump
@@ -55,8 +63,7 @@ pub struct LockPool<'info> {
5563 /// CHECK: Accounts to bootstrap the pool with initial liquidity
5664 pub payer_pool_lp : UncheckedAccount < ' info > ,
5765
58- #[ account( mut ) ]
59- /// CHECK: Admin account
66+ #[ account( mut , constraint = payer. key( ) == global. migration_authority @ ContractError :: InvalidMigrationAuthority ) ]
6067 pub payer : Signer < ' info > ,
6168
6269 /// CHECK: Token program account
You can’t perform that action at this time.
0 commit comments