Permissioned burn extension#818
Conversation
|
@joncinque Would really appreciate a quick review, just to confirm that I’m moving in the right direction before adding the tests. |
joncinque
left a comment
There was a problem hiding this comment.
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!
|
@joncinque I would need a bit of guidance on adding tests for the permissioned burn. I see tests in rust-legacy and js-legacy, but since they’re marked legacy I’m unsure of the current convention. Where should new tests go? |
joncinque
left a comment
There was a problem hiding this comment.
I see tests in rust-legacy and js-legacy, but since they’re marked legacy I’m unsure of the current convention. Where should new tests go?
Thankfully, legacy doesn't mean deprecated, so please add the tests to the rust-legacy client 😄
This is on the right track, keep it up! Let me know if you need anything else on my side, apologies for the slowness on the re-review
|
@joncinque Everything should be resolved now :) |
joncinque
left a comment
There was a problem hiding this comment.
This looks really good! Mostly nits, and a question about what to do if the authority is set to None.
We'll eventually need to add the ability to specify a burn authority in the CLI and rust-legacy clients, but that can happen later
|
I kicked off CI, and there are a few little things to fix:
Let me know if you need any help with these pieces 😄 |
joncinque
left a comment
There was a problem hiding this comment.
This is very close! We just landed another new feature, so you'll need to rebase your branch, let me know if you run into any issues there.
Otherwise, there are still a few CI failures, visible at https://github.com/solana-program/token-2022/actions/runs/20094774273/job/58139444250?pr=818:
- spellcheck failing
- js legacy needs to be formatted
- js tests failing because the new
PermissionedBurnauthority isn't included - rust build failure in CLI and rust-legacy due to the new extension type -- I'm hoping the build just figures this out after your rebase, otherwise we might have to do some annoying stuff. Let's see how CI looks after your rebase
Co-authored-by: Jon C <me@jonc.dev>
|
@joncinque Rebased and fixed the issues you pointed out. Everything should hopefully be fine now. EDIT: I see the CI fails, working on fixing them. |
joncinque
left a comment
There was a problem hiding this comment.
Sorry for the delay here, I was out for a bit. Two more little nits, then we can land this -- thanks for your continued work!
joncinque
left a comment
There was a problem hiding this comment.
Thank you for your huge contribution! This is a great feature, and you did an amazing job implementing it from start to finish
|
@joncinque Thanks! Glad I could contribute :) |
This PR implements a permissioned-burn extension as described in #772
Summary
Introduces the
PermissionedBurnmint extension, enabling bothburnandburn_checkedoperations that require approval from a designated authority configured during mint initialization.When this extension is enabled, standard
burnandburn_checkedinstructions are disallowed for the mint. This PR does not modify the existing behavior of regular burns for mints that do not use the extension.TODO:
Closes #772