-
Notifications
You must be signed in to change notification settings - Fork 90
feat: add fee payer to light token ixs #2189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9ec2a55
01c222c
426500e
7b87236
ca282bf
81a0773
dd31aff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,10 +42,17 @@ Format variants: | |
| - May receive rent top-up if compressible | ||
|
|
||
| 3. authority | ||
| - (signer, writable when top-ups needed) | ||
| - (signer) | ||
| - Mint authority of the CMint account | ||
| - Validated: must sign the transaction | ||
| - Also serves as payer for rent top-ups if needed | ||
| - If no fee_payer provided: also serves as payer for top-ups (must be writable) | ||
| - If fee_payer provided: readonly (only needs to sign) | ||
|
|
||
| 4. fee_payer (optional) | ||
| - (signer, writable) | ||
| - Optional separate account to pay for rent top-ups | ||
| - If not provided, authority account pays for top-ups | ||
| - Must have sufficient lamports to cover the top-up amount | ||
|
Comment on lines
44
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document the system_program account and payer fallback clearly. The SDK/program path now expects a system_program placeholder plus optional fee_payer. The docs still list only 3 required accounts and say authority pays top-ups unconditionally. Please update the account list, minimum accounts, and top-up payer language to match the new flow. As per coding guidelines, docs must match the implementation. 📝 Suggested doc update-3. authority
+3. authority
- (signer)
- Mint authority of the CMint account
- Validated: must sign the transaction
- If no fee_payer provided: also serves as payer for top-ups (must be writable)
- If fee_payer provided: readonly (only needs to sign)
-4. fee_payer (optional)
+4. system_program
+ - (readonly)
+ - System program used for rent/top-up transfers
+
+5. fee_payer (optional)
- (signer, writable)
- Optional separate account to pay for rent top-ups
- If not provided, authority account pays for top-ups
- Must have sufficient lamports to cover the top-up amount-1. **Validate minimum accounts:**
- - Require at least 3 accounts (cmint, destination, authority)
+1. **Validate minimum accounts:**
+ - Require at least 4 accounts (cmint, destination, authority, system_program)- - Transfer lamports from authority to both accounts if needed
+ - Transfer lamports from fee_payer if provided, otherwise authorityAlso applies to: 59-61, 79-84 🤖 Prompt for AI Agents |
||
|
|
||
| **Instruction Logic and Checks:** | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.