@@ -4862,134 +4862,6 @@ export class AdminClient extends DriftClient {
48624862 ) ;
48634863 }
48644864
4865- public async updateFeatureBitFlagsMedianTriggerPrice (
4866- enable : boolean
4867- ) : Promise < TransactionSignature > {
4868- const updateFeatureBitFlagsMedianTriggerPriceIx =
4869- await this . getUpdateFeatureBitFlagsMedianTriggerPriceIx ( enable ) ;
4870- const tx = await this . buildTransaction (
4871- updateFeatureBitFlagsMedianTriggerPriceIx
4872- ) ;
4873- const { txSig } = await this . sendTransaction ( tx , [ ] , this . opts ) ;
4874-
4875- return txSig ;
4876- }
4877-
4878- public async getUpdateFeatureBitFlagsMedianTriggerPriceIx (
4879- enable : boolean
4880- ) : Promise < TransactionInstruction > {
4881- return await this . program . instruction . updateFeatureBitFlagsMedianTriggerPrice (
4882- enable ,
4883- {
4884- accounts : {
4885- admin : this . useHotWalletAdmin
4886- ? this . wallet . publicKey
4887- : this . getStateAccount ( ) . admin ,
4888- state : await this . getStatePublicKey ( ) ,
4889- } ,
4890- }
4891- ) ;
4892- }
4893-
4894- public async updateDelegateUserGovTokenInsuranceStake (
4895- authority : PublicKey ,
4896- delegate : PublicKey
4897- ) : Promise < TransactionSignature > {
4898- const updateDelegateUserGovTokenInsuranceStakeIx =
4899- await this . getUpdateDelegateUserGovTokenInsuranceStakeIx (
4900- authority ,
4901- delegate
4902- ) ;
4903-
4904- const tx = await this . buildTransaction (
4905- updateDelegateUserGovTokenInsuranceStakeIx
4906- ) ;
4907- const { txSig } = await this . sendTransaction ( tx , [ ] , this . opts ) ;
4908-
4909- return txSig ;
4910- }
4911-
4912- public async getUpdateDelegateUserGovTokenInsuranceStakeIx (
4913- authority : PublicKey ,
4914- delegate : PublicKey
4915- ) : Promise < TransactionInstruction > {
4916- const marketIndex = GOV_SPOT_MARKET_INDEX ;
4917- const spotMarket = this . getSpotMarketAccount ( marketIndex ) ;
4918- const ifStakeAccountPublicKey = getInsuranceFundStakeAccountPublicKey (
4919- this . program . programId ,
4920- delegate ,
4921- marketIndex
4922- ) ;
4923- const userStatsPublicKey = getUserStatsAccountPublicKey (
4924- this . program . programId ,
4925- authority
4926- ) ;
4927-
4928- const ix =
4929- this . program . instruction . getUpdateDelegateUserGovTokenInsuranceStakeIx ( {
4930- accounts : {
4931- state : await this . getStatePublicKey ( ) ,
4932- spotMarket : spotMarket . pubkey ,
4933- insuranceFundStake : ifStakeAccountPublicKey ,
4934- userStats : userStatsPublicKey ,
4935- signer : this . wallet . publicKey ,
4936- insuranceFundVault : spotMarket . insuranceFund . vault ,
4937- } ,
4938- } ) ;
4939-
4940- return ix ;
4941- }
4942-
4943- public async depositIntoInsuranceFundStake (
4944- marketIndex : number ,
4945- amount : BN ,
4946- userStatsPublicKey : PublicKey ,
4947- insuranceFundStakePublicKey : PublicKey ,
4948- userTokenAccountPublicKey : PublicKey ,
4949- txParams ?: TxParams
4950- ) : Promise < TransactionSignature > {
4951- const tx = await this . buildTransaction (
4952- await this . getDepositIntoInsuranceFundStakeIx (
4953- marketIndex ,
4954- amount ,
4955- userStatsPublicKey ,
4956- insuranceFundStakePublicKey ,
4957- userTokenAccountPublicKey
4958- ) ,
4959- txParams
4960- ) ;
4961- const { txSig } = await this . sendTransaction ( tx , [ ] , this . opts ) ;
4962- return txSig ;
4963- }
4964-
4965- public async getDepositIntoInsuranceFundStakeIx (
4966- marketIndex : number ,
4967- amount : BN ,
4968- userStatsPublicKey : PublicKey ,
4969- insuranceFundStakePublicKey : PublicKey ,
4970- userTokenAccountPublicKey : PublicKey
4971- ) : Promise < TransactionInstruction > {
4972- const spotMarket = this . getSpotMarketAccount ( marketIndex ) ;
4973- return await this . program . instruction . depositIntoInsuranceFundStake (
4974- marketIndex ,
4975- amount ,
4976- {
4977- accounts : {
4978- signer : this . wallet . publicKey ,
4979- state : await this . getStatePublicKey ( ) ,
4980- spotMarket : spotMarket . pubkey ,
4981- insuranceFundStake : insuranceFundStakePublicKey ,
4982- userStats : userStatsPublicKey ,
4983- spotMarketVault : spotMarket . vault ,
4984- insuranceFundVault : spotMarket . insuranceFund . vault ,
4985- userTokenAccount : userTokenAccountPublicKey ,
4986- tokenProgram : this . getTokenProgramForSpotMarket ( spotMarket ) ,
4987- driftSigner : this . getSignerPublicKey ( ) ,
4988- } ,
4989- }
4990- ) ;
4991- }
4992-
49934865 public async updateFeatureBitFlagsBuilderCodes (
49944866 enable : boolean
49954867 ) : Promise < TransactionSignature > {
0 commit comments