-
Notifications
You must be signed in to change notification settings - Fork 0
/
send.sh
37 lines (33 loc) · 1.23 KB
/
send.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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
zsrc="ztcLKgUC9JrN1519ZjXmNy9wXAKnVcFE9tX"
zto="ztftydJRhDSXvctekQB7e1BRubfhnFWFdgS"
zamount="0.0001"
sdm="$(/home/devel/zen/src/zen-cli z_sendmany "$zsrc" "[{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"},
{\"amount\": $zamount, \"address\": \"$zto\"}]")" # 10 times
str="\"status\": \"success\","
echo
if [[ $sdm = *opid* ]]; then
opr="$(/home/devel/zen/src/zen-cli z_getoperationresult)"
if [[ "$opr" == *"$str"* ]]; then
echo "$opr"
echo "success"
else
echo
echo "-------------"
echo "failed"
echo "$opr"
echo "-------------"
echo
fi
else
echo "transaction malformed"
fi
echo