Commit 8e2b4f82 authored by linj's avatar linj

fmt

parent 13f8bc1e
...@@ -496,7 +496,7 @@ func tokenMint(cmd *cobra.Command, args []string) { ...@@ -496,7 +496,7 @@ func tokenMint(cmd *cobra.Command, args []string) {
params := &tokenty.TokenMint{ params := &tokenty.TokenMint{
Symbol: symbol, Symbol: symbol,
Amount: int64((amount + 0.000001) * 1e4) * 1e4, Amount: int64((amount+0.000001)*1e4) * 1e4,
} }
ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenMintTx", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenMintTx", params, nil)
...@@ -522,7 +522,7 @@ func getTokenLogs(cmd *cobra.Command, args []string) { ...@@ -522,7 +522,7 @@ func getTokenLogs(cmd *cobra.Command, args []string) {
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
params.Execer = getRealExecName(paraName, "token") params.Execer = getRealExecName(paraName, "token")
params.FuncName = "GetTokenHistory" params.FuncName = "GetTokenHistory"
params.Payload = types.MustPBToJSON(&types.ReqString{Data:symbol}) params.Payload = types.MustPBToJSON(&types.ReqString{Data: symbol})
rpc, err := jsonclient.NewJSONClient(rpcLaddr) rpc, err := jsonclient.NewJSONClient(rpcLaddr)
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, err) fmt.Fprintln(os.Stderr, err)
...@@ -547,4 +547,3 @@ func getTokenLogsFlags(cmd *cobra.Command) { ...@@ -547,4 +547,3 @@ func getTokenLogsFlags(cmd *cobra.Command) {
cmd.Flags().StringP("symbol", "s", "", "token symbol") cmd.Flags().StringP("symbol", "s", "", "token symbol")
cmd.MarkFlagRequired("symbol") cmd.MarkFlagRequired("symbol")
} }
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
package executor package executor
import ( import (
"encoding/hex"
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
tokenty "github.com/33cn/plugin/plugin/dapp/token/types" tokenty "github.com/33cn/plugin/plugin/dapp/token/types"
"github.com/33cn/chain33/system/dapp"
"encoding/hex"
) )
func (t *token) ExecLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) { func (t *token) ExecLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
......
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
pty "github.com/33cn/plugin/plugin/dapp/token/types" pty "github.com/33cn/plugin/plugin/dapp/token/types"
) )
var opt_logs_table = &table.Option{ var opt_logs_table = &table.Option{
Prefix: "LODB-token", Prefix: "LODB-token",
Name: "logs", Name: "logs",
...@@ -95,4 +94,4 @@ func list(db dbm.KVDB, indexName string, data *pty.LocalLogs, count, direction i ...@@ -95,4 +94,4 @@ func list(db dbm.KVDB, indexName string, data *pty.LocalLogs, count, direction i
return nil, types.ErrNotFound return nil, types.ErrNotFound
} }
return rows, nil return rows, nil
} }
\ No newline at end of file
...@@ -75,7 +75,7 @@ func (t *token) Query_GetTokenHistory(in *types.ReqString) (types.Message, error ...@@ -75,7 +75,7 @@ func (t *token) Query_GetTokenHistory(in *types.ReqString) (types.Message, error
if in == nil { if in == nil {
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
rows, err := list(t.GetLocalDB(), "symbol", &tokenty.LocalLogs{Symbol:in.Data}, -1, 0) rows, err := list(t.GetLocalDB(), "symbol", &tokenty.LocalLogs{Symbol: in.Data}, -1, 0)
if err != nil { if err != nil {
tokenlog.Error("Query_GetTokenHistory", "err", err) tokenlog.Error("Query_GetTokenHistory", "err", err)
return nil, err return nil, err
......
...@@ -357,7 +357,7 @@ func TestQueryTokenLogs(t *testing.T) { ...@@ -357,7 +357,7 @@ func TestQueryTokenLogs(t *testing.T) {
req.Driver = execName req.Driver = execName
req.FuncName = "GetTokenHistory" req.FuncName = "GetTokenHistory"
req.Param = types.Encode(&types.ReqString{Data:tokenSym}) req.Param = types.Encode(&types.ReqString{Data: tokenSym})
reply, err := paraClient.QueryChain(context.Background(), &req) reply, err := paraClient.QueryChain(context.Background(), &req)
if err != nil { if err != nil {
......
...@@ -57,7 +57,7 @@ func (t *TokenType) GetTypeMap() map[string]int32 { ...@@ -57,7 +57,7 @@ func (t *TokenType) GetTypeMap() map[string]int32 {
"TokenFinishCreate": TokenActionFinishCreate, "TokenFinishCreate": TokenActionFinishCreate,
"TokenRevokeCreate": TokenActionRevokeCreate, "TokenRevokeCreate": TokenActionRevokeCreate,
"TransferToExec": TokenActionTransferToExec, "TransferToExec": TokenActionTransferToExec,
"TokenMint": TokenActionMint, "TokenMint": TokenActionMint,
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment