js
js copied to clipboard
fund.ts:52 Uncaught (in promise) Error: failed to post funding tx - 4u..... (keep this id!) - Fund Tx Not Found
I am facing this issue . I have created keypair and added airdrop function to add fund to it. I am working on devnet . Please help to resolve it .
const connection = new Connection(clusterApiUrl("devnet"));
const wallet = Keypair.generate();
console.log('wallet :',wallet);
const metaplex = Metaplex.make(connection)
.use(keypairIdentity(wallet))
.use(bundlrStorage({address: "https://devnet.bundlr.network",
timeout:60000
}));
console.log('mataplex :',metaplex);
var fromAirdropSignature = await connection.requestAirdrop(
wallet.publicKey,
LAMPORTS_PER_SOL*1000000000,
);
console.log('fromAirdropSignature :',fromAirdropSignature);
await connection.confirmTransaction(fromAirdropSignature);
const {uri}= await metaplex.nfts().uploadMetadata({
name: "My NFT",
description: "My description",
})
// .then((res)=>
// console.log(res)
// );
console.log('uri',uri);