Skip to content

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

Merged
merged 4 commits into from
Apr 30, 2025

Conversation

febo
Copy link
Contributor

@febo febo commented Apr 17, 2025

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.

@febo febo requested review from joncinque and buffalojoec April 17, 2025 13:47
joncinque
joncinque previously approved these changes Apr 21, 2025
Copy link
Contributor

@joncinque joncinque left a 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

Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@febo febo merged commit 25b0d8c into main Apr 30, 2025
15 checks passed
@febo febo deleted the febo/mint-as-authority branch April 30, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants