import { BN, Program } from "@coral-xyz/anchor"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { StakingSpl } from "../artifacts/staking_spl"; export type WithdrawRevenueParams = { accounts: { mint: PublicKey; }, inputs: { amount: BN; }; }; export async function withdrawRevenue( program: Program, params: WithdrawRevenueParams, ): Promise { const { accounts, inputs } = params; const ix = await program.methods .withdrawRevenue( inputs.amount, ) .accounts({ ...accounts, }) .instruction(); return ix; }