INNER CODE UNIT · TypeScript

claim_fees

Deezzir/solana-bot · src/commands.ts:153

export async function claim_fees(
    wallets: common.Wallet[],
    print_only: boolean,
    priority?: PriorityLevel
): Promise<void> {
    if (wallets.length === 0) throw new Error('No wallets available.');
    require_program(
        [common.Program.Pump, common.Program.Meteora, common.Program.Raydium, common.Program.Bonk],
        'Reward claims'
    );
    const executor = create_executor();
    let total_sol_raw = 0n;
    let failed = 0;
    for (const wallet of wallets) {
        try {
            const prefix = `${wallet.keypair.publicKey.toString().padEnd(44, ' ')} ${wallet.name} (${wallet.id})`;
            const assets = await executor.get_rewards(wallet.keypair);
            const log_assets = (status: 'available' | 'claimed') => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…