fix(docs): align slippage to integer 0–100 in all remaining files

Update Readme.md, Readme.zh.md, src/commands/swap.ts and cooking.ts
with integer 0–100 slippage examples (e.g. 30 = 30%) to match the
updated API validation and skill docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
David Lau
2026-06-04 20:09:27 +08:00
parent 4ef54b0bcc
commit 73d81fa0b2
7 changed files with 46 additions and 46 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export function registerCookingCommands(program: Command): void {
.option("--website <url>", "Website URL")
.option("--twitter <url>", "Twitter link")
.option("--telegram <url>", "Telegram link")
.option("--slippage <n>", "Slippage tolerance (e.g. 0.01 = 1%)", parseFloat)
.option("--slippage <n>", "Slippage tolerance (e.g. 30 = 30%)", parseFloat)
.option("--auto-slippage", "Enable automatic slippage")
.option("--fee <amount>", "Base gas / fee")
.option("--priority-fee <sol>", "Priority fee in SOL (SOL only)")
+4 -4
View File
@@ -14,7 +14,7 @@ export function registerSwapCommands(program: Command): void {
.requiredOption("--output-token <address>", "Output token contract address")
.option("--amount <amount>", "Input raw amount (smallest unit)")
.option("--percent <pct>", "Input amount as a percentage, e.g. 50 = 50%, 1 = 1%; only valid when input_token is NOT a currency", parseFloat)
.option("--slippage <n>", "Slippage tolerance (e.g. 0.01 = 1%)", parseFloat)
.option("--slippage <n>", "Slippage tolerance (e.g. 30 = 30%)", parseFloat)
.option("--auto-slippage", "Enable automatic slippage")
.option("--min-output <amount>", "Minimum output amount")
.option("--anti-mev", "Enable anti-MEV protection, default true")
@@ -83,7 +83,7 @@ export function registerSwapCommands(program: Command): void {
.option("--input-amount <json>", 'JSON map of wallet→amount (smallest unit), e.g. \'{"addr1":"1000000","addr2":"2000000"}\'')
.option("--input-amount-bps <json>", 'JSON map of wallet→percent in bps (110000, e.g. 5000=50%), e.g. \'{"addr1":"5000"}\'')
.option("--output-amount <json>", "JSON map of wallet→target output amount")
.option("--slippage <n>", "Slippage tolerance (e.g. 0.01 = 1%)", parseFloat)
.option("--slippage <n>", "Slippage tolerance (e.g. 30 = 30%)", parseFloat)
.option("--auto-slippage", "Enable automatic slippage")
.option("--anti-mev", "Enable anti-MEV protection")
.option("--priority-fee <sol>", "Priority fee in SOL (SOL only, ≥ 0.00001)")
@@ -155,7 +155,7 @@ export function registerSwapCommands(program: Command): void {
.requiredOption("--input-token <address>", "Input token contract address")
.requiredOption("--output-token <address>", "Output token contract address")
.requiredOption("--amount <amount>", "Input amount (smallest unit)")
.requiredOption("--slippage <n>", "Slippage tolerance (e.g. 0.01 = 1%)", parseFloat)
.requiredOption("--slippage <n>", "Slippage tolerance (e.g. 30 = 30%)", parseFloat)
.option("--raw", "Output raw JSON")
.action(async (opts) => {
validateChain(opts.chain);
@@ -213,7 +213,7 @@ export function registerSwapCommands(program: Command): void {
.option("--expire-in <seconds>", "Order expiry in seconds", parseInt)
.option("--sell-ratio-type <type>", "Sell ratio basis: buy_amount (default) / hold_amount")
.option("--quote-investment <amount>", "Quote token investment amount (smart_trade)")
.option("--slippage <n>", "Slippage tolerance (e.g. 0.01 = 1%)", parseFloat)
.option("--slippage <n>", "Slippage tolerance (e.g. 30 = 30%)", parseFloat)
.option("--auto-slippage", "Enable automatic slippage")
.option("--priority-fee <sol>", "Priority fee in SOL (required for SOL chain)")
.option("--tip-fee <amount>", "Tip fee (required for SOL chain)")