metaplex-foundation / umi

A Solana Framework for JS Clients.
https://umi.typedoc.metaplex.com
MIT License
150 stars 45 forks source link

Blowfish friendly Candy Machine Mint #137

Closed thebrahman closed 1 month ago

thebrahman commented 1 month ago

Normal UMI transactions cause most wallets to flag now. Blowfish requires the usage of 'signAndSendTransaction' to avoid flags.

https://docs.blowfish.xyz/docs/signandsendtransaction-migration-guide#list-of-wallets-that-definitely-support-signandsendtransaction

To avoid flags I have been trying to convert my umi transaction to WebJs and use 'wallet.sendTransaction' to send it ( 'wallet.sendTransaction' calls 'signAndSendTransaction' if the wallet supports it).

I have been trying for the best part of a month and have had no luck. can anyone tell me how to mint from a candy machine without triggering Blowfish flags? here is an example of what I have been trying:

    let builder = transactionBuilder()
      .add(setComputeUnitLimit(umiWalletAdapter, { units: 1_000_000 })) 
      .add(
        mintV2(umiWalletAdapter, {
          candyMachine: candyMachine.publicKey,
          nftMint,
          collectionMint: candyMachine.collectionMint,
          collectionUpdateAuthority: candyMachine.authority,
          tokenStandard: candyMachine.tokenStandard,
          candyGuard: candyGuard?.publicKey,
          mintArgs,
        })
      );

    const {
      context: { slot: minContextSlot },
      value: { blockhash, lastValidBlockHeight }
    } = await connection.getLatestBlockhashAndContext();

    builder = builder.setBlockhash(blockhash);

    const umiTransaction = builder.build(umi);
    const web3Transaction = toWeb3JsTransaction(umiTransaction);

      const signature = await wallet.sendTransaction(web3Transaction, connection, { minContextSlot });
      await connection.confirmTransaction({ blockhash, lastValidBlockHeight, signature });
MarkSackerberg commented 1 month ago

This does unfortunately not work anymore (the guide you linked is deprecated).

Unfortunately the only way to get rid of that message nowadays seems to be to contact blowfish