Skip to content

Commit fdd89d4

Browse files
committed
sdk: add adminDisableUpdatePerpBidAskTwap to adminClient
1 parent 0cb9bd3 commit fdd89d4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

sdk/src/adminClient.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4835,4 +4835,38 @@ export class AdminClient extends DriftClient {
48354835
}
48364836
);
48374837
}
4838+
4839+
public async adminDisableUpdatePerpBidAskTwap(
4840+
authority: PublicKey,
4841+
disable: boolean
4842+
): Promise<TransactionSignature> {
4843+
const disableBidAskTwapUpdateIx =
4844+
await this.getAdminDisableUpdatePerpBidAskTwapIx(authority, disable);
4845+
4846+
const tx = await this.buildTransaction(disableBidAskTwapUpdateIx);
4847+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
4848+
4849+
return txSig;
4850+
}
4851+
4852+
public async getAdminDisableUpdatePerpBidAskTwapIx(
4853+
authority: PublicKey,
4854+
disable: boolean
4855+
): Promise<TransactionInstruction> {
4856+
return await this.program.instruction.adminDisableUpdatePerpBidAskTwap(
4857+
disable,
4858+
{
4859+
accounts: {
4860+
admin: this.useHotWalletAdmin
4861+
? this.wallet.publicKey
4862+
: this.getStateAccount().admin,
4863+
state: await this.getStatePublicKey(),
4864+
userStats: getUserStatsAccountPublicKey(
4865+
this.program.programId,
4866+
authority
4867+
),
4868+
},
4869+
}
4870+
);
4871+
}
48384872
}

0 commit comments

Comments
 (0)