naszam / coffeeshop

Coffeeshop Smart Contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#built_with_Truffle

Coffeeshop

Coffeeshop DApp

Project Setup

Clone this GitHub repository.

Steps to compile and deploy Coffeeshop.sol

  • Global dependencies
    • Truffle & Ganache:
    $ npm install -g truffle ganache-cli

Running the project with local test network (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

Deploying on Rinkeby's Testnet

  • 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

About

Coffeeshop Smart Contract

License:MIT License


Languages

Language:JavaScript 59.6%Language:Solidity 40.4%