npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2024 โ€“ย Pkg Stats / Ryan Hefner

nftwithwhitelist

v1.0.5

Published

Let's build your first NFT in blockchain ecosystem. Add whitelist feature to make your NFT more realistic ๐Ÿ˜Ž

Downloads

17

Readme

NFT with Whitelist

Let's build your first NFT in blockchain ecosystem. Add whitelist feature to make your NFT more realistic ๐Ÿ˜Ž.

Requirement

  • Account metamask with Sepolia network. read it.
  • You must have sepolia balanced. If not have, go to here or here.

Pre-initialize ๐Ÿ˜ผ

  • Create an account in etherscan.io and get APIKEY.
  • Get PRIVATE_KEY from your Metamask account (DISCLAIMER!! don't USE your main account for security reason. Make a new one with development purpose.)
  • Create an account from Quicknode and create new project with SEPOLIA testnet as a network. And get RPCURL.
  • Paste all of that to .env. (PLEASE paste with a pattern at that file.)

How to play ๐ŸŽฎ

  • npm install nftwithwhitelist
  • npx nftwithwhitelist init
  • Go to contracts directories. Then, rename file "AneFahmi.sol" to other filetype, maybe .html. It's to avoiding an error when deploy Whitelist.sol.
  • npx hardhat run scripts/deploy.js --network sepolia
  • Make sure you don't look any error when deploy it. Copy a whitelist contract address you got and open a link "https://sepolia.etherscan.io/address/{YOURWHITELISTCONTRACTADDRESS}
  • Click a Contract tab. And let's go to Write Contract. Coonect to Web3 and then click addAddressToWhitelist functions. (FYI: You can see this a source code in Code tab. Also, at contracts/Whitelist.sol).
  • Next step, back to your workspace and rename again a file AneFahmi.whatEverFiletype to AneFahmi.sol.
  • Open scripts/deploy-nft.js . Find const contractAddress and change a value to your Whitelist contract address. Save it.
  • And deploy your nft with, npx hardhat run scripts/deploy-nft.js --network sepolia
  • Make sure, don't see an error. Do a same treatment after deploy whitelist success. Open a link "https://sepolia.etherscan.io/address/{{YOURNFTCONTADDRESS}}".
  • Do you see "Token Tracker" and below that you looks "Ane Fahmi (AFI)"? Click it on new tab.
  • You can see an information about max total supply, how many holder, a token contract etc. Also, if you scroll down below just little bit, you can see an information about TokenID. That's mine.
  • Click Contract tab. Then, go to Connect to Web3 at Write Contract. After that, click mint functions with 0 value. Why zero? Because your Account address was registered in whitelist address. If you switch to other account and do a same things without go first to Whitelist Contract Address. You will find error or transaction never find complete. (A tips: If you use other account doesn't registered in whitelist. You must input value at least 0.01. That's based on _price variable in contracts/AneFahmi.sol Or, you can see at Read Contract tab and click on _price. But you need an information about wei, gwei and ether. Don't worry, click an numbers and you will redirect to unit converter. Focus on ethers).
  • The last, you can go to information about your transactions. Just click on View your transaction. Wait until the status process is success. Scroll down, you can find a transaction using ERC721 Token for NFT.
  • Cheers ๐Ÿป

How to change name of NFT?

  1. Thanks for use my name at your first NFT ๐Ÿคฃ
  2. Change AneFahmi.sol to AnythingYouWant.sol
  3. Open it, change name of contract based on you anything you want.
  4. Find "Ane Fahmi" and change it with you want, don't forget with symbol you want, change "AFI".
  5. Open scripts/deploy-nft.js find "aneFahmi" to your name of contract.
  6. Repeat deploy your "deploy-nft.js"
  7. Taraaa.. that's you want, right? ๐Ÿคฉ

I hope you not get problem. If that's happen, let's create an issue ๐Ÿ˜บ