github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/sign_tx.sh (about)

     1  #!/bin/bash
     2  # 각 지갑에서 1 aer씩 송금하는 tx를 tx count만큼 생성한다.
     3  
     4  # 어떤 클라이언트
     5  port=$1
     6  TARGET_DIR=$1
     7  # 지갑 갯수
     8  accCount=$2
     9  # tx 수량
    10  txCount=$3
    11  
    12  echo "============== sign txs for all accounts =============="
    13  
    14  #aergocli -p ${port} account unlock --address ${wallet} --password ${password}
    15  
    16  # 계정 & 트랜잭션 삭제
    17  rm -rf ./account_${port}.txt
    18  #rm -rf result.txt
    19  rm -rf ./${port}
    20  #mkdir $TARGET_DIR
    21  
    22  
    23  chain_id_hash=`aergocli  -p ${port} blockchain | jq .ChainIdHash`
    24  echo "chainid=$chain_id_hash"
    25  
    26  # 계정 추가
    27  for ((i = 1; i <= $accCount; i++))
    28  do
    29  TARGET_DIR=${port}/${i}
    30  account=`aergocli account new --password 1234 --path ${TARGET_DIR}`
    31  echo "make tx for account=$account in $TARGET_DIR"
    32  make_tx_internal.sh $TARGET_DIR $account $txCount $chain_id_hash
    33  
    34  echo $account >> ./account_${port}.txt
    35  done