Files
nym/documentation/scripts/cmdrun/nyx-percent-stake.sh
import this 2d6ed2ac9e [NEW-DOCs/operators]: Command output, accordion, api scraping & all final tasks (#5026)
* add custom scripts, create prebuild to import data to pages

* update after latest prebuild

* auto commit generated command files

* add accordion component

* add changbelog page

* add node_api_check outputs

* finish all command outputs

* more accordions beautifications

* finish accordion

* PR ready to go

* address review comments

---------

Co-authored-by: mfahampshire <maxhampshire@pm.me>
2024-10-24 13:59:23 +02:00

8 lines
332 B
Bash
Executable File

#!/bin/bash
stake_unyx=$(curl -s -L https://api.nymtech.net/cosmos/staking/v1beta1/pool | jq 'values["pool"]["bonded_tokens"]')
stake_unyx=$(python -c "print(int($stake_unyx))")
stake_nyx=$(python -c "print($stake_unyx / 1000000)")
voting288k_percent=$(python -c "print(288000 / $stake_nyx * 100)")
echo ${voting288k_percent:0:4}%