manual added scripts data

This commit is contained in:
mik-tf 2024-04-16 19:52:15 +00:00
parent f0bcef7880
commit 7dc9ed014f
48 changed files with 120 additions and 0 deletions

4
books/manual/Makefile Normal file
View File

@ -0,0 +1,4 @@
build:
./scripts/generate_wallets.sh
./scripts/calculate_marketcap.sh
./scripts/calculate_cloud_pricing.sh

View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
cd ../../collections/manual/values
value=$(cat tft_value.md)
CU=$(cat CU_MUSD_HOUR.md)
CUTFT=$(echo "$CU / $value" | bc -l)
printf "%.2f" $CUTFT > CU_MTFT_HOUR.md
SU=$(cat SU_MUSD_HOUR.md)
SUTFT=$(echo "$SU / $value" | bc -l)
printf "%.2f" $SUTFT > SU_MTFT_HOUR.md
NU=$(cat NU_MUSD_HOUR.md)
NUTFT=$(echo "$NU / $value" | bc -l)
printf "%.2f" $NUTFT > NU_MTFT_HOUR.md
IP=$(cat IP_MUSD_HOUR.md)
IPTFT=$(echo "$IP / $value" | bc -l)
printf "%.2f" $IPTFT > IP_MTFT_HOUR.md
NAME=$(cat NAME_MUSD_HOUR.md)
NAME=$(echo "$NAME / $value" | bc -l)
printf "%.2f" $NAME > NAME_MTFT_HOUR.md
DNAME=$(cat DNAME_MUSD_HOUR.md)
DNAME=$(echo "$DNAME / $value" | bc -l)
printf "%.2f" $DNAME > DNAME_MTFT_HOUR.md

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
cd ../../collections/manual/values
coinId="threefold-token"
url="https://api.coingecko.com/api/v3/simple/price?ids=${coinId}&vs_currencies=usd";
curl -sL ${url} \
-H 'Accept: application/json' | jq '."threefold-token".usd' | xargs printf "%.3f" > tft_value.md
supply=$(cat tft_supply.md)
value=$(cat tft_value.md)
TFT_MARKETCAP=$(echo "$supply * $value" | bc -l)
printf "%'.0f" $TFT_MARKETCAP > tft_marketcap.md

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
mkdir -p ../../collections/manual/knowledge_base/about/token_overview/special_wallets/wallet_data
cd ../../collections/manual/knowledge_base/about/token_overview/special_wallets/wallet_data
wallets=(
GA7OPN4A3JNHLPHPEWM4PJDOYYDYNZOM7ES6YL3O7NC3PRY3V3UX6ANM
GDSKFYNMZWTB3V5AN26CEAQ27643Q3KB4X6MY4UTO2LIIDFND4SPQZYU
GBQHN7RL4LSRPR2TT74ID2UJPZ2AXCHQY2WKGCTDLJM3NXVJ7GQHUCOD
GBTPAXXP6534UPC4MLNGFGJWCD6DNSRVIPPOZWXAQAWI4FKTLOJY2A2S
GB2C5HCZYWNGVM6JGXDWQBJTMUY4S2HPPTCAH63HFAQVL2ALXDW7SSJ7
GDLVIB44LVONM5K67LUPSFZMSX7G2RLYVBM5MMHUJ4NAQJU7CH4HBJBO
GDKXTUYNW4BJKDM2L7B5XUYFUISV52KUU4G7VPNLF4ZSIKBURM622YPZ
GDIJY6K2BBRIRX423ZFUYKKFDN66XP2KMSBZFQSE2PSNDZ6EDVQTRLSU
GCWHWDRXYPXQAOYMQKB66SZPLM6UANKGMSL4SP7LSOIA6OTTOYQ6HBIH
GBV734I2SV4YDDPVJMYXU3IZ2AIU5GEAJRAD4E4BQG7CA2N63NXSPMD6
GAI4C2BGOA3YHVQZZW7OW4FHOGGYWTUBEVNHB6MW4ZAFG7ZAA7D5IPC3
GCEJ7DMULFTT25UH4FAAGOZ6KER4WXAYQGJUSIITQD527DGTKSXKBQGR
GAQXBLFG4BZGIVY6DBJVWE5EAP3UNHMIA2PYCUVLY2JUSPVWPUF36BW4
GAUGOSYLCX7JZTQYF2K7RIMHFWKSA3WSI2OQ4IRKXMDMVE6ABJIJMFQR
)
for wallet in "${wallets[@]}"; do
curl -sL "https://horizon.stellar.org/accounts/${wallet}" -H 'Accept: application/json' | jq --raw-output '.balances[] | select(.asset_code == "TFT") | .balance' | xargs printf "%.2f" > ${wallet}.md
done

View File

@ -0,0 +1 @@
1131.85

View File

@ -0,0 +1 @@
30.56

View File

@ -0,0 +1 @@
15.28

View File

@ -0,0 +1 @@
102.96

View File

@ -0,0 +1 @@
2.78

View File

@ -0,0 +1 @@
257.04

View File

@ -0,0 +1 @@
6.94

View File

@ -0,0 +1 @@
51.48

View File

@ -0,0 +1 @@
1.39

View File

@ -0,0 +1 @@
1851.85

View File

@ -0,0 +1 @@
50.00

View File

@ -0,0 +1 @@
720.00

View File

@ -0,0 +1 @@
19.44

View File

@ -0,0 +1 @@
21060000

View File

@ -0,0 +1 @@
780000000

View File

@ -0,0 +1 @@
0.027