Skip to content
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

Mint Close Authority Extension is not supported and breaks creation of LP #32

Open
BitCM581 opened this issue Jan 8, 2025 · 0 comments

Comments

@BitCM581
Copy link

BitCM581 commented Jan 8, 2025

Hi guys!

I created a new token based off Solana and wanted to now add a LP for my token/solana pair. However, the creation of such LP failed. The transaction shows the following error:

> Program logged: "AnchorError thrown in programs/cp-swap/src/instructions/initialize.rs:171. Error Code: NotSupportMint. Error Number: 6007. Error Message: Not support token_2022 mint extension."
> Program consumed: 89751 of 596107 compute units
> Program returned error: "custom program error: 0x1777"

After digging a bit through the code, the issue seems to be my token using the "Mint Close Authority Extension" since the call to is_supported_mint()

pub fn is_supported_mint(mint_account: &InterfaceAccount<Mint>) -> Result<bool> {

is returning false if an extension is found that is not one of [TransferFeeConfig, MetadataPointer, TokenMetaData]:

        if e != ExtensionType::TransferFeeConfig
            && e != ExtensionType::MetadataPointer
            && e != ExtensionType::TokenMetadata
        {
            return Ok(false);
        }

Is this a "bug" or a feature? It looks like it was a conscious decision to exclude other extensions but I can not think of why this might be an issue.

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

No branches or pull requests

1 participant