-
Notifications
You must be signed in to change notification settings - Fork 8
/
dappertx
executable file
·61 lines (55 loc) · 1.42 KB
/
dappertx
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# declare an array variable
declare -a txn=(\
"createProfileDapper" \
"buyLeaseForSaleDapper" \
"buyAddonDapper" \
"editProfileDapper" \
"setProfile" \
"listLeaseForSaleDapper" \
"delistLeaseSale" \
"moveNameToDapper" \
"registerDapper" \
"removeRelatedAccountDapper" \
"renewNameDapper" \
"setPrivateModeDapper" \
"setRelatedAccountDapper" \
"buyNFTForSaleDapper" \
# "listNFTForSaleDapper" \
"delistNFTSale" \
"initWearables" \
"sendWearables" \
"deleteFindThoughts" \
"hideFindThoughts" \
"reactToFindThoughts" \
"editFindThought" \
"publishFindThought" \
"redeemNameVoucher" \
"initCollections" \
"redeemLostAndFoundNFTs" \
"redeemAllLostAndFoundNFTs" \
"sendNFTs" \
"setProfile" \
)
declare -a script=(\
"getMetadataForBuyNFTForSaleDapper" \
"getMetadataForBuyAddonDapper" \
"getMetadataForBuyLeaseForSaleDapper" \
"getMetadataForRegisterDapper" \
"getMetadataForRenewNameDapper" \
)
declare -a network=$@
# get length of an array
length=${#txn[@]}
for (( i=0; i<length; i++ ));
do
printf "making ${network} transactions ${txn[$i]%Dapper*} \n"
jq ".networks.${network}.transactions.${txn[$i]}.code" lib/find.json -r > dapper-tx/${network}/${txn[$i]%Dapper*}.cdc
done
# get length of an array
length=${#script[@]}
for (( j=0; j<length; j++ ));
do
printf "making ${network} script ${script[$j]%Dapper*} \n"
jq ".networks.${network}.scripts.${script[$j]}.code" lib/find.json -r > dapper-tx/${network}/${script[$j]%Dapper*}.cdc
done