From c57b8fd29fe06859529fe7722f62556f5cb77e4f Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Tue, 11 Oct 2022 14:01:42 +0530 Subject: [PATCH] fix auction keeper and flags --- go.mod | 4 ++-- go.sum | 8 ++++---- server/flags/flags.go | 3 +++ x/auction/keeper/grpc_query_test.go | 2 +- x/bond/client/cli/tx.go | 8 ++++++++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 5f5e5adc..c061e0d1 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 golang.org/x/net v0.0.0-20220909164309-bea034e7d591 golang.org/x/text v0.3.7 - google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91 + google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v3 v3.0.1 @@ -191,7 +191,7 @@ require ( github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect + golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect diff --git a/go.sum b/go.sum index 89f0c3e2..cee4a7db 100644 --- a/go.sum +++ b/go.sum @@ -1174,8 +1174,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b h1:huxqepDufQpLLIRXiVkTvnxrzJlpwmIWAObmcCcUFr0= -golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 h1:x8vtB3zMecnlqZIwJNUUpwYKYSqCz5jXbiyv0ZJJZeI= +golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1667,8 +1667,8 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91 h1:Ezh2cpcnP5Rq60sLensUsFnxh7P6513NLvNtCm9iyJ4= -google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e h1:halCgTFuLWDRD61piiNSxPsARANGD3Xl16hPrLgLiIg= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/server/flags/flags.go b/server/flags/flags.go index aea74bc7..ce7f9796 100644 --- a/server/flags/flags.go +++ b/server/flags/flags.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/spf13/cobra" "github.com/spf13/viper" + tmcli "github.com/tendermint/tendermint/libs/cli" ) // Tendermint/cosmos-sdk full-node start flags @@ -73,6 +74,8 @@ func AddTxFlags(cmd *cobra.Command) (*cobra.Command, error) { cmd.PersistentFlags().Float64(flags.FlagGasAdjustment, flags.DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ") //nolint:lll cmd.PersistentFlags().StringP(flags.FlagBroadcastMode, "b", flags.BroadcastSync, "Transaction broadcasting mode (sync|async|block)") cmd.PersistentFlags().String(flags.FlagKeyringBackend, keyring.BackendOS, "Select keyring's backend") + cmd.PersistentFlags().BoolP(flags.FlagSkipConfirmation, "y", false, "Skip tx broadcasting prompt confirmation") + cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)") // --gas can accept integers and "simulate" // cmd.PersistentFlags().Var(&flags.GasFlagVar, "gas", fmt.Sprintf( diff --git a/x/auction/keeper/grpc_query_test.go b/x/auction/keeper/grpc_query_test.go index 7bb6d640..9a10e5d5 100644 --- a/x/auction/keeper/grpc_query_test.go +++ b/x/auction/keeper/grpc_query_test.go @@ -335,7 +335,7 @@ func (suite *KeeperTestSuite) createAuctionAndCommitBid(commitBid bool) (*types. } r := rand.New(rand.NewSource(seed)) - accounts := app.RandomAccounts(r, 1) + accounts := app.RandomAccounts(r, accCount) for _, account := range accounts { err := testutil.FundAccount(suite.app.BankKeeper, ctx, account.Address, sdk.NewCoins( sdk.Coin{Amount: sdk.NewInt(100), Denom: sdk.DefaultBondDenom}, diff --git a/x/bond/client/cli/tx.go b/x/bond/client/cli/tx.go index 033f4903..09c55425 100644 --- a/x/bond/client/cli/tx.go +++ b/x/bond/client/cli/tx.go @@ -2,6 +2,7 @@ package cli import ( "github.com/cerc-io/laconicd/server/flags" + "github.com/cerc-io/laconicd/x/bond/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -51,6 +52,7 @@ func NewCreateBondCmd() *cobra.Command { } flags.AddTxFlags(cmd) + // flags.AddTxFlagsToCmd(cmd) return cmd } @@ -76,6 +78,8 @@ func RefillBondCmd() *cobra.Command { }, } flags.AddTxFlags(cmd) + // flags.AddTxFlagsToCmd(cmd) + return cmd } @@ -101,6 +105,8 @@ func WithdrawBondCmd() *cobra.Command { }, } flags.AddTxFlags(cmd) + // flags.AddTxFlagsToCmd(cmd) + return cmd } @@ -121,5 +127,7 @@ func CancelBondCmd() *cobra.Command { }, } flags.AddTxFlags(cmd) + // flags.AddTxFlagsToCmd(cmd) + return cmd }