Coffeeshop DApp
Clone this GitHub repository.
- Global dependencies
- Truffle & Ganache:
$ npm install -g truffle ganache-cli
- Start ganache-cli with the following command:
$ ganache-cli
- Compile the smart contract using Truffle with the following command:
$ truffle compile
- Deploy the smart contract using Truffle & Ganache with the following command:
$ truffle migrate
- Get an Ethereum Account on Metamask.
- On the landing page, click “Get Chrome Extension.”
- Create a .secret file cointaining the menomic.
- Get some test ether from a Rinkeby's faucet.
- Signup Infura.
- Create new project.
- Copy the rinkeby URL into truffle-config.js.
- Uncomment the following lines in truffle-config.js:
// const HDWalletProvider = require("@truffle/hdwallet-provider"); // const infuraKey = '...'; // const infuraURL = 'https://...'; // const fs = require('fs'); // const mnemonic = fs.readFileSync(".secret").toString().trim();
- Install Truffle HD Wallet Provider:
$ npm install @truffle/hdwallet-provider
- Deploy the smart contract using Truffle & Infura with the following command:
$ truffle migrate --network rinkeby
I've deployed the smart contract on Rinkeby's Testnet:
- Contract Address: 0x1624Ed88C02a6bD85752528acbAEDD812B5f9b19