INNER CODE UNIT · TypeScript

Option

Deezzir/solana-bot · src/bot.ts:98

    return new Option('-b, --bundle <tip>', 'Enable bundles by providing tip amount').argParser((value) => {
        const tip = parseFloat(value);
        if (isNaN(tip) || tip < JITO_MIN_TIP)
            throw new InvalidOptionArgumentError(`Not a valid tip amount. Must be at least ${JITO_MIN_TIP}.`);
        return tip;
    });
}

function get_mev_protect_option(): Option {
    return new Option('-m, --mev', 'Enable MEV protection').default(false).conflicts('bundle');
}

function get_protection_tip_option(): Option {
    return new Option('--pt, --protection-tip <tip>', 'Enable protected transaction routing by providing a tip')
        .argParser((value) => {
            const tip = parseFloat(value);
            if (isNaN(tip) || tip < JITO_MIN_TIP)
                throw new InvalidOptionArgumentError(`Not a valid tip amount. Must be at least ${JITO_MIN_TIP}.`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…