Codebase of the very first "club" to be managed on the blockchain.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
e2e
src
.editorconfig
.gitignore
README.md
Vagrantfile
angular.json
bootstrap.sh
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

blockLAB

Smart contracts & UI of blockLAB - The first club to be managed on the blockchain.

Prerequisites

Installation (local)

Vagrant setup

  1. Clone repository:
$ git clone https://github.com/blocklab/ethverein.git
  1. Set up VM with vagrant. This will run bootstrap.sh and install the required build environment (e.g., node, npm, truffle, angular-cli):
$ cd ethverein
$ vagrant up
  1. Connect to VM:
$ vagrant ssh

At the end of your session, logout or exit terminates the ssh session, and vagrand suspend suspends the VM to free up memory as well as forwarded ports. Ultimately, vagrant destroy destroys the whole thing ...

Build and run ethverein

  1. Compile, test, and run smart contracts using truffle:
$ cd ethverein
$ npm install --no-bin-links 
$ cd src
$ truffle develop
$ test
$ migrate --reset
  1. Open a new terminal, ssh into vagrant, and run angular:
$ cd ethverein
$ npm rebuild node-sass
$ ng serve --host 0.0.0.0
  1. Use your browser and connect to http://localhost:4200.

Installation (Ropsten)

There are two ways to deploy the contracts to Ropsten testnet:

  • Using geth/truffle.
  • Using http://remix.ethereum.org/. Initially, we deployed the contracts through Remix. Since leaving our build environment and copying/pasting contract code is quite painfull, we will add support for geth and truffle as well.

As soon as the contract is deployed on the test net, insert the contract URL into environment.test.ts and run angular as follows:

$ ng serve --configuration=test --host 0.0.0.0

Further angular commands

Development server

Run ng s -o to start and open dev-server

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.