Skip to content

fix: correct parameter count in token-swap README - #663

Merged
dev-jodee merged 1 commit into
solana-foundation:mainfrom
NikkiAung:fix/token-swap-readme-param-count
Aug 3, 2026
Merged

fix: correct parameter count in token-swap README#663
dev-jodee merged 1 commit into
solana-foundation:mainfrom
NikkiAung:fix/token-swap-readme-param-count

Conversation

@NikkiAung

Copy link
Copy Markdown
Contributor

Summary

Fixes #494 — the walkthrough for swap_exact_tokens_for_tokens said it "takes five parameters" but only ever listed and described four: ctx, swap_a, input_amount, min_output_amount. The actual function signature (tokens/token-swap/anchor/programs/token-swap/src/instructions/swap_exact_tokens_for_tokens.rs) confirms it's 4 params, not 5.

Test plan

  • Confirmed against the function signature that it has 4 parameters
  • Docs-only change, no code affected

swap_exact_tokens_for_tokens takes 4 parameters (ctx, swap_a,
input_amount, min_output_amount), not 5 as the doc stated.
@NikkiAung
NikkiAung requested a review from dev-jodee as a code owner August 3, 2026 17:00
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Corrects the token-swap walkthrough to state that swap_exact_tokens_for_tokens takes four parameters, matching the four parameters documented immediately below.

Confidence Score: 5/5

The PR appears safe to merge because the documentation correction is internally consistent and introduces no runtime changes.

The revised count matches the four parameters enumerated in the walkthrough, and the change affects only explanatory documentation.

Important Files Changed

Filename Overview
tokens/token-swap/README.md Corrects an inaccurate parameter count from five to four without changing code or behavior.

Reviews (1): Last reviewed commit: "fix(#494): correct parameter count in to..." | Re-trigger Greptile

@dev-jodee
dev-jodee merged commit 72160c5 into solana-foundation:main Aug 3, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong no of parameter is tell in Tokens/token-swap/Readme

2 participants