Search code examples
typescriptsolanametaplex

Solana Metaplex V1 accept SPL token for auction


I'm using the Metaplex Storefront V1 for my auctions and I would like to implement SPL tokens for auctions as far as I know the earlier version of the storefront was able to accept SPL tokens basically with a dropdown menu, but the latest version does not contain this feature. I've only found a harcoded way to accept SPL token for temporary.

export const WRAPPED_SOL_MINT = new PublicKey('So11111111111111111111111111111111111111112',);

I would like to create my own SPL token with "spl-token create-token" commandlet and accept it in my store.


Solution

  • I've dived into the code and I've found this feature. It was hidden thanks to a condition. Exact code where it can be found:

    {
      hasOtherTokens && (
        <label className="action-field">
          <span className="field-title">Auction mint</span>
          <span className="field-info">
            This will be the quote mint for your auction.
          </span>
          <TokenButton mint={mint} onClick={() => setShowTokenDialog(true)} />
          <TokenDialog
            setMint={setMint}
            open={showTokenDialog}
            onClose={() => {
              setShowTokenDialog(false);
            }}
          />
        </label>
      );
    }
    

    asd

    enter image description here

    With this feature, I was able to set up an auction that accept unique SPL token as currency.