Skip to content

Commit e4e3908

Browse files
crispheaneyharsh4786
authored andcommitted
program: rm update devnet drift
1 parent 801a8c0 commit e4e3908

File tree

4 files changed

+1
-75
lines changed

4 files changed

+1
-75
lines changed

programs/drift/src/instructions/keeper.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,20 +2732,6 @@ pub fn handle_update_user_gov_token_insurance_stake(
27322732
Ok(())
27332733
}
27342734

2735-
pub fn handle_update_user_gov_token_insurance_stake_devnet(
2736-
ctx: Context<UpdateUserGovTokenInsuranceStakeDevnet>,
2737-
gov_stake_amount: u64,
2738-
) -> Result<()> {
2739-
#[cfg(all(feature = "mainnet-beta", not(feature = "anchor-test")))]
2740-
{
2741-
panic!("Devnet function is disabled on mainnet-beta");
2742-
}
2743-
2744-
let user_stats = &mut load_mut!(ctx.accounts.user_stats)?;
2745-
user_stats.if_staked_gov_token_amount = gov_stake_amount;
2746-
Ok(())
2747-
}
2748-
27492735
pub fn handle_disable_user_high_leverage_mode<'c: 'info, 'info>(
27502736
ctx: Context<'_, '_, 'c, 'info, DisableUserHighLeverageMode<'info>>,
27512737
disable_maintenance: bool,
@@ -3602,13 +3588,6 @@ pub struct UpdateUserGovTokenInsuranceStake<'info> {
36023588
pub insurance_fund_vault: Box<InterfaceAccount<'info, TokenAccount>>,
36033589
}
36043590

3605-
#[derive(Accounts)]
3606-
pub struct UpdateUserGovTokenInsuranceStakeDevnet<'info> {
3607-
#[account(mut)]
3608-
pub user_stats: AccountLoader<'info, UserStats>,
3609-
pub signer: Signer<'info>,
3610-
}
3611-
36123591
#[derive(Accounts)]
36133592
pub struct UpdatePrelaunchOracle<'info> {
36143593
pub state: Box<Account<'info, State>>,

programs/drift/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,6 @@ pub mod drift {
737737
handle_update_user_gov_token_insurance_stake(ctx)
738738
}
739739

740-
pub fn update_user_gov_token_insurance_stake_devnet(
741-
ctx: Context<UpdateUserGovTokenInsuranceStakeDevnet>,
742-
gov_stake_amount: u64,
743-
) -> Result<()> {
744-
handle_update_user_gov_token_insurance_stake_devnet(ctx, gov_stake_amount)
745-
}
746-
747740
// IF stakers
748741

749742
pub fn initialize_insurance_fund_stake(

sdk/src/driftClient.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9243,10 +9243,7 @@ export class DriftClient {
92439243
txParams?: TxParams,
92449244
env: DriftEnv = 'mainnet-beta'
92459245
): Promise<TransactionSignature> {
9246-
const ix =
9247-
env == 'mainnet-beta'
9248-
? await this.getUpdateUserGovTokenInsuranceStakeIx(authority)
9249-
: await this.getUpdateUserGovTokenInsuranceStakeDevnetIx(authority);
9246+
const ix = await this.getUpdateUserGovTokenInsuranceStakeIx(authority);
92509247
const tx = await this.buildTransaction(ix, txParams);
92519248
const { txSig } = await this.sendTransaction(tx, [], this.opts);
92529249
return txSig;
@@ -9281,28 +9278,6 @@ export class DriftClient {
92819278
return ix;
92829279
}
92839280

9284-
public async getUpdateUserGovTokenInsuranceStakeDevnetIx(
9285-
authority: PublicKey,
9286-
amount: BN = new BN(1)
9287-
): Promise<TransactionInstruction> {
9288-
const userStatsPublicKey = getUserStatsAccountPublicKey(
9289-
this.program.programId,
9290-
authority
9291-
);
9292-
9293-
const ix = this.program.instruction.updateUserGovTokenInsuranceStakeDevnet(
9294-
amount,
9295-
{
9296-
accounts: {
9297-
userStats: userStatsPublicKey,
9298-
signer: this.wallet.publicKey,
9299-
},
9300-
}
9301-
);
9302-
9303-
return ix;
9304-
}
9305-
93069281
public async settleRevenueToInsuranceFund(
93079282
spotMarketIndex: number,
93089283
txParams?: TxParams

sdk/src/idl/drift.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,27 +3141,6 @@
31413141
],
31423142
"args": []
31433143
},
3144-
{
3145-
"name": "updateUserGovTokenInsuranceStakeDevnet",
3146-
"accounts": [
3147-
{
3148-
"name": "userStats",
3149-
"isMut": true,
3150-
"isSigner": false
3151-
},
3152-
{
3153-
"name": "signer",
3154-
"isMut": false,
3155-
"isSigner": true
3156-
}
3157-
],
3158-
"args": [
3159-
{
3160-
"name": "govStakeAmount",
3161-
"type": "u64"
3162-
}
3163-
]
3164-
},
31653144
{
31663145
"name": "initializeInsuranceFundStake",
31673146
"accounts": [

0 commit comments

Comments
 (0)