![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
react-solana-nftmint
Advanced tools
Readme
Mint NFTs on Solana With this package, all you need to mint NFTs is to provide your JSON file as an URL to the mint function.
The props should be self-explanatory, but they are:
yarn add react-solana-nftmint
or npm i -S react-solana-nftmint
import * as anchor from "@project-serum/anchor";
import { useAnchorWallet } from "@solana/wallet-adapter-react";
import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
import React, { useCallback } from "react";
import useMint, { MintProps } from "react-solana-nftmint";
export default function MyComponent() {
const anchorWallet = useAnchorWallet()
const props: MintProps = {
loading: false,
rpc: "https://api.devnet.solana.com",
title: "Sample NFT",
creators: [
{
address: new PublicKey("6xnRdTedrerREnaveYndZPioRuK1JcQPfnyA5mQME6vT"),
verified: false,
share: 100 // sums must total 100 if you have more than one creator
},
],
mintPrice: new anchor.BN(0.05 * LAMPORTS_PER_SOL),
symbol: "",
seller: new PublicKey("6xnRdTedrerREnaveYndZPioRuK1JcQPfnyA5mQME6vT"),
royalty: 500,
}
const { mintNft, ready, uploading, error } = useMint(props, anchorWallet);
const handleMint = useCallback(async () => {
if (!anchorWallet) {
return
}
let nftURL = "https://files.sdrive.app/15zg0r4.json";
await mintNft(nftURL);
}, [props, anchorWallet])
return (
<div>
{error && <div>{error}</div>}
{uploading && <div>NFT is cooking...</div>}
<button disabled={!ready} onClick={handleMint}>Mint {props.title}</button>
</div>
)
};
FAQs
UseEffect hook to mint NFT 1/1s
The npm package react-solana-nftmint receives a total of 1 weekly downloads. As such, react-solana-nftmint popularity was classified as not popular.
We found that react-solana-nftmint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.