This is an boilerpate project showing how you can hook up your Ethereum Non-Fungible Tokens (NFTs, ERC721, similar to CryptoKitties) contract in a DApp.
Etherplate uses OpenZeppelin's fantastic community-audited contracts as a base to implement the ERC721 standard.
This is forked from chuckbergeron/etherplate that is awesome project
Homebrew on Mac OSX:
brew install node npm
Apt on Linux:
apt-get install node npm
npm install truffle -g
npm install
-
cp .env.example .env
-
Enter your own twelve random words in the .envrc.
-
Also, we'll leverage Infura's Ethereum Ropsten testnet node, so make sure to set up an account and paste your private key in your
.env
Create a directory for ganache-cli to store it's database in:
mkdir .ganache
npm run truffle:compile
This will deploy the contract to the network (tip: use --network=ropsten to deploy to Ethereum's Ropsten Testnet)
npm run truffle:migrate
Make sure the truffle contracts are compiled and migrated.
In one terminal window, run the ganache-cli (local Ethereum RPC test node) with:
./ganache.sh
Once Ganache is running, in another terminal start the Webpack dev server.
npm run start
Your server should now be running at http://127.0.0.1:8080
Why is there both a truffle and truffle-config file?
- On Windows, truffle-config.js is required. You can safely delete the one you don't need (ie on Mac/Linux you can delete truffle-config.js)
npm run build
Note: Currently we are manually migrating contracts against the Ropsten & Rinkeby testnets, and checking the build into the repo. This is less than ideal. It would be better to use a build script such as the netlify-build.sh file and compile contracts on the server.
To run the DApp test suite (React components, etc):
npm test