Commit 8e2b4f82 authored by linj's avatar linj

fmt

parent 13f8bc1e
......@@ -496,7 +496,7 @@ func tokenMint(cmd *cobra.Command, args []string) {
params := &tokenty.TokenMint{
Symbol: symbol,
Amount: int64((amount + 0.000001) * 1e4) * 1e4,
Amount: int64((amount+0.000001)*1e4) * 1e4,
}
ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenMintTx", params, nil)
......@@ -522,7 +522,7 @@ func getTokenLogs(cmd *cobra.Command, args []string) {
var params rpctypes.Query4Jrpc
params.Execer = getRealExecName(paraName, "token")
params.FuncName = "GetTokenHistory"
params.Payload = types.MustPBToJSON(&types.ReqString{Data:symbol})
params.Payload = types.MustPBToJSON(&types.ReqString{Data: symbol})
rpc, err := jsonclient.NewJSONClient(rpcLaddr)
if err != nil {
fmt.Fprintln(os.Stderr, err)
......@@ -547,4 +547,3 @@ func getTokenLogsFlags(cmd *cobra.Command) {
cmd.Flags().StringP("symbol", "s", "", "token symbol")
cmd.MarkFlagRequired("symbol")
}
......@@ -5,11 +5,12 @@
package executor
import (
"encoding/hex"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/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) {
......
......@@ -14,7 +14,6 @@ import (
pty "github.com/33cn/plugin/plugin/dapp/token/types"
)
var opt_logs_table = &table.Option{
Prefix: "LODB-token",
Name: "logs",
......
......@@ -75,7 +75,7 @@ func (t *token) Query_GetTokenHistory(in *types.ReqString) (types.Message, error
if in == nil {
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 {
tokenlog.Error("Query_GetTokenHistory", "err", err)
return nil, err
......
......@@ -357,7 +357,7 @@ func TestQueryTokenLogs(t *testing.T) {
req.Driver = execName
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)
if err != nil {
......
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