-
Notifications
You must be signed in to change notification settings - Fork 124
Permissioned burn extension #818
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
base: main
Are you sure you want to change the base?
Conversation
|
@joncinque Would really appreciate a quick review, just to confirm that I’m moving in the right direction before adding the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! This is definitely on the right track, but I think we'll need a bit more functionality. Let me know what you think!
| // Pull the required extra signer from the accounts | ||
| let approver_ai = next_account_info(account_info_iter)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this, I think we should add a new variant to Burn, like BurnCheckedWithPermission, which explicitly takes in the authority. Otherwise, the account order for multisig owners will break, since you'll need to do:
- source account
- mint account
- account authority (non-signer)
- permissioned burn authority (signer)
- multisig signers (signer)
It would be better to be clear, and have a new instruction which orders the accounts as:
- source
- mint
- permissioned burn authority
- account authority
- multisig signers
We can add it as another instruction under the PermissionedBurn extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense; definitely better than making a breaking change.
This PR implements a permissioned-burn extension as described in #772
TODO:
Closes #772