This project represents deploying of NFT (ERC721) contract & NFT Marketplace for trading NFT tokens. You can also compare this project with Hardhat/Ethers version of it that published earlier in here. This would be useful for learning both pack of tools.
git clone --recursive https://github.com/0xhamedETH/truffle-web3-nft-marketplace.git your-directory
cd your-directory/ethereum
npm install
compile first to create json artifacts in build
folder
truffle compile
- Run
ganache-cli
in separate terminal
ganache-cli
- Run
truffle test
in main terminal
truffle test test/nft.test.js
For this step you first need to fill .env
file with your api keys (Alchemy
, ...)
You can deploy both contracts in any network you want (make sure truffle-config.js
contains that network)
for example: maticMumbai
truffle migrate --reset --network maticMumbai
After a while, you would see deployment transaction details of both NFT and NFTMarketplace contracts in console.