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
-
Follow the instruction of Ganache to run a local blockchain
-
Run
Ganache
, select and account and copy paste its private key into a file (e.g.private.key
) as follow:
PRIVATE_KEY=...
- Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make debug
- Website is located under
http://localhost:4000
On Ropsten
- Save the private key associated to your ropsten account in a file named
private.key
as follow:
PRIVATE_KEY=...
- Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make build
- 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
- Set your private key to
0x0
(optional)
PRIVATE_KEY=0x0000000000000000000000000000000000000000
- Run
source private.key
PRIVATE_KEY=${PRIVATE_KEY} make install
PRIVATE_KEY=${PRIVATE_KEY} make write
- Website is located under
http://localhost:4000