-
Notifications
You must be signed in to change notification settings - Fork 57
p-token: Allow withdraw excess lamports from mint without authority #51
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
Conversation
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.
Looks great to me! Just nits on 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.
Looks good!
When will this update be pushed to the legacy Solana token program where there are the most tokens with unrecoverable SOL in mint accounts? |
Problem
Currently there is no mechanism to withdraw excess lamports from mint accounts with no authority. In such scenarios, #48 proposes to allow the mint keypair to withdraw the excess lamports.
Solution
This PR updates the
withdraw_excess_lamports
instruction to allow withdraw when the authority is the same as the mint, it is a signer and the mint does not have an authority.