-
Notifications
You must be signed in to change notification settings - Fork 2
/
create_bulk_offers_linux.sh
26 lines (26 loc) · 1.17 KB
/
create_bulk_offers_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
sudo apt-get install bc -y &&
read -p "Enter your fingerprint (i.e 278xxxxxxxxx) :" finger
read -p "Enter Wallet ID for the NFTs (i.e 5) :" id
read -p "Enter Wallet ID for the TOKEN you request (i.e 2) :" id2
read -p "Enter Wallet NFT royalty (i.e 0.05 = 5.0%) :" roy; neu=$(echo "$roy+1" | bc); neu2=$(echo "scale=3 ; 1 / $neu" | bc)
echo your royalty is $roy - ergo your exchange rate to token is $neu2
read -p "Amount of offers you want to create? :" num
echo ""
echo "creating NFT_ID_LIST.txt now ..."
chia wallet nft list -f $finger -i $id | grep "nft1" >> NFT_ID_LIST.txt
echo "NFT IDs successfully stored in NFT_ID_LIST.txt"
read -p "$(tput setaf 2)Do you want to start auto creating offers? (yes/no) " yn
case $yn in
yes ) echo proceed...;;
no ) echo exiting...;
exit;;
* ) echo invalid response;
exit 1;;
esac
for i in $(seq 1 $num); do
sleep 1
yes | chia wallet make_offer -f $finger -o $(sed -n ${i}p NFT_ID_LIST.txt | tail -c -64 | cut -c -62):1 -r $id2:$neu2 -p offers/$i.offer &&
sleep 0.5
done
echo "$(tput setaf 3)loop closed ... offers are saved in offers/ ... Please consider following me on the twitter @chialisp"