fix(programs): allow permanent delegate to burn CToken tokens (L-09)#2266
fix(programs): allow permanent delegate to burn CToken tokens (L-09)#2266ananas-block wants to merge 1 commit into
Conversation
Pinocchio's process_burn only validates owner/account-delegate authority. Token-2022 permanent delegate (from mint extension) was not checked. Added try_burn_as_permanent_delegate() which parses the T22 mint for PermanentDelegate extension and manually performs the burn if authority matches, bypassing pinocchio's owner check.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
burn is only implemented for light mints (cmints) those dont have the permanent delegate extension |
Summary
Changes
burn.rs: Addedtry_burn_as_permanent_delegate()that parses the T22 mint forPermanentDelegateextension and performs manual burn if authority matches.anchor/src/lib.rs: AddedPermanentDelegateBurnFailederror code.