This project allows to fully build a new NFT collection on Ethereum block-chain and mint them through a ReactJS based website.
There are some key features:
- Image generation is completely random, based on pre-defined percentages, different SVG layers will be combined together. This will result in different clustering groups (common, rare, super-rare).
- The website is built with ReactJS and Web3.
- The generated images will be pushed to IPFS for resiliency and privacy.
- The smart-contract is ERC721 and it leaverage the openzeppelin-solidity library.
- Utility scrits are located under ./scripts folder.
convert -resize 50% -delay 20 -loop 0 metadata/images/*.png output.gif
npm install -g truffle
npm i ganache-cli
ganache-cli --port 7545 --quiet
git clone https://github.com/raelix/sport-legends.git
npm install
truffle compile
truffle migrate --reset --network rinkeby
truffle console --network rinkeby
npm start
npm install -g truffle-flattener
truffle-flattener contracts/SportLegends.sol > SportLegends.sol
N.B. the layers must be visible (up to now we have sublayers as well so this approach needs to be revisited)
for lay in $(inkscape --query-all NFT.svg | grep "g" | grep -v svg | awk -F, '{print $1}'); do
inkscape NFT.svg -i $lay -j -C --export-png=testme/$lay.png;
done
export NODE_OPTIONS=--openssl-legacy-provider
The cost = Gas Price x Amount of Gas consumed Cost = 80 Gwei * 2683987M = 214718960M Gwei = 0.21471896eth Cost = 50 Gwei * 2683987M = 134199350M Gwei = 0.13419935eth