Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 1.76 KB

README.md

File metadata and controls

77 lines (57 loc) · 1.76 KB

Template

Contribution

Please add a spearate file in the contracts folder. Do not edit files in this folder. An example is presented here in the EXAMPLE.md file.

Requirements

  • NodeJS
  • Windows, Linux or MacOS

Installation

To run this website, you first need to install gitbook

npm install gitbook-cli -g
git clone https://github.com/liquidity-network/plugin-exercises ../plugin-exercises
cd ../plugin-exercises
npm install
npm link
cd -
npm link gitbook-plugin-exercises
gitbook install

Docker

Local blockchain

  1. Follow the instruction of Ganache to run a local blockchain

  2. Run Ganache, select and account and copy paste its private key into a file (e.g. private.key) as follow:

PRIVATE_KEY=...
  1. Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make debug
  1. Website is located under http://localhost:4000

On Ropsten

  1. Save the private key associated to your ropsten account in a file named private.key as follow:
PRIVATE_KEY=...
  1. Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make build
  1. Website has been saved in _book. You can host it anywhere you want (Github pages for instance).

Write Mode

If you only need to verify your syntax and not test it on a real blockchain

  1. Set your private key to 0x0 (optional)
PRIVATE_KEY=0x0000000000000000000000000000000000000000
  1. Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make write
  1. Website is located under http://localhost:4000