Skip to content

Commit 8b3f81b

Browse files
committed
Update 2025-06 - Governance Updates
- Added BulkVoting to script 24a by using the keyword 'all' for the action-id - Script 24a now also shows the GovernanceAction Title while voting if available - Script 24a now puts the GovernanceAction Title also into the *.vote file as description - Script 24a now also checks the content of the provided Anchor-URL/HASH to be CIP100 conform - Script 24b now shows the Title of the Action for the choosen vote file - Script 24c can now handle the state 'NO CONFIDENCE' correctly
1 parent 3d8e005 commit 8b3f81b

File tree

7 files changed

+147
-29
lines changed

7 files changed

+147
-29
lines changed

cardano/mainnet/24a_genVote.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ do
557557
totalAccept=""; totalAcceptIcon="";
558558
dRepAcceptIcon=""; poolAcceptIcon=""; committeeAcceptIcon="";
559559
dRepPowerThreshold="N/A"; poolPowerThreshold="N/A"; #N/A -> not available
560+
govActionTitle="";
560561

561562
echo
562563
echo -e "\e[36m--- Entry $((${tmpCnt}+1)) of ${actionStateEntryCnt} --- Action-ID ${actionUTXO}#${actionIdx}\e[0m"
@@ -626,6 +627,7 @@ do
626627
else
627628
errorMsg=$(jq -r .errorMsg <<< ${signerJSON} 2> /dev/null)
628629
echo -e "\e[0m Anchor-Data: ${iconYes}\e[32m JSONLD structure is ok\e[0m";
630+
govActionTitle=$(jq -r ".body.title // \"\"" ${tmpAnchorContent} 2> /dev/null)
629631
if [[ "${errorMsg}" != "" ]]; then echo -e "\e[0m Notice: ${iconNo} ${errorMsg}\e[0m"; fi
630632
authors=$(jq -r --arg iconYes "${iconYes}" --arg iconNo "${iconNo}" '.authors[] | "\\e[0m Signature: \(if .valid then $iconYes else $iconNo end) \(.name)\\e[0m"' <<< ${signerJSON} 2> /dev/null)
631633
if [[ "${authors}" != "" ]]; then echo -e "${authors}\e[0m"; fi
@@ -677,6 +679,10 @@ do
677679
;;
678680
esac
679681

682+
#Show governance action title if available
683+
if [[ "${govActionTitle}" != "" ]]; then
684+
echo -e "\e[0mAction-Title: \e[36m${govActionTitle}\e[0m\n"
685+
fi
680686

