Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
aee5204e
Commit
aee5204e
authored
Sep 04, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
193a66a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
51 deletions
+50
-51
tool.sh
plugin/dapp/dposvote/cmd/tool.sh
+50
-51
No files found.
plugin/dapp/dposvote/cmd/tool.sh
View file @
aee5204e
...
...
@@ -49,7 +49,7 @@ function init() {
trans
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
"1DQUALqaqPUhJX6FWMCqhvnjrkb6ZfrRmf"
20000
}
function
send_exec
(){
function
send_exec
()
{
addr
=
$1
coins
=
$2
tx
=
$(
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
coins send_exec
-a
"
${
coins
}
"
-e
dpos
)
...
...
@@ -57,7 +57,7 @@ function send_exec(){
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet send
-d
"
${
sig
}
"
}
function
reg
(){
function
reg
()
{
addr
=
$1
ip
=
$2
key
=
$3
...
...
@@ -68,7 +68,7 @@ function reg(){
sleep
3
}
function
reReg
(){
function
reReg
()
{
addr
=
$1
ip
=
$2
key
=
$3
...
...
@@ -78,7 +78,7 @@ function reReg(){
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet send
-d
"
${
sig
}
"
sleep
3
}
function
cancelReg
(){
function
cancelReg
()
{
addr
=
$1
key
=
$2
echo
"dpos cancelRegist -a
${
addr
}
-k
${
key
}
"
...
...
@@ -87,7 +87,7 @@ function cancelReg(){
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet send
-d
"
${
sig
}
"
sleep
3
}
function
vote
(){
function
vote
()
{
addr
=
$1
key
=
$2
votes
=
$3
...
...
@@ -97,7 +97,7 @@ function vote(){
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet send
-d
"
${
sig
}
"
sleep
3
}
function
cancelVote
(){
function
cancelVote
()
{
addr
=
$1
key
=
$2
index
=
$3
...
...
@@ -107,7 +107,7 @@ function cancelVote(){
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet send
-d
"
${
sig
}
"
sleep
3
}
function
regM
(){
function
regM
()
{
addr
=
$1
key
=
$2
m
=
$3
...
...
@@ -119,7 +119,7 @@ function regM(){
sleep
3
}
function
regMn
(){
function
regMn
()
{
m
=
$1
cycle
=
$2
...
...
@@ -136,8 +136,7 @@ function regMn(){
regM
"
$addr
"
"
$key
"
"
$m
"
"
$cycle
"
}
function
regRP
(){
function
regRP
()
{
addr
=
$1
key
=
$2
r
=
$3
...
...
@@ -150,7 +149,7 @@ function regRP(){
sleep
3
}
function
regRPn
(){
function
regRPn
()
{
r
=
$1
p
=
$2
cycle
=
$3
...
...
@@ -167,7 +166,7 @@ function regRPn(){
key
=
"03F4AB6659E61E8512C9A24AC385CC1AC4D52B87D10ADBDF060086EA82BE62CDDE"
regRP
"
$addr
"
"
$key
"
"
$r
"
"
$p
"
"
$cycle
"
}
function
recordCB
(){
function
recordCB
()
{
cycle
=
$1
height
=
$2
hash
=
$3
...
...
@@ -181,64 +180,64 @@ function recordCB(){
sleep
3
}
function
qtx
(){
function
qtx
()
{
tx
=
$1
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
tx query
-s
"
${
tx
}
"
}
function
qn
(){
function
qn
()
{
result
=
$(
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos candidatorQuery
-t
topN
-n
"
$1
"
)
echo
"
$result
"
}
function
qk
(){
function
qk
()
{
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos candidatorQuery
-t
pubkeys
-k
"
$1
"
}
function
qv
(){
function
qv
()
{
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos voteQuery
-a
"
$1
"
-k
"
$2
"
}
function
qvrf
(){
function
qvrf
()
{
type
=
$1
cycle
=
$2
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos vrfQuery
-t
"
$type
"
-c
"
$cycle
"
}
function
qvrfn
(){
function
qvrfn
()
{
cycle
=
$1
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos vrfQuery
-t
"topN"
-c
"
$cycle
"
}
function
qvrfk
(){
function
qvrfk
()
{
cycle
=
$2
keys
=
$1
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos vrfQuery
-t
"pubkeys"
-c
"
$cycle
"
-k
"
${
keys
}
"
}
function
unlock
(){
function
unlock
()
{
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
wallet unlock
-p
zzh123456
}
function
qtopn
(){
function
qtopn
()
{
version
=
$1
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos topNQuery
-v
"
${
version
}
"
}
function
qcb
(){
function
qcb
()
{
type
=
$1
param
=
$2
if
[
"
${
type
}
"
==
"cycle"
]
;
then
if
[
"
${
type
}
"
==
"cycle"
]
;
then
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos cbQuery
-t
"cycle"
-c
"
${
param
}
"
elif
[
"
${
type
}
"
==
"height"
]
;
then
elif
[
"
${
type
}
"
==
"height"
]
;
then
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos cbQuery
-t
"height"
-m
"
${
param
}
"
elif
[
"
${
type
}
"
==
"hash"
]
;
then
elif
[
"
${
type
}
"
==
"hash"
]
;
then
./chain33-cli
--rpc_laddr
=
"
${
rcpAddr
}
"
dpos cbQuery
-t
"hash"
-s
"
${
param
}
"
fi
}
#main
para
=
"
$1
"
if
[
"
$para
"
==
"init"
]
;
then
para
=
"
$1
"
if
[
"
$para
"
==
"init"
]
;
then
init
send_exec 15LsTP6tkYGZcN7tc1Xo2iYifQfowxot3b 15000
send_exec 14w5JaGDrXTZwF5Wv51UAtuGgAupenLAok 15000
...
...
@@ -253,52 +252,52 @@ function qcb(){
vote 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt 03EF0E1D3112CF571743A3318125EDE2E52A4EB904BCBAA4B1F75020C2846A7EB4 100
vote 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt 03F4AB6659E61E8512C9A24AC385CC1AC4D52B87D10ADBDF060086EA82BE62CDDE 200
elif
[
"
$para
"
==
"sendExec"
]
;
then
elif
[
"
$para
"
==
"sendExec"
]
;
then
send_exec 15LsTP6tkYGZcN7tc1Xo2iYifQfowxot3b 15000
send_exec 14w5JaGDrXTZwF5Wv51UAtuGgAupenLAok 15000
send_exec 1DQUALqaqPUhJX6FWMCqhvnjrkb6ZfrRmf 15000
elif
[
"
$para
"
==
"reg"
]
;
then
elif
[
"
$para
"
==
"reg"
]
;
then
reg
"
$2
"
"
$3
"
"
$4
"
elif
[
"
$para
"
==
"cancelReg"
]
;
then
elif
[
"
$para
"
==
"cancelReg"
]
;
then
cancelReg
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"reReg"
]
;
then
elif
[
"
$para
"
==
"reReg"
]
;
then
reReg
"
$2
"
"
$3
"
"
$4
"
elif
[
"
$para
"
==
"vote"
]
;
then
elif
[
"
$para
"
==
"vote"
]
;
then
vote
"
$2
"
"
$3
"
"
$4
"
elif
[
"
$para
"
==
"cancelVote"
]
;
then
elif
[
"
$para
"
==
"cancelVote"
]
;
then
cancelVote
"
$2
"
"
$3
"
"
$4
"
elif
[
"
$para
"
==
"regM"
]
;
then
elif
[
"
$para
"
==
"regM"
]
;
then
regM
"
$2
"
"
$3
"
"
$4
"
"
$5
"
elif
[
"
$para
"
==
"regMn"
]
;
then
elif
[
"
$para
"
==
"regMn"
]
;
then
regMn
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"regRP"
]
;
then
elif
[
"
$para
"
==
"regRP"
]
;
then
regRP
"
$2
"
"
$3
"
"
$4
"
"
$5
"
"
$6
"
elif
[
"
$para
"
==
"regRPn"
]
;
then
elif
[
"
$para
"
==
"regRPn"
]
;
then
regRPn
"
$2
"
"
$3
"
"
$4
"
elif
[
"
$para
"
==
"qtx"
]
;
then
elif
[
"
$para
"
==
"qtx"
]
;
then
qtx
"
$2
"
elif
[
"
$para
"
==
"sendDpos"
]
;
then
elif
[
"
$para
"
==
"sendDpos"
]
;
then
send_exec
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"qn"
]
;
then
elif
[
"
$para
"
==
"qn"
]
;
then
qn
"
$2
"
elif
[
"
$para
"
==
"qv"
]
;
then
elif
[
"
$para
"
==
"qv"
]
;
then
qv
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"qk"
]
;
then
elif
[
"
$para
"
==
"qk"
]
;
then
qk
"
$2
"
elif
[
"
$para
"
==
"qvrf"
]
;
then
elif
[
"
$para
"
==
"qvrf"
]
;
then
qvrf
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"qvrfn"
]
;
then
elif
[
"
$para
"
==
"qvrfn"
]
;
then
qvrfn
"
$2
"
elif
[
"
$para
"
==
"qvrfk"
]
;
then
elif
[
"
$para
"
==
"qvrfk"
]
;
then
qvrfk
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"unlock"
]
;
then
elif
[
"
$para
"
==
"unlock"
]
;
then
unlock
elif
[
"
$para
"
==
"qtopn"
]
;
then
elif
[
"
$para
"
==
"qtopn"
]
;
then
qtopn
"
$2
"
elif
[
"
$para
"
==
"recordCB"
]
;
then
elif
[
"
$para
"
==
"recordCB"
]
;
then
recordCB
"
$2
"
"
$3
"
"
$4
"
"
$5
"
"
$6
"
elif
[
"
$para
"
==
"qCB"
]
;
then
elif
[
"
$para
"
==
"qCB"
]
;
then
qcb
"
$2
"
"
$3
"
elif
[
"
$para
"
==
"trans"
]
;
then
elif
[
"
$para
"
==
"trans"
]
;
then
trans
"
$2
"
"
$3
"
"
$4
"
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment