Skip to content

evercoinx/nft-marketplace

Repository files navigation

Project Description

The marketplace allows users to trade non-fungible tokens (NFTs) which are compliant with the ERC-721 standard. The smart contract exposes the following functionality to its users:

  • List an NFT
  • Delist an NFT
  • Buy an NFT with transferring ownership
  • Update listing data
  • Get listing data

Contract Description

The marketplace contract description can be found here.

Deployments

Ethereum Goerli Testnet

Polygon Mumbai Testnet

Optimism Goerli Testnet

Scripts

Install

# install application dependencies
$ npm install

Prepare

# create the .env file with the default configuration
$ cp -vi .env.example .env

# initialize the empty variables in the .env file with the corresponding values
$ sed -i -r 's/^(ALCHEMY_API_KEY=)/\1<YOUR_ALCHEMY_API_KEY>/' .env
$ sed -i -r 's/^(ETHERSCAN_API_KEY=)/\1<YOUR_ETHERSCAN_API_KEY>/' .env
$ sed -i -r 's/^(TESTNET_SENDER_MNEMONIC=)/\1<YOUR_TESTNET_SENDER_MNEMONIC>/' .env
$ sed -i -r 's/^(TESTNET_SENDER_PASSPHRASE=)/\1<YOUR_TESTNET_SENDER_PASSPHRASE_IF_ANY>/' .env
$ sed -i -r 's/^(TESTNET_SENDER_ADDRESS=)/\1<YOUR_TESTNET_SENDER_ADDRESS>/' .env

Format & Lint

# format the code
$ npm run format

# lint the code
$ npm run lint

Test

# run unit/integration tests
$ npm run test

# run unit/integration tests with a coverage report
$ npm run test:cover

# run unit/integration tests with a gas report
$ npm run test:gas

# run fuzz tests with echidna
$ npm run test:fuzz

Analyze

# analyze the contracts with mythril
$ npm run analyze:mythril

# analyze the contracts with slither
$ npm run analyze:slither

Clean

# clean up all the auxilliary directories (artifacts, caches etc)
$ npm run clean

Flatten

# flatten the contracts
$ npm run flatten

Compile

# compile the contracts
$ npm run compile

Node

# run the local node
$ npm run node

Console

# connect to the running local node
$ npm run console:node

# connect to the docker image with crytic's security toolset
$ npm run console:crytic

Deploy

# deploy the contracts to the hardhat network
$ npm run deploy:hardhat

# deploy the contracts to the localhost network
$ npm run node
$ npm run deploy:localhost

# deploy the contracts to ethereum's goerli network
$ npm run deploy:eth-goerli

# deploy the contracts to polygon's mumbai network
$ npm run deploy:pol-goerli

# deploy the contracts to optimism's goerli network
$ npm run deploy:opt-goerli

Verify

# set the address of the marketplace contract
$ sed -i -r 's/^(MARKETPLACE_ADDRESS=)/\1<YOUR_MARKETPLACE_ADDRESS>/' .env

# verify the contracts in ethereum's goerli network
$ npm run verify:eth-goerli

# verify the contracts in polygon's mumbai network
$ npm run verify:pol-mumbai

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published