2

I can see in the documentation that Token-2022's transfer fees and confidential transfers are supported (or intended to be supported) when used together. However, when I attempt to mint a token with both, like this:

spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --enable-confidential-transfers auto --transfer-fee 50 0

I receive the error message Program log: Mint or account is initialized to an invalid combination of extensions.

Looking at the source code for program-2022, I see that it checks to ensure that the ConfidentialTransferFeeConfig extension is loaded when confidential transfers and transfer fees are used together, but I don't see in the documentation or the CLI code how I could set the config expected at mint.

Am I overlooking something, or is this still incomplete?

2 Answers 2

1

You found a bug! We're not automatically initializing the confidential transfer fee extension if the confidential transfer and transfer fee are provided.

If it lands, this will get fixed with https://github.com/solana-labs/solana-program-library/pull/5862, so if you pull from master and create a mint with a transfer fee and confidential transfers, it will properly work, ie:

$ spl-token create-token --transfer-fee 100 1000000 --enable-confidential-transfers auto
0

It is not yet possible, you can find it here in the future work section: https://spl.solana.com/token-2022/status

"Due to the transaction size limit, it is not possible to do confidential transfers with a fee. We plan to include that capability with Solana 1.18."

2
  • Since it is possible to mint a token supporting confidential transfers before the 1.17 upgrade enables use of the feature, I had hoped that it would be possible to mint a token supporting both prior to support in 1.18 even if the confidential transfers would be gated until the 1.18 upgrade. But I certainly don't see the ability to do so.
    – JTB
    Commented Nov 17, 2023 at 14:06
  • it's weird that they allow it before being used on one side, but not on the other ! could you mark my answer as accepted please ? thanks !
    – Effe2
    Commented Nov 17, 2023 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.