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
79117361
Commit
79117361
authored
Oct 29, 2019
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del GetCliSysParam nil judge
parent
ab6c58e7
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
9 additions
and
216 deletions
+9
-216
proposal_board.go
plugin/dapp/autonomy/commands/proposal_board.go
+0
-14
proposal_change.go
plugin/dapp/autonomy/commands/proposal_change.go
+0
-14
proposal_project.go
plugin/dapp/autonomy/commands/proposal_project.go
+0
-17
proposal_rule.go
plugin/dapp/autonomy/commands/proposal_rule.go
+0
-20
autonomy.go
plugin/dapp/autonomy/executor/autonomy.go
+2
-1
blackwhite.go
plugin/dapp/blackwhite/executor/blackwhite.go
+6
-5
vote.go
plugin/dapp/dposvote/commands/vote.go
+0
-24
evm.go
plugin/dapp/evm/commands/evm.go
+0
-12
evm.go
plugin/dapp/evm/executor/evm.go
+1
-1
game.go
plugin/dapp/guess/commands/game.go
+0
-15
hashlock.go
plugin/dapp/hashlock/commands/hashlock.go
+0
-9
oracle.go
plugin/dapp/oracle/commands/oracle.go
+0
-15
paracross.go
plugin/dapp/paracross/commands/paracross.go
+0
-27
game.go
plugin/dapp/pokerbull/cmd/game.go
+0
-12
retrieve.go
plugin/dapp/retrieve/cmd/retrieve.go
+0
-12
ticket.go
plugin/dapp/ticket/commands/ticket.go
+0
-3
unfreeze.go
plugin/dapp/unfreeze/commands/unfreeze.go
+0
-12
valnode.go
plugin/dapp/valnode/commands/valnode.go
+0
-3
No files found.
plugin/dapp/autonomy/commands/proposal_board.go
View file @
79117361
...
...
@@ -9,8 +9,6 @@ import (
"encoding/json"
"fmt"
jsonrpc
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
...
...
@@ -103,9 +101,6 @@ func addProposalBoardFlags(cmd *cobra.Command) {
func
proposalBoard
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
year
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"year"
)
...
...
@@ -163,9 +158,6 @@ func addRevokeProposalBoardFlags(cmd *cobra.Command) {
func
revokeProposalBoard
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -208,9 +200,6 @@ func addVoteProposalBoardFlags(cmd *cobra.Command) {
func
voteProposalBoard
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -267,9 +256,6 @@ func addTerminateProposalBoardFlags(cmd *cobra.Command) {
func
terminateProposalBoard
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
plugin/dapp/autonomy/commands/proposal_change.go
View file @
79117361
...
...
@@ -9,8 +9,6 @@ import (
"encoding/json"
"fmt"
jsonrpc
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
...
...
@@ -45,9 +43,6 @@ func addProposalChangeFlags(cmd *cobra.Command) {
func
proposalChange
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
year
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"year"
)
...
...
@@ -122,9 +117,6 @@ func addRevokeProposalChangeFlags(cmd *cobra.Command) {
func
revokeProposalChange
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -166,9 +158,6 @@ func addVoteProposalChangeFlags(cmd *cobra.Command) {
func
voteProposalChange
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -219,9 +208,6 @@ func addTerminateProposalChangeFlags(cmd *cobra.Command) {
func
terminateProposalChange
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
plugin/dapp/autonomy/commands/proposal_project.go
View file @
79117361
...
...
@@ -9,8 +9,6 @@ import (
"strings"
"fmt"
jsonrpc
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
...
...
@@ -57,9 +55,6 @@ func addProposalProjectFlags(cmd *cobra.Command) {
func
proposalProject
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
year
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"year"
)
...
...
@@ -132,9 +127,6 @@ func addRevokeProposalProjectFlags(cmd *cobra.Command) {
func
revokeProposalProject
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -176,9 +168,6 @@ func addVoteProposalProjectFlags(cmd *cobra.Command) {
func
voteProposalProject
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -229,9 +218,6 @@ func addPubVoteProposalProjectFlags(cmd *cobra.Command) {
func
pubVoteProposalProject
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -288,9 +274,6 @@ func addTerminateProposalProjectFlags(cmd *cobra.Command) {
func
terminateProposalProject
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
plugin/dapp/autonomy/commands/proposal_rule.go
View file @
79117361
...
...
@@ -9,8 +9,6 @@ import (
"strings"
"fmt"
jsonrpc
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
...
...
@@ -49,9 +47,6 @@ func addProposalRuleFlags(cmd *cobra.Command) {
func
proposalRule
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
year
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"year"
)
...
...
@@ -116,9 +111,6 @@ func addRevokeProposalRuleFlags(cmd *cobra.Command) {
func
revokeProposalRule
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -161,9 +153,6 @@ func addVoteProposalRuleFlags(cmd *cobra.Command) {
func
voteProposalRule
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -219,9 +208,6 @@ func addTerminateProposalRuleFlags(cmd *cobra.Command) {
func
terminateProposalRule
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
ID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
@@ -349,9 +335,6 @@ func addTransferFundflags(cmd *cobra.Command) {
func
transferFund
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"amount"
)
...
...
@@ -397,9 +380,6 @@ func addCommentProposalflags(cmd *cobra.Command) {
func
commentProposal
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
proposalID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proposalID"
)
...
...
plugin/dapp/autonomy/executor/autonomy.go
View file @
79117361
...
...
@@ -20,7 +20,7 @@ type subConfig struct {
var
(
alog
=
log
.
New
(
"module"
,
"execs.autonomy"
)
driverName
=
auty
.
AutonomyX
autonomyAddr
=
address
.
ExecAddress
(
auty
.
AutonomyX
)
autonomyAddr
string
subcfg
subConfig
)
...
...
@@ -29,6 +29,7 @@ func Init(name string, cfg *types.Chain33Config, sub []byte) {
if
sub
!=
nil
{
types
.
MustDecode
(
sub
,
&
subcfg
)
}
autonomyAddr
=
address
.
ExecAddress
(
cfg
.
ExecName
(
auty
.
AutonomyX
))
drivers
.
Register
(
cfg
,
GetName
(),
newAutonomy
,
cfg
.
GetDappFork
(
driverName
,
"Enable"
))
InitExecType
()
}
...
...
plugin/dapp/blackwhite/executor/blackwhite.go
View file @
79117361
...
...
@@ -14,17 +14,18 @@ import (
gt
"github.com/33cn/plugin/plugin/dapp/blackwhite/types"
)
var
clog
=
log
.
New
(
"module"
,
"execs.blackwhite"
)
var
blackwhiteAddr
=
address
.
ExecAddress
(
gt
.
BlackwhiteX
)
var
driverName
=
gt
.
BlackwhiteX
var
(
clog
=
log
.
New
(
"module"
,
"execs.blackwhite"
)
blackwhiteAddr
string
driverName
=
gt
.
BlackwhiteX
)
// Init 重命名执行器名称
func
Init
(
name
string
,
cfg
*
types
.
Chain33Config
,
sub
[]
byte
)
{
driverName
=
name
gt
.
BlackwhiteX
=
driverName
gt
.
ExecerBlackwhite
=
[]
byte
(
driverName
)
blackwhiteAddr
=
address
.
ExecAddress
(
cfg
.
ExecName
(
gt
.
BlackwhiteX
))
drivers
.
Register
(
cfg
,
name
,
newBlackwhite
,
cfg
.
GetDappFork
(
driverName
,
"Enable"
))
InitExecType
()
}
...
...
plugin/dapp/dposvote/commands/vote.go
View file @
79117361
...
...
@@ -88,9 +88,6 @@ func addRegistFlags(cmd *cobra.Command) {
func
regist
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -132,9 +129,6 @@ func addCancelRegistFlags(cmd *cobra.Command) {
func
cancelRegist
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -175,9 +169,6 @@ func addVoteFlags(cmd *cobra.Command) {
func
vote
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -218,9 +209,6 @@ func addCancelVoteFlags(cmd *cobra.Command) {
func
cancelVote
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -263,9 +251,6 @@ func addReRegistFlags(cmd *cobra.Command) {
func
reRegist
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -401,9 +386,6 @@ func addVrfMFlags(cmd *cobra.Command) {
func
vrfM
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -450,9 +432,6 @@ func addVrfRPRegistFlags(cmd *cobra.Command) {
func
vrfRP
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
@@ -849,9 +828,6 @@ func recordCB(cmd *cobra.Command, args []string) {
}
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
key
,
_
:=
cmd
.
Flags
()
.
GetString
(
"privKey"
)
...
...
plugin/dapp/evm/commands/evm.go
View file @
79117361
...
...
@@ -216,9 +216,6 @@ func addCreateContractFlags(cmd *cobra.Command) {
func
createContract
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
code
,
_
:=
cmd
.
Flags
()
.
GetString
(
"input"
)
caller
,
_
:=
cmd
.
Flags
()
.
GetString
(
"caller"
)
...
...
@@ -389,9 +386,6 @@ func callContractCmd() *cobra.Command {
func
callContract
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
code
,
_
:=
cmd
.
Flags
()
.
GetString
(
"input"
)
caller
,
_
:=
cmd
.
Flags
()
.
GetString
(
"caller"
)
...
...
@@ -715,9 +709,6 @@ func addEvmTransferFlags(cmd *cobra.Command) {
func
evmTransfer
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
caller
,
_
:=
cmd
.
Flags
()
.
GetString
(
"caller"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
...
...
@@ -769,9 +760,6 @@ func addEvmWithdrawFlags(cmd *cobra.Command) {
func
evmWithdraw
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
caller
,
_
:=
cmd
.
Flags
()
.
GetString
(
"caller"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
...
...
plugin/dapp/evm/executor/evm.go
View file @
79117361
...
...
@@ -25,7 +25,7 @@ var (
evmDebug
=
false
// EvmAddress 本合约地址
EvmAddress
=
address
.
ExecAddress
(
evmtypes
.
ExecutorName
)
EvmAddress
=
""
)
var
driverName
=
evmtypes
.
ExecutorName
...
...
plugin/dapp/guess/commands/game.go
View file @
79117361
...
...
@@ -67,9 +67,6 @@ func addGuessStartFlags(cmd *cobra.Command) {
func
guessStart
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
topic
,
_
:=
cmd
.
Flags
()
.
GetString
(
"topic"
)
...
...
@@ -120,9 +117,6 @@ func addGuessBetFlags(cmd *cobra.Command) {
func
guessBet
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameId"
)
...
...
@@ -160,9 +154,6 @@ func addGuessStopBetFlags(cmd *cobra.Command) {
func
guessStopBet
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameId"
)
...
...
@@ -198,9 +189,6 @@ func addGuessAbortFlags(cmd *cobra.Command) {
func
guessAbort
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameId"
)
...
...
@@ -239,9 +227,6 @@ func addGuessPublishFlags(cmd *cobra.Command) {
func
guessPublish
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameId"
)
...
...
plugin/dapp/hashlock/commands/hashlock.go
View file @
79117361
...
...
@@ -61,9 +61,6 @@ func addHashlockLockCmdFlags(cmd *cobra.Command) {
func
hashlockLockCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
...
...
@@ -128,9 +125,6 @@ func addHashlockCmdFlags(cmd *cobra.Command) {
func
hashlockUnlockCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
...
...
@@ -174,9 +168,6 @@ func HashlockSendCmd() *cobra.Command {
func
hashlockSendCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
...
...
plugin/dapp/oracle/commands/oracle.go
View file @
79117361
...
...
@@ -90,9 +90,6 @@ func addPublishEventFlags(cmd *cobra.Command) {
func
publishEvent
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
err
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
if
err
!=
nil
{
...
...
@@ -165,9 +162,6 @@ func addAbortPublishEventFlags(cmd *cobra.Command) {
func
abortPublishEvent
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
err
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
if
err
!=
nil
{
...
...
@@ -227,9 +221,6 @@ func addPrePublishResultFlags(cmd *cobra.Command) {
func
prePublishResult
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
err
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
if
err
!=
nil
{
...
...
@@ -285,9 +276,6 @@ func addAbortPrePubResultFlags(cmd *cobra.Command) {
func
abortPrePubResult
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
err
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
if
err
!=
nil
{
...
...
@@ -347,9 +335,6 @@ func addPublishResultFlags(cmd *cobra.Command) {
func
publishResult
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
err
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
if
err
!=
nil
{
...
...
plugin/dapp/paracross/commands/paracross.go
View file @
79117361
...
...
@@ -117,9 +117,6 @@ func createAssetWithdraw(cmd *cobra.Command, args []string) {
func
createAssetTx
(
cmd
*
cobra
.
Command
,
isWithdraw
bool
)
(
string
,
error
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
if
amount
<
0
{
...
...
@@ -268,9 +265,6 @@ func addNodeJoinFlags(cmd *cobra.Command) {
func
createNodeJoinTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
opAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"addr"
)
coins
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"coins"
)
...
...
@@ -308,9 +302,6 @@ func addNodeVoteFlags(cmd *cobra.Command) {
func
createNodeVoteTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
val
,
_
:=
cmd
.
Flags
()
.
GetUint32
(
"value"
)
...
...
@@ -346,9 +337,6 @@ func addNodeQuitFlags(cmd *cobra.Command) {
func
createNodeQuitTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
opAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"addr"
)
...
...
@@ -383,9 +371,6 @@ func addNodeCancelFlags(cmd *cobra.Command) {
func
createNodeCancelTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
...
...
@@ -543,9 +528,6 @@ func addNodeGroupApplyCmdFlags(cmd *cobra.Command) {
func
nodeGroupApply
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
addrs
,
_
:=
cmd
.
Flags
()
.
GetString
(
"addrs"
)
coins
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"coins"
)
...
...
@@ -584,9 +566,6 @@ func addNodeGroupApproveCmdFlags(cmd *cobra.Command) {
func
nodeGroupApprove
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
coins
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"coins"
)
...
...
@@ -622,9 +601,6 @@ func addNodeGroupQuitCmdFlags(cmd *cobra.Command) {
func
nodeGroupQuit
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
...
...
@@ -658,9 +634,6 @@ func addNodeGroupModifyCmdFlags(cmd *cobra.Command) {
func
nodeGroupModify
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
coins
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"coins"
)
...
...
plugin/dapp/pokerbull/cmd/game.go
View file @
79117361
...
...
@@ -56,9 +56,6 @@ func addPokerbullStartFlags(cmd *cobra.Command) {
func
pokerbullStart
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
value
,
_
:=
cmd
.
Flags
()
.
GetUint64
(
"value"
)
...
...
@@ -94,9 +91,6 @@ func addPokerbullContinueFlags(cmd *cobra.Command) {
func
pokerbullContinue
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
...
...
@@ -131,9 +125,6 @@ func addPokerbullQuitFlags(cmd *cobra.Command) {
func
pokerbullQuit
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
...
...
@@ -174,9 +165,6 @@ func addPokerbullPlayFlags(cmd *cobra.Command) {
func
pokerbullPlay
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
gameID
,
_
:=
cmd
.
Flags
()
.
GetString
(
"gameID"
)
...
...
plugin/dapp/retrieve/cmd/retrieve.go
View file @
79117361
...
...
@@ -66,9 +66,6 @@ func addBakupCmdFlags(cmd *cobra.Command) {
func
backupCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
...
...
@@ -131,9 +128,6 @@ func addPerformCmdFlags(cmd *cobra.Command) {
func
prepareCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
...
...
@@ -169,9 +163,6 @@ func PerformCmd() *cobra.Command {
func
performCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
...
...
@@ -219,9 +210,6 @@ func CancelCmd() *cobra.Command {
func
cancelCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
...
...
plugin/dapp/ticket/commands/ticket.go
View file @
79117361
...
...
@@ -56,9 +56,6 @@ func addBindMinerFlags(cmd *cobra.Command) {
func
bindMiner
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
bindAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"bind_addr"
)
originAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"origin_addr"
)
...
...
plugin/dapp/unfreeze/commands/unfreeze.go
View file @
79117361
...
...
@@ -114,9 +114,6 @@ func fixAmountCmd() *cobra.Command {
func
fixAmount
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
create
,
err
:=
getCreateFlags
(
cmd
)
if
err
!=
nil
{
...
...
@@ -174,9 +171,6 @@ func leftCmd() *cobra.Command {
func
left
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
create
,
err
:=
getCreateFlags
(
cmd
)
if
err
!=
nil
{
...
...
@@ -262,9 +256,6 @@ func queryWithdrawCmd() *cobra.Command {
func
withdraw
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
...
...
@@ -282,9 +273,6 @@ func withdraw(cmd *cobra.Command, args []string) {
func
terminate
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
...
...
plugin/dapp/valnode/commands/valnode.go
View file @
79117361
...
...
@@ -149,9 +149,6 @@ func addNodeFlags(cmd *cobra.Command) {
func
addNode
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
cfg
:=
types
.
GetCliSysParam
(
title
)
if
cfg
==
nil
{
panic
(
fmt
.
Sprintln
(
"can not find CliSysParam title"
,
title
))
}
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
pubkey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkey"
)
...
...
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