diff --git a/staking/programs/integrity-pool/src/context.rs b/staking/programs/integrity-pool/src/context.rs index 64e244bb..72f172ab 100644 --- a/staking/programs/integrity-pool/src/context.rs +++ b/staking/programs/integrity-pool/src/context.rs @@ -53,6 +53,21 @@ pub struct UpdateY<'info> { pub system_program: Program<'info, System>, } +#[derive(Accounts)] +pub struct UpdatePythTokenMint<'info> { + pub reward_program_authority: Signer<'info>, + + #[account( + mut, + seeds = [POOL_CONFIG.as_bytes()], + bump, + has_one = reward_program_authority @ IntegrityPoolError::InvalidRewardProgramAuthority, + )] + pub pool_config: Account<'info, PoolConfig>, + + pub system_program: Program<'info, System>, +} + #[derive(Accounts)] pub struct UpdateDelegationFee<'info> { pub reward_program_authority: Signer<'info>, diff --git a/staking/programs/integrity-pool/src/lib.rs b/staking/programs/integrity-pool/src/lib.rs index bbf5c0f5..e894165d 100644 --- a/staking/programs/integrity-pool/src/lib.rs +++ b/staking/programs/integrity-pool/src/lib.rs @@ -57,6 +57,14 @@ pub mod integrity_pool { Ok(()) } + pub fn update_pyth_token_mint( + ctx: Context, + pyth_token_mint: Pubkey, + ) -> Result<()> { + ctx.accounts.pool_config.pyth_token_mint = pyth_token_mint; + Ok(()) + } + pub fn update_delegation_fee( ctx: Context, delegation_fee: frac64,