Skip to content

Commit

Permalink
新增批量生成钱包shell
Browse files Browse the repository at this point in the history
  • Loading branch information
方辉 committed Apr 13, 2024
1 parent 8252a92 commit 1430692
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions sh/batch_wallet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# 检查参数是否为空
if [ -z "$1" ]; then
echo "开始数不能为空"
exit 1
fi

# 检查参数是否为空
if [ -z "$2" ]; then
echo "新增的数量不能为空"
exit 1
fi

# 检查参数是否为空
if [ -z "$3" ]; then
echo "基础目录 不能为空"
exit 1
fi


# 循环执行脚本指定次数
for ((i=$1; i<=$1+$2; i++)); do
echo "execute $i"
solana-keygen new --derivation-path m/44'/501'/0'/0' --force >> wallet.log
mv /root/.config/solana/id.json $3/tmp/id$i.json
done

0 comments on commit 1430692

Please sign in to comment.