Repository navigation
token-swap: say "minor units" in PoolConfig, align devnet program ID - #206
Merged
Merged
Conversation
- PoolConfig's admin_fees_owed_a/b doc comments said "base units"; reword to "minor units" in the anchor-v1, anchor and quasar variants. - Anchor.toml [programs.devnet] held AsGVFx..., which matched nothing; set it to GahM6P..., the declare_id! all three variants already use. token-swap was the only finance program with this mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZHin66a6gYXbTBsFu1HTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
1. "minor units" in
PoolConfig. Theadmin_fees_owed_a/admin_fees_owed_bdoc comments said "in base units". The solana-finance plugin style (skills/solana/SKILL.md) uses "minor units" instead. Fixed in all three variants:finance/token-swap/anchor-v1/programs/token-swap/src/state/pool_config.rsfinance/token-swap/anchor/programs/token-swap/src/state/pool_config.rsfinance/token-swap/quasar/src/state.rs2. Program ID.
Anchor.toml[programs.devnet] swap_examplewasAsGVFxWqEn8icRBFQApxJe68x3r9zvfSbmiEzYFATGYn, which no program declares. It is nowGahM6PrXesrBkHiGJ5no4EskLNnVBCaSwVKbM4UtzyK6, thedeclare_id!that the anchor-v1, anchor and quasar programs all already use. Fixed in bothanchor-v1/Anchor.tomlandanchor/Anchor.toml.I checked every other finance program's
Anchor.tomlagainst itsdeclare_id!: betting-market, escrow, fundraiser, lending, managed-fund, options, order-book, perpetual-futures, prop-amm, token-fundraiser and vault-strategy all agree. token-swap was the only mismatch.Testing
In
finance/token-swap/anchor-v1, I followed theanchor-v1.ymlsteps with Solana 3.1.8, Anchor CLI 1.2.1 and surfpool 1.7.0:anchor keys sync,anchor build: OKanchor test: OK, 28 passed, 0 failed (tests/test_swap.rs)The
anchor/andquasar/variants were not built locally. Their changes there are doc comments andAnchor.tomlonly, so CI will cover them.Follow-up
The
PoolConfigexcerpt in quiknode-labs/docs#3676 (guides/solana-development/finance/solana-amm-program/index.mdx) needs updating to match after this merges.Generated by Claude Code