POKEMON CARDS NFT MARKETPLACE is a decentralized application (DApp) that enables users to participate in auctions for Pokémon cards represented as Non-Fungible Tokens (NFTs). The project is built on the Ethereum blockchain using smart contracts and leverages various technologies and tools to achieve its functionalities.
- Only the admin can create new NFT tokens representing Pokémon cards.
- Users can bid on Pokémon card NFTs in auctions.
- The admin can mint new NFT tokens for new Pokémon cards.
- The admin can start and end auctions for specific Pokémon card NFTs.
- At the end of an auction, the NFT is transferred to the highest bidder.
- Participants who did not win the auction can withdraw their bids.
The project utilizes the following technologies and tools:
- HTML: For the basic structure of the user interface.
- CSS & Bootstrap CSS: For styling and responsiveness of the DApp.
- JavaScript: To implement the frontend functionalities and interactions.
- NFT.Storage API: To upload metadata information and card images to a decentralized storage solution.
- Solidity: To write the smart contracts governing the NFT creation, auction, and transfer logic.
- Web3.js: To interact with the Ethereum blockchain and smart contracts from the frontend.
- Remix IDE: For testing and debugging the smart contracts.
- Hardhat: To deploy the smart contracts on the Ganache local blockchain environment.
- Ganache: To set up and manage the local blockchain environment for development and testing.
- Vite and Node.js: To build and run the frontend application.
- Dotenv: To store the private key and provider URL securely.
Before running the POKEMON CARDS NFT MARKETPLACE, you need to have the following installed:
- Node.js
- Ganache
- MetaMask Ethereum wallet extension in your browser.
- Clone the repository and navigate to the project directory.
git clone https://github.com/akshitbtw/pokemon-cards-nft-marketplace.git
cd pokemon-cards-nft-marketplace
- Install the required dependencies by running:
npm install
- Set up a
.env
file in the root directory and store your private key and provider URL like this:
PRIVATE_KEY=your_private_key_here
PROVIDER_URL=your_provider_url_here
Replace your_private_key_here
with the private key of the admin's Ethereum wallet and your_provider_url_here
with the URL of your chosen Ethereum provider (e.g., Infura).
- Deploy the smart contracts using Hardhat and Ganache:
npx hardhat run scripts/deploy.js --network localhost # Deploys the smart contracts
- Launch the frontend application:
npm run dev
- Open your browser and access the application at
http://localhost:<PORT_NUMBER>
.
-
Minting NFTs:
- As an admin, you can mint new NFTs by navigating to the "Create NFT" section under the admin panel.
- Fill in the required details in the form shown there, such as card attributes, image.
- Click the "Create NFT" button to create a new Pokémon card NFT.
-
Starting an Auction:
-
Ending an Auction:
- Admin can manually end an ongoing auction after its timer expires.
- Go to the "Start/End Auction" section under the admin panel.
- Find the card and click the "End Auction" button below it.
-
Bidding on Auctions:
- Users can bid on the auctions shown on the homepage.
- Enter your bid amount in the input field next to the Pokémon card NFT you want to bid on.
- Click the "Place Bid" button to submit your bid.
-
Winning an Auction:
- If you place the highest bid on an auction and the timer expires, the NFT will be automatically transferred to your Ethereum wallet.
- You can see the NFT you won in the "My NFTs" section.
-
Withdrawing Bids:
- If you don't win an auction, you can withdraw the bidded amount.
- Go to the "Withdraw" section and find the card and click the "Withdraw" button below it to get back your bid amount.