681687
#DO A NICE OUTPUT OF THE DIFFERENT CONTENTS & DO THE RIGHT CALCULATIONS FOR THE ACCEPTANCE
682688
case "${actionTag}" in
@@ -1121,6 +1127,10 @@ if [[ "${voteParam}" != "" ]]; then
11211127
#Generate the vote file depending on the choice made above
11221128
voteJSON=$(${cardanocli} ${cliEra} governance vote create ${voteParam} --governance-action-tx-id "${actionUTXO}" --governance-action-index "${actionIdx}" ${vkeyParam} "${voterVkeyFile}" ${anchorPARAM} --out-file /dev/stdout 2> /dev/stdout)
11231129
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\e[35mERROR - ${voteJSON}\e[0m\n"; exit 1; fi
1130+
1131+
#Inject the GovActionTitle into the voting file
1132+
voteJSON=$(jq -r ". += { \"description\": \"${govActionTitle//[^[:alnum:][:space:]-_\/\!§$%&()?<>@|.,:;=*\']}\" }" <<< ${voteJSON} 2> /dev/null)
1133+
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\e[35mERROR - ${voteJSON}\e[0m\n"; exit 1; fi
11241134
echo "${voteJSON}" > "${votingFile}"; checkError "$?"; if [ $? -ne 0 ]; then exit $?; fi
11251135

11261136
echo -e "\e[0mCreated the Vote-Certificate file: \e[32m${votingFile}\e[90m"

cardano/mainnet/24b_regVote.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,18 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
189189
if [[ $? -ne 0 ]]; then echo -e "\n\e[35mERROR - Could not read in Vote-File '${metafile}' !\n\e[0m"; exit 1; fi
190190
echo -e "\e[0mReading Vote-File: \e[32m${metafile}\e[0m"
191191

192-
#Read the values of the voting file
192+
#Read the values of the voting file generated by 'governance vote view'
193193
{ read voteActionVoter;
194194
read voteActionID;
195195
read voteActionAnchorHASH;
196196
read voteActionAnchorURL;
197197
read voteActionAnswer;
198198
} <<< $(jq -r "to_entries | (.[0].key // \"-\", (.[0].value | to_entries | (.[0].key // \"-\", .[0].value.anchor.dataHash // \"-\", .[0].value.anchor.url // \"-\", .[0].value.decision // \"-\" )))" <<< "${voteJSON}")
199199

200+
#Get action-title
201+
voteActionTitle=$(jq -r ".description // \"\"" "${metafile}" 2> /dev/null);
202+
if [[ "${voteActionTitle}" != "" ]]; then echo -e "\e[0m Description: \e[36m${voteActionTitle}"; fi
203+
200204
#Get voteType
201205
case ${voteActionVoter%%-*} in
202206
"committee") voteType="Committee";;

cardano/mainnet/24c_queryVote.sh

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ case ${workMode} in
338338
#Get currentEpoch for Active-dRep-Power-Filtering
339339
currentEpoch=$(get_currentEpoch)
340340

341+
#Get the current protocolParameters for the dRep and pool voting thresholds
342+
protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters)
343+
341344
#### Voting Power Stuff
342345
#Get DRep Stake Distribution for quorum calculation later on
343346
#Only calculate the
@@ -382,6 +385,11 @@ case ${workMode} in
382385
committeePowerThreshold=$(bc <<< "scale=2; 100.00 * ${committeePowerThreshold}") #scale it to 0.00-100.00%
383386
;;
384387

388+
389+
"null") #a null threshold symbolizes the state committeeNoConfidence
390+
committeePowerThreshold=-1
391+
;;
392+
385393
*) #if any other type, throw an error
386394
echo -e "\e[35mERROR - Could not handle committeeThresholdType = ${committeeThresholdType}\e[0m\n"; exit 1
387395
;;
@@ -390,8 +398,6 @@ case ${workMode} in
390398
#Generate the JSON of all committeeHotHashes and there names, depending on the committeeColdHashes
391399
ccMemberHotHashNamesJSON=$(jq -r "[ .[] | { \"\(.value.hotCredsAuthStatus.contents | keys[0])-\(.value.hotCredsAuthStatus.contents | flatten[0])\": (${ccMemberColdHashNames}[.key]) } ] | reduce .[] as \$o ({}; . * \$o)" <<< ${committeeStateJSON} 2> /dev/null)
392400

393-
#Get the current protocolParameters for the dRep and pool voting thresholds
394-
protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters)
395401
;;
396402

397403

@@ -439,6 +445,10 @@ case ${workMode} in
439445
committeePowerThreshold=$(bc <<< "scale=2; 100 * ${committeeThreshold}")
440446
;;
441447

448+
"null") #a null threshold symbolizes the state committeeNoConfidence
449+
committeePowerThreshold=-1
450+
;;
451+
442452
*) #if any other type, throw an error
443453
echo -e "\e[35mERROR - Could not handle committeeThresholdType = ${committeeThresholdType}\e[0m\n"; exit 1
444454
;;
@@ -645,6 +655,7 @@ do
645655
totalAccept=""; totalAcceptIcon="";
646656
dRepAcceptIcon=""; poolAcceptIcon=""; committeeAcceptIcon="";
647657
dRepPowerThreshold="N/A"; poolPowerThreshold="N/A"; #N/A -> not available
658+
govActionTitle="";
648659

649660
echo
650661
echo -e "\e[36m--- Entry $((${tmpCnt}+1)) of ${actionStateEntryCnt} --- Action-ID ${actionUTXO}#${actionIdx}\e[0m"
@@ -715,6 +726,7 @@ do
715726
else
716727
errorMsg=$(jq -r .errorMsg <<< ${signerJSON} 2> /dev/null)
717728
echo -e "\e[0m Anchor-Data: ${iconYes}\e[32m JSONLD structure is ok\e[0m";
729+
govActionTitle=$(jq -r ".body.title // \"\"" ${tmpAnchorContent} 2> /dev/null)
718730
if [[ "${errorMsg}" != "" ]]; then echo -e "\e[0m Notice: ${iconNo} ${errorMsg}\e[0m"; fi
719731
authors=$(jq -r --arg iconYes "${iconYes}" --arg iconNo "${iconNo}" '.authors[] | "\\e[0m Signature: \(if .valid then $iconYes else $iconNo end) \(.name)\\e[0m"' <<< ${signerJSON} 2> /dev/null)
720732
if [[ "${authors}" != "" ]]; then echo -e "${authors}\e[0m"; fi
@@ -766,6 +778,11 @@ do
766778
;;
767779
esac
768780

