Skip to content

Commit fa6f49b

Browse files
committed
Update 2026-02: Bugfix for latest xxd version
Bugfix for some `xxd` commands that had the options `-b` and `-ps` in it at the same time. Latest `xxd` version does not like that. Code was fixed.
1 parent 508335d commit fa6f49b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

cardano/mainnet/00_common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ convert_tokenName2BECH() {
11531153
#${2} = assetName in ASCII or empty
11541154
local tmp_policyID=$(trimString "${1}") #make sure there are not spaces before and after
11551155
local tmp_assetName=$(trimString "${2}")
1156-
if [[ ! "${tmp_assetName}" == "" ]]; then local tmp_assetName=$(echo -n "${tmp_assetName}" | xxd -b -ps -c 80 | tr -d '\n'); fi
1156+
if [[ ! "${tmp_assetName}" == "" ]]; then local tmp_assetName=$(echo -n "${tmp_assetName}" | xxd -ps -c 80 | tr -d '\n'); fi
11571157

11581158
#echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | cut -d' ' -f 1 | ${bech32_bin} asset
11591159
echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | awk {'print $1'} | ${bech32_bin} asset
@@ -1164,7 +1164,7 @@ echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | awk {
11641164
#-------------------------------------------------------
11651165
#Convert ASCII assetName into HEX assetName
11661166
convert_assetNameASCII2HEX() {
1167-
echo -n "${1}" | xxd -b -ps -c 80 | tr -d '\n'
1167+
echo -n "${1}" | xxd -ps -c 80 | tr -d '\n'
11681168
}
11691169
#-------------------------------------------------------
11701170

cardano/mainnet/sha256sum_sposcripts.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
a8d810595590ee2ae248ed3626b38f52b5a3dff061436ec83d004059a8b1cb6e 00_common.sh
1+
30c87690ba61f7a278e214299ef2c7e604dea50ced3d3dea010518552847390f 00_common.sh
22
9a4343d99683eb17a26c325e604c1693cb7212f3118b207df3bf96b8381fdb63 01_claimRewards.sh
33
8f98ef3f0983ed12ba714390b9a528ccf06b41f51dfcd1d52c50d86f038455c8 01_protectKey.sh
44
1d7746cc6ee07d1892268fc585cbdcac526218ac3a5a921532259a9b54ba0d3f 01_queryAddress.sh

cardano/testnet/00_common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ convert_tokenName2BECH() {
11531153
#${2} = assetName in ASCII or empty
11541154
local tmp_policyID=$(trimString "${1}") #make sure there are not spaces before and after
11551155
local tmp_assetName=$(trimString "${2}")
1156-
if [[ ! "${tmp_assetName}" == "" ]]; then local tmp_assetName=$(echo -n "${tmp_assetName}" | xxd -b -ps -c 80 | tr -d '\n'); fi
1156+
if [[ ! "${tmp_assetName}" == "" ]]; then local tmp_assetName=$(echo -n "${tmp_assetName}" | xxd -ps -c 80 | tr -d '\n'); fi
11571157

11581158
#echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | cut -d' ' -f 1 | ${bech32_bin} asset
11591159
echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | awk {'print $1'} | ${bech32_bin} asset
@@ -1164,7 +1164,7 @@ echo -n "${tmp_policyID}${tmp_assetName}" | xxd -r -ps | b2sum -l 160 -b | awk {
11641164
#-------------------------------------------------------
11651165
#Convert ASCII assetName into HEX assetName
11661166
convert_assetNameASCII2HEX() {
1167-
echo -n "${1}" | xxd -b -ps -c 80 | tr -d '\n'
1167+
echo -n "${1}" | xxd -ps -c 80 | tr -d '\n'
11681168
}
11691169
#-------------------------------------------------------
11701170

0 commit comments

Comments
 (0)