github.com/aergoio/aergo@v1.3.1/bin/make.sh (about) 1 #!/bin/bash 2 3 4 5 set -e 6 if [ "$#" -ne 3 ]; then 7 echo "./make.sh [nr_acc] [nr_txs] [target_dir]" 8 exit 9 fi 10 11 NR_ACC=$1 12 NR_TX=$2 13 TARGET_DIR=$3 14 TO_ACC=AmMHA3fjtQS2xrXU6LuHqTxM97eLVGSCjcTosfTmV4gQyZ3ck8a6 15 rm -fr $TARGET_DIR 16 mkdir -p $TARGET_DIR 17 18 19 echo "Make $NR_ACC account(/w $NR_TX transactions) in $TARGET_DIR..." 20 for ((i = 1; i <= $NR_ACC; i++)) 21 do 22 NEWKEY=`./aergocli account new --password 1 2> /dev/null` 23 echo $NEWKEY 24 ./aergocli account unlock --address $NEWKEY --password 1 &> /dev/null 25 echo "[" > "$TARGET_DIR/$NEWKEY.trx" 26 for ((j = 1; j <= $NR_TX; j++)) 27 do 28 printf '\rGenerating..... %d/%d account (%d/%d)' $i $NR_ACC $j $NR_TX 29 ./aergocli signtx --jsontx \ 30 "{\"account\":\"$NEWKEY\", \ 31 \"nonce\": $j , \ 32 \"price\": \"1\" , \ 33 \"limit\": 100 , \ 34 \"recipient\":\"$TO_ACC\", \ 35 \"type\": 0, \ 36 \"amount\": \"25000\" }" --address $NEWKEY --password 1 >> "$TARGET_DIR/$NEWKEY.trx" 2> /dev/null 37 38 echo "," >> $TARGET_DIR/$NEWKEY.trx 39 done 40 truncate -s -2 $TARGET_DIR/$NEWKEY.trx 41 echo "]" >> $TARGET_DIR/$NEWKEY.trx 42 43 done 44 45 echo "" 46 47