Skip to content
Sebastian C. Bürgel edited this page Jul 21, 2019 · 31 revisions

This is a summary of setup-related tasks

Table of contents

Infrastructure

Private Key Generation

  1. Navigate to Vanity ETH to quickly create a testnet Ethereum key pair value.
  2. Scroll to the bottom, click generate
  3. Click to show and access the private key value
  4. Copy both the public address and private key into the .secrets.json file
    "fundAccountEthAddress": "YOUR_ETHEREUM_ADDRESS",
    "fundAccountPrivateKey": "YOUR_PRIVATE_KEY"

Now either grab some ropsten test ether at the faucet or send yourself some from another account.

Note: it is heavily recommended to NOT use this account for mainnet ether as the private key is stored unencrypted in a text file! For development purposes only!

Infura

  1. Navigate to Infura to create a new account or login with your existing account.
  2. If you're not already, navigate to your Dashboard
  3. Create a new project (near the top mid of the webpage) and name it Hopr
  4. Save your Project ID (aka API Key) this used in the .secrets.json file under the infuraApiKey key:string pair
    "infuraApiKey": "INFURA_PRODUCT_ID",
  1. Whitelist the contract address specified in the README page

Requirements

Ubuntu Linux

TLDR: just run the following script to set everything up in on go. For the longer annotated version see the step-by-step instructions below:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.bashrc
nvm install --lts
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update && apt -y upgrade && apt -y install yarn
apt install -y python-minimal
apt install -y build-essential

The annotated version of the above script if you rather understand what you are doing:

  1. Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
  1. Refresh your .bashrc file which now got updated by the nvm installer:
. ~/.bashrc

Alternatively you could log out of your shell and open it again to have nvm set up. 3. Install the latest long-term support (LTS) version NodeJS:

 nvm install --lts
  1. Make sure the latest LTS version got installed (currently v10.16.0)
node --version
  1. Install yarn:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update && apt -y upgrade && apt -y install yarn
  1. Install python2 (dependency for the node-gyp package that a dependency requires)
apt install -y python-minimal
  1. Install build-essential
apt install -y build-essential

Mac

Windows

The following Windows setup goes faster when one utilizes Chocolatey (a Windows Package Manager).

Required software packages:

  • Git
  • Node (using NVM to install and manage node versions)
  • Windows Build Tools
  • Visual Studio Code (recommended or your IDE of choice)
  • solc (Solidity Compiler)

Instructions:

  1. Install: Chocolatey
  2. Install solc
  3. Install VS Code

Open up PowerShell or cmd:

  1. Run: choco install git.install
  2. Run: choco install nvm
  3. Run: nvm install 11.3
  4. Run: nvm use 11.3

Verify node is working via: node --version.

Note: You may have to restart cmd/Powershell or refresh your environment (refreshenv) in between the steps above.

Prepping Node 11.X

  1. Run: npm install --global windows-build-tools
  2. Run: npm install --global yarn

At this point, yarn install should run successfully.

Follow the rest of the steps located in the README to run Hopr

Commit messages

We use emojjis to provide an easy visual representation of our commit types. Prepend every commit message with an emoji of this form: <emoji> commit message. For commits with multiple types, use <emoji><emoji2> commit message.

On OSX press CTRL + CMD + SPACE to show the emoji palette. 

On Windows press WINDOWS + PERIOD or WINDOWS + SEMICOLON

Which emoji to use?

Commit type Emoji
Initial commit 🎉 party popper
New feature ✨ sparkles
Bug fix 🐛 bug
Documentation 📚 books
Tests 🚨 police car's light
Refactoring ♻️ recycling symbol
Tooling 🔧 wrench
Work in progress (WIP) 🚧 construction sign
Cosmetic change 🎨 artist palette
Breaking change 💣 bomb
Deprecation 💩 pile of poop
Version tag 🔖 bookmark
Internationalization 🌐 globe with meridians