From 679e07e0a59017f0795b47cc27cf6000863ace2b Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Fri, 4 Oct 2024 09:19:47 +0200 Subject: [PATCH] assetchains.old: determine which komodod to use system-wide or local --- iguana/assetchains.old | 51 ++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/iguana/assetchains.old b/iguana/assetchains.old index d82e1d9b..efbce5c8 100755 --- a/iguana/assetchains.old +++ b/iguana/assetchains.old @@ -1,17 +1,40 @@ #!/bin/bash -set -x +#set -x delay=60 +if [[ ! -r "pubkey.txt" ]]; then + echo "Error: pubkey.txt does not exist or is not readable." + exit 1 +fi + source pubkey.txt -echo $pubkey -komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=CLC -ac_supply=99000000 -ac_reward=50000000 -ac_perc=100000000 -ac_founders=1 -ac_cc=45 -ac_public=1 -ac_snapshot=1440 -ac_pubkey=02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9 -addnode=node.cryptocollider.com -ac_adaptivepow=6 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=DOC -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 -addnode=209.222.101.247 -addnode=103.195.100.32 -datadir=${HOME}/.komodo/GLEEC_OLD $1 & -komodod -pubkey=$pubkey -ac_name=GLEEC -ac_suply=1000000000 -ac_end=1 -ac_public=1 -ac_staked=50 -addnode=65.21.52.182 -addnode=135.181.80.132 $1 & -komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=MARTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & -komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & + +if [[ -z "$pubkey" ]]; then + echo "Error: 'pubkey' variable is not set in pubkey.txt." + exit 1 +fi +echo "Public Key: $pubkey" + +# Determine which ${PREFIX}komodod to use: system-wide or local +if command -v ${PREFIX}komodod >/dev/null 2>&1; then + PREFIX="" + echo "Using system-wide komodod ..." +elif [[ -x "./komodod" ]]; then + PREFIX="./" + echo "Using local ./komodod ..." +else + echo "Error: Neither system-wide ${PREFIX}komodod nor ./${PREFIX}komodod found." + exit 1 +fi + +${PREFIX}komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=CLC -ac_supply=99000000 -ac_reward=50000000 -ac_perc=100000000 -ac_founders=1 -ac_cc=45 -ac_public=1 -ac_snapshot=1440 -ac_pubkey=02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9 -addnode=node.cryptocollider.com -ac_adaptivepow=6 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=DOC -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 -addnode=209.222.101.247 -addnode=103.195.100.32 -datadir=${HOME}/.komodo/GLEEC_OLD $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=GLEEC -ac_suply=1000000000 -ac_end=1 -ac_public=1 -ac_staked=50 -addnode=65.21.52.182 -addnode=135.181.80.132 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=MARTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +${PREFIX}komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 &