- Install node v12.10.0:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install 12.10.0
nvm alias default 12.10.0
Restart Terminal - Install Truffle:
npm i -g truffle
- Install IPFS:
npm i -g ipfs
Restart Terminal - Run IPFS Node:
jsipfs daemon
- Get project directory (in new terminal window):
git clone https://github.com/dappuniversity/nft_masterclass_1.git
- Enter project directory and install dependecies:
cd nft_masterclass_1 && npm i
- Enter truffle developer mode:
truffle develop
- Migrate contracts (locally):
migrate --reset
- Mint NFTs (locally):
exec src/backEnd/scripts/mint.js
- Migrate contracts on public network (in this case Kovan):
a) Rename .env_example to .env and fill accordingly)
b) Get Kovan ETH i.e. from https://faucet.kovan.network/ or https://gitter.im/kovan-testnet/faucet
c) Off VPN(if got and ON), then type:migrate --reset --network kovan
- Mint NFTs on public network (in this case Kovan):
exec src/backEnd/scripts/mint.js --network kovan
11. Run dApp:npm start
- Enter dApp in browser:
localhost:3000
- Connect to the dApp:
If running publicly set MetaMask network to Kovan.
If running locally set MetaMask network to (Settings>Networks>Add Network):
- Run IPFS Node (if not running already)
jsipfs daemon
- Create build directory (inside project directory)
npm run build
- Publish on IPFS
jsipfs add -r build
- Copy the latest generated hash and paste into the place of hash below:
https://ipfs.io/ipfs/hash
For the first time may take a while to load dApp - Create Human readable link
Use this site
- Create build directory (inside project directory):
npm run build
- Enter build directory:
cd build
- Install Surge:
npm i -g surge
- Publish on Surge:
surge
...and follow the instructions