/timestamp-dapp

Dapp for recording digital goods on the Ethereum blockchain

Primary LanguageJavaScriptMIT LicenseMIT

IPStamp

Application for timestamping digital files. This prototype was developed as part of the Seminar "Blockchain Technology – An Introduction for Business Managers" at the University of Zurich.

This project was bootstrapped with Truffle.

npm install -g truffle
truffle unbox react

Prerequisites

We don't use Ganache at the moment, as it fails somehow. Everything works though with Ganache-CLI. If at some point we switch back, the README should be updated.

Setup

onetime setup

Clone the Project

git clone https://github.com/simibac/timestamp-dapp.git

# or

git clone git@github.com:simibac/timestamp-dapp.git

Set up Client

cd timestamp-dapp/client/
npm install

Detailed information can be found here: README.

Install Truffle

npm install -g truffle

# or

sudo npm install -g truffle

Install Ganache-CLI

Install with @beta to get the latest updates which fixes a bug that caused wrong gas estimations (more details).

npm install -g ganache-cli@beta

# or

sudo npm install -g ganache-cli@beta

Setup Metamask

  1. Start a local blockchain with ganache-cli in a terminal - which will most likely be running on: http://127.0.0.1:8545).
  2. Open Metamask in your browser and login with your wallet.
  3. Click on the network dropdown and select Custom RPC.
  4. Scroll down and enter the copied RPC Server of ganache-cli into the New RPC URL field.
  5. Hit Save.
  6. Switch to your ganache-cli an copy one of the private keys.
  7. Back in Metamask, click on the colored circle on the top right and select Import Account.
  8. Paste the private key from ganache-cli and hit Import. You should now be logged in with an Account from the ganache-cli network with a balance of 100 ETH.

Run Environment

everytime to run the environment

  1. Pull the latest commits:
    # Terminal Tab #1
    cd /path/to/timestamp-dapp
    git pull
  2. Start local blockchain with ganache-cli.
  3. Compile the Smart Contracts:
    # Terminal Tab #1
    truffle compile
  4. Deploy the Smart Contracts on the Ganache network:
    # Terminal Tab #1
    truffle migrate --reset
  5. Start the Truffle console:
    # Terminal Tab #1
    truffle console
  6. Start the React client:
    # Terminal Tab #2
    cd /path/to/timestamp-dapp/client
    npm install
    npm start
  7. localhost:3000 should be opened automatically in your browser

⚠️ Make sure your Metamask is connected to the correct network! ⚠️