This app was firstly developed to show the basic usage of ark-go library. The app functionalities are currently targeted at delegate functionalities - to setup automated script payments for delegate voters.
See the demo console app shell recording here: https://asciinema.org/a/5yndxl794ncfpmjoqftuaiodm?t=8.
It's very straightforward four(4) step process as described bellow:
ARKGO-Pool is compiled into a small executable file that can be run on linux or windows.
No additional frameworks and installations needed. All you need to do is unzip the binary and run the application.
You can also run it from your secure USB stick.
Config.toml is a simple.ini setup file, where you specify the share percentages for your:
- voters,
- reserve fund,
- costs and
- personal fund.
It is very simple and intuitive. Just edit settings/sample.config.toml to your preferences and rename it to config.toml.
- $> chmod +x arkgopool //make file executable on Linux
- $> ./arkgopool //Linux
- c:\ark-go-payment>arkgopool.exe //Windows
See the demo video of console app shell recording here: https://asciinema.org/a/5yndxl794ncfpmjoqftuaiodm?t=8.
To run the script in silent mode run: $>arkgopool -silent=true
You can add it to you cronjob if you want to have automated payments.
AND THAT'S ALL :)
- Setting sharing properties in a simple config file: settings/sample.config.toml. Copy file to config.toml for productive config. (cp sample.config.toml config.toml)
- Setting up delegate preferences in settings/config.toml. User can set his delegate address, sharing rations for voters and reward fund.
- Checking vote weight by voters, displaying fidelity in hoours and see the precalculated rewards before Sending.
- Manually sending the reward to users.
- Network switching (application can run on MAINNET as well as on DEVNET).
- Linking account for automated payments.
- Running in silent mode - to process automated reward payments to voters.
- Logging and overview of succesfull payments in a separate timestamped csv file, linked with sent and confirmed transactionsID from the blockchain (fields: Recepient, Amount, TimeStamp, TxID, VoteWieght).
- Database logging and REST server is included in the package
- Blocking of vote hopers
Application was developed to help testing of the core library and to provide a tool for delegates to process automated payments/ or just manual payments.
$> cd $GOPATH/src/github.com/kristjank/ark-go/cmd/arkgopool
$> go run arkgopool.go
$> cd $GOPATH/src/github.com/kristjank/ark-go/cmd/arkgopool
$> go build
$> cd $GOPATH/src/github.com/kristjank/ark-go/cmd/arkgopool
$> ./arkgopool.exe
$> cd $GOPATH/src/github.com/kristjank/ark-go/cmd/arkgopool
$> ./arkgopool
$> cd arkgopool/settings
$> cp sample.config.toml config.toml
$> nano config.toml
You will have to slightly adapt it to use the latest version. (Golang Download: https://golang.org/dl/)
$> curl -O https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
$> tar xvf go1.8.3.linux-amd64.tar.gz
$> sudo chown -R root:root ./go
$> sudo mv go /usr/local
$> sudo nano ~/.profile
Add at the end of the files:
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Save the files.
$> source ~/.profile
$> mkdir work
$> go get github.com/kristjank/ark-go
$> cd ~/work/src/github.com/kristjank/ark-go
$> go get ./...
$> cd ~/work/src/github.com/kristjank/ark-go/cmd/arkgopool
$> go build
$> cd
$> ln -s ~/work/src/github.com/kristjank/ark-go/cmd/arkgopool arkgopool
Now you can run with:
$> cd arkgopool
$> ./arkgopool
Create and edit config.toml to define your own settings.
$> cd arkgopool/settings
$> cp sample.config.toml config.toml
$> nano config.toml
First, make sure that you did link your account. (Option 4)
$> cd arkgopool
Create such a file go-payment.sh in home:
#!/bin/bash
cd ~/YOUR_ARK_GO_FOLDER_PATH_TO_WHERE_ARK_GO_POOL_IS
./arkgopool -silent=true
Make it executable:
$> chmod +x go-payment.sh
Open crontab:
$> crontab -e
Add a line at the end and an empty line behind:
30 17 * * * ~/go-payment.sh
Save and now your payments will done automatic every day. Enjoy!
Thank you for checking in.
For more information about ark-go see the core package. That is where it all happens: /core
Chris (kristjan.kosic@gmail.com), with a lot of help from FX Thoorens fx@ark.io and ARK Community
Jarunik (jens@hviid.ch), with a lot of help from Chris
Ark address:
AUgTuukcKeE4XFdzaK6rEHMD5FLmVBSmHk
@Jarunik
Copyright (c) 2017 ARK, chris
--chris