Skip to content

KrisAdw/Simple-NFTMarketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT Marketplace Contract

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.

Documentation

https://book.getfoundry.sh/

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • foundry
    • You'll know you did it right if you can run forge --version and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)

Quickstart

git clone https://github.com/KrisAdw/Simple-NFTMarketplace.git
cd Simple-NFTMarketplace
forge build

Usage

Start a local node

make anvil

Deploy

This will default to your local node. You need to have it running in another terminal in order for it to deploy.

Deploy NFT

make deployNft

Deploy Marketplace

make deployMarketplace

Other usage command can be find in Makefile

Testing

forge test

or

forge test --fork-url $SEPOLIA_RPC_URL

Test Coverage

forge coverage

Estimate gas

You can estimate how much gas things cost by running:

forge snapshot

And you'll see an output file called .gas-snapshot

Formatting

To run code formatting:

forge fmt

Thank you!

If you want to get contact on me, feel free to connect or follow me on:

Kris Adiwinata Linkedin Kris Adiwinata Instagram Kris Adiwinata Twitter

About

A simple NFT Marketplace with feature to list, sell, and cancelling NFT's to your marketplace

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors