Commit 8696e80
committed
fix(quasar/tokens): use InterfaceAccount<Mint> for address-bound mints
Newer quasar-lang's Account<T> derive emits <T as Discriminator>::BUMP_OFFSET
whenever the field carries an 'address = ...' constraint (it stores the
discriminator-owned bump offset). SPL 'Mint' does not implement Discriminator,
so build fails with:
the trait bound `quasar_spl::Mint: quasar_lang::prelude::Discriminator`
is not satisfied
InterfaceAccount<T> intentionally takes the generic existing-account
verifier path that doesn't require Discriminator (so it can accept both
SPL Token and Token-2022 mints), which makes it the right wrapper for an
address-bound SPL Mint.
Affects:
- tokens/pda-mint-authority/quasar (MintTokens.mint at MintPda)
- tokens/token-swap/quasar (deposit_liquidity / withdraw_liquidity
mint_liquidity at LiquidityMintPda)1 parent 3f7447c commit 8696e80
3 files changed
Lines changed: 23 additions & 3 deletions
File tree
- tokens
- pda-mint-authority/quasar/src
- token-swap/quasar/src/instructions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | | - | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | | - | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | | - | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
0 commit comments