Skip to content

Commit

Permalink
chore: 🤖 FLK precision calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Oct 18, 2023
1 parent 6bcc775 commit b6a11cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/node_details
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ defaultLightningKeystoreConsensusPemFilename="consensus.pem"
defaultLightningKeystoreNodePemPath="$defaultLightningKeystorePath/$defaultLightningKeystoreNodePemFilename"
defaultLightningKeystoreConsensusPemPath="$defaultLightningKeystorePath/$defaultLightningKeystoreConsensusPemFilename"
defaultRPCUrl="https://rpc.testnet.fleek.network/rpc/v0"
defaultUnitPrecision="10^18"

# Utils
hasCommand() {
command -v "$1" >/dev/null 2>&1
}

flkMinorUnitToFlk() {
echo "$1 / $defaultUnitPrecision" | bc
}

# The white space before and after is intentional
cat << "ART"
Expand Down Expand Up @@ -103,7 +108,9 @@ echo "The Consensus Public Key is $consensusPubKey"
echo "The Node Server IP address is $ipAddr"

if [[ ! "$hasStake" -eq "" ]]; then
echo "The Node staked amount is $hasStake"
flkAmount=$(flkMinorUnitToFlk "$hasStake")

echo "The Node staked amount is $flkAmount FLK"
fi

echo
Expand Down

0 comments on commit b6a11cd

Please sign in to comment.