This is a simple NFT Marketplace contract where you can list your NFT in marketplace, and then people can buy it with designated price. Created using Foundry framework.
This contract not included a royalty feature to the marketplace, further development can be done for this feature.
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
Foundry consists of:
- Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
- Chisel: Fast, utilitarian, and verbose solidity REPL.
- git
- You'll know you did it right if you can run
git --versionand you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --versionand you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
git clone https://github.com/KrisAdw/Simple-NFTMarketplace.git
cd Simple-NFTMarketplace
forge build
make anvil
This will default to your local node. You need to have it running in another terminal in order for it to deploy.
make deployNft
make deployMarketplace
Other usage command can be find in Makefile
forge test
or
forge test --fork-url $SEPOLIA_RPC_URL
forge coverage
You can estimate how much gas things cost by running:
forge snapshot
And you'll see an output file called .gas-snapshot
To run code formatting:
forge fmt
If you want to get contact on me, feel free to connect or follow me on: