Skip to content

teamzednode/gingerbread

Repository files navigation

gingerbread

Dashboard for Tezos Bakers Demo version at: https://gingerbread.zednode.com

image

image

Deploy to Netlify NOTE: This will deploy with sample Zednode configuration, please fork and update src/static/config.json with your own delegate address and fees.

Getting started

Gingerbread is a Vue based dashbaord application to assist bakers with their baking operations. The bare minimum dependendecies to get this running are:

  1. Tezos Node running with RPC enabled
  2. Static Gingerbread HTML/JS/CSS application hosted

For a more detailed explanation of how gingerbread interacts with the Tezos RPC, please see documentation here: https://github.com/teamzednode/gingerbread/blob/master/rpc_documentation.md

Running a tezos node

  1. Head over here and follow instructions and either use docker or build from sources. We have successfully built on Ubuntu 18.04.
  2. Install SSL certificates, we reccomend Let's Encrypt Certbot: https://certbot.eff.org/
  3. Start node with correct parameters: sudo ./tezos-node run --rpc-addr=0.0.0.0:443 --cors-header='content-type' --cors-origin='*' --rpc-tls="/etc/letsencrypt/live/tezos-mainnet-rpc.zednode.com/fullchain.pem,/etc/letsencrypt/live/tezos-mainnet-rpc.zednode.com/privkey.pem"

Running Gingerbread Application

  1. Fork project and update static/config.json. static/example.config.json provides an example of all the required fields needed.
  2. Execute npm run build. Assets will now be located in /dist directory.
  3. Start web server from /dist directory. See above for easy deploy via Netlify.

Batch payouts to delegators

  1. Navigate to cycle you would like to pay out delegators for.(e.g. /cycle_info/83)
  2. Click Transactions Download button and save transactions to your local file system.
  3. Download tezos-batch-payments bash script from https://github.com/figment-networks/tezos-batch-payments. NOTE: we have tested this MD5 version df8b37f3255d8923143eb680cf154720. You can run md5 tezos-batch-payments.bash to check. PLEASE USE SCRIPT AT YOUR OWN RISK.
  4. Make sure your tezos-client locally is configured properly, here is what our ~/.tezos-client/config looks like:
{ "base_dir": "/Users/zednode/.tezos-client", "node_addr": "tezos-mainnet-rpc.zednode.com",
  "node_port": 443, "tls": true, "web_port": 8080, "confirmations": 0 }
  1. Create a "float" account. This account is only funded and used for payouts. tezos-client gen keys float
  2. Reveal account: tezos-client reveal key for float
  3. Call batch payout script and specify your float address and transactions file. `./tezos-batch-payments.bash --use float --transactions-file ~/transactions/transactions_cycle_50.txt

Build Commands

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test