781+
#Show governance action title if available
782+
if [[ "${govActionTitle}" != "" ]]; then
783+
echo -e "\e[0mAction-Title: \e[36m${govActionTitle}\e[0m\n"
784+
fi
785+
769786
#DO A NICE OUTPUT OF THE DIFFERENT CONTENTS & DO THE RIGHT CALCULATIONS FOR THE ACCEPTANCE
770787
case "${actionTag}" in
771788

@@ -778,7 +795,12 @@ do
778795

779796
dRepAcceptIcon="N/A"; poolAcceptIcon="N/A";
780797
totalAccept="N/A";
781-
if [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅"; else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
798+
799+
#If we are in committeeNoConfidence mode(thresholdpower=-1), remove the committeeAcceptIcon
800+
if [[ ${committeePowerThreshold} == "-1" ]]; then committeeAcceptIcon="";
801+
elif [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅";
802+
else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO";
803+
fi
782804
;;
783805

784806

@@ -805,7 +827,12 @@ do
805827
fi
806828
poolPowerThreshold=$(bc <<< "scale=2; 100.00 * ${poolPowerThreshold}")
807829
if [[ $(bc <<< "${poolPct} >= ${poolPowerThreshold}") -eq 1 ]]; then poolAcceptIcon="\e[92m✅"; else poolAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
808-
if [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅"; else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
830+
831+
#If we are in committeeNoConfidence mode(thresholdpower=-1), remove the committeeAcceptIcon
832+
if [[ ${committeePowerThreshold} == "-1" ]]; then committeeAcceptIcon=""; totalAccept+="NO";
833+
elif [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅";
834+
else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO";
835+
fi
809836
;;
810837

811838

@@ -882,9 +909,12 @@ do
882909
if [[ ${protocolVersionMajor} -ge 10 ]]; then #only do dRep check if we are at least in conway chang-2 phase
883910
if [[ $(bc <<< "${dRepPct} >= ${dRepPowerThreshold}") -eq 1 ]]; then dRepAcceptIcon="\e[92m✅"; else dRepAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
884911
fi
885-
#committee can vote on all parameters
886-
if [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅"; else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
887912

913+
#If we are in committeeNoConfidence mode(thresholdpower=-1), remove the committeeAcceptIcon
914+
if [[ ${committeePowerThreshold} == "-1" ]]; then committeeAcceptIcon=""; totalAccept+="NO";
915+
elif [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅";
916+
else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO";
917+
fi
888918
;;
889919

890920

@@ -908,13 +938,16 @@ do
908938
echo -e "\e[0mSet new\e[32m Constitution-Hash \e[0m► \e[94m${anchorHash}\e[0m"
909939
echo -e "\e[0mSet new\e[32m Guardrails-Script-Hash \e[0m► \e[94m${scriptHash}\e[0m"
910940
echo -e "\e[0m"
911-
912941
#Calculate acceptance: Get the right threshold, make it a nice percentage number, check if threshold is reached
913942
{ read dRepPowerThreshold; } <<< $(jq -r '.dRepVotingThresholds.updateToConstitution // 0' <<< "${protocolParametersJSON}" 2> /dev/null)
914943
dRepPowerThreshold=$(bc <<< "scale=2; 100.00 * ${dRepPowerThreshold}")
915944
if [[ $(bc <<< "${dRepPct} >= ${dRepPowerThreshold}") -eq 1 ]]; then dRepAcceptIcon="\e[92m✅"; else dRepAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
916945
poolAcceptIcon=""; #pools not allowed to vote on this
917-
if [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅"; else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
946+
#If we are in committeeNoConfidence mode(thresholdpower=-1), remove the committeeAcceptIcon
947+
if [[ ${committeePowerThreshold} == "-1" ]]; then committeeAcceptIcon=""; totalAccept+="NO";
948+
elif [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅";
949+
else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO";
950+
fi
918951
;;
919952

920953

@@ -960,7 +993,13 @@ do
960993
echo -e "\e[0m"
961994

962995
#Calculate acceptance: Get the right threshold, make it a nice percentage number, check if threshold is reached
963-
{ read dRepPowerThreshold; read poolPowerThreshold; } <<< $(jq -r '.dRepVotingThresholds.committeeNormal // 0, .poolVotingThresholds.committeeNormal // 0' <<< "${protocolParametersJSON}" 2> /dev/null)
996+
997+
#If we are in committeeNoConfidence mode(thresholdpower=-1), use the committeeNoConfidence parameter set
998+
if [[ ${committeePowerThreshold} != "-1" ]]; then
999+
{ read dRepPowerThreshold; read poolPowerThreshold; } <<< $(jq -r '.dRepVotingThresholds.committeeNormal // 0, .poolVotingThresholds.committeeNormal // 0' <<< "${protocolParametersJSON}" 2> /dev/null)
1000+
else
1001+
{ read dRepPowerThreshold; read poolPowerThreshold; } <<< $(jq -r '.dRepVotingThresholds.committeeNoConfidence // 0, .poolVotingThresholds.committeeNoConfidence // 0' <<< "${protocolParametersJSON}" 2> /dev/null)
1002+
fi
9641003
dRepPowerThreshold=$(bc <<< "scale=2; 100.00 * ${dRepPowerThreshold}")
9651004
if [[ $(bc <<< "${dRepPct} >= ${dRepPowerThreshold}") -eq 1 ]]; then dRepAcceptIcon="\e[92m✅"; else dRepAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
9661005
poolPowerThreshold=$(bc <<< "scale=2; 100.00 * ${poolPowerThreshold}")
@@ -1031,11 +1070,14 @@ do
10311070
dRepPowerThreshold=$(bc <<< "scale=2; 100.00 * ${dRepPowerThreshold}")
10321071
if [[ $(bc <<< "${dRepPct} >= ${dRepPowerThreshold}") -eq 1 ]]; then dRepAcceptIcon="\e[92m✅"; else dRepAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
10331072
poolAcceptIcon=""; #pools not allowed to vote on this
1034-
if [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅"; else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO"; fi
1073+
#If we are in committeeNoConfidence mode(thresholdpower=-1), remove the committeeAcceptIcon
1074+
if [[ ${committeePowerThreshold} == "-1" ]]; then committeeAcceptIcon=""; totalAccept+="NO";
1075+
elif [[ $(bc <<< "${committeePct} >= ${committeePowerThreshold}") -eq 1 ]]; then committeeAcceptIcon="\e[92m✅";
1076+
else committeeAcceptIcon="\e[91m❌"; totalAccept+="NO";
1077+
fi
10351078
;;
10361079

10371080

1038-
10391081
esac
10401082

10411083
#If there is a voterHash, get the voting answer for it
@@ -1089,8 +1131,11 @@ do
10891131
*) totalAcceptIcon="\e[92m✅";;
10901132
esac
10911133
printf "\e[97m%88s\e[90m │ %b \e[0m\n" "Full approval of the proposal" "${totalAcceptIcon}"
1092-
echo
10931134

1135+
#show an alert if we are in the no confidence mode
1136+
if [[ ${committeePowerThreshold} == "-1" ]]; then echo -e "\e[35mWe are currently in the 'No Confidence' state !\e[0m\n"; fi
1137+
1138+
echo
10941139

10951140

10961141
done

cardano/mainnet/sha256sum_sposcripts.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ b3dc04d57dab6532375c2c7fe7857e775e877e6e9cb6dac1bf30a08e58b3f2ef 23b_genComHotK
4343
b5840cb93c592ea51b4f253cdd7d0643c610d03cdb2decd94a3ce0e8d152d5d1 23c_regComAuthCert.sh
4444
d7d4753a6066fd792d9b46238c4cfe365e0ba342b3bdf891048f8795df8962cd 23d_checkComOnChain.sh
4545
18cb3611f363ac081280e52cefffe47eaa7b9038f281acee9517fe62287633b1 23e_retComColdKeys.sh
46-
d8dbfa59d027372e868352819454c918348abf0ee824d5ac314b9c3f0be94ab1 24a_genVote.sh
47-
8421ddbb5a773669d8c03ea198d164766114ec79600c65939204f5fca42bf317 24b_regVote.sh
48-
ff1a92be0ee7a80a066fc3574b518abc650b6c20168d54887cfbb071f3dd0b5b 24c_queryVote.sh
46+
74d9fa1477845cba5822f318eab181bec00efbd3349dda10a521f7a858a50cbe 24a_genVote.sh
47+
9fe07dea03bb99096371c66186df1a5bf29861a4c4c5bd0a043c9e76564f9e5e 24b_regVote.sh
48+
4de8dde67145d6ec01bbff495985ad3959159abdf6206f09b3777a1d581a0672 24c_queryVote.sh
4949
0004e496a15589cd01d936c70aef59b17aa378c8f64783789224d579f7a016a1 25a_genAction.sh
5050
55d146ca3e16aaad4aefce1e47ef5b5bcb8dcb16d4b92275c20def87fccb7ee3 25b_regAction.sh
5151
b7b13da87eeafe5dbd0f0d1810e2f4e69dc02c8c1e0697f8c7847740dc73a4fb bech32

cardano/testnet/24a_genVote.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ do
557557
totalAccept=""; totalAcceptIcon="";
558558
dRepAcceptIcon=""; poolAcceptIcon=""; committeeAcceptIcon="";
559559
dRepPowerThreshold="N/A"; poolPowerThreshold="N/A"; #N/A -> not available
560+
govActionTitle="";
560561

561562
echo
562563
echo -e "\e[36m--- Entry $((${tmpCnt}+1)) of ${actionStateEntryCnt} --- Action-ID ${actionUTXO}#${actionIdx}\e[0m"
@@ -626,6 +627,7 @@ do
626627
else
627628
errorMsg=$(jq -r .errorMsg <<< ${signerJSON} 2> /dev/null)
628629
echo -e "\e[0m Anchor-Data: ${iconYes}\e[32m JSONLD structure is ok\e[0m";
630+
govActionTitle=$(jq -r ".body.title // \"\"" ${tmpAnchorContent} 2> /dev/null)
629631
if [[ "${errorMsg}" != "" ]]; then echo -e "\e[0m Notice: ${iconNo} ${errorMsg}\e[0m"; fi
630632
authors=$(jq -r --arg iconYes "${iconYes}" --arg iconNo "${iconNo}" '.authors[] | "\\e[0m Signature: \(if .valid then $iconYes else $iconNo end) \(.name)\\e[0m"' <<< ${signerJSON} 2> /dev/null)
631633
if [[ "${authors}" != "" ]]; then echo -e "${authors}\e[0m"; fi
@@ -677,6 +679,10 @@ do
677679
;;
678680
esac
679681

682+
#Show governance action title if available
683+
if [[ "${govActionTitle}" != "" ]]; then
684+
echo -e "\e[0mAction-Title: \e[36m${govActionTitle}\e[0m\n"
685+
fi
680686

681687
#DO A NICE OUTPUT OF THE DIFFERENT CONTENTS & DO THE RIGHT CALCULATIONS FOR THE ACCEPTANCE
682688
case "${actionTag}" in
@@ -1121,6 +1127,10 @@ if [[ "${voteParam}" != "" ]]; then
11211127
#Generate the vote file depending on the choice made above
11221128
voteJSON=$(${cardanocli} ${cliEra} governance vote create ${voteParam} --governance-action-tx-id "${actionUTXO}" --governance-action-index "${actionIdx}" ${vkeyParam} "${voterVkeyFile}" ${anchorPARAM} --out-file /dev/stdout 2> /dev/stdout)
11231129
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\e[35mERROR - ${voteJSON}\e[0m\n"; exit 1; fi
1130+
1131+
#Inject the GovActionTitle into the voting file
1132+
voteJSON=$(jq -r ". += { \"description\": \"${govActionTitle//[^[:alnum:][:space:]-_\/\!§$%&()?<>@|.,:;=*\']}\" }" <<< ${voteJSON} 2> /dev/null)
1133+
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\e[35mERROR - ${voteJSON}\e[0m\n"; exit 1; fi
11241134
echo "${voteJSON}" > "${votingFile}"; checkError "$?"; if [ $? -ne 0 ]; then exit $?; fi
11251135

11261136
echo -e "\e[0mCreated the Vote-Certificate file: \e[32m${votingFile}\e[90m"

cardano/testnet/24b_regVote.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,18 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
189189
if [[ $? -ne 0 ]]; then echo -e "\n\e[35mERROR - Could not read in Vote-File '${metafile}' !\n\e[0m"; exit 1; fi
190190
echo -e "\e[0mReading Vote-File: \e[32m${metafile}\e[0m"
191191

192-
#Read the values of the voting file
192+
#Read the values of the voting file generated by 'governance vote view'
193193
{ read voteActionVoter;
194194
read voteActionID;
195195
read voteActionAnchorHASH;
196196
read voteActionAnchorURL;
197197
read voteActionAnswer;
198198
} <<< $(jq -r "to_entries | (.[0].key // \"-\", (.[0].value | to_entries | (.[0].key // \"-\", .[0].value.anchor.dataHash // \"-\", .[0].value.anchor.url // \"-\", .[0].value.decision // \"-\" )))" <<< "${voteJSON}")
199199

200+
#Get action-title
201+
voteActionTitle=$(jq -r ".description // \"\"" "${metafile}" 2> /dev/null);
202+
if [[ "${voteActionTitle}" != "" ]]; then echo -e "\e[0m Description: \e[36m${voteActionTitle}"; fi
203+
200204
#Get voteType
201205
case ${voteActionVoter%%-*} in
202206
"committee") voteType="Committee";;

0 commit comments

Comments
 (0)