You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'll notice that instruction #5 (on Solscan) is HarvestWithheldTokensToMint. However, the Withdraw Authority is Null so this operation should normally fail. But this is an exceptional case in which the tokens are being immediately burned (by instruction #6) in the same atomic transaction, so the harvest is allowed in order to permit the wallet owner to recover the rent.
Nevertheless we wanted to make absolutely sure that there was no way to withdraw withheld tokens, so we tried to withdraw our own:
Problem
If you look at this transaction:
4N1GvNc27DFhKK7Y8dcjMhrDuze4LMfM1qhoG6nkFG2EWTMPEcuevXVGEXmwt6gR55VEskQ9X37Z8RKkP1HhgL8i
You'll notice that instruction #5 (on Solscan) is HarvestWithheldTokensToMint. However, the Withdraw Authority is Null so this operation should normally fail. But this is an exceptional case in which the tokens are being immediately burned (by instruction #6) in the same atomic transaction, so the harvest is allowed in order to permit the wallet owner to recover the rent.
Nevertheless we wanted to make absolutely sure that there was no way to withdraw withheld tokens, so we tried to withdraw our own:
spl-token withdraw-withheld-tokens 8QhMP4HVfUd78hSjwzRXmifYCWAYB2nYiM6Emd7fTstd --fee-payer AirDpo61FVsNDoWSBoBX3K4gcBiTVnkfZRAZk7bKfRtX.json --url mainnet-beta --output json --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --withdraw-withheld-authority AirDpo61FVsNDoWSBoBX3K4gcBiTVnkfZRAZk7bKfRtX.json
This command just terminates as though it succeeded. It definitely didn't succeed because our Withheld Amount on explorer.solana.com is unchanged:
8QhMP4HVfUd78hSjwzRXmifYCWAYB2nYiM6Emd7fTstd
This is correct behavior but withdraw-withheld-tokens should have returned an error message.
Proposed Solution
Just check if the operation succeeded and report to the user.
The text was updated successfully, but these errors were encountered: