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
- Git command line interface
- Node.js command line interface
- Metamask Extension for your browser (including wallet)
- Ganache-CLI to spin up a blockchain with instant mining
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.
onetime setup
git clone https://github.com/simibac/timestamp-dapp.git
# or
git clone git@github.com:simibac/timestamp-dapp.git
cd timestamp-dapp/client/
npm install
Detailed information can be found here: README.
npm install -g truffle
# or
sudo npm install -g truffle
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
- Start a local blockchain with
ganache-cli
in a terminal - which will most likely be running on:http://127.0.0.1:8545
). - Open
Metamask
in your browser and login with your wallet. - Click on the network dropdown and select Custom RPC.
- Scroll down and enter the copied
RPC Server
ofganache-cli
into the New RPC URL field. - Hit Save.
- Switch to your
ganache-cli
an copy one of the private keys. - Back in
Metamask
, click on the colored circle on the top right and select Import Account. - Paste the private key from
ganache-cli
and hit Import. You should now be logged in with an Account from theganache-cli
network with a balance of 100 ETH.
everytime to run the environment
- Pull the latest commits:
# Terminal Tab #1 cd /path/to/timestamp-dapp git pull
- Start local blockchain with
ganache-cli
. - Compile the
Smart Contracts
:# Terminal Tab #1 truffle compile
- Deploy the
Smart Contracts
on theGanache
network:# Terminal Tab #1 truffle migrate --reset
- Start the
Truffle
console:# Terminal Tab #1 truffle console
- Start the
React
client:# Terminal Tab #2 cd /path/to/timestamp-dapp/client npm install npm start
localhost:3000
should be opened automatically in your browser