Skip to content

obitel-forks/Ethereum-NFT-Store-with-Dutch-Auctions

 
 

Repository files navigation

Ethereum NFT-Store with Dutch Auctions [POC]

A POC of a NFT-Store where one can mint NFT's and then sell them by creating dutch auctions. The app consists of three pages:

  1. A main page where one can search for NFT's and mint them
  2. An auctions page where all currently running auctions are listed
  3. An inventory page where all numbers owned by the current user are listed

Getting up and running

# install dependencies
$ npm install

# deploy contracts
# (make sure to first fire up ganache and to change the 'from' account in 'truffle.js')
$ truffle migrate --reset --network ganache

# start app
$ npm run dev

(The app is configured to check for a private Ganache network)

Used packages

Used contracts

Useful links

Tools

Known errors

Minting does not work

  • Solution: Minting is currently only allowed by the owner of the NFT contract. Check that the address from which the contracts were deployed matches the address from which one calls mint()

Attempting to run transaction which calls a contract function, but recipient address 0x... is not a contract address

  • Solution: Delete .json files in build/contracts/ and redeploy contracts

Nonce of account is not correct

  • Solution: Go to MetaMask -> Settings -> scroll to the bottom -> select Reset Account

bid() reverts/out of gas

  • Solution: Use more gas ;-)

TODO's

  • add discoverability for auctions to NFTDutchAuction.sol (see: NFTokenEnumerable.sol function tokenOfOwnerByIndex(address _owner, uint256 _index))
  • add possibility to cancel auctions
  • reduce gas cost of NFTDutchAuction.sol functions
  • rework search for numbers: add steps, show min and max, etc.
  • add tests
  • add notifications
  • inventory: when calling getOwnedNFT() do not loop over 0 -> display message "currently no NFT's owned"
  • unify used time units (currently hours and minutes)

Screenshots

About

A POC of a NFT-Store running on Ethereum

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.7%
  • Solidity 7.4%
  • HTML 3.5%
  • CSS 0.4%