Add interest bearing mint extension#4464
Open
jamie-osec wants to merge 7 commits into
Open
Conversation
|
@Bhargavamacha is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
c21aef8 to
a9c2af2
Compare
a9c2af2 to
1d1a6fc
Compare
0x4ka5h
requested changes
Apr 27, 2026
…lper The duplicate-detection error in add_extension_interest_bearing_mint_authority referred to "rate authority"; this is the authority helper, not the rate one.
Mirrors how sibling extensions (group pointer, transfer hook, etc.) reserve space when either of their two related fields is provided. The CPI also defaulted to .unwrap() on the rate; default it to 0 so authority-only configurations work, with the authority free to set a non-zero rate later.
Every other extension Expr is run through check_scope.generate_check; the newly added interest-bearing fields skipped it, so the optional-account ergonomics were inconsistent with the rest of the init group.
Adds the interest-bearing rate/authority fields to ConstraintTokenMintGroup, threads them through the constraint builder, and emits checks in generate_constraint_mint that read InterestBearingConfig from the mint and verify current_rate / rate_authority against the user-supplied exprs. Without this, #[account(mint::interest_bearing::authority = ..)] on a non-init account would silently pass. Adds three error codes: ConstraintMintInterestBearingExtension, ConstraintMintInterestBearingAuthority, ConstraintMintInterestBearingRate.
0x4ka5h
approved these changes
Apr 27, 2026
78459e8 to
fd78c99
Compare
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.
Rebases and adds tests for #3278