Template for Achievement Network to create new exercises
Clone or download
Latest commit 7e2e774 Jan 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts 🐳 Docker container for build Jan 15, 2019
.gitignore [Init] Template of Achievement.network Jun 25, 2018
Dockerfile 🐳 Docker container for build Jan 15, 2019
LICENSE Initial commit Jun 24, 2018
Makefile 🐳 Docker container for build Jan 15, 2019
README.md 📝 Update readme.md Jan 15, 2019
SUMMARY.md 🐳 Docker container for build Jan 15, 2019
book.json 🐳 Docker container for build Jan 15, 2019

README.md

Template

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