INNER CODE UNIT · TypeScript

get_mev_protect_option

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

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}.`);
            return tip;
        })
        .conflicts('bundle');
}

function get_slippage_option(): Option {
    return new Option('-s, --slippage <number>', 'Slippage in percents').argParser((value) => {
        const parsed_value = parseFloat(value);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…