-
Notifications
You must be signed in to change notification settings - Fork 5
Setup
🚧 Setup required per your environment 👷♂️
These instructions were tested for Ubuntu 18.04 but might work for other versions in a similar fashion.
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
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
Install the build-essential which contains various dependencies required to build HOPR:
apt install build-essential -y
Install Python
apt install python -y
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
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.
- Install the VS Code development environment by downloading it and executing the installer with all default settings
- Install Chocolatey to install other packages:
- Open the
Windows power shell
from start menu as administrator (right click it and selectRun as administrator
) - Run
Get-ExecutionPolicy
, if it returnsRestricted
, then runSet-ExecutionPolicy AllSigned
and hita
to confirm. - 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).
- Open the
- Go back ot Install git command line tools:
choco install git.install -y
- Install the node version manager:
choco install nvm -y
- Close powershell and open it again as administrator
- Now install a recent node version:
nvm install 11.15
- Finally use that node version:
nvm use 11.15
- Install yarn:
npm install --global yarn
- Install a bunch of build tools (this might take a around minutes):
npm install --global windows-build-tools
Notes:
- You may have to restart cmd/Powershell or refresh your environment (
refreshenv
) in between the steps above. - If any of the steps stalls for over 5 minuted, terminate the process via
Ctrl
+c
and start it again. - 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).
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.
- Navigate to Vanity ETH to quickly create a
testnet
Ethereum key pair value. - Scroll to the bottom, click
generate
- Click to show and access the
private key
value - Copy both the public address and private key into the
.env
file - make sure to prefix both address and private key with0x
(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!
- Navigate to Infura to create a new account or login with your existing account.
- If you're not already, navigate to your
Dashboard
- Create a new project (near the top mid of the webpage) and name it
Hopr
- Save your
Project ID
(aka API Key)