Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7836

I'm using Alchemy for an airdrop, but after completing airdrop, my confirmTransaction function is not working, which prevents below code from running

$
0
0
    try {          let signature = await connection.requestAirdrop(            new PublicKey(publicKey),            LAMPORTS_PER_SOL          );          console.log("Airdrop complete");            await connection.confirmTransaction({             signature,          });        // **code is not reaching here**        const balance = await connection.getBalance(new PublicKey(publicKey));        const balanceInSOL = balance / LAMPORTS_PER_SOL;        console.log(`Balance of wallet ${publicKey} is: ${balanceInSOL} SOL`);   } catch (error) {      console.error("An error occurred:", error);   }

Viewing all articles
Browse latest Browse all 7836

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>