Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #sendtip.sh
- #!/bin/bash
- shopt -s expand_aliases
- RESTAPI_PORT=3101
- MY_POOL_ID="0c5b04c5c2163ace868018c94e0a0ea105c57188d9aa8aa0ac1ee85e55cb0305"
- MY_USER_ID="8d6f2066-f33c-41bd-a6ef-cb0ef513d9ec" # on pooltool website get this from your account profile page
- THIS_GENESIS="8e4d2a343f3dcf93" # We only actually look at the first 7 characters
- if [ ! $JORMUNGANDR_RESTAPI_URL ]; then export JORMUNGANDR_RESTAPI_URL=http://127.0.0.1:${RESTAPI_PORT}/api; fi
- alias cli="$(which jcli) rest v0"
- lastBlockHeight=$(cli node stats get --output-format json | jq -r .lastBlockHeight)
- echo ${lastBlockHeight}
- if [ "$lastBlockHeight" != "" ]; then
- curl -G "https://tamoq3vkbl.execute-api.us-west-2.amazonaws.com/prod/sharemytip?poolid=${MY_POOL_ID}&userid=${MY_USER_ID}&genesispref=${THIS_GENESIS}&mytip=${lastBlockHeight}"
- fi
- #report.sh
- watch -n 15 "jcli rest v0 node stats get --host "http://127.0.0.1:3101/api" \
- && jcli rest v0 stake-pool get 0c5b04c5c2163ace868018c94e0a0ea105c57188d9aa8aa0ac1ee85e55cb0305 --host "http://127.0.0.1:3101/api" \
- && ./sendtip.sh"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement