Open chudleigh2 opened 2 months ago
This is certainly possible -- here's how I'm thinking it would go:
WithdrawExcessLamportsAuthority
just for mints, along with an instruction to initialize the authorityWithdrawExcessLamportsAuthority
and support it in SetAuthority
withdraw_excess_lamports
, if the extension exists, then that's the only possible authority that can withdraw lamports, so even the mint authority wouldn't be able to withdraw lamportsAnd I think that's it. What do you think?
That makes sense!
I was hoping there might have been an even easier solution like giving an existing authority the ability to do it, perhaps even metadata update authority. A lot of tokens will have this extension active but not all.
your way would work for all tokens going forward and is a great idea.
Why not both?
SPL Token is very careful to avoid overloading authorities, so I would go with the same approach if we add another authority, rather than spreading the ability to withdraw lamports across multiple authorities.
This may be a pointless request but if you don't ask, you don't get.
I believe the authority to withdraw excess lamports from a program owned account for SPL 2022 is set with Minth Authority.
Almost all tokens created will revoke the Mint Authority making this a pointless CLI command. I appreciate there are already a lot of authorities but but surely one more can't hurt?
Whether it's even possible to change this now is beyond me but doing so would make a huge amount of people happy.