Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.
SCBuergel edited this page Jan 21, 2020 · 41 revisions

🚧 Setup required per your environment 👷‍♂️

Table of contents

Ubuntu

These instructions were tested for Ubuntu 18.04 but might work for other versions in a similar fashion.

yarn

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 install yarn -y

You can ensure that yarn is available

# yarn -v
1.21.1

nvm

Install nvm Make sure to get the latest version from the link above as this might not be the latest version:

# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

Now close the console and open it again and check if nvm is working

# nvm --version
0.35.2

build-essential

Install the build-essential which contains various dependencies required to build HOPR:

apt install build-essential -y

Python

Install Python

apt install python -y

macOS

Required software packages:

  • XCode Command-Line Tools
  • Git
  • solc (Solidity Compiler)

Open a terminal and run xcode-select --install and/or follow these instructions to install the XCode Command-line tools.

$ xcode-select --install

Install the package manager Brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Git and solc (the Solidity compiler) and optionally NVM, the Node.js Version Manager

$ brew install git 
$ brew install solidity
# optional:
$ brew install nvm

Windows

Before running HOPR on Windows, several dependencies need to be installed, some of which might already be available on your computer. The installation needs to be done with administrator privileges in the Windows power shell, while running HOPR can be done without administrator rights.

  1. Install the VS Code development environment by downloading it and executing the installer with all default settings
  2. Install Chocolatey to install other packages:
    1. Open the Windows power shell from start menu as administrator (right click it and select Run as administrator)
    2. Run Get-ExecutionPolicy, if it returns Restricted, then run Set-ExecutionPolicy AllSigned and hit a to confirm.
    3. Install chocolatey: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) (copy-paste this from the website linked above).
  3. Go back ot Install git command line tools: choco install git.install -y
  4. Install the node version manager: choco install nvm -y
  5. Close powershell and open it again as administrator
  6. Now install a recent node version: nvm install 11.15
  7. Finally use that node version: nvm use 11.15
  8. Install yarn: npm install --global yarn
  9. Install a bunch of build tools (this might take a around minutes): npm install --global windows-build-tools

Notes:

  1. You may have to restart cmd/Powershell or refresh your environment (refreshenv) in between the steps above.
  2. If any of the steps stalls for over 5 minuted, terminate the process via Ctrl + c and start it again.
  3. On first startup of node startTestnet (see README) the Windows firewall presents a warning that you can simply confirm to grant access to the network.

At this point, yarn install should run successfully.

Follow the rest of the steps located in the README to run Hopr, you can do so in normal Windows power shell (without administrator rights).

Private Key Generation

This step is only required for the public testnet (seriously, try the local testnet first!), the local testnet works with default accounts which are already set up in the default .env file and with the accounts that Ganache automatically credited for you.

  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 .env file - make sure to prefix both address and private key with 0x (the vanity generator does not do this)ˆ
    "fundAccountEthAddress": "YOUR_ETHEREUM_ADDRESS",
    "fundAccountPrivateKey": "YOUR_PRIVATE_KEY"

Now either visit the Kovan faucet or the Ropsten facuet to get some free testnet Ether or send yourself some from another account. If you do not have the address associated with the private key in your .env file, you can use tools such as MyEtherWallet to get the address from a private key.

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)
Clone this wiki locally