The sneaker market has blown up the past decade with shoe brand titans like Nike and adidas reaping in billions. Each year customers go to great lengths to secure themselves a newly released sneaker, though few will actually ever wear them. For many sneakers are an investment. Bought anywhere between $160-$300, highly coveted or popular sneakers will resell for $2000 to $30000 and less popular sneakers going for retail to $600. However these high resell prices have made themselves a target for fraud. With every new release, thousands of counterfeit copies are made, with some looking nearly indistinguishable from the original. Many will fall victim to buying counterfeit sneakers, sometimes paying thousands of dollars for them, only to later realize they were duped. Today there is still no garunteed method to seperate the fake from the real, but hopefully NFTs can solve this problem...
This project aims to create an app that allows sneaker brands like Nike and adidas to create NFT tokens of their sneakers. Customers who purchase the sneaker online or instore will be sent a confirmation code either by email or printed receipt. Customers will then login to the App via Metamask and use their code to mint their sneaker NFT.
The NFT will serve as a proof of ownership and certification of authenticity of the physical sneaker. NFTs will be linked to the sneaker by serial code, confirmation code, and a QR code. When customers want to resell their shoes online or in person, all they need to do is scan the QR code on their shoe which will display the NFT contract and the current owner.
client: Project's React frontend.contracts: Smart contracts that are deployed on the Rinkeby testnet.migrations: Migration files for deploying contracts incontractsdirectory.test: Tests for smart contracts.scripts: JS scripts to upload confirmations codes and images to contracts.
- Node.js >= v14
- Truffle and Ganache >= 5.4.19
git checkout master
- Run
npm installin project root to install smart contract dependencies - Run local testnet in port
8545with an Ethereum client, e.g. Ganache truffle migrate --network developmenttruffle console --network development- Run tests in Truffle console:
test
truffle console --network developmentexec scripts/add-codes.jsexec scripts/add-images.js
- Copy the
contractsfolder in./build/contractsand paste intoclient/src - Run
cd client - Run
npm installto install front end dependencies - Copy the
mnemonicfrom the Ethereum client and import into Metamask - Make sure your Metamask network is set to
Localhost 8545in the correct port8545and chain id is1337 - If you get
TXRejectedErrorwhen sending a transaction, reset your Metamask account from Advanced settings. - Run
npm start - Open
http://localhost:3000
- The first
accountis theselleraccount with access to theLaunchandEndbuttons. - Any other
accountis the "buyer" account with access to theMintfunction. Confirmation codescan be found in theadd-codes.jsfile in the/scriptsdirectory
Buyer:
- Enter web site
- Login with Metamask
- Browse uploaded sneakers
- Select sneaker
- Input the confirmation code and click
Mintto mint the sneaker NFT (smart contract call)
Seller:
- Enter web site
- Login with Metamask
- Select sneaker
- Click the
LaunchorEndbutton to allow or block minting (smart contract call)
Deployed on Rinkeby testnet
https://blockchain-developer-bootcamp-final-project-atootdev.netlify.app/
0xb7F0E927Db0d1e8D596b983a3F187d8636f95300
MNEMONIC=
INFURA_KEY=
- Remove tokenId variable from Sneaker struct
- Single function in Sneaker NFT contract to get all relevant data
- Other contract improvements (from reviews, comments, etc)
- Create ERC721 Factory contract
- Create ERC721 contracts for streetwear and collectibles
- Utilize IPFS for file storage of token meta data
- Research solution for generating user profiles and data storage (blockchain, off/side chain?)
- Perform live test with small business
- Research alternative blockchains for cheaper fees and faster rates
- Improve UI/UX (state management, styling, etc)