- The objective of this project is to create a marketplace that allows users to buy, sell NFTs as well as view their own NFTs using blockchain technology. The application must be built using Next.js and integrate with a smart contract deployed on the Base test network.
- The user must be able to connect their wallet based on testnet
- User should be able to see available nfts
- The user must be able to sell their own nfts at X price
- The user must be able to buy nfts at the price provided.
- As for the visual part, any framework that is simple can be used, it doesn't matter if it is a very MVP version, more attention will be paid to the coordination of the features than to the form.
- You can use any tool, but we will talk in detail about the solution.
- Making The Smart Contract
Functions in the smart contract NFTMarketplace.sol
- createToken() - Top level function when creating a token for the first time.
- createListedToken() - Helps create the object of type ListedToken for the NFT and Update the idToListedToken mapping.
- getAllNFTs() - get all the NFTs from the current user on the marketplace.
- getMyNFTs() - get all the NFTs from the current user on the marketplace.
- executeSale() - the function that executes the sale on the marketplace.
- Work on components
- Marketplace.js
- Navbar.js
- NFTpage.js
- NFTTile.js
- Profile.js
- SellNFT.js
- Make test and work on better fuctions of bottons and interactions on IFPS and Alchemy SDK conenctions, .env .
Errors to fix and possible solutions:
- GetIpfsUrlFromPinata: where does it come from?
- updateDataFetched : NTFpage.js line 40
- deploy.js : where the Process line 25 comes from
- testing.js import ethers
- navbar.js : Opens 3 times, use effects without dependency array, change to empty array.
- Connect wallets button
- Fix the issues and continue with the integrations.
- SellNFT.js
- Navbar.js
- Marketplace.js
- NFTpage.js