From 168aeb4547b95a8acb6124eb557a267143f2d0eb Mon Sep 17 00:00:00 2001 From: Gjermund Bjaanes Date: Mon, 30 May 2022 10:54:36 +0200 Subject: [PATCH 01/42] add node command with bank query and send Bounty address: cosmos1zra3wz596n0qc898myceka3q23x9rk8fuw65c7 --- ignite/cmd/account.go | 12 + ignite/cmd/account_create.go | 10 +- ignite/cmd/account_delete.go | 10 +- ignite/cmd/account_export.go | 10 +- ignite/cmd/account_import.go | 10 +- ignite/cmd/account_list.go | 9 +- ignite/cmd/account_show.go | 10 +- ignite/cmd/cmd.go | 1 + ignite/cmd/network.go | 1 + ignite/cmd/network_campaign_publish.go | 1 + ignite/cmd/network_campaign_update.go | 1 + ignite/cmd/network_chain_init.go | 1 + ignite/cmd/network_chain_join.go | 1 + ignite/cmd/network_chain_launch.go | 1 + ignite/cmd/network_chain_prepare.go | 1 + ignite/cmd/network_chain_publish.go | 1 + ignite/cmd/network_chain_revert_launch.go | 1 + ignite/cmd/network_request_approve.go | 1 + ignite/cmd/network_request_reject.go | 1 + ignite/cmd/network_request_verify.go | 1 + ignite/cmd/network_reward_set.go | 1 + ignite/cmd/node.go | 32 ++ ignite/cmd/node_query.go | 69 ++++ ignite/cmd/node_query_bank.go | 14 + ignite/cmd/node_query_bank_balances.go | 74 ++++ ignite/cmd/node_tx.go | 61 +++ ignite/cmd/node_tx_bank.go | 14 + ignite/cmd/node_tx_bank_send.go | 109 +++++ ignite/cmd/relayer_configure.go | 2 + ignite/cmd/relayer_connect.go | 2 + ignite/pkg/cosmosaccount/cosmosaccount.go | 12 +- .../pkg/cosmosaccount/cosmosaccount_test.go | 50 +++ ignite/pkg/cosmosclient/bank.go | 50 +++ ignite/pkg/cosmosclient/consensus.go | 66 +++ ignite/pkg/cosmosclient/cosmosclient.go | 204 ++++++---- ignite/services/network/mocks/chain.go | 16 +- .../services/network/mocks/cosmos_client.go | 33 +- ignite/services/network/network.go | 2 +- integration/account/cmd_account_test.go | 94 +++++ integration/env.go | 109 +++-- integration/node/cmd_query_bank_test.go | 229 +++++++++++ integration/node/cmd_tx_bank_send_test.go | 377 ++++++++++++++++++ 42 files changed, 1545 insertions(+), 159 deletions(-) create mode 100644 ignite/cmd/node.go create mode 100644 ignite/cmd/node_query.go create mode 100644 ignite/cmd/node_query_bank.go create mode 100644 ignite/cmd/node_query_bank_balances.go create mode 100644 ignite/cmd/node_tx.go create mode 100644 ignite/cmd/node_tx_bank.go create mode 100644 ignite/cmd/node_tx_bank_send.go create mode 100644 ignite/pkg/cosmosaccount/cosmosaccount_test.go create mode 100644 ignite/pkg/cosmosclient/bank.go create mode 100644 ignite/pkg/cosmosclient/consensus.go create mode 100644 integration/account/cmd_account_test.go create mode 100644 integration/node/cmd_query_bank_test.go create mode 100644 integration/node/cmd_tx_bank_send_test.go diff --git a/ignite/cmd/account.go b/ignite/cmd/account.go index 57801c0f57..f7fceba128 100644 --- a/ignite/cmd/account.go +++ b/ignite/cmd/account.go @@ -16,6 +16,7 @@ const ( flagPassphrase = "passphrase" flagNonInteractive = "non-interactive" flagKeyringBackend = "keyring-backend" + flagKeyringDir = "keyring-dir" flagFrom = "from" ) @@ -58,6 +59,17 @@ func getKeyringBackend(cmd *cobra.Command) cosmosaccount.KeyringBackend { return cosmosaccount.KeyringBackend(backend) } +func flagSetKeyringDir() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.String(flagKeyringDir, cosmosaccount.KeyringHome, "The accounts keyring directory") + return fs +} + +func getKeyringDir(cmd *cobra.Command) string { + keyringDir, _ := cmd.Flags().GetString(flagKeyringDir) + return keyringDir +} + func flagSetAccountPrefixes() *flag.FlagSet { fs := flag.NewFlagSet("", flag.ContinueOnError) fs.String(flagAddressPrefix, cosmosaccount.AccountPrefixCosmos, "Account address prefix") diff --git a/ignite/cmd/account_create.go b/ignite/cmd/account_create.go index 176e537dc2..584533dcc1 100644 --- a/ignite/cmd/account_create.go +++ b/ignite/cmd/account_create.go @@ -17,15 +17,21 @@ func NewAccountCreate() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } func accountCreateHandler(cmd *cobra.Command, args []string) error { - name := args[0] + var ( + name = args[0] + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + ) ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_delete.go b/ignite/cmd/account_delete.go index f7f7ddb4e6..cb48db77d3 100644 --- a/ignite/cmd/account_delete.go +++ b/ignite/cmd/account_delete.go @@ -17,15 +17,21 @@ func NewAccountDelete() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } func accountDeleteHandler(cmd *cobra.Command, args []string) error { - name := args[0] + var ( + name = args[0] + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + ) ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_export.go b/ignite/cmd/account_export.go index 2484af4b01..2f5558a3da 100644 --- a/ignite/cmd/account_export.go +++ b/ignite/cmd/account_export.go @@ -19,6 +19,7 @@ func NewAccountExport() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetAccountImportExport()) c.Flags().String(flagPath, "", "path to export private key. default: ./key_[name]") @@ -27,8 +28,10 @@ func NewAccountExport() *cobra.Command { func accountExportHandler(cmd *cobra.Command, args []string) error { var ( - name = args[0] - path = flagGetPath(cmd) + name = args[0] + path = flagGetPath(cmd) + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) ) passphrase, err := getPassphrase(cmd) @@ -37,7 +40,8 @@ func accountExportHandler(cmd *cobra.Command, args []string) error { } ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_import.go b/ignite/cmd/account_import.go index 78e67e3e06..8ff74d2932 100644 --- a/ignite/cmd/account_import.go +++ b/ignite/cmd/account_import.go @@ -24,6 +24,7 @@ func NewAccountImport() *cobra.Command { c.Flags().String(flagSecret, "", "Your mnemonic or path to your private key (use interactive mode instead to securely pass your mnemonic)") c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetAccountImportExport()) return c @@ -31,8 +32,10 @@ func NewAccountImport() *cobra.Command { func accountImportHandler(cmd *cobra.Command, args []string) error { var ( - name = args[0] - secret, _ = cmd.Flags().GetString(flagSecret) + name = args[0] + secret, _ = cmd.Flags().GetString(flagSecret) + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) ) if secret == "" { @@ -59,7 +62,8 @@ func accountImportHandler(cmd *cobra.Command, args []string) error { } ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_list.go b/ignite/cmd/account_list.go index b236c8575a..bd821ad912 100644 --- a/ignite/cmd/account_list.go +++ b/ignite/cmd/account_list.go @@ -14,14 +14,21 @@ func NewAccountList() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetAccountPrefixes()) return c } func accountListHandler(cmd *cobra.Command, args []string) error { + var ( + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + ) + ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_show.go b/ignite/cmd/account_show.go index 7d340a41b1..ea0d2aa464 100644 --- a/ignite/cmd/account_show.go +++ b/ignite/cmd/account_show.go @@ -15,16 +15,22 @@ func NewAccountShow() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetAccountPrefixes()) return c } func accountShowHandler(cmd *cobra.Command, args []string) error { - name := args[0] + var ( + name = args[0] + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + ) ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringBackend(keyringBackend), + cosmosaccount.WithKeyringDir(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/cmd.go b/ignite/cmd/cmd.go index f5d03ca539..86ed4ace3f 100644 --- a/ignite/cmd/cmd.go +++ b/ignite/cmd/cmd.go @@ -68,6 +68,7 @@ ignite scaffold chain github.com/username/mars`, c.AddCommand(NewChain()) c.AddCommand(NewGenerate()) c.AddCommand(NewNetwork()) + c.AddCommand(NewNode()) c.AddCommand(NewAccount()) c.AddCommand(NewRelayer()) c.AddCommand(NewTools()) diff --git a/ignite/cmd/network.go b/ignite/cmd/network.go index 43a732cfe8..1664d19ec9 100644 --- a/ignite/cmd/network.go +++ b/ignite/cmd/network.go @@ -156,6 +156,7 @@ func getNetworkCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { cosmosclient.WithAddressPrefix(networktypes.SPN), cosmosclient.WithUseFaucet(spnFaucetAddress, networktypes.SPNDenom, 5), cosmosclient.WithKeyringServiceName(cosmosaccount.KeyringServiceName), + cosmosclient.WithKeyringDir(getKeyringDir(cmd)), } keyringBackend := getKeyringBackend(cmd) diff --git a/ignite/cmd/network_campaign_publish.go b/ignite/cmd/network_campaign_publish.go index 594ca2d191..1faa789ca9 100644 --- a/ignite/cmd/network_campaign_publish.go +++ b/ignite/cmd/network_campaign_publish.go @@ -23,6 +23,7 @@ func NewNetworkCampaignPublish() *cobra.Command { c.Flags().String(flagMetadata, "", "Add a metada to the chain") c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetHome()) return c } diff --git a/ignite/cmd/network_campaign_update.go b/ignite/cmd/network_campaign_update.go index 7734bc03df..6bd1916cba 100644 --- a/ignite/cmd/network_campaign_update.go +++ b/ignite/cmd/network_campaign_update.go @@ -30,6 +30,7 @@ func NewNetworkCampaignUpdate() *cobra.Command { c.Flags().String(flagCampaignTotalSupply, "", "Update the total of the mainnet of a campaign") c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_chain_init.go b/ignite/cmd/network_chain_init.go index f4237ef5d3..64c27c8c5e 100644 --- a/ignite/cmd/network_chain_init.go +++ b/ignite/cmd/network_chain_init.go @@ -47,6 +47,7 @@ func NewNetworkChainInit() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetYes()) return c } diff --git a/ignite/cmd/network_chain_join.go b/ignite/cmd/network_chain_join.go index 3369560f60..981be1b3c4 100644 --- a/ignite/cmd/network_chain_join.go +++ b/ignite/cmd/network_chain_join.go @@ -39,6 +39,7 @@ func NewNetworkChainJoin() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetYes()) return c diff --git a/ignite/cmd/network_chain_launch.go b/ignite/cmd/network_chain_launch.go index 566c058f42..7406bd36b6 100644 --- a/ignite/cmd/network_chain_launch.go +++ b/ignite/cmd/network_chain_launch.go @@ -24,6 +24,7 @@ func NewNetworkChainLaunch() *cobra.Command { c.Flags().Duration(flagRemainingTime, 0, "Duration of time in seconds before the chain is effectively launched") c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_chain_prepare.go b/ignite/cmd/network_chain_prepare.go index 4467c8de0f..8d37c243ab 100644 --- a/ignite/cmd/network_chain_prepare.go +++ b/ignite/cmd/network_chain_prepare.go @@ -33,6 +33,7 @@ func NewNetworkChainPrepare() *cobra.Command { c.Flags().BoolP(flagForce, "f", false, "Force the prepare command to run even if the chain is not launched") c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetHome()) return c diff --git a/ignite/cmd/network_chain_publish.go b/ignite/cmd/network_chain_publish.go index a9d499eb00..f468ce3dfb 100644 --- a/ignite/cmd/network_chain_publish.go +++ b/ignite/cmd/network_chain_publish.go @@ -56,6 +56,7 @@ func NewNetworkChainPublish() *cobra.Command { c.Flags().String(flagAmount, "", "Amount of coins for account request") c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetYes()) diff --git a/ignite/cmd/network_chain_revert_launch.go b/ignite/cmd/network_chain_revert_launch.go index cf83be77d7..d5732e1f1c 100644 --- a/ignite/cmd/network_chain_revert_launch.go +++ b/ignite/cmd/network_chain_revert_launch.go @@ -20,6 +20,7 @@ func NewNetworkChainRevertLaunch() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_request_approve.go b/ignite/cmd/network_request_approve.go index 12baae54d9..1592c5773c 100644 --- a/ignite/cmd/network_request_approve.go +++ b/ignite/cmd/network_request_approve.go @@ -30,6 +30,7 @@ func NewNetworkRequestApprove() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_request_reject.go b/ignite/cmd/network_request_reject.go index 1a470539d5..34c7baaa57 100644 --- a/ignite/cmd/network_request_reject.go +++ b/ignite/cmd/network_request_reject.go @@ -22,6 +22,7 @@ func NewNetworkRequestReject() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_request_verify.go b/ignite/cmd/network_request_verify.go index 0e22746541..fa0ca7b1ec 100644 --- a/ignite/cmd/network_request_verify.go +++ b/ignite/cmd/network_request_verify.go @@ -28,6 +28,7 @@ func NewNetworkRequestVerify() *cobra.Command { c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } diff --git a/ignite/cmd/network_reward_set.go b/ignite/cmd/network_reward_set.go index c2bfb21122..c64ba13e4e 100644 --- a/ignite/cmd/network_reward_set.go +++ b/ignite/cmd/network_reward_set.go @@ -21,6 +21,7 @@ func NewNetworkRewardSet() *cobra.Command { RunE: networkChainRewardSetHandler, } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagNetworkFrom()) c.Flags().AddFlagSet(flagSetHome()) return c diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go new file mode 100644 index 0000000000..0ef5b3ee6b --- /dev/null +++ b/ignite/cmd/node.go @@ -0,0 +1,32 @@ +package ignitecmd + +import ( + "github.com/spf13/cobra" +) + +var rpcAddress string + +const ( + flagRPC = "rpc" + rpcAddressLocal = "tcp://localhost:26657" +) + +func NewNode() *cobra.Command { + c := &cobra.Command{ + Use: "node [command]", + Short: "Make calls to a live blockchain node", + Args: cobra.ExactArgs(1), + } + + c.PersistentFlags().StringVar(&rpcAddress, flagRPC, rpcAddressLocal, ": to tendermint rpc interface for this chain") + + c.AddCommand(NewNodeQuery()) + c.AddCommand(NewNodeTx()) + + return c +} + +func getRPC(cmd *cobra.Command) (rpc string) { + rpc, _ = cmd.Flags().GetString(flagRPC) + return +} diff --git a/ignite/cmd/node_query.go b/ignite/cmd/node_query.go new file mode 100644 index 0000000000..4a2afc827b --- /dev/null +++ b/ignite/cmd/node_query.go @@ -0,0 +1,69 @@ +package ignitecmd + +import ( + "errors" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" +) + +const ( + flagPage = "page" + flagLimit = "limit" + flagPageKey = "page-key" + flagOffset = "offset" + flagCountTotal = "count-total" + flagReverse = "reverse" +) + +func NewNodeQuery() *cobra.Command { + c := &cobra.Command{ + Use: "query", + Short: "Querying subcommands", + Aliases: []string{"q"}, + } + + c.AddCommand(NewNodeQueryBank()) + + return c +} + +func flagSetPagination(query string) *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + + fs.Uint64(flagPage, 1, fmt.Sprintf("pagination page of %s to query for. This sets offset to a multiple of limit", query)) + fs.String(flagPageKey, "", fmt.Sprintf("pagination page-key of %s to query for", query)) + fs.Uint64(flagOffset, 0, fmt.Sprintf("pagination offset of %s to query for", query)) + fs.Uint64(flagLimit, 100, fmt.Sprintf("pagination limit of %s to query for", query)) + fs.Bool(flagCountTotal, false, fmt.Sprintf("count total number of records in %s to query for", query)) + fs.Bool(flagReverse, false, "results are sorted in descending order") + + return fs +} + +func getPagination(cmd *cobra.Command) (*query.PageRequest, error) { + pageKey, _ := cmd.Flags().GetString(flagPageKey) + offset, _ := cmd.Flags().GetUint64(flagOffset) + limit, _ := cmd.Flags().GetUint64(flagLimit) + countTotal, _ := cmd.Flags().GetBool(flagCountTotal) + page, _ := cmd.Flags().GetUint64(flagPage) + reverse, _ := cmd.Flags().GetBool(flagReverse) + + if page > 1 && offset > 0 { + return nil, errors.New("page and offset cannot be used together") + } + + if page > 1 { + offset = (page - 1) * limit + } + + return &query.PageRequest{ + Key: []byte(pageKey), + Offset: offset, + Limit: limit, + CountTotal: countTotal, + Reverse: reverse, + }, nil +} diff --git a/ignite/cmd/node_query_bank.go b/ignite/cmd/node_query_bank.go new file mode 100644 index 0000000000..9ebf9cc287 --- /dev/null +++ b/ignite/cmd/node_query_bank.go @@ -0,0 +1,14 @@ +package ignitecmd + +import "github.com/spf13/cobra" + +func NewNodeQueryBank() *cobra.Command { + c := &cobra.Command{ + Use: "bank", + Short: "Querying commands for the bank module", + } + + c.AddCommand(NewNodeQueryBankBalances()) + + return c +} diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go new file mode 100644 index 0000000000..4ca31bf3fd --- /dev/null +++ b/ignite/cmd/node_query_bank_balances.go @@ -0,0 +1,74 @@ +package ignitecmd + +import ( + "fmt" + + "github.com/ignite-hq/cli/ignite/pkg/cliui" + "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" + "github.com/spf13/cobra" +) + +func NewNodeQueryBankBalances() *cobra.Command { + c := &cobra.Command{ + Use: "balances [address]", + Short: "Query for account balances by address", + RunE: nodeQueryBankBalancesHandler, + Args: cobra.ExactArgs(1), + } + + c.Flags().AddFlagSet(flagSetHome()) + c.Flags().AddFlagSet(flagSetAccountPrefixes()) + c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) + c.Flags().AddFlagSet(flagSetPagination("all balances")) + + return c +} + +func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { + var ( + inputAccount = args[0] + prefix = getAddressPrefix(cmd) + node = getRPC(cmd) + home = getHome(cmd) + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + ) + session := cliui.New() + defer session.Cleanup() + + client, err := cosmosclient.New( + cmd.Context(), + cosmosclient.WithAddressPrefix(prefix), + cosmosclient.WithHome(home), + cosmosclient.WithKeyringBackend(keyringBackend), + cosmosclient.WithKeyringDir(keyringDir), + cosmosclient.WithNodeAddress(node), + ) + if err != nil { + return err + } + + address, err := client.Bech32Address(inputAccount) + if err != nil { + return err + } + + pagination, err := getPagination(cmd) + if err != nil { + return err + } + + session.StartSpinner("Querying...") + balances, err := client.BankBalances(address, pagination) + if err != nil { + return err + } + + var rows [][]string + for _, b := range balances { + rows = append(rows, []string{fmt.Sprintf("%s", b.Amount), b.Denom}) + } + + return session.PrintTable([]string{"Amount", "Denom"}, rows...) +} diff --git a/ignite/cmd/node_tx.go b/ignite/cmd/node_tx.go new file mode 100644 index 0000000000..93f048567c --- /dev/null +++ b/ignite/cmd/node_tx.go @@ -0,0 +1,61 @@ +package ignitecmd + +import ( + "fmt" + + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" +) + +const ( + flagGenerateOnly = "generate-only" + + gasFlagAuto = "auto" + flagGasPrices = "gas-prices" + flagGas = "gas" +) + +func NewNodeTx() *cobra.Command { + c := &cobra.Command{ + Use: "tx", + Short: "Transactions subcommands", + } + + c.AddCommand(NewNodeTxBank()) + + return c +} + +func flagSetTxFrom() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.String(flagFrom, "", "Account name to use for sending transactions") + return fs +} + +func flagSetGenerateOnly() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.Bool(flagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT") + return fs +} + +func getGenerateOnly(cmd *cobra.Command) bool { + generateOnly, _ := cmd.Flags().GetBool(flagGenerateOnly) + return generateOnly +} + +func flagSetGasFlags() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.String(flagGasPrices, "", "Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)") + fs.String(flagGas, gasFlagAuto, fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically", gasFlagAuto)) + return fs +} + +func getGasPrices(cmd *cobra.Command) string { + gasPrices, _ := cmd.Flags().GetString(flagGasPrices) + return gasPrices +} + +func getGas(cmd *cobra.Command) string { + gas, _ := cmd.Flags().GetString(flagGas) + return gas +} diff --git a/ignite/cmd/node_tx_bank.go b/ignite/cmd/node_tx_bank.go new file mode 100644 index 0000000000..9c541a5b36 --- /dev/null +++ b/ignite/cmd/node_tx_bank.go @@ -0,0 +1,14 @@ +package ignitecmd + +import "github.com/spf13/cobra" + +func NewNodeTxBank() *cobra.Command { + c := &cobra.Command{ + Use: "bank", + Short: "Bank transaction subcommands", + } + + c.AddCommand(NewNodeTxBankSend()) + + return c +} diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go new file mode 100644 index 0000000000..108c879488 --- /dev/null +++ b/ignite/cmd/node_tx_bank_send.go @@ -0,0 +1,109 @@ +package ignitecmd + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ignite-hq/cli/ignite/pkg/cliui" + "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" + "github.com/spf13/cobra" +) + +func NewNodeTxBankSend() *cobra.Command { + c := &cobra.Command{ + Use: "send [from_account_or_address] [to_account_or_address] [amount]", + Short: "Send funds from one account to another.", + RunE: nodeTxBankSendHandler, + Args: cobra.ExactArgs(3), + } + + c.Flags().AddFlagSet(flagSetHome()) + c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetAccountPrefixes()) + c.Flags().AddFlagSet(flagSetKeyringDir()) + c.Flags().AddFlagSet(flagSetTxFrom()) + c.Flags().AddFlagSet(flagSetGenerateOnly()) + c.Flags().AddFlagSet(flagSetGasFlags()) + + return c +} + +func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { + var ( + fromAccountInput = args[0] + toAccountInput = args[1] + amount = args[2] + home = getHome(cmd) + prefix = getAddressPrefix(cmd) + from = getFrom(cmd) + node = getRPC(cmd) + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + generateOnly = getGenerateOnly(cmd) + gas = getGas(cmd) + gasPrices = getGasPrices(cmd) + ) + + session := cliui.New() + defer session.Cleanup() + + session.StartSpinner("Sending transaction...") + + client, err := cosmosclient.New(cmd.Context(), + cosmosclient.WithAddressPrefix(prefix), + cosmosclient.WithHome(home), + cosmosclient.WithKeyringBackend(keyringBackend), + cosmosclient.WithKeyringDir(keyringDir), + cosmosclient.WithNodeAddress(node), + cosmosclient.WithGas(gas), + cosmosclient.WithGasPrices(gasPrices), + ) + if err != nil { + return err + } + + // If from flag is missing, check if the "from account" argument is an account name and use that instead + if from == "" { + fromInputIsAccount, err := client.AccountExists(fromAccountInput) + if err != nil { + return err + } + if fromInputIsAccount { + from = fromAccountInput + } else { + return fmt.Errorf("\"--%s\" flag is required when from address is not an account name", flagFrom) + } + } + + fromAddress, err := client.Bech32Address(fromAccountInput) + if err != nil { + return err + } + + toAddress, err := client.Bech32Address(toAccountInput) + if err != nil { + return err + } + + coins, err := sdk.ParseCoinsNormalized(amount) + if err != nil { + return err + } + + if generateOnly { + tx, err := client.BankSendGenerateOnly(fromAddress, toAddress, coins, from) + if err != nil { + return err + } + + return session.Println(tx) + } + + if err := client.BankSend(fromAddress, toAddress, coins, from); err != nil { + return err + } + + session.Println("Transaction broadcast successful!") + return session.Printf("%s sent from %s to %s\n", amount, fromAccountInput, toAccountInput) + +} diff --git a/ignite/cmd/relayer_configure.go b/ignite/cmd/relayer_configure.go index 17b731e10f..4a963630c1 100644 --- a/ignite/cmd/relayer_configure.go +++ b/ignite/cmd/relayer_configure.go @@ -85,6 +85,7 @@ func NewRelayerConfigure() *cobra.Command { c.Flags().String(flagSourceClientID, "", "use a custom client id for source") c.Flags().String(flagTargetClientID, "", "use a custom client id for target") c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } @@ -99,6 +100,7 @@ func relayerConfigureHandler(cmd *cobra.Command, args []string) (err error) { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringDir(getKeyringDir(cmd)), ) if err != nil { return err diff --git a/ignite/cmd/relayer_connect.go b/ignite/cmd/relayer_connect.go index b3f0cbb121..f1e6b4dd80 100644 --- a/ignite/cmd/relayer_connect.go +++ b/ignite/cmd/relayer_connect.go @@ -23,6 +23,7 @@ func NewRelayerConnect() *cobra.Command { } c.Flags().AddFlagSet(flagSetKeyringBackend()) + c.Flags().AddFlagSet(flagSetKeyringDir()) return c } @@ -37,6 +38,7 @@ func relayerConnectHandler(cmd *cobra.Command, args []string) (err error) { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), + cosmosaccount.WithKeyringDir(getKeyringDir(cmd)), ) if err != nil { return err diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index ce0ecbf925..77dfe31bec 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -51,7 +51,7 @@ const ( // Registry for accounts. type Registry struct { - homePath string + keyringDir string keyringServiceName string keyringBackend KeyringBackend @@ -61,9 +61,9 @@ type Registry struct { // Option configures your registry. type Option func(*Registry) -func WithHome(path string) Option { +func WithKeyringDir(path string) Option { return func(c *Registry) { - c.homePath = path + c.keyringDir = path } } @@ -84,7 +84,7 @@ func New(options ...Option) (Registry, error) { r := Registry{ keyringServiceName: sdktypes.KeyringServiceName(), keyringBackend: KeyringTest, - homePath: KeyringHome, + keyringDir: KeyringHome, } for _, apply := range options { @@ -93,7 +93,7 @@ func New(options ...Option) (Registry, error) { var err error - r.Keyring, err = keyring.New(r.keyringServiceName, string(r.keyringBackend), r.homePath, os.Stdin) + r.Keyring, err = keyring.New(r.keyringServiceName, string(r.keyringBackend), r.keyringDir, os.Stdin) if err != nil { return Registry{}, err } @@ -105,7 +105,7 @@ func NewStandalone(options ...Option) (Registry, error) { return New( append([]Option{ WithKeyringServiceName(KeyringServiceName), - WithHome(KeyringHome), + WithKeyringDir(KeyringHome), }, options...)..., ) } diff --git a/ignite/pkg/cosmosaccount/cosmosaccount_test.go b/ignite/pkg/cosmosaccount/cosmosaccount_test.go new file mode 100644 index 0000000000..7ddd5f298f --- /dev/null +++ b/ignite/pkg/cosmosaccount/cosmosaccount_test.go @@ -0,0 +1,50 @@ +package cosmosaccount_test + +import ( + "github.com/stretchr/testify/require" + "testing" + + "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" +) + +const testAccountName = "myTestAccount" + +func TestRegistry(t *testing.T) { + tmpDir := t.TempDir() + registry, err := cosmosaccount.New(cosmosaccount.WithKeyringDir(tmpDir)) + require.NoError(t, err) + + account, mnemonic, err := registry.Create(testAccountName) + require.NoError(t, err) + require.Equal(t, testAccountName, account.Name) + require.False(t, account.Info.GetAddress().Empty()) + + getAccount, err := registry.GetByName(testAccountName) + require.NoError(t, err) + require.True(t, getAccount.Info.GetAddress().Equals(account.Info.GetAddress())) + + secondTmpDir := t.TempDir() + secondRegistry, err := cosmosaccount.New(cosmosaccount.WithKeyringDir(secondTmpDir)) + require.NoError(t, err) + + importedAccount, err := secondRegistry.Import(testAccountName, mnemonic, "") + require.NoError(t, err) + require.Equal(t, testAccountName, importedAccount.Name) + require.True(t, importedAccount.Info.GetAddress().Equals(account.Info.GetAddress())) + + _, _, err = registry.Create("another one") + require.NoError(t, err) + list, err := registry.List() + require.NoError(t, err) + require.Equal(t, 2, len(list)) + + err = registry.DeleteByName(testAccountName) + require.NoError(t, err) + afterDeleteList, err := registry.List() + require.NoError(t, err) + require.Equal(t, 1, len(afterDeleteList)) + + _, err = registry.GetByName(testAccountName) + var expectedErr *cosmosaccount.AccountDoesNotExistError + require.ErrorAs(t, err, &expectedErr) +} diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go new file mode 100644 index 0000000000..14d5b98452 --- /dev/null +++ b/ignite/pkg/cosmosclient/bank.go @@ -0,0 +1,50 @@ +package cosmosclient + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +func (c Client) BankBalances(address string, pagination *query.PageRequest) (sdk.Coins, error) { + req := &banktypes.QueryAllBalancesRequest{ + Address: address, + Pagination: pagination, + } + + resp, err := performQuery[*banktypes.QueryAllBalancesResponse](c, func() (*banktypes.QueryAllBalancesResponse, error) { + return banktypes.NewQueryClient(c.context).AllBalances(context.Background(), req) + }) + if err != nil { + return nil, err + } + + return resp.Balances, nil +} + +func (c Client) BankSend(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) error { + msg := &banktypes.MsgSend{ + FromAddress: fromAddress, + ToAddress: toAddress, + Amount: amount, + } + + _, err := c.BroadcastTx(fromAccountName, msg) + if err != nil { + return err + } + + return nil +} + +func (c Client) BankSendGenerateOnly(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) (string, error) { + msg := &banktypes.MsgSend{ + FromAddress: fromAddress, + ToAddress: toAddress, + Amount: amount, + } + + return c.GenerateTx(fromAccountName, msg) +} diff --git a/ignite/pkg/cosmosclient/consensus.go b/ignite/pkg/cosmosclient/consensus.go new file mode 100644 index 0000000000..337a5f5057 --- /dev/null +++ b/ignite/pkg/cosmosclient/consensus.go @@ -0,0 +1,66 @@ +package cosmosclient + +import ( + "context" + "encoding/base64" + "time" + + commitmenttypes "github.com/cosmos/ibc-go/v2/modules/core/23-commitment/types" + "github.com/tendermint/tendermint/libs/bytes" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" +) + +// ConsensusInfo is the validator consensus info +type ConsensusInfo struct { + Timestamp string `json:"Timestamp"` + Root string `json:"Root"` + NextValidatorsHash string `json:"NextValidatorsHash"` + ValidatorSet *tmproto.ValidatorSet `json:"ValidatorSet"` +} + +// ConsensusInfo returns the appropriate tendermint consensus state by given height +// and the validator set for the next height +func (c Client) ConsensusInfo(ctx context.Context, height int64) (ConsensusInfo, error) { + node, err := c.Context().GetNode() + if err != nil { + return ConsensusInfo{}, err + } + + commit, err := node.Commit(ctx, &height) + if err != nil { + return ConsensusInfo{}, err + } + + var ( + page = 1 + count = 10_000 + ) + validators, err := node.Validators(ctx, &height, &page, &count) + if err != nil { + return ConsensusInfo{}, err + } + + protoValset, err := tmtypes.NewValidatorSet(validators.Validators).ToProto() + if err != nil { + return ConsensusInfo{}, err + } + + heightNext := height + 1 + validatorsNext, err := node.Validators(ctx, &heightNext, &page, &count) + if err != nil { + return ConsensusInfo{}, err + } + + var ( + hash = tmtypes.NewValidatorSet(validatorsNext.Validators).Hash() + root = commitmenttypes.NewMerkleRoot(commit.AppHash) + ) + + return ConsensusInfo{ + Timestamp: commit.Time.Format(time.RFC3339Nano), + NextValidatorsHash: bytes.HexBytes(hash).String(), + Root: base64.StdEncoding.EncodeToString(root.Hash), + ValidatorSet: protoValset, + }, nil +} diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 00d646745d..88f249eceb 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -3,12 +3,12 @@ package cosmosclient import ( "context" - "encoding/base64" "encoding/hex" "fmt" "io" "os" "path/filepath" + "strconv" "strings" "sync" "time" @@ -21,21 +21,18 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/bech32" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" "github.com/gogo/protobuf/proto" prototypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" - "github.com/tendermint/tendermint/libs/bytes" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" rpchttp "github.com/tendermint/tendermint/rpc/client/http" ctypes "github.com/tendermint/tendermint/rpc/core/types" - tmtypes "github.com/tendermint/tendermint/types" "github.com/ignite/cli/ignite/pkg/cosmosaccount" "github.com/ignite/cli/ignite/pkg/cosmosfaucet" @@ -87,6 +84,10 @@ type Client struct { homePath string keyringServiceName string keyringBackend cosmosaccount.KeyringBackend + keyringDir string + + gas string + gasPrices string } // Option configures your client. @@ -116,6 +117,13 @@ func WithKeyringBackend(backend cosmosaccount.KeyringBackend) Option { } } +// WithKeyringDir sets the directory of the keyring. By default, it uses cosmosaccount.KeyringHome +func WithKeyringDir(keyringDir string) Option { + return func(c *Client) { + c.keyringDir = keyringDir + } +} + // WithNodeAddress sets the node address of your chain. When this option is not provided // `http://localhost:26657` is used as default. func WithNodeAddress(addr string) Option { @@ -143,6 +151,18 @@ func WithUseFaucet(faucetAddress, denom string, minAmount uint64) Option { } } +func WithGas(gas string) Option { + return func(c *Client) { + c.gas = gas + } +} + +func WithGasPrices(gasPrices string) Option { + return func(c *Client) { + c.gasPrices = gasPrices + } +} + // New creates a new client with given options. func New(ctx context.Context, options ...Option) (Client, error) { c := Client{ @@ -153,6 +173,7 @@ func New(ctx context.Context, options ...Option) (Client, error) { faucetDenom: defaultFaucetDenom, faucetMinAmount: defaultFaucetMinAmount, out: io.Discard, + gas: strconv.Itoa(defaultGasLimit), } var err error @@ -180,10 +201,14 @@ func New(ctx context.Context, options ...Option) (Client, error) { c.homePath = filepath.Join(home, "."+c.chainID) } + if c.keyringDir == "" { + c.keyringDir = c.homePath + } + c.AccountRegistry, err = cosmosaccount.New( cosmosaccount.WithKeyringServiceName(c.keyringServiceName), cosmosaccount.WithKeyringBackend(c.keyringBackend), - cosmosaccount.WithHome(c.homePath), + cosmosaccount.WithKeyringDir(c.keyringDir), ) if err != nil { return Client{}, err @@ -208,6 +233,40 @@ func (c Client) Address(accountName string) (sdktypes.AccAddress, error) { return account.Info.GetAddress(), nil } +func (c Client) AccountExists(accountName string) (bool, error) { + _, err := c.Account(accountName) + var accErr *cosmosaccount.AccountDoesNotExistError + errNotFound := errors.As(err, &accErr) + if errNotFound { + return false, nil + } + + if err != nil { + return false, err + } + + return true, nil +} + +// Bech32Address returns the bech32 address, with the correct prefix, from account name or address. +func (c Client) Bech32Address(accountNameOrAddress string) (string, error) { + unlockFn := c.lockBech32Prefix() + defer unlockFn() + + _, _, err := bech32.DecodeAndConvert(accountNameOrAddress) + if err == nil { + // Already bech32 + return accountNameOrAddress, nil + } + + account, err := c.Account(accountNameOrAddress) + if err != nil { + return "", err + } + + return account.Address(c.addressPrefix), nil +} + func (c Client) Context() client.Context { return c.context } @@ -251,92 +310,65 @@ func (r Response) Decode(message proto.Message) error { }, message) } -// ConsensusInfo is the validator consensus info -type ConsensusInfo struct { - Timestamp string `json:"Timestamp"` - Root string `json:"Root"` - NextValidatorsHash string `json:"NextValidatorsHash"` - ValidatorSet *tmproto.ValidatorSet `json:"ValidatorSet"` +// Status returns the node status +func (c Client) Status(ctx context.Context) (*ctypes.ResultStatus, error) { + return c.RPC.Status(ctx) } -// ConsensusInfo returns the appropriate tendermint consensus state by given height -// and the validator set for the next height -func (c Client) ConsensusInfo(ctx context.Context, height int64) (ConsensusInfo, error) { - node, err := c.Context().GetNode() +// BroadcastTx creates and broadcasts a tx with given messages for account. +func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, error) { + _, broadcast, err := c.BroadcastTxWithProvision(accountName, msgs...) if err != nil { - return ConsensusInfo{}, err + return Response{}, err } + return broadcast() +} - commit, err := node.Commit(ctx, &height) +func (c Client) GenerateTx(accountName string, msgs ...sdktypes.Msg) (string, error) { + unsignedTx, _, err := c.BroadcastTxWithProvision(accountName, msgs...) if err != nil { - return ConsensusInfo{}, err + return "", err } - var ( - page = 1 - count = 10_000 - ) - validators, err := node.Validators(ctx, &height, &page, &count) + json, err := c.context.TxConfig.TxJSONEncoder()(unsignedTx.GetTx()) if err != nil { - return ConsensusInfo{}, err + return "", err } - protoValset, err := tmtypes.NewValidatorSet(validators.Validators).ToProto() - if err != nil { - return ConsensusInfo{}, err - } + return string(json), nil +} - heightNext := height + 1 - validatorsNext, err := node.Validators(ctx, &heightNext, &page, &count) - if err != nil { - return ConsensusInfo{}, err - } +// protects sdktypes.Config. +var mconf sync.Mutex - var ( - hash = tmtypes.NewValidatorSet(validatorsNext.Validators).Hash() - root = commitmenttypes.NewMerkleRoot(commit.AppHash) - ) +func (c Client) lockBech32Prefix() (unlockFn func()) { + mconf.Lock() + config := sdktypes.GetConfig() + config.SetBech32PrefixForAccount(c.addressPrefix, c.addressPrefix+"pub") - return ConsensusInfo{ - Timestamp: commit.Time.Format(time.RFC3339Nano), - NextValidatorsHash: bytes.HexBytes(hash).String(), - Root: base64.StdEncoding.EncodeToString(root.Hash), - ValidatorSet: protoValset, - }, nil + return mconf.Unlock } -// Status returns the node status -func (c Client) Status(ctx context.Context) (*ctypes.ResultStatus, error) { - return c.RPC.Status(ctx) -} +func performQuery[T any](c Client, q func() (T, error)) (T, error) { + unlockFn := c.lockBech32Prefix() + defer unlockFn() -// BroadcastTx creates and broadcasts a tx with given messages for account. -func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, error) { - _, broadcast, err := c.BroadcastTxWithProvision(accountName, msgs...) - if err != nil { - return Response{}, err - } - return broadcast() + return q() } -// protects sdktypes.Config. -var mconf sync.Mutex - func (c Client) BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Msg) ( - gas uint64, broadcast func() (Response, error), err error) { + unsignedTx client.TxBuilder, broadcast func() (Response, error), err error) { if err := c.prepareBroadcast(context.Background(), accountName, msgs); err != nil { - return 0, nil, err + return nil, nil, err } // TODO find a better way if possible. - mconf.Lock() - defer mconf.Unlock() - config := sdktypes.GetConfig() - config.SetBech32PrefixForAccount(c.addressPrefix, c.addressPrefix+"pub") + unlockFn := c.lockBech32Prefix() + defer unlockFn() accountAddress, err := c.Address(accountName) if err != nil { - return 0, nil, err + return nil, nil, err } ctx := c.context. @@ -345,26 +377,41 @@ func (c Client) BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Ms txf, err := prepareFactory(ctx, c.Factory) if err != nil { - return 0, nil, err + return nil, nil, err } - _, gas, err = tx.CalculateGas(ctx, txf, msgs...) - if err != nil { - return 0, nil, err + var gas uint64 + if c.gas != "" && c.gas != "auto" { + gas, err = strconv.ParseUint(c.gas, 10, 64) + if err != nil { + return nil, nil, err + } + } else { + _, gas, err = tx.CalculateGas(ctx, txf, msgs...) + if err != nil { + return nil, nil, err + } + // the simulated gas can vary from the actual gas needed for a real transaction + // we add an additional amount to endure sufficient gas is provided + gas += 10000 } - // the simulated gas can vary from the actual gas needed for a real transaction - // we add an additional amount to endure sufficient gas is provided - gas += 10000 + txf = txf.WithGas(gas) + if c.gasPrices != "" { + txf = txf.WithGasPrices(c.gasPrices) + } + + txUnsigned, err := tx.BuildUnsignedTx(txf, msgs...) + if err != nil { + return nil, nil, err + } + + txUnsigned.SetFeeGranter(ctx.GetFeeGranterAddress()) + // Return the provision function - return gas, func() (Response, error) { - txUnsigned, err := tx.BuildUnsignedTx(txf, msgs...) - if err != nil { - return Response{}, err - } + return txUnsigned, func() (Response, error) { - txUnsigned.SetFeeGranter(ctx.GetFeeGranterAddress()) if err := tx.Sign(txf, accountName, txUnsigned, true); err != nil { return Response{}, err } @@ -517,6 +564,7 @@ func newContext( sdktypes.RegisterInterfaces(interfaceRegistry) staking.RegisterInterfaces(interfaceRegistry) cryptocodec.RegisterInterfaces(interfaceRegistry) + banktypes.RegisterInterfaces(interfaceRegistry) return client.Context{}. WithChainID(chainID). diff --git a/ignite/services/network/mocks/chain.go b/ignite/services/network/mocks/chain.go index 9ff3b873ee..4d407a9e26 100644 --- a/ignite/services/network/mocks/chain.go +++ b/ignite/services/network/mocks/chain.go @@ -1,12 +1,11 @@ -// Code generated by mockery v2.12.2. DO NOT EDIT. +// Code generated by mockery v2.12.3. DO NOT EDIT. package mocks import ( - "context" - "testing" + context "context" - "github.com/stretchr/testify/mock" + mock "github.com/stretchr/testify/mock" ) // Chain is an autogenerated mock type for the Chain type @@ -252,8 +251,13 @@ func (_m *Chain) SourceURL() string { return r0 } -// NewChain creates a new instance of Chain. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations. -func NewChain(t testing.TB) *Chain { +type NewChainT interface { + mock.TestingT + Cleanup(func()) +} + +// NewChain creates a new instance of Chain. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChain(t NewChainT) *Chain { mock := &Chain{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index e203637f5e..30ff57f1bb 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -1,18 +1,20 @@ -// Code generated by mockery v2.12.2. DO NOT EDIT. +// Code generated by mockery v2.12.3. DO NOT EDIT. package mocks import ( - "context" - "testing" + context "context" + + client "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/mock" coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/ignite/cli/ignite/pkg/cosmosaccount" "github.com/ignite/cli/ignite/pkg/cosmosclient" + + mock "github.com/stretchr/testify/mock" + + types "github.com/cosmos/cosmos-sdk/types" ) // CosmosClient is an autogenerated mock type for the CosmosClient type @@ -93,7 +95,7 @@ func (_m *CosmosClient) BroadcastTx(accountName string, msgs ...types.Msg) (cosm } // BroadcastTxWithProvision provides a mock function with given fields: accountName, msgs -func (_m *CosmosClient) BroadcastTxWithProvision(accountName string, msgs ...types.Msg) (uint64, func() (cosmosclient.Response, error), error) { +func (_m *CosmosClient) BroadcastTxWithProvision(accountName string, msgs ...types.Msg) (client.TxBuilder, func() (cosmosclient.Response, error), error) { _va := make([]interface{}, len(msgs)) for _i := range msgs { _va[_i] = msgs[_i] @@ -103,11 +105,13 @@ func (_m *CosmosClient) BroadcastTxWithProvision(accountName string, msgs ...typ _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 uint64 - if rf, ok := ret.Get(0).(func(string, ...types.Msg) uint64); ok { + var r0 client.TxBuilder + if rf, ok := ret.Get(0).(func(string, ...types.Msg) client.TxBuilder); ok { r0 = rf(accountName, msgs...) } else { - r0 = ret.Get(0).(uint64) + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.TxBuilder) + } } var r1 func() (cosmosclient.Response, error) @@ -187,8 +191,13 @@ func (_m *CosmosClient) Status(ctx context.Context) (*coretypes.ResultStatus, er return r0, r1 } -// NewCosmosClient creates a new instance of CosmosClient. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations. -func NewCosmosClient(t testing.TB) *CosmosClient { +type NewCosmosClientT interface { + mock.TestingT + Cleanup(func()) +} + +// NewCosmosClient creates a new instance of CosmosClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCosmosClient(t NewCosmosClientT) *CosmosClient { mock := &CosmosClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/network.go b/ignite/services/network/network.go index cdb8f5e5e0..01c0752cd1 100644 --- a/ignite/services/network/network.go +++ b/ignite/services/network/network.go @@ -28,7 +28,7 @@ type CosmosClient interface { Address(accountName string) (sdktypes.AccAddress, error) Context() client.Context BroadcastTx(accountName string, msgs ...sdktypes.Msg) (cosmosclient.Response, error) - BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Msg) (gas uint64, broadcast func() (cosmosclient.Response, error), err error) + BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Msg) (unsignedTx client.TxBuilder, broadcast func() (cosmosclient.Response, error), err error) Status(ctx context.Context) (*ctypes.ResultStatus, error) ConsensusInfo(ctx context.Context, height int64) (cosmosclient.ConsensusInfo, error) } diff --git a/integration/account/cmd_account_test.go b/integration/account/cmd_account_test.go new file mode 100644 index 0000000000..9a03a88223 --- /dev/null +++ b/integration/account/cmd_account_test.go @@ -0,0 +1,94 @@ +package account_test + +import ( + "bytes" + "strings" + "testing" + + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite-hq/cli/ignite/pkg/randstr" + envtest "github.com/ignite-hq/cli/integration" + "github.com/stretchr/testify/require" +) + +const testAccountMnemonic = "develop mansion drum glow husband trophy labor jelly fault run pause inside jazz foil page injury foam oppose fruit chunk segment morning series nation" + +func TestAccount(t *testing.T) { + var ( + env = envtest.New(t) + tmpDir = t.TempDir() + accountName = randstr.Runes(10) + ) + + env.Must(env.Exec("create account", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "create", accountName, "--keyring-dir", tmpDir), + )), + )) + + var listOutputBuffer = &bytes.Buffer{} + env.Must(env.Exec("list accounts", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), + )), + envtest.ExecStdout(listOutputBuffer), + )) + require.True(t, strings.Contains(listOutputBuffer.String(), accountName)) + + env.Must(env.Exec("delete account", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "delete", accountName, "--keyring-dir", tmpDir), + )), + )) + + var listOutputAfterDeleteBuffer = &bytes.Buffer{} + env.Must(env.Exec("list accounts after delete", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), + )), + envtest.ExecStdout(listOutputAfterDeleteBuffer), + )) + require.Equal(t, listOutputAfterDeleteBuffer.String(), "Name \tAddress Public Key \t\n\n") + + env.Must(env.Exec("import account", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "testaccount42", "--keyring-dir", tmpDir, "--non-interactive", "--secret", testAccountMnemonic), + )), + )) + + var listOutputAfterImportBuffer = &bytes.Buffer{} + env.Must(env.Exec("list accounts after import", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), + )), + envtest.ExecStdout(listOutputAfterImportBuffer), + )) + require.Equal(t, `Name Address Public Key +testaccount42 cosmos1ytnkpns7mfd6jjkvq9ztdvjdrt2xvmft2qxzqd PubKeySecp256k1{02FDF6D6F63B6B8E3CC71D03669BE0808F9990EE2A7FDBBF47E6BBEC4176E7763C} + +`, listOutputAfterImportBuffer.String()) + + var showOutputBuffer = &bytes.Buffer{} + env.Must(env.Exec("show account", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "show", "testaccount42", "--keyring-dir", tmpDir), + )), + envtest.ExecStdout(showOutputBuffer), + )) + require.Equal(t, `Name Address Public Key +testaccount42 cosmos1ytnkpns7mfd6jjkvq9ztdvjdrt2xvmft2qxzqd PubKeySecp256k1{02FDF6D6F63B6B8E3CC71D03669BE0808F9990EE2A7FDBBF47E6BBEC4176E7763C} + +`, showOutputBuffer.String()) + + var showOutputWithDifferentPrefixBuffer = &bytes.Buffer{} + env.Must(env.Exec("show account with address prefi", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "show", "testaccount42", "--keyring-dir", tmpDir, "--address-prefix", "test"), + )), + envtest.ExecStdout(showOutputWithDifferentPrefixBuffer), + )) + require.Equal(t, `Name Address Public Key +testaccount42 test1ytnkpns7mfd6jjkvq9ztdvjdrt2xvmftxemuve PubKeySecp256k1{02FDF6D6F63B6B8E3CC71D03669BE0808F9990EE2A7FDBBF47E6BBEC4176E7763C} + +`, showOutputWithDifferentPrefixBuffer.String()) +} diff --git a/integration/env.go b/integration/env.go index 50830861e2..ddfe629de2 100644 --- a/integration/env.go +++ b/integration/env.go @@ -149,6 +149,7 @@ func (e Env) Exec(msg string, steps step.Steps, options ...ExecOption) (ok bool) return e.Exec(msg, steps, options...) } } + if err != nil { msg = fmt.Sprintf("%s\n\nLogs:\n\n%s\n\nError Logs:\n\n%s\n", msg, @@ -285,12 +286,38 @@ func (e Env) TmpDir() (path string) { return path } +func (e Env) SetKeyringBackend(path string, configFile string, keyringBackend string) { + configyml, conf := e.openConfig(path, configFile) + defer configyml.Close() + + conf.Init.KeyringBackend = keyringBackend + e.saveConfig(configyml, conf) +} +func (e Env) SetConfigMnemonic(path string, configFile string, accountName string, mnemonic string) { + configyml, conf := e.openConfig(path, configFile) + defer configyml.Close() + + found := false + for i, acc := range conf.Accounts { + if acc.Name == accountName { + conf.Accounts[i].Mnemonic = mnemonic + found = true + break + } + } + + if !found { + e.t.FailNow() + } + + e.saveConfig(configyml, conf) +} + // RandomizeServerPorts randomizes server ports for the app at path, updates // its config.yml and returns new values. func (e Env) RandomizeServerPorts(path string, configFile string) chainconfig.Host { - if configFile == "" { - configFile = ConfigYML - } + configyml, conf := e.openConfig(path, configFile) + defer configyml.Close() // generate random server ports and servers list. ports, err := availableport.Find(6) @@ -310,46 +337,25 @@ func (e Env) RandomizeServerPorts(path string, configFile string) chainconfig.Ho } // update config.yml with the generated servers list. - configyml, err := os.OpenFile(filepath.Join(path, configFile), os.O_RDWR|os.O_CREATE, 0755) - require.NoError(e.t, err) - defer configyml.Close() - - var conf chainconfig.Config - require.NoError(e.t, yaml.NewDecoder(configyml).Decode(&conf)) - conf.Host = servers - require.NoError(e.t, configyml.Truncate(0)) - _, err = configyml.Seek(0, 0) - require.NoError(e.t, err) - require.NoError(e.t, yaml.NewEncoder(configyml).Encode(conf)) + e.saveConfig(configyml, conf) return servers } // ConfigureFaucet finds a random port for the app faucet and updates config.yml with this port and provided coins options func (e Env) ConfigureFaucet(path string, configFile string, coins, coinsMax []string) string { - if configFile == "" { - configFile = ConfigYML - } + configyml, conf := e.openConfig(path, configFile) + defer configyml.Close() // find a random available port port, err := availableport.Find(1) require.NoError(e.t, err) - configyml, err := os.OpenFile(filepath.Join(path, configFile), os.O_RDWR|os.O_CREATE, 0755) - require.NoError(e.t, err) - defer configyml.Close() - - var conf chainconfig.Config - require.NoError(e.t, yaml.NewDecoder(configyml).Decode(&conf)) - conf.Faucet.Port = port[0] conf.Faucet.Coins = coins conf.Faucet.CoinsMax = coinsMax - require.NoError(e.t, configyml.Truncate(0)) - _, err = configyml.Seek(0, 0) - require.NoError(e.t, err) - require.NoError(e.t, yaml.NewEncoder(configyml).Encode(conf)) + e.saveConfig(configyml, conf) addr, err := xurl.HTTP(fmt.Sprintf("0.0.0.0:%d", port[0])) require.NoError(e.t, err) @@ -358,24 +364,15 @@ func (e Env) ConfigureFaucet(path string, configFile string, coins, coinsMax []s } // SetRandomHomeConfig sets in the blockchain config files generated temporary directories for home directories -func (e Env) SetRandomHomeConfig(path string, configFile string) { - if configFile == "" { - configFile = ConfigYML - } - - // update config.yml with the generated temporary directories - configyml, err := os.OpenFile(filepath.Join(path, configFile), os.O_RDWR|os.O_CREATE, 0755) - require.NoError(e.t, err) +// Returns the random home directory +func (e Env) SetRandomHomeConfig(path string, configFile string) string { + configyml, conf := e.openConfig(path, configFile) defer configyml.Close() - var conf chainconfig.Config - require.NoError(e.t, yaml.NewDecoder(configyml).Decode(&conf)) - conf.Init.Home = e.TmpDir() - require.NoError(e.t, configyml.Truncate(0)) - _, err = configyml.Seek(0, 0) - require.NoError(e.t, err) - require.NoError(e.t, yaml.NewEncoder(configyml).Encode(conf)) + e.saveConfig(configyml, conf) + + return conf.Init.Home } // Must fails the immediately if not ok. @@ -397,3 +394,29 @@ func (e Env) Home() string { func (e Env) AppdHome(name string) string { return filepath.Join(e.Home(), fmt.Sprintf(".%s", name)) } + +// openConfig opens the config file and returns both the file itself and an unmarshalled config object +// The returned file must be closed +func (e Env) openConfig(path string, configFile string) (*os.File, chainconfig.Config) { + if configFile == "" { + configFile = ConfigYML + } + + // update config.yml with the generated temporary directories + configyml, err := os.OpenFile(filepath.Join(path, configFile), os.O_RDWR|os.O_CREATE, 0755) + require.NoError(e.t, err) + + var conf chainconfig.Config + require.NoError(e.t, yaml.NewDecoder(configyml).Decode(&conf)) + + return configyml, conf +} + +// saveConfig saves the profided conf object to the configyml file +// saveConfig does not close the file +func (e Env) saveConfig(configyml *os.File, conf chainconfig.Config) { + require.NoError(e.t, configyml.Truncate(0)) + _, err := configyml.Seek(0, 0) + require.NoError(e.t, err) + require.NoError(e.t, yaml.NewEncoder(configyml).Encode(conf)) +} diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go new file mode 100644 index 0000000000..23abb4fbf2 --- /dev/null +++ b/integration/node/cmd_query_bank_test.go @@ -0,0 +1,229 @@ +package node_test + +import ( + "bytes" + "context" + "strings" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/stretchr/testify/require" + + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + envtest "github.com/ignite-hq/cli/integration" +) + +const testPrefix = "testpref" +const aliceMnemonic = "trade physical mention claw forum fork night rate distance steak monster among soldier custom cave cloud addict runway melody current witness destroy version forward" +const aliceAddress = "testpref148akaazpnhce4gjcxy8l59969dtaxxrceju4m6" +const bobMnemonic = "alcohol alert unknown tissue clap basic slide air treat liquid proof toward outdoor loyal depart toddler cabbage glimpse warm outer switch output theme try" +const bobAddress = "testpref1nrzh528qngagy6vzgt2yc8p9quv8adjxn7rk65" + +func TestNodeQueryBankBalances(t *testing.T) { + var ( + env = envtest.New(t) + path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) + servers = env.RandomizeServerPorts(path, "") + rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + accKeyringDir = t.TempDir() + ) + + env.SetKeyringBackend(path, "", keyring.BackendTest) + env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) + env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + + var ( + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ) + + go func() { + defer cancel() + isBackendAliveErr := env.IsAppServed(ctx, servers) + require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + // error "account doesn't have any balances" occurs if a sleep is not included + time.Sleep(time.Second * 1) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), + )), + )) + env.Must(env.Exec("import bob", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), + )), + )) + + var accountOutputBuffer = &bytes.Buffer{} + env.Must(env.Exec("query bank balances", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(accountOutputBuffer), + )) + require.True(t, strings.Contains(accountOutputBuffer.String(), `Amount Denom +100000000 stake +20000 token`)) + + var addressOutputBuffer = &bytes.Buffer{} + env.Must(env.Exec("query bank balances", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + aliceAddress, + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(addressOutputBuffer), + )) + require.True(t, strings.Contains(addressOutputBuffer.String(), `Amount Denom +100000000 stake +20000 token`)) + + var paginationFirstPageOutput = &bytes.Buffer{} + env.Must(env.Exec("query bank balances with pagination", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--limit", + "1", + "--page", + "1", + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(paginationFirstPageOutput), + )) + require.True(t, strings.Contains(paginationFirstPageOutput.String(), `Amount Denom +100000000 stake`)) + require.False(t, strings.Contains(paginationFirstPageOutput.String(), `token`)) + + var paginationSecondPageOutput = &bytes.Buffer{} + env.Must(env.Exec("query bank balances with pagination", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--limit", + "1", + "--page", + "2", + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(paginationSecondPageOutput), + )) + require.True(t, strings.Contains(paginationSecondPageOutput.String(), `Amount Denom +20000 token`)) + require.False(t, strings.Contains(paginationSecondPageOutput.String(), `stake`)) + + env.Must(env.Exec("query bank balances fail with non-existent account name", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "nonexistentaccount", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecShouldError(), + )) + + env.Must(env.Exec("query bank balances fail with non-existent address", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + testPrefix+"1gspvt8qsk8cryrsxnqt452cjczjm5ejdgla24e", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecShouldError(), + )) + + env.Must(env.Exec("query bank balances fail with wrong prefix", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecShouldError(), + )) + }() + env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) +} diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go new file mode 100644 index 0000000000..e6f1b9fb48 --- /dev/null +++ b/integration/node/cmd_tx_bank_send_test.go @@ -0,0 +1,377 @@ +package node_test + +import ( + "bytes" + "context" + "fmt" + "strings" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/stretchr/testify/require" + + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + envtest "github.com/ignite-hq/cli/integration" +) + +func TestNodeTxBankSend(t *testing.T) { + var ( + env = envtest.New(t) + path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) + servers = env.RandomizeServerPorts(path, "") + rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + accKeyringDir = t.TempDir() + ) + + env.SetKeyringBackend(path, "", keyring.BackendTest) + env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) + env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + + var ( + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ) + + go func() { + defer cancel() + isBackendAliveErr := env.IsAppServed(ctx, servers) + require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + // error "account doesn't have any balances" occurs if a sleep is not included + time.Sleep(time.Second * 1) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), + )), + )) + env.Must(env.Exec("import bob", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), + )), + )) + + env.Must(env.Exec("send 100token from alice to bob", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "100token", + "--from", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + )) + + env.Must(env.Exec("send 2stake from bob to alice using addresses", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + bobAddress, + aliceAddress, + "2stake", + "--from", + "bob", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + )) + + env.Must(env.Exec("send 5token from alice to bob using a combination of address and account", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + bobAddress, + "5token", + "--from", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + )) + + time.Sleep(time.Second * 1) + + var aliceBalanceCheckBuffer = &bytes.Buffer{} + env.Must(env.Exec("query bank balances for alice", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(aliceBalanceCheckBuffer), + )) + require.True(t, strings.Contains(aliceBalanceCheckBuffer.String(), `Amount Denom +100000002 stake +19895 token`)) + + var bobBalanceCheckBuffer = &bytes.Buffer{} + env.Must(env.Exec("query bank balances for bob", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "bank", + "balances", + "bob", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(bobBalanceCheckBuffer), + )) + require.True(t, strings.Contains(bobBalanceCheckBuffer.String(), `Amount Denom +99999998 stake +10105 token`)) + + }() + env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) +} + +func TestNodeTxBankSendGenerateOnly(t *testing.T) { + var ( + env = envtest.New(t) + path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) + servers = env.RandomizeServerPorts(path, "") + rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + accKeyringDir = t.TempDir() + ) + + env.SetKeyringBackend(path, "", keyring.BackendTest) + env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) + env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + + var ( + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ) + + go func() { + defer cancel() + isBackendAliveErr := env.IsAppServed(ctx, servers) + require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + // error "account doesn't exist" occurs if a sleep is not included + time.Sleep(time.Second * 1) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), + )), + )) + env.Must(env.Exec("import bob", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), + )), + )) + + var generateOutput = &bytes.Buffer{} + env.Must(env.Exec("generate unsigned tx", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "5token", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--generate-only", + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(generateOutput), + )) + + require.True(t, strings.Contains(generateOutput.String(), fmt.Sprintf(`"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"%s","amount":[{"denom":"token","amount":"5"}]}]`, aliceAddress, bobAddress))) + require.True(t, strings.Contains(generateOutput.String(), `"signatures":[]`)) + }() + + env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) +} + +func TestNodeTxBankSendWithGas(t *testing.T) { + var ( + env = envtest.New(t) + path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) + servers = env.RandomizeServerPorts(path, "") + rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + accKeyringDir = t.TempDir() + ) + + env.SetKeyringBackend(path, "", keyring.BackendTest) + env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) + env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + + var ( + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ) + + go func() { + defer cancel() + isBackendAliveErr := env.IsAppServed(ctx, servers) + require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + // error "account doesn't have any balances" occurs if a sleep is not included + time.Sleep(time.Second * 1) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), + )), + )) + env.Must(env.Exec("import bob", + step.NewSteps(step.New( + step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), + )), + )) + + env.Must(env.Exec("send 100token from alice to bob with gas flags", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "100token", + "--from", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--gas", + "200000", + "--gas-prices", + "1stake", + ), + step.Workdir(rndWorkdir), + )), + )) + + env.Must(env.Exec("send 100token from alice to bob with too little gas", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "100token", + "--from", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--gas", + "2", + "--gas-prices", + "1stake", + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecShouldError(), + )) + + var generateOutput = &bytes.Buffer{} + env.Must(env.Exec("generate bank send tx with gas flags", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "100token", + "--from", + "alice", + "--rpc", + "http://"+servers.RPC, + "--keyring-dir", + accKeyringDir, + "--address-prefix", + testPrefix, + "--gas", + "2000034", + "--gas-prices", + "0.089stake", + "--generate-only", + ), + step.Workdir(rndWorkdir), + )), + envtest.ExecStdout(generateOutput), + )) + require.True(t, strings.Contains(generateOutput.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`)) + + }() + env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) +} From 04946df9b51d4fc3819f881bb3ad76351f3194fd Mon Sep 17 00:00:00 2001 From: Gjermund Bjaanes Date: Fri, 3 Jun 2022 17:00:43 +0200 Subject: [PATCH 02/42] Code review cleanup --- ignite/cmd/node_query.go | 14 ++-- ignite/cmd/node_query_bank_balances.go | 7 +- ignite/cmd/node_tx_bank_send.go | 13 +++- ignite/pkg/cosmosclient/bank.go | 23 ++----- ignite/pkg/cosmosclient/cosmosclient.go | 90 +++++++------------------ ignite/pkg/cosmosclient/txservice.go | 68 +++++++++++++++++++ ignite/services/network/network.go | 1 - 7 files changed, 118 insertions(+), 98 deletions(-) create mode 100644 ignite/pkg/cosmosclient/txservice.go diff --git a/ignite/cmd/node_query.go b/ignite/cmd/node_query.go index 4a2afc827b..c5295e90da 100644 --- a/ignite/cmd/node_query.go +++ b/ignite/cmd/node_query.go @@ -44,12 +44,14 @@ func flagSetPagination(query string) *flag.FlagSet { } func getPagination(cmd *cobra.Command) (*query.PageRequest, error) { - pageKey, _ := cmd.Flags().GetString(flagPageKey) - offset, _ := cmd.Flags().GetUint64(flagOffset) - limit, _ := cmd.Flags().GetUint64(flagLimit) - countTotal, _ := cmd.Flags().GetBool(flagCountTotal) - page, _ := cmd.Flags().GetUint64(flagPage) - reverse, _ := cmd.Flags().GetBool(flagReverse) + var ( + pageKey, _ = cmd.Flags().GetString(flagPageKey) + offset, _ = cmd.Flags().GetUint64(flagOffset) + limit, _ = cmd.Flags().GetUint64(flagLimit) + countTotal, _ = cmd.Flags().GetBool(flagCountTotal) + page, _ = cmd.Flags().GetUint64(flagPage) + reverse, _ = cmd.Flags().GetBool(flagReverse) + ) if page > 1 && offset > 0 { return nil, errors.New("page and offset cannot be used together") diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index 4ca31bf3fd..b3cd26db7c 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -10,8 +10,8 @@ import ( func NewNodeQueryBankBalances() *cobra.Command { c := &cobra.Command{ - Use: "balances [address]", - Short: "Query for account balances by address", + Use: "balances [account-name|address]", + Short: "Query for account balances by account name or address", RunE: nodeQueryBankBalancesHandler, Args: cobra.ExactArgs(1), } @@ -60,7 +60,7 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { } session.StartSpinner("Querying...") - balances, err := client.BankBalances(address, pagination) + balances, err := client.BankBalances(cmd.Context(), address, pagination) if err != nil { return err } @@ -70,5 +70,6 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { rows = append(rows, []string{fmt.Sprintf("%s", b.Amount), b.Denom}) } + session.StopSpinner() return session.PrintTable([]string{"Amount", "Denom"}, rows...) } diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 108c879488..48c0d3ac6e 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -90,19 +90,26 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { return err } + tx, err := client.BankSendTx(fromAddress, toAddress, coins, from) + if err != nil { + return err + } + if generateOnly { - tx, err := client.BankSendGenerateOnly(fromAddress, toAddress, coins, from) + json, err := tx.EncodeJSON() if err != nil { return err } - return session.Println(tx) + session.StopSpinner() + return session.Println(string(json)) } - if err := client.BankSend(fromAddress, toAddress, coins, from); err != nil { + if _, err := tx.Broadcast(); err != nil { return err } + session.StopSpinner() session.Println("Transaction broadcast successful!") return session.Printf("%s sent from %s to %s\n", amount, fromAccountInput, toAccountInput) diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go index 14d5b98452..4a9eb98db1 100644 --- a/ignite/pkg/cosmosclient/bank.go +++ b/ignite/pkg/cosmosclient/bank.go @@ -8,14 +8,14 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) -func (c Client) BankBalances(address string, pagination *query.PageRequest) (sdk.Coins, error) { +func (c Client) BankBalances(ctx context.Context, address string, pagination *query.PageRequest) (sdk.Coins, error) { req := &banktypes.QueryAllBalancesRequest{ Address: address, Pagination: pagination, } resp, err := performQuery[*banktypes.QueryAllBalancesResponse](c, func() (*banktypes.QueryAllBalancesResponse, error) { - return banktypes.NewQueryClient(c.context).AllBalances(context.Background(), req) + return banktypes.NewQueryClient(c.context).AllBalances(ctx, req) }) if err != nil { return nil, err @@ -24,27 +24,12 @@ func (c Client) BankBalances(address string, pagination *query.PageRequest) (sdk return resp.Balances, nil } -func (c Client) BankSend(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) error { +func (c Client) BankSendTx(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) (TxService, error) { msg := &banktypes.MsgSend{ FromAddress: fromAddress, ToAddress: toAddress, Amount: amount, } - _, err := c.BroadcastTx(fromAccountName, msg) - if err != nil { - return err - } - - return nil -} - -func (c Client) BankSendGenerateOnly(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) (string, error) { - msg := &banktypes.MsgSend{ - FromAddress: fromAddress, - ToAddress: toAddress, - Amount: amount, - } - - return c.GenerateTx(fromAccountName, msg) + return c.CreateTx(fromAccountName, msg) } diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 88f249eceb..e76dcb1cfd 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -22,7 +22,6 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -151,12 +150,15 @@ func WithUseFaucet(faucetAddress, denom string, minAmount uint64) Option { } } +// WithGas sets an explicit gas-limit on transactions. +// Set to "auto" to calculate automatically func WithGas(gas string) Option { return func(c *Client) { c.gas = gas } } +// WithGasPrices sets the price per gas (e.g. 0.1uatom) func WithGasPrices(gasPrices string) Option { return func(c *Client) { c.gasPrices = gasPrices @@ -250,8 +252,7 @@ func (c Client) AccountExists(accountName string) (bool, error) { // Bech32Address returns the bech32 address, with the correct prefix, from account name or address. func (c Client) Bech32Address(accountNameOrAddress string) (string, error) { - unlockFn := c.lockBech32Prefix() - defer unlockFn() + defer c.lockBech32Prefix()() _, _, err := bech32.DecodeAndConvert(accountNameOrAddress) if err == nil { @@ -315,29 +316,6 @@ func (c Client) Status(ctx context.Context) (*ctypes.ResultStatus, error) { return c.RPC.Status(ctx) } -// BroadcastTx creates and broadcasts a tx with given messages for account. -func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, error) { - _, broadcast, err := c.BroadcastTxWithProvision(accountName, msgs...) - if err != nil { - return Response{}, err - } - return broadcast() -} - -func (c Client) GenerateTx(accountName string, msgs ...sdktypes.Msg) (string, error) { - unsignedTx, _, err := c.BroadcastTxWithProvision(accountName, msgs...) - if err != nil { - return "", err - } - - json, err := c.context.TxConfig.TxJSONEncoder()(unsignedTx.GetTx()) - if err != nil { - return "", err - } - - return string(json), nil -} - // protects sdktypes.Config. var mconf sync.Mutex @@ -350,25 +328,26 @@ func (c Client) lockBech32Prefix() (unlockFn func()) { } func performQuery[T any](c Client, q func() (T, error)) (T, error) { - unlockFn := c.lockBech32Prefix() - defer unlockFn() + defer c.lockBech32Prefix()() return q() } -func (c Client) BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Msg) ( - unsignedTx client.TxBuilder, broadcast func() (Response, error), err error) { - if err := c.prepareBroadcast(context.Background(), accountName, msgs); err != nil { - return nil, nil, err +func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, error) { + txService, err := c.CreateTx(accountName, msgs...) + if err != nil { + return Response{}, err } - // TODO find a better way if possible. - unlockFn := c.lockBech32Prefix() - defer unlockFn() + return txService.Broadcast() +} + +func (c Client) CreateTx(accountName string, msgs ...sdktypes.Msg) (TxService, error) { + defer c.lockBech32Prefix()() accountAddress, err := c.Address(accountName) if err != nil { - return nil, nil, err + return TxService{}, err } ctx := c.context. @@ -377,25 +356,24 @@ func (c Client) BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Ms txf, err := prepareFactory(ctx, c.Factory) if err != nil { - return nil, nil, err + return TxService{}, err } var gas uint64 if c.gas != "" && c.gas != "auto" { gas, err = strconv.ParseUint(c.gas, 10, 64) if err != nil { - return nil, nil, err + return TxService{}, err } } else { _, gas, err = tx.CalculateGas(ctx, txf, msgs...) if err != nil { - return nil, nil, err + return TxService{}, err } // the simulated gas can vary from the actual gas needed for a real transaction // we add an additional amount to endure sufficient gas is provided gas += 10000 } - txf = txf.WithGas(gas) if c.gasPrices != "" { @@ -404,36 +382,16 @@ func (c Client) BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Ms txUnsigned, err := tx.BuildUnsignedTx(txf, msgs...) if err != nil { - return nil, nil, err + return TxService{}, err } txUnsigned.SetFeeGranter(ctx.GetFeeGranterAddress()) - // Return the provision function - return txUnsigned, func() (Response, error) { - - if err := tx.Sign(txf, accountName, txUnsigned, true); err != nil { - return Response{}, err - } - - txBytes, err := ctx.TxConfig.TxEncoder()(txUnsigned.GetTx()) - if err != nil { - return Response{}, err - } - - resp, err := ctx.BroadcastTx(txBytes) - if err == sdkerrors.ErrInsufficientFunds { - err = c.makeSureAccountHasTokens(context.Background(), accountAddress.String()) - if err != nil { - return Response{}, err - } - resp, err = ctx.BroadcastTx(txBytes) - } - - return Response{ - Codec: ctx.Codec, - TxResponse: resp, - }, handleBroadcastResult(resp, err) + return TxService{ + client: c, + clientContext: ctx, + txBuilder: txUnsigned, + txFactory: txf, }, nil } diff --git a/ignite/pkg/cosmosclient/txservice.go b/ignite/pkg/cosmosclient/txservice.go new file mode 100644 index 0000000000..0a71348ecd --- /dev/null +++ b/ignite/pkg/cosmosclient/txservice.go @@ -0,0 +1,68 @@ +package cosmosclient + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" + sdktypes "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +type TxService struct { + client Client + clientContext client.Context + txBuilder client.TxBuilder + txFactory tx.Factory +} + +// Gas is gas decided to use for this tx. +// either calculated or configured by the caller. +func (s TxService) Gas() uint64 { + return s.txBuilder.GetTx().GetGas() +} + +// Broadcast signs and broadcasts this tx. +func (s TxService) Broadcast() (Response, error) { + defer s.client.lockBech32Prefix()() + + accountName := s.clientContext.GetFromName() + accountAddress := s.clientContext.GetFromAddress() + + if err := s.client.prepareBroadcast(context.Background(), accountName, []sdktypes.Msg{}); err != nil { + return Response{}, err + } + + if err := tx.Sign(s.txFactory, accountName, s.txBuilder, true); err != nil { + return Response{}, err + } + + txBytes, err := s.clientContext.TxConfig.TxEncoder()(s.txBuilder.GetTx()) + if err != nil { + return Response{}, err + } + + resp, err := s.clientContext.BroadcastTx(txBytes) + if err == sdkerrors.ErrInsufficientFunds { + err = s.client.makeSureAccountHasTokens(context.Background(), accountAddress.String()) + if err != nil { + return Response{}, err + } + resp, err = s.clientContext.BroadcastTx(txBytes) + } + + return Response{ + Codec: s.clientContext.Codec, + TxResponse: resp, + }, handleBroadcastResult(resp, err) +} + +// EncodeJSON encodes the transaction as a json string +func (s TxService) EncodeJSON() ([]byte, error) { + json, err := s.client.context.TxConfig.TxJSONEncoder()(s.txBuilder.GetTx()) + if err != nil { + return nil, err + } + + return json, nil +} diff --git a/ignite/services/network/network.go b/ignite/services/network/network.go index 01c0752cd1..b1349bf50e 100644 --- a/ignite/services/network/network.go +++ b/ignite/services/network/network.go @@ -28,7 +28,6 @@ type CosmosClient interface { Address(accountName string) (sdktypes.AccAddress, error) Context() client.Context BroadcastTx(accountName string, msgs ...sdktypes.Msg) (cosmosclient.Response, error) - BroadcastTxWithProvision(accountName string, msgs ...sdktypes.Msg) (unsignedTx client.TxBuilder, broadcast func() (cosmosclient.Response, error), err error) Status(ctx context.Context) (*ctypes.ResultStatus, error) ConsensusInfo(ctx context.Context, height int64) (cosmosclient.ConsensusInfo, error) } From 772714542897f6a7ead95016eb7f95cc8e25bda5 Mon Sep 17 00:00:00 2001 From: Gjermund Bjaanes Date: Tue, 7 Jun 2022 21:02:39 +0200 Subject: [PATCH 03/42] Code review fix --- ignite/pkg/cosmosclient/txservice.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ignite/pkg/cosmosclient/txservice.go b/ignite/pkg/cosmosclient/txservice.go index 0a71348ecd..c702970e7c 100644 --- a/ignite/pkg/cosmosclient/txservice.go +++ b/ignite/pkg/cosmosclient/txservice.go @@ -59,10 +59,5 @@ func (s TxService) Broadcast() (Response, error) { // EncodeJSON encodes the transaction as a json string func (s TxService) EncodeJSON() ([]byte, error) { - json, err := s.client.context.TxConfig.TxJSONEncoder()(s.txBuilder.GetTx()) - if err != nil { - return nil, err - } - - return json, nil + return s.client.context.TxConfig.TxJSONEncoder()(s.txBuilder.GetTx()) } From 94452af34ef12e02a989374df5d8b34112cd0171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=2E=20=C3=96zt=C3=BCrk?= Date: Fri, 10 Jun 2022 14:46:50 +0300 Subject: [PATCH 04/42] fix merge --- ignite/pkg/cosmosclient/consensus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/pkg/cosmosclient/consensus.go b/ignite/pkg/cosmosclient/consensus.go index 337a5f5057..3911ff442c 100644 --- a/ignite/pkg/cosmosclient/consensus.go +++ b/ignite/pkg/cosmosclient/consensus.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "time" - commitmenttypes "github.com/cosmos/ibc-go/v2/modules/core/23-commitment/types" + commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" "github.com/tendermint/tendermint/libs/bytes" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" From 45771436f94a7584892beb5ad6fec466b44f0813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=2E=20=C3=96zt=C3=BCrk?= Date: Mon, 13 Jun 2022 22:00:48 +0300 Subject: [PATCH 05/42] refactor --- go.mod | 9 +- go.sum | 341 ++++++++++++++++++++-- ignite/cmd/node.go | 41 ++- ignite/cmd/node_query_bank_balances.go | 20 +- ignite/cmd/node_tx_bank_send.go | 18 +- ignite/pkg/cosmosaccount/cosmosaccount.go | 4 +- integration/app.go | 225 ++++++++++++++ integration/env.go | 334 ++------------------- integration/exec.go | 105 +++++++ integration/node/cmd_query_bank_test.go | 232 ++++++++++----- integration/node/cmd_tx_bank_send_test.go | 253 +++++++++++----- 11 files changed, 1056 insertions(+), 526 deletions(-) create mode 100644 integration/app.go create mode 100644 integration/exec.go diff --git a/go.mod b/go.mod index 343a8ff5d5..eac1c9de13 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.18 require ( github.com/99designs/keyring v1.2.1 github.com/AlecAivazis/survey/v2 v2.1.1 + github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 github.com/blang/semver v3.5.1+incompatible github.com/briandowns/spinner v1.11.1 github.com/buger/jsonparser v1.1.1 @@ -58,6 +59,7 @@ require ( golang.org/x/text v0.3.7 google.golang.org/grpc v1.46.2 google.golang.org/protobuf v1.28.0 + gopkg.in/yaml.v2 v2.4.0 ) require ( @@ -69,6 +71,8 @@ require ( github.com/Microsoft/hcsshim v0.9.2 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/alecthomas/chroma v0.8.2 // indirect + github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 // indirect + github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 // indirect github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect @@ -118,7 +122,7 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/gobuffalo/envy v1.8.1 // indirect + github.com/gobuffalo/envy v1.9.0 // indirect github.com/gobuffalo/flect v0.2.0 // indirect github.com/gobuffalo/github_flavored_markdown v1.1.0 // indirect github.com/gobuffalo/helpers v0.5.0 // indirect @@ -197,7 +201,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.4.0 // indirect + github.com/rogpeppe/go-internal v1.6.2 // indirect github.com/rs/zerolog v1.26.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect @@ -234,7 +238,6 @@ require ( google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect gopkg.in/ini.v1 v1.66.3 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.1.0 // indirect nhooyr.io/websocket v1.8.6 // indirect diff --git a/go.sum b/go.sum index 0989f7bd0a..bc10f29b89 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ +4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -13,6 +15,7 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -44,21 +47,25 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= +github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/AlecAivazis/survey/v2 v2.1.1 h1:LEMbHE0pLj75faaVEKClEX1TM4AJmmnOh9eimREzLWI= github.com/AlecAivazis/survey/v2 v2.1.1/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= +github.com/Antonboom/errname v0.1.4/go.mod h1:jRXo3m0E0EuCnK3wbsSVH3X55Z4iTDLl6ZfCxwFj4TM= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -90,6 +97,7 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -99,9 +107,15 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -121,6 +135,7 @@ github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2 github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= +github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim v0.9.2 h1:wB06W5aYFfUB3IvootYAY2WnOmIdgPGfqSI6tufQNnY= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= @@ -132,6 +147,7 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -140,6 +156,7 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -170,12 +187,16 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 h1:axBiC50cNZOs7ygH5BgQp4N+aYrZ2DNpWZ1KG3VOSOM= github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2/go.mod h1:jnzFpU88PccN/tPPhCpnNU8mZphvKxYM9lLNkd8e+os= +github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= @@ -191,12 +212,17 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY= github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= @@ -215,10 +241,13 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/briandowns/spinner v1.11.1 h1:OixPqDEcX3juo5AjQZAnFPbeUA0jvkp2qzB5gOZJ/L0= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= @@ -264,6 +293,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/charmbracelet/bubbles v0.7.5/go.mod h1:IRTORFvhEI6OUH7WhN2Ks8Z8miNGimk1BE6cmHijOkM= github.com/charmbracelet/bubbles v0.7.6 h1:SCAp4ZEUf2tBNEsufo+Xxxu2dvbFhYSDPrX45toQZrM= github.com/charmbracelet/bubbles v0.7.6/go.mod h1:0D4XRYK0tjo8JMvflz1obpVcOikNZSG46SFauoZj22s= @@ -276,6 +306,7 @@ github.com/charmbracelet/glamour v0.2.1-0.20210311152407-2b8307dcb400 h1:vj8zwTs github.com/charmbracelet/glamour v0.2.1-0.20210311152407-2b8307dcb400/go.mod h1:VO5pQW96Vj3qJy9ikwb5Zo8lcvt2ZDFoE3UXl+SduQs= github.com/charmbracelet/glow v1.4.0 h1:pqOa+FsrjLb9aQXcX7xEj0OFZParmR0JEwhdSf1AVHc= github.com/charmbracelet/glow v1.4.0/go.mod h1:PmzpVs6fvXd60PmqRkbKtSz412SfDFPD3XbraI1hnJQ= +github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -305,8 +336,11 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= +github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= @@ -341,12 +375,14 @@ github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= +github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/containerd v1.6.2 h1:pcaPUGbYW8kBw6OgIZwIVIeEhdWVrBzsoCfVJ5BjrLU= github.com/containerd/containerd v1.6.2/go.mod h1:sidY30/InSE1j2vdD1ihtKoJz+lWdaXMdiAeIupaf+s= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -415,6 +451,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -422,17 +459,28 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.45.5 h1:GVrZM+lss6y626Pq6loxh/3KLRgK/J6/alTkcKkYmGU= -github.com/cosmos/cosmos-sdk v0.45.5/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= +github.com/cosmos/cosmos-sdk v0.44.2/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU80QCZUPnHr4= +github.com/cosmos/cosmos-sdk v0.44.3/go.mod h1:bA3+VenaR/l/vDiYzaiwbWvRPWHMBX2jG0ygiFtiBp0= +github.com/cosmos/cosmos-sdk v0.44.4/go.mod h1:0QTCOkE8IWu5LZyfnbbjFjxYRIcV4pBOr7+zPpJwl58= +github.com/cosmos/cosmos-sdk v0.44.5/go.mod h1:maUA6m2TBxOJZkbwl0eRtEBgTX37kcaiOWU5t1HEGaY= +github.com/cosmos/cosmos-sdk v0.45.4 h1:eStDAhJdMY8n5arbBRe+OwpNeBSunxSBHp1g55ulfdA= +github.com/cosmos/cosmos-sdk v0.45.4/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= +github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= +github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= +github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= +github.com/cosmos/iavl v0.17.1/go.mod h1:7aisPZK8yCpQdy3PMvKeO+bhq1NwDjUwjzxwwROUxFk= +github.com/cosmos/iavl v0.17.2/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= -github.com/cosmos/ibc-go/v3 v3.0.1 h1:JMQhAHYt/chIm240kIXeFIJfQr8m6FR3sE/eDqbpxWA= -github.com/cosmos/ibc-go/v3 v3.0.1/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40= +github.com/cosmos/ibc-go v1.2.2/go.mod h1:XmYjsRFOs6Q9Cz+CSsX21icNoH27vQKb3squgnCOCbs= +github.com/cosmos/ibc-go/v2 v2.0.2/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= +github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= +github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -450,20 +498,24 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= +github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -505,8 +557,8 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -520,11 +572,15 @@ github.com/emicklei/proto v1.9.0 h1:l0QiNT6Qs7Yj0Mb4X6dnWBQer4ebei2BFcgQLbGqUDc= github.com/emicklei/proto v1.9.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -541,6 +597,7 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -558,6 +615,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -569,6 +628,7 @@ github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwv github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= @@ -597,6 +657,7 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -616,16 +677,30 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/envy v1.8.1 h1:RUr68liRvs0TS1D5qdW3mQv2SjAsu1QWMCx1tG4kDjs= github.com/gobuffalo/envy v1.8.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/envy v1.9.0 h1:eZR0DuEgVLfeIb1zIKt3bT4YovIMf9O9LXQeCZLXpqE= +github.com/gobuffalo/envy v1.9.0/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobuffalo/genny v0.6.0 h1:d7c6d66ZrTHHty01hDX1/TcTWvAJQxRZl885KWX5kHY= @@ -652,6 +727,7 @@ github.com/gobuffalo/uuid v2.0.5+incompatible h1:c5uWRuEnYggYCrT9AJm0U2v1QTG7OVD github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE= github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -668,6 +744,7 @@ github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= @@ -695,6 +772,7 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -719,9 +797,21 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.42.1/go.mod h1:MuInrVlgg2jq4do6XI1jbkErbVHVbwdrLLtGv6p2wPI= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -745,6 +835,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f/go.mod h1:nOFQdrUlIlx6M6ODdSpBj1NVA+VgLC6kmw60mkw34H4= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -758,6 +849,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -768,6 +860,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -779,9 +873,13 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= @@ -802,11 +900,21 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -814,6 +922,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -846,6 +956,7 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -878,6 +989,8 @@ github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDG github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -886,6 +999,7 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -907,7 +1021,12 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -915,14 +1034,17 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/ansi v1.0.2 h1:+Ei5HCAH0xsrQRCT2PDr4mq9r4Gm4tg+arNdXRkB22s= github.com/jpillora/ansi v1.0.2/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jpillora/chisel v1.7.6/go.mod h1:BC2zg11mTIoyGPUjc2EkTgfz3uUUV93+K9tNYCCU/fw= github.com/jpillora/chisel v1.7.7 h1:eLbzoX+ekDhVmF5CpSJD01NtH/w7QMYeaFCIFbzn9ns= github.com/jpillora/chisel v1.7.7/go.mod h1:X3ZzJDlOSlkMLVY3DMsdrd03rMtugLYk2IOUhvX0SXo= github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA= @@ -941,19 +1063,26 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -976,11 +1105,21 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= +github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -988,6 +1127,7 @@ github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoR github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= @@ -1003,7 +1143,9 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1027,22 +1169,28 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-zglob v0.0.3 h1:6Ry4EYsScDyt5di4OI6xw1bYhOqfE5S33Z1OPy+d+To= github.com/mattn/go-zglob v0.0.3/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/meowgorithm/babyenv v1.3.0/go.mod h1:lwNX+J6AGBFqNrMZ2PTLkM6SO+W4X8DOg9zBDO4j3Ig= github.com/meowgorithm/babyenv v1.3.1 h1:18ZEYIgbzoFQfRLF9+lxjRfk/ui6w8U0FWl07CgWvvc= github.com/meowgorithm/babyenv v1.3.1/go.mod h1:lwNX+J6AGBFqNrMZ2PTLkM6SO+W4X8DOg9zBDO4j3Ig= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.1.1/go.mod h1:PKqk4L74K6wVNwY2b6fr+9Qqr/3hIsHVfZCJdbvozrY= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= @@ -1050,8 +1198,10 @@ github.com/microcosm-cc/bluemonday v1.0.4 h1:p0L+CTpo/PLFdkoPcJemLXG+fpMD7pYOoDE github.com/microcosm-cc/bluemonday v1.0.4/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a h1:eU8j/ClY2Ty3qdHnn0TyW3ivFoPC/0F1gQZz8yTxbbE= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a/go.mod h1:v8eSC2SMp9/7FTKUncp7fH9IwPfw+ysMObcEz5FWheQ= @@ -1063,20 +1213,26 @@ github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/sys/mount v0.3.0/go.mod h1:U2Z3ur2rXPFrFmy4q6WMwWrBOAQGYtYTRVM8BIvzbwk= github.com/moby/sys/mount v0.3.1 h1:RX1K0x95oR8j5P1YefKDt7tE1C2kCCixV0H8Aza3GaI= github.com/moby/sys/mount v0.3.1/go.mod h1:6IZknFQiqjLpwuYJD5Zk0qYEuJiws36M88MIXnZHya0= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= @@ -1094,7 +1250,11 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= @@ -1117,8 +1277,11 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1134,10 +1297,15 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -1147,6 +1315,7 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1162,6 +1331,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -1232,6 +1402,7 @@ github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7ir github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -1240,6 +1411,7 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -1252,8 +1424,10 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -1290,6 +1464,7 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -1310,6 +1485,16 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -1332,20 +1517,25 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY= github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= +github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ= @@ -1355,6 +1545,8 @@ github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDN github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1362,6 +1554,7 @@ github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/securego/gosec/v2 v2.8.1/go.mod h1:pUmsq6+VyFEElJMUX+QB3p3LWNHXg1R3xh2ssVJPs8Q= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/ksuid v1.0.3 h1:FoResxvleQwYiPAVKe1tMUlEirodZqlqglIuFsdDntY= github.com/segmentio/ksuid v1.0.3/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= @@ -1370,7 +1563,11 @@ github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLS github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -1386,9 +1583,11 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1401,6 +1600,7 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -1409,6 +1609,7 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= @@ -1425,9 +1626,11 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= @@ -1440,10 +1643,11 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= -github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1463,37 +1667,56 @@ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKk github.com/takuoki/gocase v1.0.0 h1:gPwLJTWVm2T1kUiCsKirg/faaIUGVTI0FA3SYr75a44= github.com/takuoki/gocase v1.0.0/go.mod h1:QgOKJrbuJoDrtoKswBX1/Dw8mJrkOV9tbQZJaxaJ6zc= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/flutter/v2 v2.0.3/go.mod h1:hnaVhWhzv2Od1LqZFWrRKwiOHeMonsB9EIWP0AGMPw0= github.com/tendermint/flutter/v2 v2.0.4 h1:0/FndUq1YgzNwfaDMZYHul6hb6A5yBX2nEZfJRaxZcI= github.com/tendermint/flutter/v2 v2.0.4/go.mod h1:hnaVhWhzv2Od1LqZFWrRKwiOHeMonsB9EIWP0AGMPw0= -github.com/tendermint/fundraising v0.3.1-0.20220613014523-03b4a2d4481a h1:DIxap6r3z89JLoaLp6TTtt8XS7Zgfy4XACfG6b+4plE= -github.com/tendermint/fundraising v0.3.1-0.20220613014523-03b4a2d4481a/go.mod h1:oJFZUZ/GsACtkYeWScKpHLdqMUThNWpMAi/G47LJUi4= +github.com/tendermint/fundraising v0.3.0 h1:VtHfmVlAS93MUDlt6Em21l3taw6s9kLY/w8Cd1FB9fM= +github.com/tendermint/fundraising v0.3.0/go.mod h1:oJFZUZ/GsACtkYeWScKpHLdqMUThNWpMAi/G47LJUi4= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072 h1:J7+gbosE+lUg/m6wGNHs8xRM5ugU3FbdLWwaNg5b9kw= -github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072/go.mod h1:Ek8O0rqggK/yz1ya55hr0tVUPvsAR5sHLLLClTbuPrc= +github.com/tendermint/spm v0.1.8/go.mod h1:iHgfQ5YOI6ONc9E7ugGQolVdfSMHpeXfZ/OpXuN/42Q= +github.com/tendermint/spn v0.1.1-0.20211210094128-4ca78a240c57/go.mod h1:p4BO8YC6kOKSKqMfySqaLHfwBmuPE/QcLwnnVhh7H9M= +github.com/tendermint/spn v0.2.1-0.20220609194312-7833ecf4454a h1:+xo1H4r/dLkUcx89/jP88TbVQiA40Rcn7yQyPozIj5k= +github.com/tendermint/spn v0.2.1-0.20220609194312-7833ecf4454a/go.mod h1:5w8qNkgtJM24CcMjqTsVOKnSbz+U2fke7bEGzRlcdHA= +github.com/tendermint/starport v0.19.5 h1:5mI//Q4xPfpzHksX1JPTUgamTtdhrVLq4o6RIlM6TSg= +github.com/tendermint/starport v0.19.5/go.mod h1:XdbMpJ5R6QzP1+yrfsoCk44fnp9/52raponbkvjIMQA= +github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= +github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= +github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= +github.com/tendermint/tendermint v0.34.13/go.mod h1:6RVVRBqwtKhA+H59APKumO+B7Nye4QXSFc6+TYxAxCI= github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= +github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= +github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tendermint/vue v0.3.5 h1:PTZaW0+7/4lRJyUtuZOxFzMCahNLowTadVoCZns2Wmw= github.com/tendermint/vue v0.3.5/go.mod h1:Sg9MGPF+uY+SJ79sdZgtC2LnH+FDU2qWuiRxoZn5bmw= +github.com/tetafro/godot v1.4.9/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= +github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.3.0/go.mod h1:aF5rnkdtqNWP/gC7vPUO5pKsB0Oac2FDTQP4F+dpZMU= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= @@ -1505,12 +1728,20 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= +github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektra/mockery/v2 v2.11.0 h1:9NkC3urGvJS9B0ve5aTbFjksbO9f/u5cZFgCTVJ30jg= github.com/vektra/mockery/v2 v2.11.0/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1532,6 +1763,10 @@ github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHg github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1550,10 +1785,12 @@ github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -1562,6 +1799,7 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3 go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1583,6 +1821,7 @@ go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpK go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= @@ -1592,6 +1831,7 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1616,6 +1856,7 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1626,6 +1867,7 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1704,6 +1946,7 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1718,6 +1961,7 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1760,6 +2004,7 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1770,6 +2015,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1805,6 +2051,7 @@ golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1844,6 +2091,7 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1893,7 +2141,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1937,11 +2184,16 @@ golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1954,23 +2206,29 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191224055732-dd894d0a8a40/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1980,24 +2238,50 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2025,6 +2309,7 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -2042,6 +2327,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -2059,12 +2345,15 @@ google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2074,6 +2363,7 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -2097,12 +2387,15 @@ google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1m google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2154,6 +2447,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -2169,12 +2463,15 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2196,6 +2493,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2217,6 +2515,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= @@ -2247,6 +2546,10 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index 0ef5b3ee6b..dde76b0aa7 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -1,14 +1,14 @@ package ignitecmd import ( + "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" + "github.com/ignite-hq/cli/ignite/pkg/xurl" "github.com/spf13/cobra" ) -var rpcAddress string - const ( - flagRPC = "rpc" - rpcAddressLocal = "tcp://localhost:26657" + flagNode = "node" + cosmosRPCAddress = "https://rpc.cosmos.network" ) func NewNode() *cobra.Command { @@ -18,7 +18,7 @@ func NewNode() *cobra.Command { Args: cobra.ExactArgs(1), } - c.PersistentFlags().StringVar(&rpcAddress, flagRPC, rpcAddressLocal, ": to tendermint rpc interface for this chain") + c.PersistentFlags().String(flagNode, cosmosRPCAddress, ": to tendermint rpc interface for this chain") c.AddCommand(NewNodeQuery()) c.AddCommand(NewNodeTx()) @@ -26,7 +26,36 @@ func NewNode() *cobra.Command { return c } +func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { + var ( + home = getHome(cmd) + prefix = getAddressPrefix(cmd) + node = getRPC(cmd) + keyringBackend = getKeyringBackend(cmd) + keyringDir = getKeyringDir(cmd) + gas = getGas(cmd) + gasPrices = getGasPrices(cmd) + ) + + options := []cosmosclient.Option{ + cosmosclient.WithAddressPrefix(prefix), + cosmosclient.WithHome(home), + cosmosclient.WithKeyringBackend(keyringBackend), + cosmosclient.WithKeyringDir(keyringDir), + cosmosclient.WithNodeAddress(xurl.HTTPEnsurePort(node)), + } + + if gas != "" { + options = append(options, cosmosclient.WithGas(gas)) + } + if gasPrices != "" { + options = append(options, cosmosclient.WithGasPrices(gasPrices)) + } + + return cosmosclient.New(cmd.Context(), options...) +} + func getRPC(cmd *cobra.Command) (rpc string) { - rpc, _ = cmd.Flags().GetString(flagRPC) + rpc, _ = cmd.Flags().GetString(flagNode) return } diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index b3cd26db7c..a8eed5cb1e 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/ignite-hq/cli/ignite/pkg/cliui" - "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" "github.com/spf13/cobra" ) @@ -26,25 +25,12 @@ func NewNodeQueryBankBalances() *cobra.Command { } func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { - var ( - inputAccount = args[0] - prefix = getAddressPrefix(cmd) - node = getRPC(cmd) - home = getHome(cmd) - keyringBackend = getKeyringBackend(cmd) - keyringDir = getKeyringDir(cmd) - ) + inputAccount := args[0] + session := cliui.New() defer session.Cleanup() - client, err := cosmosclient.New( - cmd.Context(), - cosmosclient.WithAddressPrefix(prefix), - cosmosclient.WithHome(home), - cosmosclient.WithKeyringBackend(keyringBackend), - cosmosclient.WithKeyringDir(keyringDir), - cosmosclient.WithNodeAddress(node), - ) + client, err := newNodeCosmosClient(cmd) if err != nil { return err } diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 48c0d3ac6e..0b666bfe73 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ignite-hq/cli/ignite/pkg/cliui" - "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" "github.com/spf13/cobra" ) @@ -33,15 +32,8 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { fromAccountInput = args[0] toAccountInput = args[1] amount = args[2] - home = getHome(cmd) - prefix = getAddressPrefix(cmd) from = getFrom(cmd) - node = getRPC(cmd) - keyringBackend = getKeyringBackend(cmd) - keyringDir = getKeyringDir(cmd) generateOnly = getGenerateOnly(cmd) - gas = getGas(cmd) - gasPrices = getGasPrices(cmd) ) session := cliui.New() @@ -49,15 +41,7 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { session.StartSpinner("Sending transaction...") - client, err := cosmosclient.New(cmd.Context(), - cosmosclient.WithAddressPrefix(prefix), - cosmosclient.WithHome(home), - cosmosclient.WithKeyringBackend(keyringBackend), - cosmosclient.WithKeyringDir(keyringDir), - cosmosclient.WithNodeAddress(node), - cosmosclient.WithGas(gas), - cosmosclient.WithGasPrices(gasPrices), - ) + client, err := newNodeCosmosClient(cmd) if err != nil { return err } diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index 77dfe31bec..0af9cfe349 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -61,7 +61,7 @@ type Registry struct { // Option configures your registry. type Option func(*Registry) -func WithKeyringDir(path string) Option { +func WithKeyringDirPath(path string) Option { return func(c *Registry) { c.keyringDir = path } @@ -105,7 +105,7 @@ func NewStandalone(options ...Option) (Registry, error) { return New( append([]Option{ WithKeyringServiceName(KeyringServiceName), - WithKeyringDir(KeyringHome), + WithKeyringDirPath(KeyringHome), }, options...)..., ) } diff --git a/integration/app.go b/integration/app.go new file mode 100644 index 0000000000..c83251963c --- /dev/null +++ b/integration/app.go @@ -0,0 +1,225 @@ +package envtest + +import ( + "fmt" + "os" + "path" + "path/filepath" + "strconv" + "time" + + "github.com/ignite-hq/cli/ignite/chainconfig" + "github.com/ignite-hq/cli/ignite/pkg/availableport" + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite-hq/cli/ignite/pkg/gocmd" + "github.com/ignite-hq/cli/ignite/pkg/xurl" + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v2" +) + +const ServeTimeout = time.Minute * 15 + +const defaultConfigFileName = "config.yml" + +type App struct { + path string + configPath string + homePath string + + env Env +} + +type AppOption func(*App) + +func AppConfigPath(path string) AppOption { + return func(o *App) { + o.configPath = path + } +} + +func AppHomePath(path string) AppOption { + return func(o *App) { + o.homePath = path + } +} + +// Scaffold scaffolds an app to a unique appPath and returns it. +func (e Env) Scaffold(name string, flags ...string) App { + root := e.TmpDir() + + e.Exec("scaffold an app", + step.NewSteps(step.New( + step.Exec( + IgniteApp, + append([]string{ + "scaffold", + "chain", + name, + }, flags...)..., + ), + step.Workdir(root), + )), + ) + + var ( + appDirName = path.Base(name) + appSourcePath = filepath.Join(root, appDirName) + appHomePath = e.AppHome(appDirName) + ) + + e.t.Cleanup(func() { os.RemoveAll(appHomePath) }) + + return e.App(appSourcePath, AppHomePath(appHomePath)) +} + +func (e Env) App(path string, options ...AppOption) App { + app := App{ + path: path, + } + + for _, apply := range options { + apply(&app) + } + + if app.configPath == "" { + app.configPath = filepath.Join(path, defaultConfigFileName) + } + + return app +} + +func (a App) SourcePath() string { + return a.path +} + +// Serve serves an application lives under path with options where msg describes the +// execution from the serving action. +// unless calling with Must(), Serve() will not exit test runtime on failure. +func (a App) Serve(msg string, options ...ExecOption) (ok bool) { + serveCommand := []string{ + "chain", + "serve", + "-v", + } + + if a.homePath != "" { + serveCommand = append(serveCommand, "--home", a.homePath) + } + if a.configPath != "" { + serveCommand = append(serveCommand, "--config", a.configPath) + } + + return a.env.Exec(msg, + step.NewSteps(step.New( + step.Exec(IgniteApp, serveCommand...), + step.Workdir(a.path), + )), + options..., + ) +} + +// Simulate runs the simulation test for the app +func (a App) Simulate(numBlocks, blockSize int) { + a.env.Exec("running the simulation tests", + step.NewSteps(step.New( + step.Exec( + IgniteApp, // TODO + "chain", + "simulate", + "--numBlocks", + strconv.Itoa(numBlocks), + "--blockSize", + strconv.Itoa(blockSize), + ), + step.Workdir(a.path), + )), + ) +} + +// EnsureSteady ensures that app living at the path can compile and its tests are passing. +func (a App) EnsureSteady() { + _, statErr := os.Stat(a.configPath) + + require.False(a.env.t, os.IsNotExist(statErr), "config.yml cannot be found") + + a.env.Exec("make sure app is steady", + step.NewSteps(step.New( + step.Exec(gocmd.Name(), "test", "./..."), + step.Workdir(a.path), + )), + ) +} + +// EnableFaucet enables faucet by finding a random port for the app faucet and update config.yml +// with this port and provided coins options. +func (a App) EnableFaucet(coins, coinsMax []string) (faucetAddr string) { + // find a random available port + port, err := availableport.Find(1) + require.NoError(a.env.t, err) + + a.EditConfig(func(conf *chainconfig.Config) { + conf.Faucet.Port = port[0] + conf.Faucet.Coins = coins + conf.Faucet.CoinsMax = coinsMax + }) + + addr, err := xurl.HTTP(fmt.Sprintf("0.0.0.0:%d", port[0])) + require.NoError(a.env.t, err) + + return addr +} + +// RandomizeServerPorts randomizes server ports for the app at path, updates +// its config.yml and returns new values. +func (a App) RandomizeServerPorts() chainconfig.Host { + // generate random server ports and servers list. + ports, err := availableport.Find(6) + require.NoError(a.env.t, err) + + genAddr := func(port int) string { + return fmt.Sprintf("localhost:%d", port) + } + + servers := chainconfig.Host{ + RPC: genAddr(ports[0]), + P2P: genAddr(ports[1]), + Prof: genAddr(ports[2]), + GRPC: genAddr(ports[3]), + GRPCWeb: genAddr(ports[4]), + API: genAddr(ports[5]), + } + + a.EditConfig(func(conf *chainconfig.Config) { + conf.Host = servers + }) + + return servers +} + +// UseRandomHomeDir sets in the blockchain config files generated temporary directories for home directories +// Returns the random home directory +func (a App) UseRandomHomeDir() (homeDirPath string) { + dir := a.env.TmpDir() + + a.EditConfig(func(conf *chainconfig.Config) { + conf.Init.Home = dir + }) + + return dir +} + +func (a App) EditConfig(apply func(*chainconfig.Config)) { + f, err := os.OpenFile(a.configPath, os.O_RDWR|os.O_CREATE, 0755) + require.NoError(a.env.t, err) + defer f.Close() + + var conf chainconfig.Config + require.NoError(a.env.t, yaml.NewDecoder(f).Decode(&conf)) + + apply(&conf) + + require.NoError(a.env.t, f.Truncate(0)) + _, err = f.Seek(0, 0) + require.NoError(a.env.t, err) + require.NoError(a.env.t, yaml.NewEncoder(f).Encode(conf)) +} diff --git a/integration/env.go b/integration/env.go index ddfe629de2..fb6d82adb4 100644 --- a/integration/env.go +++ b/integration/env.go @@ -1,38 +1,32 @@ package envtest import ( - "bytes" "context" "errors" "fmt" - "io" "os" - "path" "path/filepath" "strconv" + "strings" "testing" "time" "github.com/cenkalti/backoff" - "github.com/goccy/go-yaml" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ignite/cli/ignite/chainconfig" - "github.com/ignite/cli/ignite/pkg/availableport" - "github.com/ignite/cli/ignite/pkg/cmdrunner" - "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosfaucet" - "github.com/ignite/cli/ignite/pkg/gocmd" "github.com/ignite/cli/ignite/pkg/httpstatuschecker" "github.com/ignite/cli/ignite/pkg/xexec" "github.com/ignite/cli/ignite/pkg/xurl" ) const ( - ServeTimeout = time.Minute * 15 - IgniteApp = "ignite" - ConfigYML = "config.yml" + IgniteApp = "ignite" +) + +const ( + Stargate = "stargate" ) var isCI, _ = strconv.ParseBool(os.Getenv("CI")) @@ -71,186 +65,6 @@ func (e Env) Ctx() context.Context { return e.ctx } -type execOptions struct { - ctx context.Context - shouldErr, shouldRetry bool - stdout, stderr io.Writer -} - -type ExecOption func(*execOptions) - -// ExecShouldError sets the expectations of a command's execution to end with a failure. -func ExecShouldError() ExecOption { - return func(o *execOptions) { - o.shouldErr = true - } -} - -// ExecCtx sets cancelation context for the execution. -func ExecCtx(ctx context.Context) ExecOption { - return func(o *execOptions) { - o.ctx = ctx - } -} - -// ExecStdout captures stdout of an execution. -func ExecStdout(w io.Writer) ExecOption { - return func(o *execOptions) { - o.stdout = w - } -} - -// ExecStderr captures stderr of an execution. -func ExecStderr(w io.Writer) ExecOption { - return func(o *execOptions) { - o.stderr = w - } -} - -// ExecRetry retries command until it is successful before context is canceled. -func ExecRetry() ExecOption { - return func(o *execOptions) { - o.shouldRetry = true - } -} - -// Exec executes a command step with options where msg describes the expectation from the test. -// unless calling with Must(), Exec() will not exit test runtime on failure. -func (e Env) Exec(msg string, steps step.Steps, options ...ExecOption) (ok bool) { - opts := &execOptions{ - ctx: e.ctx, - stdout: io.Discard, - stderr: io.Discard, - } - for _, o := range options { - o(opts) - } - var ( - stdout = &bytes.Buffer{} - stderr = &bytes.Buffer{} - ) - copts := []cmdrunner.Option{ - cmdrunner.DefaultStdout(io.MultiWriter(stdout, opts.stdout)), - cmdrunner.DefaultStderr(io.MultiWriter(stderr, opts.stderr)), - } - if isCI { - copts = append(copts, cmdrunner.EndSignal(os.Kill)) - } - err := cmdrunner. - New(copts...). - Run(opts.ctx, steps...) - if err == context.Canceled { - err = nil - } - if err != nil { - fmt.Fprintln(os.Stderr, err) - if opts.shouldRetry && opts.ctx.Err() == nil { - time.Sleep(time.Second) - return e.Exec(msg, steps, options...) - } - } - - if err != nil { - msg = fmt.Sprintf("%s\n\nLogs:\n\n%s\n\nError Logs:\n\n%s\n", - msg, - stdout.String(), - stderr.String()) - } - if opts.shouldErr { - return assert.Error(e.t, err, msg) - } - return assert.NoError(e.t, err, msg) -} - -const ( - Stargate = "stargate" -) - -// Scaffold scaffolds an app to a unique appPath and returns it. -func (e Env) Scaffold(name string, flags ...string) (appPath string) { - root := e.TmpDir() - e.Exec("scaffold an app", - step.NewSteps(step.New( - step.Exec( - IgniteApp, - append([]string{ - "scaffold", - "chain", - name, - }, flags...)..., - ), - step.Workdir(root), - )), - ) - - appDir := path.Base(name) - - // Cleanup the home directory and cache of the app - e.t.Cleanup(func() { - os.RemoveAll(filepath.Join(e.Home(), fmt.Sprintf(".%s", appDir))) - }) - - return filepath.Join(root, appDir) -} - -// Serve serves an application lives under path with options where msg describes the -// execution from the serving action. -// unless calling with Must(), Serve() will not exit test runtime on failure. -func (e Env) Serve(msg, path, home, configPath string, options ...ExecOption) (ok bool) { - serveCommand := []string{ - "chain", - "serve", - "-v", - } - - if home != "" { - serveCommand = append(serveCommand, "--home", home) - } - if configPath != "" { - serveCommand = append(serveCommand, "--config", configPath) - } - - return e.Exec(msg, - step.NewSteps(step.New( - step.Exec(IgniteApp, serveCommand...), - step.Workdir(path), - )), - options..., - ) -} - -// Simulate runs the simulation test for the app -func (e Env) Simulate(appPath string, numBlocks, blockSize int) { - e.Exec("running the simulation tests", - step.NewSteps(step.New( - step.Exec( - IgniteApp, - "chain", - "simulate", - "--numBlocks", - strconv.Itoa(numBlocks), - "--blockSize", - strconv.Itoa(blockSize), - ), - step.Workdir(appPath), - )), - ) -} - -// EnsureAppIsSteady ensures that app living at the path can compile and its tests -// are passing. -func (e Env) EnsureAppIsSteady(appPath string) { - _, statErr := os.Stat(filepath.Join(appPath, ConfigYML)) - require.False(e.t, os.IsNotExist(statErr), "config.yml cannot be found") - - e.Exec("make sure app is steady", - step.NewSteps(step.New( - step.Exec(gocmd.Name(), "test", "./..."), - step.Workdir(appPath), - )), - ) -} - // IsAppServed checks that app is served properly and servers are started to listening // before ctx canceled. func (e Env) IsAppServed(ctx context.Context, host chainconfig.Host) error { @@ -266,6 +80,7 @@ func (e Env) IsAppServed(ctx context.Context, host chainconfig.Host) error { } return err } + return backoff.Retry(checkAlive, backoff.WithContext(backoff.NewConstantBackOff(time.Second), ctx)) } @@ -275,104 +90,25 @@ func (e Env) IsFaucetServed(ctx context.Context, faucetClient cosmosfaucet.HTTPC _, err := faucetClient.FaucetInfo(ctx) return err } + return backoff.Retry(checkAlive, backoff.WithContext(backoff.NewConstantBackOff(time.Second), ctx)) } // TmpDir creates a new temporary directory. func (e Env) TmpDir() (path string) { - path, err := os.MkdirTemp("", "integration") - require.NoError(e.t, err, "create a tmp dir") - e.t.Cleanup(func() { os.RemoveAll(path) }) - return path -} - -func (e Env) SetKeyringBackend(path string, configFile string, keyringBackend string) { - configyml, conf := e.openConfig(path, configFile) - defer configyml.Close() - - conf.Init.KeyringBackend = keyringBackend - e.saveConfig(configyml, conf) -} -func (e Env) SetConfigMnemonic(path string, configFile string, accountName string, mnemonic string) { - configyml, conf := e.openConfig(path, configFile) - defer configyml.Close() - - found := false - for i, acc := range conf.Accounts { - if acc.Name == accountName { - conf.Accounts[i].Mnemonic = mnemonic - found = true - break - } - } - - if !found { - e.t.FailNow() - } - - e.saveConfig(configyml, conf) -} - -// RandomizeServerPorts randomizes server ports for the app at path, updates -// its config.yml and returns new values. -func (e Env) RandomizeServerPorts(path string, configFile string) chainconfig.Host { - configyml, conf := e.openConfig(path, configFile) - defer configyml.Close() - - // generate random server ports and servers list. - ports, err := availableport.Find(6) - require.NoError(e.t, err) - - genAddr := func(port int) string { - return fmt.Sprintf("localhost:%d", port) - } - - servers := chainconfig.Host{ - RPC: genAddr(ports[0]), - P2P: genAddr(ports[1]), - Prof: genAddr(ports[2]), - GRPC: genAddr(ports[3]), - GRPCWeb: genAddr(ports[4]), - API: genAddr(ports[5]), - } - - // update config.yml with the generated servers list. - conf.Host = servers - e.saveConfig(configyml, conf) - - return servers + return e.t.TempDir() } -// ConfigureFaucet finds a random port for the app faucet and updates config.yml with this port and provided coins options -func (e Env) ConfigureFaucet(path string, configFile string, coins, coinsMax []string) string { - configyml, conf := e.openConfig(path, configFile) - defer configyml.Close() - - // find a random available port - port, err := availableport.Find(1) - require.NoError(e.t, err) - - conf.Faucet.Port = port[0] - conf.Faucet.Coins = coins - conf.Faucet.CoinsMax = coinsMax - e.saveConfig(configyml, conf) - - addr, err := xurl.HTTP(fmt.Sprintf("0.0.0.0:%d", port[0])) +// Home returns user's home dir. +func (e Env) Home() string { + home, err := os.UserHomeDir() require.NoError(e.t, err) - - return addr + return home } -// SetRandomHomeConfig sets in the blockchain config files generated temporary directories for home directories -// Returns the random home directory -func (e Env) SetRandomHomeConfig(path string, configFile string) string { - configyml, conf := e.openConfig(path, configFile) - defer configyml.Close() - - conf.Init.Home = e.TmpDir() - e.saveConfig(configyml, conf) - - return conf.Init.Home +// AppHome returns app's root home/data dir path. +func (e Env) AppHome(name string) string { + return filepath.Join(e.Home(), fmt.Sprintf(".%s", name)) } // Must fails the immediately if not ok. @@ -383,40 +119,14 @@ func (e Env) Must(ok bool) { } } -// Home returns user's home dir. -func (e Env) Home() string { - home, err := os.UserHomeDir() - require.NoError(e.t, err) - return home -} - -// AppdHome returns appd's home dir. -func (e Env) AppdHome(name string) string { - return filepath.Join(e.Home(), fmt.Sprintf(".%s", name)) +func (e Env) HasFailed() bool { + return e.t.Failed() } -// openConfig opens the config file and returns both the file itself and an unmarshalled config object -// The returned file must be closed -func (e Env) openConfig(path string, configFile string) (*os.File, chainconfig.Config) { - if configFile == "" { - configFile = ConfigYML - } - - // update config.yml with the generated temporary directories - configyml, err := os.OpenFile(filepath.Join(path, configFile), os.O_RDWR|os.O_CREATE, 0755) - require.NoError(e.t, err) - - var conf chainconfig.Config - require.NoError(e.t, yaml.NewDecoder(configyml).Decode(&conf)) - - return configyml, conf +func (e Env) RequireExpectations() { + e.Must(e.HasFailed()) } -// saveConfig saves the profided conf object to the configyml file -// saveConfig does not close the file -func (e Env) saveConfig(configyml *os.File, conf chainconfig.Config) { - require.NoError(e.t, configyml.Truncate(0)) - _, err := configyml.Seek(0, 0) - require.NoError(e.t, err) - require.NoError(e.t, yaml.NewEncoder(configyml).Encode(conf)) +func Contains(s, partial string) bool { + return strings.Contains(s, strings.TrimSpace(partial)) } diff --git a/integration/exec.go b/integration/exec.go new file mode 100644 index 0000000000..ce2b8f19e7 --- /dev/null +++ b/integration/exec.go @@ -0,0 +1,105 @@ +package envtest + +import ( + "bytes" + "context" + "fmt" + "io" + "os" + "time" + + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner" + "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/stretchr/testify/assert" +) + +type execOptions struct { + ctx context.Context + shouldErr, shouldRetry bool + stdout, stderr io.Writer +} + +type ExecOption func(*execOptions) + +// ExecShouldError sets the expectations of a command's execution to end with a failure. +func ExecShouldError() ExecOption { + return func(o *execOptions) { + o.shouldErr = true + } +} + +// ExecCtx sets cancelation context for the execution. +func ExecCtx(ctx context.Context) ExecOption { + return func(o *execOptions) { + o.ctx = ctx + } +} + +// ExecStdout captures stdout of an execution. +func ExecStdout(w io.Writer) ExecOption { + return func(o *execOptions) { + o.stdout = w + } +} + +// ExecStderr captures stderr of an execution. +func ExecStderr(w io.Writer) ExecOption { + return func(o *execOptions) { + o.stderr = w + } +} + +// ExecRetry retries command until it is successful before context is canceled. +func ExecRetry() ExecOption { + return func(o *execOptions) { + o.shouldRetry = true + } +} + +// Exec executes a command step with options where msg describes the expectation from the test. +// unless calling with Must(), Exec() will not exit test runtime on failure. +func (e Env) Exec(msg string, steps step.Steps, options ...ExecOption) (ok bool) { + opts := &execOptions{ + ctx: e.ctx, + stdout: io.Discard, + stderr: io.Discard, + } + for _, o := range options { + o(opts) + } + var ( + stdout = &bytes.Buffer{} + stderr = &bytes.Buffer{} + ) + copts := []cmdrunner.Option{ + cmdrunner.DefaultStdout(io.MultiWriter(stdout, opts.stdout)), + cmdrunner.DefaultStderr(io.MultiWriter(stderr, opts.stderr)), + } + if isCI { + copts = append(copts, cmdrunner.EndSignal(os.Kill)) + } + err := cmdrunner. + New(copts...). + Run(opts.ctx, steps...) + if err == context.Canceled { + err = nil + } + if err != nil { + fmt.Fprintln(os.Stderr, err) + if opts.shouldRetry && opts.ctx.Err() == nil { + time.Sleep(time.Second) + return e.Exec(msg, steps, options...) + } + } + + if err != nil { + msg = fmt.Sprintf("%s\n\nLogs:\n\n%s\n\nError Logs:\n\n%s\n", + msg, + stdout.String(), + stderr.String()) + } + if opts.shouldErr { + return assert.Error(e.t, err, msg) + } + return assert.NoError(e.t, err, msg) +} diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index 23abb4fbf2..a9e76f820f 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -3,61 +3,99 @@ package node_test import ( "bytes" "context" - "strings" + "path/filepath" "testing" "time" + "github.com/alecthomas/assert" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/stretchr/testify/require" + "github.com/ignite-hq/cli/ignite/chainconfig" "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" + "github.com/ignite-hq/cli/ignite/pkg/xurl" envtest "github.com/ignite-hq/cli/integration" ) +const keyringTestDirName = "keyring-test" const testPrefix = "testpref" -const aliceMnemonic = "trade physical mention claw forum fork night rate distance steak monster among soldier custom cave cloud addict runway melody current witness destroy version forward" -const aliceAddress = "testpref148akaazpnhce4gjcxy8l59969dtaxxrceju4m6" -const bobMnemonic = "alcohol alert unknown tissue clap basic slide air treat liquid proof toward outdoor loyal depart toddler cabbage glimpse warm outer switch output theme try" -const bobAddress = "testpref1nrzh528qngagy6vzgt2yc8p9quv8adjxn7rk65" func TestNodeQueryBankBalances(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) - servers = env.RandomizeServerPorts(path, "") - rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + name = "blog" + alice = "alice" + + env = envtest.New(t) + app = env.Scaffold(name, "--address-prefix", testPrefix) + home = env.AppHome(name) + servers = app.RandomizeServerPorts() + accKeyringDir = t.TempDir() ) - env.SetKeyringBackend(path, "", keyring.BackendTest) - env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) - env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + node, err := xurl.HTTP(servers.RPC) + require.NoError(t, err) + + defer env.RequireExpectations() + + // TODO use INMEM + ca, err := cosmosaccount.New( + cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), + ) + require.NoError(t, err) + + aliceAccount, aliceMnemonic, err := ca.Create(alice) + require.NoError(t, err) + + app.EditConfig(func(conf *chainconfig.Config) { + conf.Accounts = []chainconfig.Account{ + { + Name: alice, + Mnemonic: aliceMnemonic, + Coins: []string{"5600a", "1200b"}, + }, + } + conf.Init.KeyringBackend = keyring.BackendTest + }) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "account", + "import", + alice, + "--keyring-dir", + accKeyringDir, + "--non-interactive", + "--secret", + aliceMnemonic, + ), + )), + )) var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + isBackendAliveErr error ) + // do not fail the test in a goroutine, it has to be done in the main. go func() { defer cancel() - isBackendAliveErr := env.IsAppServed(ctx, servers) - require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { + return + } // error "account doesn't have any balances" occurs if a sleep is not included + // TODO find another way without sleep, with retry+ctx routine. time.Sleep(time.Second * 1) - env.Must(env.Exec("import alice", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), - )), - )) - env.Must(env.Exec("import bob", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), - )), - )) + b := &bytes.Buffer{} - var accountOutputBuffer = &bytes.Buffer{} - env.Must(env.Exec("query bank balances", + env.Exec("query bank balances by account name", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -66,23 +104,30 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(accountOutputBuffer), + envtest.ExecStdout(b), + ) + + assert.True(t, envtest.Contains(b.String(), ` +Amount Denom +5600 a +1200 b`, )) - require.True(t, strings.Contains(accountOutputBuffer.String(), `Amount Denom -100000000 stake -20000 token`)) - var addressOutputBuffer = &bytes.Buffer{} - env.Must(env.Exec("query bank balances", + if env.HasFailed() { + return + } + + b.Reset() + + env.Exec("query bank balances by address", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -90,24 +135,31 @@ func TestNodeQueryBankBalances(t *testing.T) { "query", "bank", "balances", - aliceAddress, - "--rpc", - "http://"+servers.RPC, + aliceAccount.Address(testPrefix), + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(addressOutputBuffer), + envtest.ExecStdout(b), + ) + + assert.True(t, envtest.Contains(b.String(), `, +Amount Denom +5600 a +1200 b`, )) - require.True(t, strings.Contains(addressOutputBuffer.String(), `Amount Denom -100000000 stake -20000 token`)) - var paginationFirstPageOutput = &bytes.Buffer{} - env.Must(env.Exec("query bank balances with pagination", + if env.HasFailed() { + return + } + + b.Reset() + + env.Exec("query bank balances with pagination -page 1", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -116,8 +168,8 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", @@ -127,16 +179,23 @@ func TestNodeQueryBankBalances(t *testing.T) { "--page", "1", ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(paginationFirstPageOutput), + envtest.ExecStdout(b), + ) + + assert.True(t, envtest.Contains(b.String(), ` +Amount Denom +5600 a`, )) - require.True(t, strings.Contains(paginationFirstPageOutput.String(), `Amount Denom -100000000 stake`)) - require.False(t, strings.Contains(paginationFirstPageOutput.String(), `token`)) + assert.False(t, envtest.Contains(b.String(), `token`)) - var paginationSecondPageOutput = &bytes.Buffer{} - env.Must(env.Exec("query bank balances with pagination", + if env.HasFailed() { + return + } + + b.Reset() + + env.Exec("query bank balances with pagination -page 2", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -145,8 +204,8 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", @@ -156,15 +215,23 @@ func TestNodeQueryBankBalances(t *testing.T) { "--page", "2", ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(paginationSecondPageOutput), + envtest.ExecStdout(b), + ) + + assert.True(t, envtest.Contains(b.String(), ` +Amount Denom +1200 b`, )) - require.True(t, strings.Contains(paginationSecondPageOutput.String(), `Amount Denom -20000 token`)) - require.False(t, strings.Contains(paginationSecondPageOutput.String(), `stake`)) + assert.False(t, envtest.Contains(b.String(), `stake`)) + + if env.HasFailed() { + return + } - env.Must(env.Exec("query bank balances fail with non-existent account name", + b.Reset() + + env.Exec("query bank balances fail with non-existent account name", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -173,19 +240,22 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "nonexistentaccount", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), envtest.ExecShouldError(), - )) + ) - env.Must(env.Exec("query bank balances fail with non-existent address", + if env.HasFailed() { + return + } + + env.Exec("query bank balances fail with non-existent address", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -194,19 +264,22 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", testPrefix+"1gspvt8qsk8cryrsxnqt452cjczjm5ejdgla24e", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), envtest.ExecShouldError(), - )) + ) - env.Must(env.Exec("query bank balances fail with wrong prefix", + if env.HasFailed() { + return + } + + env.Exec("query bank balances should fail with a wrong prefix", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -215,15 +288,18 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, + // the default prefix will fail this test, which is on purpose. ), - step.Workdir(rndWorkdir), )), envtest.ExecShouldError(), - )) + ) }() - env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) + + require.NoError(t, isBackendAliveErr, "app cannot get online in time") } diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index e6f1b9fb48..7e85116498 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -4,54 +4,116 @@ import ( "bytes" "context" "fmt" + "path/filepath" "strings" "testing" "time" + "github.com/alecthomas/assert" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/stretchr/testify/require" + "github.com/ignite-hq/cli/ignite/chainconfig" "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" + "github.com/ignite-hq/cli/ignite/pkg/xurl" envtest "github.com/ignite-hq/cli/integration" ) func TestNodeTxBankSend(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) - servers = env.RandomizeServerPorts(path, "") - rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + name = "blog" + alice = "alice" + bob = "bob" + + env = envtest.New(t) + app = env.Scaffold(name, "--address-prefix", testPrefix) + home = env.AppHome(name) + servers = app.RandomizeServerPorts() + accKeyringDir = t.TempDir() ) - env.SetKeyringBackend(path, "", keyring.BackendTest) - env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) - env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + node, err := xurl.HTTP(servers.RPC) + require.NoError(t, err) + + defer env.RequireExpectations() + + ca, err := cosmosaccount.New( + cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), + ) + require.NoError(t, err) + + aliceAccount, aliceMnemonic, err := ca.Create(alice) + require.NoError(t, err) + + bobAccount, bobMnemonic, err := ca.Create(bob) + require.NoError(t, err) + + app.EditConfig(func(conf *chainconfig.Config) { + conf.Accounts = []chainconfig.Account{ + { + Name: alice, + Mnemonic: aliceMnemonic, + Coins: []string{"500a", "600b"}, + }, + { + Name: bob, + Mnemonic: bobMnemonic, + Coins: []string{"2500a", "2600b"}, + }, + } + conf.Init.KeyringBackend = keyring.BackendTest + }) + + env.Must(env.Exec("import alice", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "account", + "import", + "alice", + "--keyring-dir", + accKeyringDir, + "--non-interactive", + "--secret", aliceMnemonic, + ), + )), + )) + + env.Must(env.Exec("import bob", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "account", + "import", + "bob", + "--keyring-dir", + accKeyringDir, + "--non-interactive", + "--secret", bobMnemonic, + ), + )), + )) var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + isBackendAliveErr error ) go func() { defer cancel() - isBackendAliveErr := env.IsAppServed(ctx, servers) - require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { + return + } // error "account doesn't have any balances" occurs if a sleep is not included + // TODO find another way without sleep, with retry+ctx routine. time.Sleep(time.Second * 1) - env.Must(env.Exec("import alice", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), - )), - )) - env.Must(env.Exec("import bob", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), - )), - )) - - env.Must(env.Exec("send 100token from alice to bob", + env.Exec("send 100token from alice to bob", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -64,18 +126,21 @@ func TestNodeTxBankSend(t *testing.T) { "100token", "--from", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - )) + ) + + if env.HasFailed() { + return + } - env.Must(env.Exec("send 2stake from bob to alice using addresses", + env.Exec("send 2stake from bob to alice using addresses", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -83,23 +148,26 @@ func TestNodeTxBankSend(t *testing.T) { "tx", "bank", "send", - bobAddress, - aliceAddress, + bobAccount.Address(testPrefix), + aliceAccount.Address(testPrefix), "2stake", "--from", "bob", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - )) + ) - env.Must(env.Exec("send 5token from alice to bob using a combination of address and account", + if env.HasFailed() { + return + } + + env.Exec("send 5token from alice to bob using a combination of address and account", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -108,25 +176,30 @@ func TestNodeTxBankSend(t *testing.T) { "bank", "send", "alice", - bobAddress, + bobAccount.Address(testPrefix), "5token", "--from", "alice", - "--rpc", - "http://"+servers.RPC, + "--node", + node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - )) + ) + + if env.HasFailed() { + return + } + // TODO find another way without sleep, with retry+ctx routine. time.Sleep(time.Second * 1) - var aliceBalanceCheckBuffer = &bytes.Buffer{} - env.Must(env.Exec("query bank balances for alice", + b := &bytes.Buffer{} + + env.Exec("query bank balances for alice", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -142,16 +215,23 @@ func TestNodeTxBankSend(t *testing.T) { "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(aliceBalanceCheckBuffer), - )) - require.True(t, strings.Contains(aliceBalanceCheckBuffer.String(), `Amount Denom + envtest.ExecStdout(b), + ) + + assert.True(t, envtest.Contains(b.String(), ` +Amount Denom 100000002 stake -19895 token`)) +19895 token`, + )) + + if env.HasFailed() { + return + } - var bobBalanceCheckBuffer = &bytes.Buffer{} - env.Must(env.Exec("query bank balances for bob", + b.Reset() + + env.Exec("query bank balances for bob", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -167,39 +247,48 @@ func TestNodeTxBankSend(t *testing.T) { "--address-prefix", testPrefix, ), - step.Workdir(rndWorkdir), )), - envtest.ExecStdout(bobBalanceCheckBuffer), - )) - require.True(t, strings.Contains(bobBalanceCheckBuffer.String(), `Amount Denom + envtest.ExecStdout(b), + ) + + assert.True(t, strings.Contains(b.String(), ` +Amount Denom 99999998 stake -10105 token`)) +10105 token`, + )) }() - env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) + + require.NoError(t, isBackendAliveErr, "app cannot get online in time") } func TestNodeTxBankSendGenerateOnly(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) - servers = env.RandomizeServerPorts(path, "") - rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + name = "blog" + alice = "alice" + bob = "bob" + + env = envtest.New(t) + app = env.Scaffold(name, "--address-prefix", testPrefix) + home = env.AppHome(name) + servers = app.RandomizeServerPorts() + accKeyringDir = t.TempDir() ) - env.SetKeyringBackend(path, "", keyring.BackendTest) - env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) - env.SetConfigMnemonic(path, "", "bob", bobMnemonic) - var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + isBackendAliveErr error ) go func() { defer cancel() - isBackendAliveErr := env.IsAppServed(ctx, servers) - require.NoError(t, isBackendAliveErr, "app cannot get online in time") + + if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { + return + } // error "account doesn't exist" occurs if a sleep is not included time.Sleep(time.Second * 1) @@ -245,20 +334,37 @@ func TestNodeTxBankSendGenerateOnly(t *testing.T) { }() env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + + require.NoError(t, isBackendAliveErr, "app cannot get online in time") } func TestNodeTxBankSendWithGas(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--address-prefix", testPrefix) - servers = env.RandomizeServerPorts(path, "") - rndWorkdir = t.TempDir() // To make sure we can run these commands from anywhere + name = "blog" + alice = "alice" + bob = "bob" + + env = envtest.New(t) + app = env.Scaffold(name, "--address-prefix", testPrefix) + home = env.AppHome(name) + servers = app.RandomizeServerPorts() + accKeyringDir = t.TempDir() ) - env.SetKeyringBackend(path, "", keyring.BackendTest) - env.SetConfigMnemonic(path, "", "alice", aliceMnemonic) - env.SetConfigMnemonic(path, "", "bob", bobMnemonic) + node, err := xurl.HTTP(servers.RPC) + require.NoError(t, err) + + defer env.RequireExpectations() + + ca, err := cosmosaccount.New( + cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), + ) + require.NoError(t, err) + + aliceAccount, aliceMnemonic, err := ca.Create(alice) + require.NoError(t, err) var ( ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) @@ -373,5 +479,8 @@ func TestNodeTxBankSendWithGas(t *testing.T) { require.True(t, strings.Contains(generateOutput.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`)) }() + env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + + require.NoError(t, isBackendAliveErr, "app cannot get online in time") } From 8924f77fb3e7c89e8195a9b3cd73e206c680d7f9 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 26 Jul 2022 17:43:24 +0200 Subject: [PATCH 06/42] Merge branch 'develop' into issue-2489-node-banks-cmds Fixed a bunch of conflicts with recent renaming --- go.mod | 3 - go.sum | 335 +----------------- ignite/cmd/account_create.go | 2 +- ignite/cmd/account_delete.go | 2 +- ignite/cmd/account_export.go | 2 +- ignite/cmd/account_import.go | 2 +- ignite/cmd/account_list.go | 2 +- ignite/cmd/account_show.go | 2 +- ignite/cmd/node.go | 4 +- ignite/cmd/node_query_bank_balances.go | 2 +- ignite/cmd/node_tx_bank_send.go | 2 +- ignite/cmd/relayer_configure.go | 2 +- ignite/cmd/relayer_connect.go | 2 +- ignite/pkg/cosmosaccount/cosmosaccount.go | 12 +- .../pkg/cosmosaccount/cosmosaccount_test.go | 9 +- ignite/pkg/cosmosclient/cosmosclient.go | 2 +- ignite/services/network/mocks/account_info.go | 6 +- .../services/network/mocks/campaign_client.go | 6 +- ignite/services/network/mocks/chain.go | 6 +- .../services/network/mocks/cosmos_client.go | 45 +-- .../services/network/mocks/launch_client.go | 6 +- .../services/network/mocks/profile_client.go | 6 +- .../services/network/mocks/reward_client.go | 6 +- ignite/services/network/queries.go | 42 --- integration/account/cmd_account_test.go | 6 +- integration/app.go | 10 +- integration/exec.go | 4 +- integration/node/cmd_query_bank_test.go | 14 +- integration/node/cmd_tx_bank_send_test.go | 16 +- 29 files changed, 87 insertions(+), 471 deletions(-) diff --git a/go.mod b/go.mod index eac1c9de13..fcd3e3044e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.18 require ( github.com/99designs/keyring v1.2.1 github.com/AlecAivazis/survey/v2 v2.1.1 - github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 github.com/blang/semver v3.5.1+incompatible github.com/briandowns/spinner v1.11.1 github.com/buger/jsonparser v1.1.1 @@ -71,8 +70,6 @@ require ( github.com/Microsoft/hcsshim v0.9.2 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/alecthomas/chroma v0.8.2 // indirect - github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 // indirect - github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 // indirect github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect diff --git a/go.sum b/go.sum index bc10f29b89..eb4e1c8ff0 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -15,7 +13,6 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -47,25 +44,21 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= -github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/AlecAivazis/survey/v2 v2.1.1 h1:LEMbHE0pLj75faaVEKClEX1TM4AJmmnOh9eimREzLWI= github.com/AlecAivazis/survey/v2 v2.1.1/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= -github.com/Antonboom/errname v0.1.4/go.mod h1:jRXo3m0E0EuCnK3wbsSVH3X55Z4iTDLl6ZfCxwFj4TM= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -97,7 +90,6 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -107,15 +99,9 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -135,7 +121,6 @@ github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2 github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim v0.9.2 h1:wB06W5aYFfUB3IvootYAY2WnOmIdgPGfqSI6tufQNnY= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= @@ -147,7 +132,6 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -156,7 +140,6 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -187,16 +170,12 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 h1:axBiC50cNZOs7ygH5BgQp4N+aYrZ2DNpWZ1KG3VOSOM= github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2/go.mod h1:jnzFpU88PccN/tPPhCpnNU8mZphvKxYM9lLNkd8e+os= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= @@ -212,17 +191,12 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY= github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= @@ -241,13 +215,10 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/briandowns/spinner v1.11.1 h1:OixPqDEcX3juo5AjQZAnFPbeUA0jvkp2qzB5gOZJ/L0= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= @@ -293,7 +264,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/charmbracelet/bubbles v0.7.5/go.mod h1:IRTORFvhEI6OUH7WhN2Ks8Z8miNGimk1BE6cmHijOkM= github.com/charmbracelet/bubbles v0.7.6 h1:SCAp4ZEUf2tBNEsufo+Xxxu2dvbFhYSDPrX45toQZrM= github.com/charmbracelet/bubbles v0.7.6/go.mod h1:0D4XRYK0tjo8JMvflz1obpVcOikNZSG46SFauoZj22s= @@ -306,7 +276,6 @@ github.com/charmbracelet/glamour v0.2.1-0.20210311152407-2b8307dcb400 h1:vj8zwTs github.com/charmbracelet/glamour v0.2.1-0.20210311152407-2b8307dcb400/go.mod h1:VO5pQW96Vj3qJy9ikwb5Zo8lcvt2ZDFoE3UXl+SduQs= github.com/charmbracelet/glow v1.4.0 h1:pqOa+FsrjLb9aQXcX7xEj0OFZParmR0JEwhdSf1AVHc= github.com/charmbracelet/glow v1.4.0/go.mod h1:PmzpVs6fvXd60PmqRkbKtSz412SfDFPD3XbraI1hnJQ= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -336,11 +305,8 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= @@ -375,14 +341,12 @@ github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/containerd v1.6.2 h1:pcaPUGbYW8kBw6OgIZwIVIeEhdWVrBzsoCfVJ5BjrLU= github.com/containerd/containerd v1.6.2/go.mod h1:sidY30/InSE1j2vdD1ihtKoJz+lWdaXMdiAeIupaf+s= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -451,7 +415,6 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -459,28 +422,17 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.44.2/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU80QCZUPnHr4= -github.com/cosmos/cosmos-sdk v0.44.3/go.mod h1:bA3+VenaR/l/vDiYzaiwbWvRPWHMBX2jG0ygiFtiBp0= -github.com/cosmos/cosmos-sdk v0.44.4/go.mod h1:0QTCOkE8IWu5LZyfnbbjFjxYRIcV4pBOr7+zPpJwl58= -github.com/cosmos/cosmos-sdk v0.44.5/go.mod h1:maUA6m2TBxOJZkbwl0eRtEBgTX37kcaiOWU5t1HEGaY= -github.com/cosmos/cosmos-sdk v0.45.4 h1:eStDAhJdMY8n5arbBRe+OwpNeBSunxSBHp1g55ulfdA= -github.com/cosmos/cosmos-sdk v0.45.4/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= +github.com/cosmos/cosmos-sdk v0.45.5 h1:GVrZM+lss6y626Pq6loxh/3KLRgK/J6/alTkcKkYmGU= +github.com/cosmos/cosmos-sdk v0.45.5/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= -github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= -github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= -github.com/cosmos/iavl v0.17.1/go.mod h1:7aisPZK8yCpQdy3PMvKeO+bhq1NwDjUwjzxwwROUxFk= -github.com/cosmos/iavl v0.17.2/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= -github.com/cosmos/ibc-go v1.2.2/go.mod h1:XmYjsRFOs6Q9Cz+CSsX21icNoH27vQKb3squgnCOCbs= -github.com/cosmos/ibc-go/v2 v2.0.2/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= -github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= -github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= +github.com/cosmos/ibc-go/v3 v3.0.1 h1:JMQhAHYt/chIm240kIXeFIJfQr8m6FR3sE/eDqbpxWA= +github.com/cosmos/ibc-go/v3 v3.0.1/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -498,24 +450,20 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -557,8 +505,8 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -572,15 +520,11 @@ github.com/emicklei/proto v1.9.0 h1:l0QiNT6Qs7Yj0Mb4X6dnWBQer4ebei2BFcgQLbGqUDc= github.com/emicklei/proto v1.9.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -597,7 +541,6 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -615,8 +558,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -628,7 +569,6 @@ github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwv github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= @@ -657,7 +597,6 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -677,24 +616,11 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= @@ -727,7 +653,6 @@ github.com/gobuffalo/uuid v2.0.5+incompatible h1:c5uWRuEnYggYCrT9AJm0U2v1QTG7OVD github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE= github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -744,7 +669,6 @@ github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= @@ -772,7 +696,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -797,21 +720,9 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.42.1/go.mod h1:MuInrVlgg2jq4do6XI1jbkErbVHVbwdrLLtGv6p2wPI= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -835,7 +746,6 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f/go.mod h1:nOFQdrUlIlx6M6ODdSpBj1NVA+VgLC6kmw60mkw34H4= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -849,7 +759,6 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -860,8 +769,6 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -873,13 +780,9 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= @@ -900,21 +803,11 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -922,8 +815,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -956,7 +847,6 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -989,8 +879,6 @@ github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDG github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -999,7 +887,6 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -1021,12 +908,7 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -1034,17 +916,14 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/ansi v1.0.2 h1:+Ei5HCAH0xsrQRCT2PDr4mq9r4Gm4tg+arNdXRkB22s= github.com/jpillora/ansi v1.0.2/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jpillora/chisel v1.7.6/go.mod h1:BC2zg11mTIoyGPUjc2EkTgfz3uUUV93+K9tNYCCU/fw= github.com/jpillora/chisel v1.7.7 h1:eLbzoX+ekDhVmF5CpSJD01NtH/w7QMYeaFCIFbzn9ns= github.com/jpillora/chisel v1.7.7/go.mod h1:X3ZzJDlOSlkMLVY3DMsdrd03rMtugLYk2IOUhvX0SXo= github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA= @@ -1063,26 +942,19 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -1105,21 +977,11 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -1127,7 +989,6 @@ github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoR github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= @@ -1143,9 +1004,7 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1169,28 +1028,22 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-zglob v0.0.3 h1:6Ry4EYsScDyt5di4OI6xw1bYhOqfE5S33Z1OPy+d+To= github.com/mattn/go-zglob v0.0.3/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/meowgorithm/babyenv v1.3.0/go.mod h1:lwNX+J6AGBFqNrMZ2PTLkM6SO+W4X8DOg9zBDO4j3Ig= github.com/meowgorithm/babyenv v1.3.1 h1:18ZEYIgbzoFQfRLF9+lxjRfk/ui6w8U0FWl07CgWvvc= github.com/meowgorithm/babyenv v1.3.1/go.mod h1:lwNX+J6AGBFqNrMZ2PTLkM6SO+W4X8DOg9zBDO4j3Ig= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.1.1/go.mod h1:PKqk4L74K6wVNwY2b6fr+9Qqr/3hIsHVfZCJdbvozrY= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= @@ -1198,10 +1051,8 @@ github.com/microcosm-cc/bluemonday v1.0.4 h1:p0L+CTpo/PLFdkoPcJemLXG+fpMD7pYOoDE github.com/microcosm-cc/bluemonday v1.0.4/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a h1:eU8j/ClY2Ty3qdHnn0TyW3ivFoPC/0F1gQZz8yTxbbE= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a/go.mod h1:v8eSC2SMp9/7FTKUncp7fH9IwPfw+ysMObcEz5FWheQ= @@ -1213,26 +1064,20 @@ github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/sys/mount v0.3.0/go.mod h1:U2Z3ur2rXPFrFmy4q6WMwWrBOAQGYtYTRVM8BIvzbwk= github.com/moby/sys/mount v0.3.1 h1:RX1K0x95oR8j5P1YefKDt7tE1C2kCCixV0H8Aza3GaI= github.com/moby/sys/mount v0.3.1/go.mod h1:6IZknFQiqjLpwuYJD5Zk0qYEuJiws36M88MIXnZHya0= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= @@ -1250,11 +1095,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= @@ -1277,11 +1118,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1297,15 +1135,10 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -1315,7 +1148,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1331,7 +1163,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -1402,7 +1233,6 @@ github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7ir github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -1411,7 +1241,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -1424,10 +1253,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -1464,7 +1291,6 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -1485,16 +1311,6 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -1525,17 +1341,13 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ= @@ -1545,8 +1357,6 @@ github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDN github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1554,7 +1364,6 @@ github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/securego/gosec/v2 v2.8.1/go.mod h1:pUmsq6+VyFEElJMUX+QB3p3LWNHXg1R3xh2ssVJPs8Q= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/ksuid v1.0.3 h1:FoResxvleQwYiPAVKe1tMUlEirodZqlqglIuFsdDntY= github.com/segmentio/ksuid v1.0.3/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= @@ -1563,11 +1372,7 @@ github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLS github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -1583,11 +1388,9 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1600,7 +1403,6 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -1609,7 +1411,6 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= @@ -1626,11 +1427,9 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= @@ -1643,11 +1442,10 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1667,56 +1465,37 @@ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKk github.com/takuoki/gocase v1.0.0 h1:gPwLJTWVm2T1kUiCsKirg/faaIUGVTI0FA3SYr75a44= github.com/takuoki/gocase v1.0.0/go.mod h1:QgOKJrbuJoDrtoKswBX1/Dw8mJrkOV9tbQZJaxaJ6zc= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/flutter/v2 v2.0.3/go.mod h1:hnaVhWhzv2Od1LqZFWrRKwiOHeMonsB9EIWP0AGMPw0= github.com/tendermint/flutter/v2 v2.0.4 h1:0/FndUq1YgzNwfaDMZYHul6hb6A5yBX2nEZfJRaxZcI= github.com/tendermint/flutter/v2 v2.0.4/go.mod h1:hnaVhWhzv2Od1LqZFWrRKwiOHeMonsB9EIWP0AGMPw0= -github.com/tendermint/fundraising v0.3.0 h1:VtHfmVlAS93MUDlt6Em21l3taw6s9kLY/w8Cd1FB9fM= -github.com/tendermint/fundraising v0.3.0/go.mod h1:oJFZUZ/GsACtkYeWScKpHLdqMUThNWpMAi/G47LJUi4= +github.com/tendermint/fundraising v0.3.1-0.20220613014523-03b4a2d4481a h1:DIxap6r3z89JLoaLp6TTtt8XS7Zgfy4XACfG6b+4plE= +github.com/tendermint/fundraising v0.3.1-0.20220613014523-03b4a2d4481a/go.mod h1:oJFZUZ/GsACtkYeWScKpHLdqMUThNWpMAi/G47LJUi4= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/spm v0.1.8/go.mod h1:iHgfQ5YOI6ONc9E7ugGQolVdfSMHpeXfZ/OpXuN/42Q= -github.com/tendermint/spn v0.1.1-0.20211210094128-4ca78a240c57/go.mod h1:p4BO8YC6kOKSKqMfySqaLHfwBmuPE/QcLwnnVhh7H9M= -github.com/tendermint/spn v0.2.1-0.20220609194312-7833ecf4454a h1:+xo1H4r/dLkUcx89/jP88TbVQiA40Rcn7yQyPozIj5k= -github.com/tendermint/spn v0.2.1-0.20220609194312-7833ecf4454a/go.mod h1:5w8qNkgtJM24CcMjqTsVOKnSbz+U2fke7bEGzRlcdHA= -github.com/tendermint/starport v0.19.5 h1:5mI//Q4xPfpzHksX1JPTUgamTtdhrVLq4o6RIlM6TSg= -github.com/tendermint/starport v0.19.5/go.mod h1:XdbMpJ5R6QzP1+yrfsoCk44fnp9/52raponbkvjIMQA= -github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= -github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= -github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= -github.com/tendermint/tendermint v0.34.13/go.mod h1:6RVVRBqwtKhA+H59APKumO+B7Nye4QXSFc6+TYxAxCI= +github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072 h1:J7+gbosE+lUg/m6wGNHs8xRM5ugU3FbdLWwaNg5b9kw= +github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072/go.mod h1:Ek8O0rqggK/yz1ya55hr0tVUPvsAR5sHLLLClTbuPrc= github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= -github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= -github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tendermint/vue v0.3.5 h1:PTZaW0+7/4lRJyUtuZOxFzMCahNLowTadVoCZns2Wmw= github.com/tendermint/vue v0.3.5/go.mod h1:Sg9MGPF+uY+SJ79sdZgtC2LnH+FDU2qWuiRxoZn5bmw= -github.com/tetafro/godot v1.4.9/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= -github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= -github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.3.0/go.mod h1:aF5rnkdtqNWP/gC7vPUO5pKsB0Oac2FDTQP4F+dpZMU= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= @@ -1728,20 +1507,12 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektra/mockery/v2 v2.11.0 h1:9NkC3urGvJS9B0ve5aTbFjksbO9f/u5cZFgCTVJ30jg= github.com/vektra/mockery/v2 v2.11.0/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1763,10 +1534,6 @@ github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHg github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1785,12 +1552,10 @@ github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -1799,7 +1564,6 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3 go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1821,7 +1585,6 @@ go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpK go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= @@ -1831,7 +1594,6 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1856,7 +1618,6 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1867,7 +1628,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1946,7 +1706,6 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1961,7 +1720,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -2004,7 +1762,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -2015,7 +1772,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2051,7 +1807,6 @@ golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2091,7 +1846,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2141,6 +1895,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2184,16 +1939,11 @@ golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -2206,29 +1956,23 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191224055732-dd894d0a8a40/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2238,50 +1982,24 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2309,7 +2027,6 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -2327,7 +2044,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -2345,15 +2061,12 @@ google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2363,7 +2076,6 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -2387,15 +2099,12 @@ google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1m google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2447,7 +2156,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -2463,15 +2171,12 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2493,7 +2198,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2515,7 +2219,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= @@ -2546,10 +2249,6 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/ignite/cmd/account_create.go b/ignite/cmd/account_create.go index 584533dcc1..7a4e8ac0aa 100644 --- a/ignite/cmd/account_create.go +++ b/ignite/cmd/account_create.go @@ -31,7 +31,7 @@ func accountCreateHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_delete.go b/ignite/cmd/account_delete.go index cb48db77d3..6bfa3ea6bb 100644 --- a/ignite/cmd/account_delete.go +++ b/ignite/cmd/account_delete.go @@ -31,7 +31,7 @@ func accountDeleteHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_export.go b/ignite/cmd/account_export.go index 2f5558a3da..b1499718e2 100644 --- a/ignite/cmd/account_export.go +++ b/ignite/cmd/account_export.go @@ -41,7 +41,7 @@ func accountExportHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_import.go b/ignite/cmd/account_import.go index 8ff74d2932..37aeddf9cf 100644 --- a/ignite/cmd/account_import.go +++ b/ignite/cmd/account_import.go @@ -63,7 +63,7 @@ func accountImportHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_list.go b/ignite/cmd/account_list.go index bd821ad912..3e11e27b1e 100644 --- a/ignite/cmd/account_list.go +++ b/ignite/cmd/account_list.go @@ -28,7 +28,7 @@ func accountListHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/account_show.go b/ignite/cmd/account_show.go index ea0d2aa464..609f007abe 100644 --- a/ignite/cmd/account_show.go +++ b/ignite/cmd/account_show.go @@ -30,7 +30,7 @@ func accountShowHandler(cmd *cobra.Command, args []string) error { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(keyringBackend), - cosmosaccount.WithKeyringDir(keyringDir), + cosmosaccount.WithHome(keyringDir), ) if err != nil { return err diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index dde76b0aa7..15529e44d5 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -1,8 +1,8 @@ package ignitecmd import ( - "github.com/ignite-hq/cli/ignite/pkg/cosmosclient" - "github.com/ignite-hq/cli/ignite/pkg/xurl" + "github.com/ignite/cli/ignite/pkg/cosmosclient" + "github.com/ignite/cli/ignite/pkg/xurl" "github.com/spf13/cobra" ) diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index a8eed5cb1e..1d5450fec0 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -3,7 +3,7 @@ package ignitecmd import ( "fmt" - "github.com/ignite-hq/cli/ignite/pkg/cliui" + "github.com/ignite/cli/ignite/pkg/cliui" "github.com/spf13/cobra" ) diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 0b666bfe73..e026811cff 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ignite-hq/cli/ignite/pkg/cliui" + "github.com/ignite/cli/ignite/pkg/cliui" "github.com/spf13/cobra" ) diff --git a/ignite/cmd/relayer_configure.go b/ignite/cmd/relayer_configure.go index 4a963630c1..0e59a43b9b 100644 --- a/ignite/cmd/relayer_configure.go +++ b/ignite/cmd/relayer_configure.go @@ -100,7 +100,7 @@ func relayerConfigureHandler(cmd *cobra.Command, args []string) (err error) { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), - cosmosaccount.WithKeyringDir(getKeyringDir(cmd)), + cosmosaccount.WithHome(getKeyringDir(cmd)), ) if err != nil { return err diff --git a/ignite/cmd/relayer_connect.go b/ignite/cmd/relayer_connect.go index f1e6b4dd80..d83cbbed8e 100644 --- a/ignite/cmd/relayer_connect.go +++ b/ignite/cmd/relayer_connect.go @@ -38,7 +38,7 @@ func relayerConnectHandler(cmd *cobra.Command, args []string) (err error) { ca, err := cosmosaccount.New( cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)), - cosmosaccount.WithKeyringDir(getKeyringDir(cmd)), + cosmosaccount.WithHome(getKeyringDir(cmd)), ) if err != nil { return err diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index 0af9cfe349..ce0ecbf925 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -51,7 +51,7 @@ const ( // Registry for accounts. type Registry struct { - keyringDir string + homePath string keyringServiceName string keyringBackend KeyringBackend @@ -61,9 +61,9 @@ type Registry struct { // Option configures your registry. type Option func(*Registry) -func WithKeyringDirPath(path string) Option { +func WithHome(path string) Option { return func(c *Registry) { - c.keyringDir = path + c.homePath = path } } @@ -84,7 +84,7 @@ func New(options ...Option) (Registry, error) { r := Registry{ keyringServiceName: sdktypes.KeyringServiceName(), keyringBackend: KeyringTest, - keyringDir: KeyringHome, + homePath: KeyringHome, } for _, apply := range options { @@ -93,7 +93,7 @@ func New(options ...Option) (Registry, error) { var err error - r.Keyring, err = keyring.New(r.keyringServiceName, string(r.keyringBackend), r.keyringDir, os.Stdin) + r.Keyring, err = keyring.New(r.keyringServiceName, string(r.keyringBackend), r.homePath, os.Stdin) if err != nil { return Registry{}, err } @@ -105,7 +105,7 @@ func NewStandalone(options ...Option) (Registry, error) { return New( append([]Option{ WithKeyringServiceName(KeyringServiceName), - WithKeyringDirPath(KeyringHome), + WithHome(KeyringHome), }, options...)..., ) } diff --git a/ignite/pkg/cosmosaccount/cosmosaccount_test.go b/ignite/pkg/cosmosaccount/cosmosaccount_test.go index 7ddd5f298f..0588f1cb97 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount_test.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount_test.go @@ -1,17 +1,18 @@ package cosmosaccount_test import ( - "github.com/stretchr/testify/require" "testing" - "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" + "github.com/stretchr/testify/require" + + "github.com/ignite/cli/ignite/pkg/cosmosaccount" ) const testAccountName = "myTestAccount" func TestRegistry(t *testing.T) { tmpDir := t.TempDir() - registry, err := cosmosaccount.New(cosmosaccount.WithKeyringDir(tmpDir)) + registry, err := cosmosaccount.New(cosmosaccount.WithHome(tmpDir)) require.NoError(t, err) account, mnemonic, err := registry.Create(testAccountName) @@ -24,7 +25,7 @@ func TestRegistry(t *testing.T) { require.True(t, getAccount.Info.GetAddress().Equals(account.Info.GetAddress())) secondTmpDir := t.TempDir() - secondRegistry, err := cosmosaccount.New(cosmosaccount.WithKeyringDir(secondTmpDir)) + secondRegistry, err := cosmosaccount.New(cosmosaccount.WithHome(secondTmpDir)) require.NoError(t, err) importedAccount, err := secondRegistry.Import(testAccountName, mnemonic, "") diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index e76dcb1cfd..ca2312da59 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -210,7 +210,7 @@ func New(ctx context.Context, options ...Option) (Client, error) { c.AccountRegistry, err = cosmosaccount.New( cosmosaccount.WithKeyringServiceName(c.keyringServiceName), cosmosaccount.WithKeyringBackend(c.keyringBackend), - cosmosaccount.WithKeyringDir(c.keyringDir), + cosmosaccount.WithHome(c.keyringDir), ) if err != nil { return Client{}, err diff --git a/ignite/services/network/mocks/account_info.go b/ignite/services/network/mocks/account_info.go index 41d46ebb59..55777aa49c 100644 --- a/ignite/services/network/mocks/account_info.go +++ b/ignite/services/network/mocks/account_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -115,13 +115,13 @@ func (_m *AccountInfo) GetType() keyring.KeyType { return r0 } -type NewAccountInfoT interface { +type mockConstructorTestingTNewAccountInfo interface { mock.TestingT Cleanup(func()) } // NewAccountInfo creates a new instance of AccountInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountInfo(t NewAccountInfoT) *AccountInfo { +func NewAccountInfo(t mockConstructorTestingTNewAccountInfo) *AccountInfo { mock := &AccountInfo{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/campaign_client.go b/ignite/services/network/mocks/campaign_client.go index 4bded5b175..1c7b7b2b25 100644 --- a/ignite/services/network/mocks/campaign_client.go +++ b/ignite/services/network/mocks/campaign_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -407,13 +407,13 @@ func (_m *CampaignClient) TotalShares(ctx context.Context, in *types.QueryTotalS return r0, r1 } -type NewCampaignClientT interface { +type mockConstructorTestingTNewCampaignClient interface { mock.TestingT Cleanup(func()) } // NewCampaignClient creates a new instance of CampaignClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCampaignClient(t NewCampaignClientT) *CampaignClient { +func NewCampaignClient(t mockConstructorTestingTNewCampaignClient) *CampaignClient { mock := &CampaignClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/chain.go b/ignite/services/network/mocks/chain.go index 4d407a9e26..a2c997f378 100644 --- a/ignite/services/network/mocks/chain.go +++ b/ignite/services/network/mocks/chain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -251,13 +251,13 @@ func (_m *Chain) SourceURL() string { return r0 } -type NewChainT interface { +type mockConstructorTestingTNewChain interface { mock.TestingT Cleanup(func()) } // NewChain creates a new instance of Chain. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChain(t NewChainT) *Chain { +func NewChain(t mockConstructorTestingTNewChain) *Chain { mock := &Chain{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index 30ff57f1bb..ece181cd7b 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -94,45 +94,6 @@ func (_m *CosmosClient) BroadcastTx(accountName string, msgs ...types.Msg) (cosm return r0, r1 } -// BroadcastTxWithProvision provides a mock function with given fields: accountName, msgs -func (_m *CosmosClient) BroadcastTxWithProvision(accountName string, msgs ...types.Msg) (client.TxBuilder, func() (cosmosclient.Response, error), error) { - _va := make([]interface{}, len(msgs)) - for _i := range msgs { - _va[_i] = msgs[_i] - } - var _ca []interface{} - _ca = append(_ca, accountName) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 client.TxBuilder - if rf, ok := ret.Get(0).(func(string, ...types.Msg) client.TxBuilder); ok { - r0 = rf(accountName, msgs...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(client.TxBuilder) - } - } - - var r1 func() (cosmosclient.Response, error) - if rf, ok := ret.Get(1).(func(string, ...types.Msg) func() (cosmosclient.Response, error)); ok { - r1 = rf(accountName, msgs...) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(func() (cosmosclient.Response, error)) - } - } - - var r2 error - if rf, ok := ret.Get(2).(func(string, ...types.Msg) error); ok { - r2 = rf(accountName, msgs...) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - // ConsensusInfo provides a mock function with given fields: ctx, height func (_m *CosmosClient) ConsensusInfo(ctx context.Context, height int64) (cosmosclient.ConsensusInfo, error) { ret := _m.Called(ctx, height) @@ -191,13 +152,13 @@ func (_m *CosmosClient) Status(ctx context.Context) (*coretypes.ResultStatus, er return r0, r1 } -type NewCosmosClientT interface { +type mockConstructorTestingTNewCosmosClient interface { mock.TestingT Cleanup(func()) } // NewCosmosClient creates a new instance of CosmosClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCosmosClient(t NewCosmosClientT) *CosmosClient { +func NewCosmosClient(t mockConstructorTestingTNewCosmosClient) *CosmosClient { mock := &CosmosClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/launch_client.go b/ignite/services/network/mocks/launch_client.go index ad0740f1fb..2b0a624386 100644 --- a/ignite/services/network/mocks/launch_client.go +++ b/ignite/services/network/mocks/launch_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -347,13 +347,13 @@ func (_m *LaunchClient) VestingAccountAll(ctx context.Context, in *types.QueryAl return r0, r1 } -type NewLaunchClientT interface { +type mockConstructorTestingTNewLaunchClient interface { mock.TestingT Cleanup(func()) } // NewLaunchClient creates a new instance of LaunchClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLaunchClient(t NewLaunchClientT) *LaunchClient { +func NewLaunchClient(t mockConstructorTestingTNewLaunchClient) *LaunchClient { mock := &LaunchClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/profile_client.go b/ignite/services/network/mocks/profile_client.go index 8463ff6060..32f05d0962 100644 --- a/ignite/services/network/mocks/profile_client.go +++ b/ignite/services/network/mocks/profile_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -197,13 +197,13 @@ func (_m *ProfileClient) ValidatorByOperatorAddress(ctx context.Context, in *typ return r0, r1 } -type NewProfileClientT interface { +type mockConstructorTestingTNewProfileClient interface { mock.TestingT Cleanup(func()) } // NewProfileClient creates a new instance of ProfileClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProfileClient(t NewProfileClientT) *ProfileClient { +func NewProfileClient(t mockConstructorTestingTNewProfileClient) *ProfileClient { mock := &ProfileClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/mocks/reward_client.go b/ignite/services/network/mocks/reward_client.go index f3f673f3d5..4f343046cf 100644 --- a/ignite/services/network/mocks/reward_client.go +++ b/ignite/services/network/mocks/reward_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -107,13 +107,13 @@ func (_m *RewardClient) RewardPoolAll(ctx context.Context, in *types.QueryAllRew return r0, r1 } -type NewRewardClientT interface { +type mockConstructorTestingTNewRewardClient interface { mock.TestingT Cleanup(func()) } // NewRewardClient creates a new instance of RewardClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRewardClient(t NewRewardClientT) *RewardClient { +func NewRewardClient(t mockConstructorTestingTNewRewardClient) *RewardClient { mock := &RewardClient{} mock.Mock.Test(t) diff --git a/ignite/services/network/queries.go b/ignite/services/network/queries.go index c77a67ea1e..1f03bf5700 100644 --- a/ignite/services/network/queries.go +++ b/ignite/services/network/queries.go @@ -210,48 +210,6 @@ func (n Network) MainnetAccounts(ctx context.Context, campaignID uint64) (genAcc return genAccs, nil } -func (n Network) GenesisAccount(ctx context.Context, launchID uint64, address string) (networktypes.GenesisAccount, error) { - n.ev.Send(events.New(events.StatusOngoing, "Fetching genesis accounts")) - res, err := n.launchQuery.GenesisAccount(ctx, &launchtypes.QueryGetGenesisAccountRequest{ - LaunchID: launchID, - Address: address, - }) - if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { - return networktypes.GenesisAccount{}, ErrObjectNotFound - } else if err != nil { - return networktypes.GenesisAccount{}, err - } - return networktypes.ToGenesisAccount(res.GenesisAccount), nil -} - -func (n Network) VestingAccount(ctx context.Context, launchID uint64, address string) (networktypes.VestingAccount, error) { - n.ev.Send(events.New(events.StatusOngoing, "Fetching vesting accounts")) - res, err := n.launchQuery.VestingAccount(ctx, &launchtypes.QueryGetVestingAccountRequest{ - LaunchID: launchID, - Address: address, - }) - if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { - return networktypes.VestingAccount{}, ErrObjectNotFound - } else if err != nil { - return networktypes.VestingAccount{}, err - } - return networktypes.ToVestingAccount(res.VestingAccount) -} - -func (n Network) GenesisValidator(ctx context.Context, launchID uint64, address string) (networktypes.GenesisValidator, error) { - n.ev.Send(events.New(events.StatusOngoing, "Fetching genesis validator")) - res, err := n.launchQuery.GenesisValidator(ctx, &launchtypes.QueryGetGenesisValidatorRequest{ - LaunchID: launchID, - Address: address, - }) - if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { - return networktypes.GenesisValidator{}, ErrObjectNotFound - } else if err != nil { - return networktypes.GenesisValidator{}, err - } - return networktypes.ToGenesisValidator(res.GenesisValidator), nil -} - // ChainReward fetches the chain reward from SPN by launch id func (n Network) ChainReward(ctx context.Context, launchID uint64) (rewardtypes.RewardPool, error) { res, err := n.rewardQuery. diff --git a/integration/account/cmd_account_test.go b/integration/account/cmd_account_test.go index 9a03a88223..fffdce29d3 100644 --- a/integration/account/cmd_account_test.go +++ b/integration/account/cmd_account_test.go @@ -5,9 +5,9 @@ import ( "strings" "testing" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" - "github.com/ignite-hq/cli/ignite/pkg/randstr" - envtest "github.com/ignite-hq/cli/integration" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/randstr" + envtest "github.com/ignite/cli/integration" "github.com/stretchr/testify/require" ) diff --git a/integration/app.go b/integration/app.go index c83251963c..a63fc3dad0 100644 --- a/integration/app.go +++ b/integration/app.go @@ -8,11 +8,11 @@ import ( "strconv" "time" - "github.com/ignite-hq/cli/ignite/chainconfig" - "github.com/ignite-hq/cli/ignite/pkg/availableport" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" - "github.com/ignite-hq/cli/ignite/pkg/gocmd" - "github.com/ignite-hq/cli/ignite/pkg/xurl" + "github.com/ignite/cli/ignite/chainconfig" + "github.com/ignite/cli/ignite/pkg/availableport" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/gocmd" + "github.com/ignite/cli/ignite/pkg/xurl" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/integration/exec.go b/integration/exec.go index ce2b8f19e7..3c37b74fb1 100644 --- a/integration/exec.go +++ b/integration/exec.go @@ -8,8 +8,8 @@ import ( "os" "time" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/cmdrunner" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/stretchr/testify/assert" ) diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index a9e76f820f..a919faa139 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -7,15 +7,15 @@ import ( "testing" "time" - "github.com/alecthomas/assert" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/ignite-hq/cli/ignite/chainconfig" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" - "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" - "github.com/ignite-hq/cli/ignite/pkg/xurl" - envtest "github.com/ignite-hq/cli/integration" + "github.com/ignite/cli/ignite/chainconfig" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/xurl" + envtest "github.com/ignite/cli/integration" ) const keyringTestDirName = "keyring-test" @@ -41,7 +41,7 @@ func TestNodeQueryBankBalances(t *testing.T) { // TODO use INMEM ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), ) require.NoError(t, err) diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 7e85116498..0128b5712e 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -9,15 +9,15 @@ import ( "testing" "time" - "github.com/alecthomas/assert" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/ignite-hq/cli/ignite/chainconfig" - "github.com/ignite-hq/cli/ignite/pkg/cmdrunner/step" - "github.com/ignite-hq/cli/ignite/pkg/cosmosaccount" - "github.com/ignite-hq/cli/ignite/pkg/xurl" - envtest "github.com/ignite-hq/cli/integration" + "github.com/ignite/cli/ignite/chainconfig" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/xurl" + envtest "github.com/ignite/cli/integration" ) func TestNodeTxBankSend(t *testing.T) { @@ -40,7 +40,7 @@ func TestNodeTxBankSend(t *testing.T) { defer env.RequireExpectations() ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), ) require.NoError(t, err) @@ -358,7 +358,7 @@ func TestNodeTxBankSendWithGas(t *testing.T) { defer env.RequireExpectations() ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringDirPath(filepath.Join(home, keyringTestDirName)), + cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), ) require.NoError(t, err) From c4508b17caad25a925c27d7684e89e8a392b1c2c Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 26 Jul 2022 18:17:35 +0200 Subject: [PATCH 07/42] wip: fix integration tests due to recent refac --- integration/app.go | 1 + integration/app/cmd_app_test.go | 66 ++++++++++++++--------------- integration/app/cmd_ibc_test.go | 73 ++++++++++++++++----------------- integration/app/tx_test.go | 14 +++---- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/integration/app.go b/integration/app.go index a63fc3dad0..19ecfe70ac 100644 --- a/integration/app.go +++ b/integration/app.go @@ -74,6 +74,7 @@ func (e Env) Scaffold(name string, flags ...string) App { func (e Env) App(path string, options ...AppOption) App { app := App{ + env: e, path: path, } diff --git a/integration/app/cmd_app_test.go b/integration/app/cmd_app_test.go index cfda628644..3316fe604a 100644 --- a/integration/app/cmd_app_test.go +++ b/integration/app/cmd_app_test.go @@ -15,53 +15,53 @@ import ( func TestGenerateAnApp(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) - _, statErr := os.Stat(filepath.Join(path, "x", "blog")) + _, statErr := os.Stat(filepath.Join(app.SourcePath(), "x", "blog")) require.False(t, os.IsNotExist(statErr), "the default module should be scaffolded") - env.EnsureAppIsSteady(path) + app.EnsureSteady() } // TestGenerateAnAppWithName tests scaffolding a new chain using a local name instead of a GitHub URI. func TestGenerateAnAppWithName(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("blog") + env = envtest.New(t) + app = env.Scaffold("blog") ) - _, statErr := os.Stat(filepath.Join(path, "x", "blog")) + _, statErr := os.Stat(filepath.Join(app.SourcePath(), "x", "blog")) require.False(t, os.IsNotExist(statErr), "the default module should be scaffolded") - env.EnsureAppIsSteady(path) + app.EnsureSteady() } func TestGenerateAnAppWithNoDefaultModule(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--no-module") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog", "--no-module") ) - _, statErr := os.Stat(filepath.Join(path, "x", "blog")) + _, statErr := os.Stat(filepath.Join(app.SourcePath(), "x", "blog")) require.True(t, os.IsNotExist(statErr), "the default module should not be scaffolded") - env.EnsureAppIsSteady(path) + app.EnsureSteady() } func TestGenerateAnAppWithNoDefaultModuleAndCreateAModule(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog", "--no-module") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog", "--no-module") ) - defer env.EnsureAppIsSteady(path) + defer app.EnsureSteady() env.Must(env.Exec("should scaffold a new module into a chain that never had modules before", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "first_module"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) } @@ -70,45 +70,45 @@ func TestGenerateAnAppWithWasm(t *testing.T) { t.Skip() var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("add Wasm module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "wasm", "--yes"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should not add Wasm module second time", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "wasm", "--yes"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating an existing module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -116,7 +116,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { env.Must(env.Exec("should prevent creating a module with an invalid name", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example1", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -124,7 +124,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { env.Must(env.Exec("should prevent creating a module with a reserved name", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "tx", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -132,7 +132,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { env.Must(env.Exec("should prevent creating a module with a forbidden prefix", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "ibcfoo", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -140,7 +140,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { env.Must(env.Exec("should prevent creating a module prefixed with an existing module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "examplefoo", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -157,7 +157,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { "account,bank,staking,slashing,example", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -173,7 +173,7 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { "dup,dup", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -190,10 +190,10 @@ func TestGenerateAStargateAppWithEmptyModule(t *testing.T) { "inexistent", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/app/cmd_ibc_test.go b/integration/app/cmd_ibc_test.go index 1bdd1b9034..f8d8838ffc 100644 --- a/integration/app/cmd_ibc_test.go +++ b/integration/app/cmd_ibc_test.go @@ -3,7 +3,6 @@ package app_test import ( - "path/filepath" "testing" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" @@ -13,14 +12,14 @@ import ( func TestCreateModuleWithIBC(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blogibc") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blogibc") ) env.Must(env.Exec("create an IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "foo", "--ibc", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -36,14 +35,14 @@ func TestCreateModuleWithIBC(t *testing.T) { "--path", "./blogibc", ), - step.Workdir(filepath.Dir(path)), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a type in an IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user", "email", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -60,7 +59,7 @@ func TestCreateModuleWithIBC(t *testing.T) { "ordered", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -77,14 +76,14 @@ func TestCreateModuleWithIBC(t *testing.T) { "unordered", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a non IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "non_ibc", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -101,24 +100,24 @@ func TestCreateModuleWithIBC(t *testing.T) { "account,bank,staking,slashing", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } func TestCreateIBCOracle(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/ibcoracle") + env = envtest.New(t) + app = env.Scaffold("github.com/test/ibcoracle") ) env.Must(env.Exec("create an IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "foo", "--ibc", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -135,28 +134,28 @@ func TestCreateIBCOracle(t *testing.T) { "defaultName,isLaunched:bool,minLaunch:uint,maxLaunch:int", "--require-registration", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create the first BandChain oracle integration", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "band", "--yes", "oracleone", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create the second BandChain oracle integration", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "band", "--yes", "oracletwo", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a BandChain oracle with no module specified", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "band", "--yes", "invalidOracle"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -164,7 +163,7 @@ func TestCreateIBCOracle(t *testing.T) { env.Must(env.Exec("should prevent creating a BandChain oracle in a non existent module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "band", "--yes", "invalidOracle", "--module", "nomodule"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -172,32 +171,32 @@ func TestCreateIBCOracle(t *testing.T) { env.Must(env.Exec("create a non-IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "bar", "--params", "name,minLaunch:uint,maxLaunch:int", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a BandChain oracle in a non IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "band", "--yes", "invalidOracle", "--module", "bar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } func TestCreateIBCPacket(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blogibc2") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blogibc2") ) env.Must(env.Exec("create an IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "foo", "--ibc", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -216,14 +215,14 @@ func TestCreateIBCPacket(t *testing.T) { "--ack", "foo:string,bar:int,baz:bool", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a packet with no module specified", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "bar", "text"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -231,7 +230,7 @@ func TestCreateIBCPacket(t *testing.T) { env.Must(env.Exec("should prevent creating a packet in a non existent module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "bar", "text", "--module", "nomodule"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -239,7 +238,7 @@ func TestCreateIBCPacket(t *testing.T) { env.Must(env.Exec("should prevent creating an existing packet", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "bar", "post", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -266,52 +265,52 @@ func TestCreateIBCPacket(t *testing.T) { "victory:bool", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a custom field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "type", "--yes", "custom-type", "customField:uint", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a packet with a custom field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "foo-baz", "customField:CustomType", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a packet with no send message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "nomessage", "foo", "--no-message", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a packet with no field", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "empty", "--module", "foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a non-IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "bar", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a packet in a non IBC module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "packet", "--yes", "foo", "text", "--module", "bar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/app/tx_test.go b/integration/app/tx_test.go index 9f7ad74f24..b6346a634e 100644 --- a/integration/app/tx_test.go +++ b/integration/app/tx_test.go @@ -25,8 +25,8 @@ func TestSignTxWithDashedAppName(t *testing.T) { var ( env = envtest.New(t) appname = "dashed-app-name" - path = env.Scaffold(appname) - host = env.RandomizeServerPorts(path, "") + app = env.Scaffold(appname) + host = app.RandomizeServerPorts() ctx, cancel = context.WithCancel(env.Ctx()) ) @@ -37,7 +37,7 @@ func TestSignTxWithDashedAppName(t *testing.T) { env.Exec("scaffold a simple list", step.NewSteps(step.New( - step.Workdir(path), + step.Workdir(app.SourcePath()), step.Exec( envtest.IgniteApp, "scaffold", @@ -103,7 +103,7 @@ func TestSignTxWithDashedAppName(t *testing.T) { isTxBodyRetrieved = env.Exec("sign a tx", steps, envtest.ExecRetry()) }() - env.Must(env.Serve("should serve", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve", envtest.ExecCtx(ctx))) if !isTxBodyRetrieved { t.FailNow() @@ -116,8 +116,8 @@ func TestGetTxViaGRPCGateway(t *testing.T) { var ( env = envtest.New(t) appname = randstr.Runes(10) - path = env.Scaffold(fmt.Sprintf("github.com/test/%s", appname)) - host = env.RandomizeServerPorts(path, "") + app = env.Scaffold(fmt.Sprintf("github.com/test/%s", appname)) + host = app.RandomizeServerPorts() ctx, cancel = context.WithCancel(env.Ctx()) ) @@ -258,7 +258,7 @@ func TestGetTxViaGRPCGateway(t *testing.T) { isTxBodyRetrieved = env.Exec("retrieve account addresses", steps, envtest.ExecRetry()) }() - env.Must(env.Serve("should serve", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve", envtest.ExecCtx(ctx))) if !isTxBodyRetrieved { t.FailNow() From a3760f835ceb0a8749a23342da20425a73a50bd2 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Wed, 27 Jul 2022 16:03:17 +0200 Subject: [PATCH 08/42] test: finish apply refac in tests --- integration/chain/cache_test.go | 24 +++++----- integration/chain/cmd_serve_test.go | 44 ++++++++----------- integration/chain/config_test.go | 10 ++--- integration/cosmosgen/cosmosgen_test.go | 16 +++---- integration/faucet/faucet_test.go | 8 ++-- integration/list/cmd_list_test.go | 33 +++++++------- integration/map/cmd_map_test.go | 36 +++++++-------- integration/node/cmd_tx_bank_send_test.go | 14 +++--- .../other_components/cmd_message_test.go | 23 +++++----- .../other_components/cmd_query_test.go | 27 ++++++------ integration/simulation/simapp_test.go | 18 ++++---- integration/single/cmd_singleton_test.go | 25 +++++------ 12 files changed, 134 insertions(+), 144 deletions(-) diff --git a/integration/chain/cache_test.go b/integration/chain/cache_test.go index f815416e70..bfd752fd8a 100644 --- a/integration/chain/cache_test.go +++ b/integration/chain/cache_test.go @@ -18,11 +18,11 @@ import ( func TestCliWithCaching(t *testing.T) { var ( env = envtest.New(t) - path = env.Scaffold("github.com/test/cacheblog") - vueGenerated = filepath.Join(path, "vue/src/store/generated") - openapiGenerated = filepath.Join(path, "docs/static/openapi.yml") - typesDir = filepath.Join(path, "x/cacheblog/types") - servers = env.RandomizeServerPorts(path, "") + app = env.Scaffold("github.com/test/cacheblog") + vueGenerated = filepath.Join(app.SourcePath(), "vue/src/store/generated") + openapiGenerated = filepath.Join(app.SourcePath(), "docs/static/openapi.yml") + typesDir = filepath.Join(app.SourcePath(), "x/cacheblog/types") + servers = app.RandomizeServerPorts() ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) isBackendAliveErr error ) @@ -38,7 +38,7 @@ func TestCliWithCaching(t *testing.T) { "myfield2:bool", "--yes", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -52,7 +52,7 @@ func TestCliWithCaching(t *testing.T) { "mytypefield", "--yes", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -64,11 +64,11 @@ func TestCliWithCaching(t *testing.T) { "build", "--proto-all-modules", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() deleteCachedFiles(t, vueGenerated, openapiGenerated, typesDir) @@ -80,11 +80,11 @@ func TestCliWithCaching(t *testing.T) { "build", "--proto-all-modules", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() deleteCachedFiles(t, vueGenerated, openapiGenerated, typesDir) @@ -92,7 +92,7 @@ func TestCliWithCaching(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } diff --git a/integration/chain/cmd_serve_test.go b/integration/chain/cmd_serve_test.go index fa820a7eaa..d6193aa621 100644 --- a/integration/chain/cmd_serve_test.go +++ b/integration/chain/cmd_serve_test.go @@ -19,14 +19,14 @@ func TestServeStargateWithWasm(t *testing.T) { var ( env = envtest.New(t) - apath = env.Scaffold("github.com/test/sgblog") - servers = env.RandomizeServerPorts(apath, "") + app = env.Scaffold("github.com/test/sgblog") + servers = app.RandomizeServerPorts() ) env.Must(env.Exec("add Wasm module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "wasm", "--yes"), - step.Workdir(apath), + step.Workdir(app.SourcePath()), )), )) @@ -38,7 +38,7 @@ func TestServeStargateWithWasm(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", apath, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } @@ -46,8 +46,8 @@ func TestServeStargateWithWasm(t *testing.T) { func TestServeStargateWithCustomHome(t *testing.T) { var ( env = envtest.New(t) - apath = env.Scaffold("github.com/test/sgblog2") - servers = env.RandomizeServerPorts(apath, "") + app = env.Scaffold("github.com/test/sgblog2") + servers = app.RandomizeServerPorts() ) var ( @@ -58,7 +58,7 @@ func TestServeStargateWithCustomHome(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", apath, "./home", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } @@ -66,13 +66,10 @@ func TestServeStargateWithCustomHome(t *testing.T) { func TestServeStargateWithConfigHome(t *testing.T) { var ( env = envtest.New(t) - apath = env.Scaffold("github.com/test/sgblog3") - servers = env.RandomizeServerPorts(apath, "") + app = env.Scaffold("github.com/test/sgblog3") + servers = app.RandomizeServerPorts() ) - // Set config homes - env.SetRandomHomeConfig(apath, "") - var ( ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) isBackendAliveErr error @@ -81,7 +78,7 @@ func TestServeStargateWithConfigHome(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", apath, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } @@ -90,19 +87,16 @@ func TestServeStargateWithCustomConfigFile(t *testing.T) { tmpDir := t.TempDir() var ( - env = envtest.New(t) - apath = env.Scaffold("github.com/test/sgblog4") + env = envtest.New(t) + app = env.Scaffold("github.com/test/sgblog4") ) // Move config newConfig := "new_config.yml" newConfigPath := filepath.Join(tmpDir, newConfig) - err := os.Rename(filepath.Join(apath, "config.yml"), newConfigPath) + err := os.Rename(filepath.Join(app.SourcePath(), "config.yml"), newConfigPath) require.NoError(t, err) - servers := env.RandomizeServerPorts(tmpDir, newConfig) - - // Set config homes - env.SetRandomHomeConfig(tmpDir, newConfig) + servers := app.RandomizeServerPorts() var ( ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) @@ -112,7 +106,7 @@ func TestServeStargateWithCustomConfigFile(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", apath, "", newConfigPath, envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } @@ -121,12 +115,10 @@ func TestServeStargateWithCustomConfigFile(t *testing.T) { func TestServeStargateWithName(t *testing.T) { var ( env = envtest.New(t) - apath = env.Scaffold("sgblog5") - servers = env.RandomizeServerPorts(apath, "") + app = env.Scaffold("sgblog5") + servers = app.RandomizeServerPorts() ) - env.SetRandomHomeConfig(apath, "") - ctx, cancel := context.WithTimeout(env.Ctx(), envtest.ServeTimeout) var isBackendAliveErr error @@ -137,7 +129,7 @@ func TestServeStargateWithName(t *testing.T) { isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve with Stargate version", apath, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } diff --git a/integration/chain/config_test.go b/integration/chain/config_test.go index 162d65a01f..80b439ae64 100644 --- a/integration/chain/config_test.go +++ b/integration/chain/config_test.go @@ -20,15 +20,15 @@ func TestOverwriteSDKConfigsAndChainID(t *testing.T) { var ( env = envtest.New(t) appname = randstr.Runes(10) - path = env.Scaffold(fmt.Sprintf("github.com/test/%s", appname)) - servers = env.RandomizeServerPorts(path, "") + app = env.Scaffold(fmt.Sprintf("github.com/test/%s", appname)) + servers = app.RandomizeServerPorts() ctx, cancel = context.WithCancel(env.Ctx()) isBackendAliveErr error ) var c chainconfig.Config - cf := confile.New(confile.DefaultYAMLEncodingCreator, filepath.Join(path, "config.yml")) + cf := confile.New(confile.DefaultYAMLEncodingCreator, filepath.Join(app.SourcePath(), "config.yml")) require.NoError(t, cf.Load(&c)) c.Genesis = map[string]interface{}{"chain_id": "cosmos"} @@ -41,7 +41,7 @@ func TestOverwriteSDKConfigsAndChainID(t *testing.T) { defer cancel() isBackendAliveErr = env.IsAppServed(ctx, servers) }() - env.Must(env.Serve("should serve", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") configs := []struct { @@ -57,7 +57,7 @@ func TestOverwriteSDKConfigsAndChainID(t *testing.T) { for _, c := range configs { var conf map[string]interface{} - cf := confile.New(c.ec, filepath.Join(env.AppdHome(appname), c.relpath)) + cf := confile.New(c.ec, filepath.Join(env.AppHome(appname), c.relpath)) require.NoError(t, cf.Load(&conf)) require.Equal(t, c.expectedVal, conf[c.key]) } diff --git a/integration/cosmosgen/cosmosgen_test.go b/integration/cosmosgen/cosmosgen_test.go index f526cfb872..8da290e614 100644 --- a/integration/cosmosgen/cosmosgen_test.go +++ b/integration/cosmosgen/cosmosgen_test.go @@ -15,8 +15,8 @@ import ( func TestCosmosGen(t *testing.T) { var ( env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") - dirGenerated = filepath.Join(path, "vue/src/store/generated") + app = env.Scaffold("github.com/test/blog") + dirGenerated = filepath.Join(app.SourcePath(), "vue/src/store/generated") ) const ( @@ -33,7 +33,7 @@ func TestCosmosGen(t *testing.T) { "--yes", withMsgModuleName, ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -50,7 +50,7 @@ func TestCosmosGen(t *testing.T) { "--module", withMsgModuleName, ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -63,7 +63,7 @@ func TestCosmosGen(t *testing.T) { "--yes", withoutMsgModuleName, ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -79,7 +79,7 @@ func TestCosmosGen(t *testing.T) { "--module", withoutMsgModuleName, ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -95,7 +95,7 @@ func TestCosmosGen(t *testing.T) { "--module", withoutMsgModuleName, ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -110,7 +110,7 @@ func TestCosmosGen(t *testing.T) { "--yes", "--proto-all-modules", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) diff --git a/integration/faucet/faucet_test.go b/integration/faucet/faucet_test.go index c6e9633763..b3e7fc029f 100644 --- a/integration/faucet/faucet_test.go +++ b/integration/faucet/faucet_test.go @@ -32,9 +32,9 @@ var ( func TestRequestCoinsFromFaucet(t *testing.T) { var ( env = envtest.New(t) - apath = env.Scaffold("github.com/test/faucet") - servers = env.RandomizeServerPorts(apath, "") - faucetURL = env.ConfigureFaucet(apath, "", defaultCoins, maxCoins) + app = env.Scaffold("github.com/test/faucet") + servers = app.RandomizeServerPorts() + faucetURL = app.EnableFaucet(defaultCoins, maxCoins) ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) faucetClient = cosmosfaucet.NewClient(faucetURL) ) @@ -46,7 +46,7 @@ func TestRequestCoinsFromFaucet(t *testing.T) { // serve the app go func() { - env.Serve("should serve app", apath, "", "", envtest.ExecCtx(ctx)) + app.Serve("should serve app", envtest.ExecCtx(ctx)) }() // wait servers to be online diff --git a/integration/list/cmd_list_test.go b/integration/list/cmd_list_test.go index 3dba5eb23e..a77bf7a794 100644 --- a/integration/list/cmd_list_test.go +++ b/integration/list/cmd_list_test.go @@ -3,7 +3,6 @@ package list_test import ( - "path/filepath" "testing" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" @@ -12,21 +11,21 @@ import ( func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a list", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user", "email"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -43,7 +42,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { "--module", "example", ), - step.Workdir(filepath.Dir(path)), + step.Workdir(app.SourcePath()), )), )) @@ -68,7 +67,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { "textCoinsAlias:coins", "--no-simulation", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -83,7 +82,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { "--module", "example", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -98,14 +97,14 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { "--module", "example", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a list with duplicated fields", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "company", "name", "name"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -113,7 +112,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { env.Must(env.Exec("should prevent creating a list with unrecognized field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "employee", "level:itn"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -121,7 +120,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { env.Must(env.Exec("should prevent creating an existing list", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user", "email"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -129,7 +128,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { env.Must(env.Exec("should prevent creating a list whose name is a reserved word", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "map", "size:int"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -137,7 +136,7 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { env.Must(env.Exec("should prevent creating a list containing a field with a reserved word", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "document", "type:int"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -145,17 +144,17 @@ func TestGenerateAnAppWithStargateWithListAndVerify(t *testing.T) { env.Must(env.Exec("create a list with no interaction message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "nomessage", "email", "--no-message"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a list in a non existent module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user", "email", "--module", "idontexist"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/map/cmd_map_test.go b/integration/map/cmd_map_test.go index aa7e6e226b..e549ed92c6 100644 --- a/integration/map/cmd_map_test.go +++ b/integration/map/cmd_map_test.go @@ -12,35 +12,35 @@ import ( func TestCreateMapWithStargate(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a map", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "user", "user-id", "email"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a map with custom path", step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "s", "map", "--yes", "appPath", "email", "--path", filepath.Join(path, "app")), - step.Workdir(filepath.Dir(path)), + step.Exec(envtest.IgniteApp, "s", "map", "--yes", "appPath", "email", "--path", filepath.Join(app.SourcePath(), "app")), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a map with no message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "nomessage", "email", "--no-message"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -57,14 +57,14 @@ func TestCreateMapWithStargate(t *testing.T) { "example", "--no-simulation", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a map with a typename that already exist", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "user", "email", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -72,14 +72,14 @@ func TestCreateMapWithStargate(t *testing.T) { env.Must(env.Exec("create a map in a custom module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "mapUser", "email", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a map with a custom field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "mapDetail", "user:MapUser", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -105,7 +105,7 @@ func TestCreateMapWithStargate(t *testing.T) { "--module", "example", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -124,7 +124,7 @@ func TestCreateMapWithStargate(t *testing.T) { "--module", "example", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -142,7 +142,7 @@ func TestCreateMapWithStargate(t *testing.T) { "--module", "example", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -151,14 +151,14 @@ func TestCreateMapWithStargate(t *testing.T) { step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "message", "--yes", "create-scavenge", "description"), step.Exec(envtest.IgniteApp, "s", "map", "--yes", "scavenge", "description", "--no-message"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating a map with duplicated indexes", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "map_with_duplicated_index", "email", "--index", "foo,foo"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -166,10 +166,10 @@ func TestCreateMapWithStargate(t *testing.T) { env.Must(env.Exec("should prevent creating a map with an index present in fields", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "map", "--yes", "map_with_invalid_index", "email", "--index", "email"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 0128b5712e..5929d96a29 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -270,10 +270,11 @@ func TestNodeTxBankSendGenerateOnly(t *testing.T) { alice = "alice" bob = "bob" - env = envtest.New(t) - app = env.Scaffold(name, "--address-prefix", testPrefix) - home = env.AppHome(name) - servers = app.RandomizeServerPorts() + env = envtest.New(t) + app = env.Scaffold(name, "--address-prefix", testPrefix) + home = env.AppHome(name) + servers = app.RandomizeServerPorts() + rndWorkdir = env.TmpDir() accKeyringDir = t.TempDir() ) @@ -333,7 +334,7 @@ func TestNodeTxBankSendGenerateOnly(t *testing.T) { require.True(t, strings.Contains(generateOutput.String(), `"signatures":[]`)) }() - env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } @@ -349,6 +350,7 @@ func TestNodeTxBankSendWithGas(t *testing.T) { home = env.AppHome(name) servers = app.RandomizeServerPorts() + rndWorkdir = env.TmpDir() accKeyringDir = t.TempDir() ) @@ -480,7 +482,7 @@ func TestNodeTxBankSendWithGas(t *testing.T) { }() - env.Must(env.Serve("should serve with Stargate version", path, "", "", envtest.ExecCtx(ctx))) + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) require.NoError(t, isBackendAliveErr, "app cannot get online in time") } diff --git a/integration/other_components/cmd_message_test.go b/integration/other_components/cmd_message_test.go index 9106485764..bba8ae0615 100644 --- a/integration/other_components/cmd_message_test.go +++ b/integration/other_components/cmd_message_test.go @@ -3,7 +3,6 @@ package other_components_test import ( - "path/filepath" "testing" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" @@ -12,8 +11,8 @@ import ( func TestGenerateAnAppWithMessage(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a message", @@ -30,7 +29,7 @@ func TestGenerateAnAppWithMessage(t *testing.T) { "-r", "foo,bar:int,foobar:bool", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -51,14 +50,14 @@ func TestGenerateAnAppWithMessage(t *testing.T) { "blog", "--no-simulation", ), - step.Workdir(filepath.Dir(path)), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating an existing message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "message", "--yes", "do-foo", "bar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -66,7 +65,7 @@ func TestGenerateAnAppWithMessage(t *testing.T) { env.Must(env.Exec("create a message with a custom signer name", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "message", "--yes", "do-bar", "bar", "--signer", "bar-doer"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -90,21 +89,21 @@ func TestGenerateAnAppWithMessage(t *testing.T) { "textCoins:array.coin", "textCoinsAlias:coins", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a message with the custom field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "message", "--yes", "foo-baz", "customField:CustomType"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "foo", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -125,9 +124,9 @@ func TestGenerateAnAppWithMessage(t *testing.T) { "--response", "foo,bar:int,foobar:bool", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/other_components/cmd_query_test.go b/integration/other_components/cmd_query_test.go index b29a1b2dae..94ec3dc46d 100644 --- a/integration/other_components/cmd_query_test.go +++ b/integration/other_components/cmd_query_test.go @@ -3,7 +3,6 @@ package other_components_test import ( - "path/filepath" "testing" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" @@ -12,8 +11,8 @@ import ( func TestGenerateAnAppWithQuery(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a query", @@ -30,7 +29,7 @@ func TestGenerateAnAppWithQuery(t *testing.T) { "-r", "foo,bar:int,foobar:bool", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -50,7 +49,7 @@ func TestGenerateAnAppWithQuery(t *testing.T) { "--path", "./blog", ), - step.Workdir(filepath.Dir(path)), + step.Workdir(app.SourcePath()), )), )) @@ -69,7 +68,7 @@ func TestGenerateAnAppWithQuery(t *testing.T) { "foo,bar:int,foobar:bool", "--paginated", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -93,21 +92,21 @@ func TestGenerateAnAppWithQuery(t *testing.T) { "textCoins:array.coin", "textCoinsAlias:coins", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a query with the custom field type as a response", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "query", "--yes", "foobaz", "-r", "bar:CustomType"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent using custom type in request params", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "query", "--yes", "bur", "bar:CustomType"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -115,14 +114,14 @@ func TestGenerateAnAppWithQuery(t *testing.T) { env.Must(env.Exec("create an empty query", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "query", "--yes", "foobar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating an existing query", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "query", "--yes", "foo", "bar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -130,7 +129,7 @@ func TestGenerateAnAppWithQuery(t *testing.T) { env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "foo", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -150,9 +149,9 @@ func TestGenerateAnAppWithQuery(t *testing.T) { "--response", "foo,bar:int,foobar:bool", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } diff --git a/integration/simulation/simapp_test.go b/integration/simulation/simapp_test.go index bb12a26d73..1718cbe59f 100644 --- a/integration/simulation/simapp_test.go +++ b/integration/simulation/simapp_test.go @@ -11,42 +11,42 @@ import ( func TestGenerateAnAppAndSimulate(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create a list", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "foo", "foobar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create an singleton type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "single", "--yes", "baz", "foobar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create an singleton type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "noSimapp", "foobar", "--no-simulation"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "message", "--yes", "msgFoo", "foobar"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("scaffold a new module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "new_module"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) @@ -62,9 +62,9 @@ func TestGenerateAnAppAndSimulate(t *testing.T) { "--module", "new_module", ), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.Simulate(path, 100, 50) + app.Simulate(100, 50) } diff --git a/integration/single/cmd_singleton_test.go b/integration/single/cmd_singleton_test.go index bad28e6782..e412083e4e 100644 --- a/integration/single/cmd_singleton_test.go +++ b/integration/single/cmd_singleton_test.go @@ -3,7 +3,6 @@ package single_test import ( - "path/filepath" "testing" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" @@ -12,56 +11,56 @@ import ( func TestCreateSingletonWithStargate(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("github.com/test/blog") + env = envtest.New(t) + app = env.Scaffold("github.com/test/blog") ) env.Must(env.Exec("create an singleton type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "single", "--yes", "user", "email"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create an singleton type with custom path", step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "s", "single", "--yes", "appPath", "email", "--path", path), - step.Workdir(filepath.Dir(path)), + step.Exec(envtest.IgniteApp, "s", "single", "--yes", "appPath", "email", "--path", app.SourcePath()), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create an singleton type with no message", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "single", "--yes", "no-message", "email", "--no-message"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create a module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "module", "--yes", "example", "--require-registration"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create another type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user", "email", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("create another type with a custom field type", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "list", "--yes", "user-detail", "user:User", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) env.Must(env.Exec("should prevent creating an singleton type with a typename that already exist", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "single", "--yes", "user", "email", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), envtest.ExecShouldError(), )) @@ -69,9 +68,9 @@ func TestCreateSingletonWithStargate(t *testing.T) { env.Must(env.Exec("create an singleton type in a custom module", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "s", "single", "--yes", "singleuser", "email", "--module", "example"), - step.Workdir(path), + step.Workdir(app.SourcePath()), )), )) - env.EnsureAppIsSteady(path) + app.EnsureSteady() } From 09ce61b7aab28d211896e8a5f8cfca7d7e47c02a Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 28 Jul 2022 16:35:55 +0200 Subject: [PATCH 09/42] Fix integration test on node command --- integration/node/cmd_query_bank_test.go | 127 ++++----- integration/node/cmd_tx_bank_send_test.go | 302 ++++++---------------- 2 files changed, 130 insertions(+), 299 deletions(-) diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index a919faa139..f51736a5ff 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "path/filepath" + "strings" "testing" "time" @@ -12,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/ignite/cli/ignite/chainconfig" + "github.com/ignite/cli/ignite/pkg/cliui/entrywriter" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" "github.com/ignite/cli/ignite/pkg/xurl" @@ -37,12 +39,9 @@ func TestNodeQueryBankBalances(t *testing.T) { node, err := xurl.HTTP(servers.RPC) require.NoError(t, err) - defer env.RequireExpectations() - - // TODO use INMEM ca, err := cosmosaccount.New( cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), - cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringMemory), ) require.NoError(t, err) @@ -54,9 +53,10 @@ func TestNodeQueryBankBalances(t *testing.T) { { Name: alice, Mnemonic: aliceMnemonic, - Coins: []string{"5600a", "1200b"}, + Coins: []string{"5600atoken", "1200btoken", "100000000stake"}, }, } + conf.Faucet = chainconfig.Faucet{} conf.Init.KeyringBackend = keyring.BackendTest }) @@ -67,11 +67,9 @@ func TestNodeQueryBankBalances(t *testing.T) { "account", "import", alice, - "--keyring-dir", - accKeyringDir, + "--keyring-dir", accKeyringDir, "--non-interactive", - "--secret", - aliceMnemonic, + "--secret", aliceMnemonic, ), )), )) @@ -104,22 +102,20 @@ func TestNodeQueryBankBalances(t *testing.T) { "bank", "balances", "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecStdout(b), ) - assert.True(t, envtest.Contains(b.String(), ` -Amount Denom -5600 a -1200 b`, - )) + var expectedBalances strings.Builder + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, + []string{"5600", "atoken"}, + []string{"1200", "btoken"}, + ) + assert.Contains(t, b.String(), expectedBalances.String()) if env.HasFailed() { return @@ -136,22 +132,15 @@ Amount Denom "bank", "balances", aliceAccount.Address(testPrefix), - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecStdout(b), ) - assert.True(t, envtest.Contains(b.String(), `, -Amount Denom -5600 a -1200 b`, - )) + assert.Contains(t, b.String(), expectedBalances.String()) if env.HasFailed() { return @@ -168,26 +157,22 @@ Amount Denom "bank", "balances", "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, - "--limit", - "1", - "--page", - "1", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, + "--limit", "1", + "--page", "1", ), )), envtest.ExecStdout(b), ) - assert.True(t, envtest.Contains(b.String(), ` -Amount Denom -5600 a`, - )) - assert.False(t, envtest.Contains(b.String(), `token`)) + expectedBalances.Reset() + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, + []string{"5600", "atoken"}, + ) + assert.Contains(t, b.String(), expectedBalances.String()) + assert.NotContains(t, b.String(), "btoken") if env.HasFailed() { return @@ -204,26 +189,22 @@ Amount Denom "bank", "balances", "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, - "--limit", - "1", - "--page", - "2", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, + "--limit", "1", + "--page", "2", ), )), envtest.ExecStdout(b), ) - assert.True(t, envtest.Contains(b.String(), ` -Amount Denom -1200 b`, - )) - assert.False(t, envtest.Contains(b.String(), `stake`)) + expectedBalances.Reset() + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, + []string{"1200", "btoken"}, + ) + assert.Contains(t, b.String(), expectedBalances.String()) + assert.NotContains(t, b.String(), "atoken") if env.HasFailed() { return @@ -240,12 +221,9 @@ Amount Denom "bank", "balances", "nonexistentaccount", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecShouldError(), @@ -264,12 +242,9 @@ Amount Denom "bank", "balances", testPrefix+"1gspvt8qsk8cryrsxnqt452cjczjm5ejdgla24e", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecShouldError(), @@ -288,10 +263,8 @@ Amount Denom "bank", "balances", "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, + "--node", node, + "--keyring-dir", accKeyringDir, // the default prefix will fail this test, which is on purpose. ), )), diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 5929d96a29..b242425617 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -14,21 +14,23 @@ import ( "github.com/stretchr/testify/require" "github.com/ignite/cli/ignite/chainconfig" + "github.com/ignite/cli/ignite/pkg/cliui/entrywriter" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/randstr" "github.com/ignite/cli/ignite/pkg/xurl" envtest "github.com/ignite/cli/integration" ) func TestNodeTxBankSend(t *testing.T) { var ( - name = "blog" - alice = "alice" - bob = "bob" + appname = randstr.Runes(10) + alice = "alice" + bob = "bob" env = envtest.New(t) - app = env.Scaffold(name, "--address-prefix", testPrefix) - home = env.AppHome(name) + app = env.Scaffold(appname, "--address-prefix", testPrefix) + home = env.AppHome(appname) servers = app.RandomizeServerPorts() accKeyringDir = t.TempDir() @@ -37,8 +39,6 @@ func TestNodeTxBankSend(t *testing.T) { node, err := xurl.HTTP(servers.RPC) require.NoError(t, err) - defer env.RequireExpectations() - ca, err := cosmosaccount.New( cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), @@ -56,12 +56,12 @@ func TestNodeTxBankSend(t *testing.T) { { Name: alice, Mnemonic: aliceMnemonic, - Coins: []string{"500a", "600b"}, + Coins: []string{"2000token", "100000000stake"}, }, { Name: bob, Mnemonic: bobMnemonic, - Coins: []string{"2500a", "2600b"}, + Coins: []string{"10000token", "100000000stake"}, }, } conf.Init.KeyringBackend = keyring.BackendTest @@ -74,8 +74,7 @@ func TestNodeTxBankSend(t *testing.T) { "account", "import", "alice", - "--keyring-dir", - accKeyringDir, + "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic, ), @@ -89,8 +88,7 @@ func TestNodeTxBankSend(t *testing.T) { "account", "import", "bob", - "--keyring-dir", - accKeyringDir, + "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic, ), @@ -124,14 +122,10 @@ func TestNodeTxBankSend(t *testing.T) { "alice", "bob", "100token", - "--from", - "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--from", "alice", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), ) @@ -151,14 +145,10 @@ func TestNodeTxBankSend(t *testing.T) { bobAccount.Address(testPrefix), aliceAccount.Address(testPrefix), "2stake", - "--from", - "bob", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--from", "bob", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), ) @@ -180,12 +170,9 @@ func TestNodeTxBankSend(t *testing.T) { "5token", "--from", "alice", - "--node", - node, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), ) @@ -208,22 +195,20 @@ func TestNodeTxBankSend(t *testing.T) { "bank", "balances", "alice", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecStdout(b), ) - assert.True(t, envtest.Contains(b.String(), ` -Amount Denom -100000002 stake -19895 token`, - )) + var expectedBalances strings.Builder + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, + []string{"2", "stake"}, + []string{"1895", "token"}, + ) + assert.Contains(t, b.String(), expectedBalances.String()) if env.HasFailed() { return @@ -240,73 +225,24 @@ Amount Denom "bank", "balances", "bob", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, ), )), envtest.ExecStdout(b), ) - assert.True(t, strings.Contains(b.String(), ` -Amount Denom -99999998 stake -10105 token`, - )) - - }() - - env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) - - require.NoError(t, isBackendAliveErr, "app cannot get online in time") -} - -func TestNodeTxBankSendGenerateOnly(t *testing.T) { - var ( - name = "blog" - alice = "alice" - bob = "bob" - - env = envtest.New(t) - app = env.Scaffold(name, "--address-prefix", testPrefix) - home = env.AppHome(name) - servers = app.RandomizeServerPorts() - rndWorkdir = env.TmpDir() - - accKeyringDir = t.TempDir() - ) - - var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) - isBackendAliveErr error - ) - - go func() { - defer cancel() - - if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { - return - } - - // error "account doesn't exist" occurs if a sleep is not included - time.Sleep(time.Second * 1) - - env.Must(env.Exec("import alice", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), - )), - )) - env.Must(env.Exec("import bob", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), - )), - )) + expectedBalances.Reset() + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, + []string{"99999998", "stake"}, + []string{"10105", "token"}, + ) + assert.Contains(t, b.String(), expectedBalances.String()) + // check generated tx var generateOutput = &bytes.Buffer{} - env.Must(env.Exec("generate unsigned tx", + env.Exec("generate unsigned tx", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -317,81 +253,23 @@ func TestNodeTxBankSendGenerateOnly(t *testing.T) { "alice", "bob", "5token", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, "--generate-only", ), - step.Workdir(rndWorkdir), )), envtest.ExecStdout(generateOutput), - )) - - require.True(t, strings.Contains(generateOutput.String(), fmt.Sprintf(`"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"%s","amount":[{"denom":"token","amount":"5"}]}]`, aliceAddress, bobAddress))) - require.True(t, strings.Contains(generateOutput.String(), `"signatures":[]`)) - }() - - env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) - - require.NoError(t, isBackendAliveErr, "app cannot get online in time") -} - -func TestNodeTxBankSendWithGas(t *testing.T) { - var ( - name = "blog" - alice = "alice" - bob = "bob" - - env = envtest.New(t) - app = env.Scaffold(name, "--address-prefix", testPrefix) - home = env.AppHome(name) - servers = app.RandomizeServerPorts() - - rndWorkdir = env.TmpDir() - accKeyringDir = t.TempDir() - ) - - node, err := xurl.HTTP(servers.RPC) - require.NoError(t, err) - - defer env.RequireExpectations() - - ca, err := cosmosaccount.New( - cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), - cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), - ) - require.NoError(t, err) - - aliceAccount, aliceMnemonic, err := ca.Create(alice) - require.NoError(t, err) - - var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) - ) - - go func() { - defer cancel() - isBackendAliveErr := env.IsAppServed(ctx, servers) - require.NoError(t, isBackendAliveErr, "app cannot get online in time") - - // error "account doesn't have any balances" occurs if a sleep is not included - time.Sleep(time.Second * 1) + ) - env.Must(env.Exec("import alice", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "alice", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", aliceMnemonic), - )), - )) - env.Must(env.Exec("import bob", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "account", "import", "bob", "--keyring-dir", accKeyringDir, "--non-interactive", "--secret", bobMnemonic), - )), - )) + require.Contains(t, generateOutput.String(), + fmt.Sprintf(`"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"%s","amount":[{"denom":"token","amount":"5"}]}]`, + aliceAccount.Address(testPrefix), bobAccount.Address(testPrefix)), + ) + require.Contains(t, generateOutput.String(), `"signatures":[]`) - env.Must(env.Exec("send 100token from alice to bob with gas flags", + // test with gas + env.Exec("send 100token from bob to alice with gas flags", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -399,27 +277,21 @@ func TestNodeTxBankSendWithGas(t *testing.T) { "tx", "bank", "send", - "alice", "bob", - "100token", - "--from", "alice", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, - "--gas", - "200000", - "--gas-prices", - "1stake", + "100token", + "--from", "bob", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, + "--gas", "200000", + "--gas-prices", "1stake", ), - step.Workdir(rndWorkdir), )), - )) + ) - env.Must(env.Exec("send 100token from alice to bob with too little gas", + // not enough minerals + env.Exec("send 100token from alice to bob with too little gas", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -430,26 +302,19 @@ func TestNodeTxBankSendWithGas(t *testing.T) { "alice", "bob", "100token", - "--from", - "alice", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, - "--gas", - "2", - "--gas-prices", - "1stake", + "--from", "alice", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, + "--gas", "2", + "--gas-prices", "1stake", ), - step.Workdir(rndWorkdir), )), envtest.ExecShouldError(), - )) + ) - var generateOutput = &bytes.Buffer{} - env.Must(env.Exec("generate bank send tx with gas flags", + generateOutput.Reset() + env.Exec("generate bank send tx with gas flags", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -460,25 +325,18 @@ func TestNodeTxBankSendWithGas(t *testing.T) { "alice", "bob", "100token", - "--from", - "alice", - "--rpc", - "http://"+servers.RPC, - "--keyring-dir", - accKeyringDir, - "--address-prefix", - testPrefix, - "--gas", - "2000034", - "--gas-prices", - "0.089stake", + "--from", "alice", + "--node", node, + "--keyring-dir", accKeyringDir, + "--address-prefix", testPrefix, + "--gas", "2000034", + "--gas-prices", "0.089stake", "--generate-only", ), - step.Workdir(rndWorkdir), )), envtest.ExecStdout(generateOutput), - )) - require.True(t, strings.Contains(generateOutput.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`)) + ) + require.Contains(t, generateOutput.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`) }() From 92b9ecea8d28bbe8039be9f125f64cd21c21a0a5 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 28 Jul 2022 17:37:52 +0200 Subject: [PATCH 10/42] various improvments in node integration test --- ignite/pkg/cosmosclient/bank.go | 2 +- integration/node/cmd_query_bank_test.go | 13 +++++-------- integration/node/cmd_tx_bank_send_test.go | 19 +++++++------------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go index 4a9eb98db1..8a6e220a96 100644 --- a/ignite/pkg/cosmosclient/bank.go +++ b/ignite/pkg/cosmosclient/bank.go @@ -14,7 +14,7 @@ func (c Client) BankBalances(ctx context.Context, address string, pagination *qu Pagination: pagination, } - resp, err := performQuery[*banktypes.QueryAllBalancesResponse](c, func() (*banktypes.QueryAllBalancesResponse, error) { + resp, err := performQuery(c, func() (*banktypes.QueryAllBalancesResponse, error) { return banktypes.NewQueryClient(c.context).AllBalances(ctx, req) }) if err != nil { diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index f51736a5ff..38c20b5faf 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -16,6 +16,7 @@ import ( "github.com/ignite/cli/ignite/pkg/cliui/entrywriter" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/randstr" "github.com/ignite/cli/ignite/pkg/xurl" envtest "github.com/ignite/cli/integration" ) @@ -25,12 +26,12 @@ const testPrefix = "testpref" func TestNodeQueryBankBalances(t *testing.T) { var ( - name = "blog" - alice = "alice" + appname = randstr.Runes(10) + alice = "alice" env = envtest.New(t) - app = env.Scaffold(name, "--address-prefix", testPrefix) - home = env.AppHome(name) + app = env.Scaffold(appname, "--address-prefix", testPrefix) + home = env.AppHome(appname) servers = app.RandomizeServerPorts() accKeyringDir = t.TempDir() @@ -122,7 +123,6 @@ func TestNodeQueryBankBalances(t *testing.T) { } b.Reset() - env.Exec("query bank balances by address", step.NewSteps(step.New( step.Exec( @@ -147,7 +147,6 @@ func TestNodeQueryBankBalances(t *testing.T) { } b.Reset() - env.Exec("query bank balances with pagination -page 1", step.NewSteps(step.New( step.Exec( @@ -179,7 +178,6 @@ func TestNodeQueryBankBalances(t *testing.T) { } b.Reset() - env.Exec("query bank balances with pagination -page 2", step.NewSteps(step.New( step.Exec( @@ -211,7 +209,6 @@ func TestNodeQueryBankBalances(t *testing.T) { } b.Reset() - env.Exec("query bank balances fail with non-existent account name", step.NewSteps(step.New( step.Exec( diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index b242425617..5b639f95a4 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -181,11 +181,7 @@ func TestNodeTxBankSend(t *testing.T) { return } - // TODO find another way without sleep, with retry+ctx routine. - time.Sleep(time.Second * 1) - b := &bytes.Buffer{} - env.Exec("query bank balances for alice", step.NewSteps(step.New( step.Exec( @@ -215,7 +211,6 @@ func TestNodeTxBankSend(t *testing.T) { } b.Reset() - env.Exec("query bank balances for bob", step.NewSteps(step.New( step.Exec( @@ -241,7 +236,7 @@ func TestNodeTxBankSend(t *testing.T) { assert.Contains(t, b.String(), expectedBalances.String()) // check generated tx - var generateOutput = &bytes.Buffer{} + b.Reset() env.Exec("generate unsigned tx", step.NewSteps(step.New( step.Exec( @@ -259,14 +254,14 @@ func TestNodeTxBankSend(t *testing.T) { "--generate-only", ), )), - envtest.ExecStdout(generateOutput), + envtest.ExecStdout(b), ) - require.Contains(t, generateOutput.String(), + require.Contains(t, b.String(), fmt.Sprintf(`"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"%s","amount":[{"denom":"token","amount":"5"}]}]`, aliceAccount.Address(testPrefix), bobAccount.Address(testPrefix)), ) - require.Contains(t, generateOutput.String(), `"signatures":[]`) + require.Contains(t, b.String(), `"signatures":[]`) // test with gas env.Exec("send 100token from bob to alice with gas flags", @@ -313,7 +308,7 @@ func TestNodeTxBankSend(t *testing.T) { envtest.ExecShouldError(), ) - generateOutput.Reset() + b.Reset() env.Exec("generate bank send tx with gas flags", step.NewSteps(step.New( step.Exec( @@ -334,9 +329,9 @@ func TestNodeTxBankSend(t *testing.T) { "--generate-only", ), )), - envtest.ExecStdout(generateOutput), + envtest.ExecStdout(b), ) - require.Contains(t, generateOutput.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`) + require.Contains(t, b.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`) }() From 8e39bda18a0dc97bd1b7a74b6407838121941f2c Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 28 Jul 2022 17:38:22 +0200 Subject: [PATCH 11/42] test: read test.v to add more trace on step execution That helps when some commands are not running properly. --- ignite/pkg/cmdrunner/cmdrunner.go | 14 +++++++++++++- integration/env.go | 8 ++++++++ integration/exec.go | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ignite/pkg/cmdrunner/cmdrunner.go b/ignite/pkg/cmdrunner/cmdrunner.go index ed3cfe28b8..d1574334d9 100644 --- a/ignite/pkg/cmdrunner/cmdrunner.go +++ b/ignite/pkg/cmdrunner/cmdrunner.go @@ -6,6 +6,7 @@ import ( "io" "os" "os/exec" + "strings" "golang.org/x/sync/errgroup" @@ -21,6 +22,7 @@ type Runner struct { stdin io.Reader workdir string runParallel bool + debug bool } // Option defines option to run commands @@ -68,6 +70,12 @@ func EndSignal(s os.Signal) Option { } } +func EnableDebug() Option { + return func(r *Runner) { + r.debug = true + } +} + // New returns a new commands runner func New(options ...Option) *Runner { runner := &Runner{ @@ -85,9 +93,13 @@ func (r *Runner) Run(ctx context.Context, steps ...*step.Step) error { return nil } g, ctx := errgroup.WithContext(ctx) - for _, step := range steps { + for i, step := range steps { // copy s to a new variable to allocate a new address // so we can safely use it inside goroutines spawned in this loop. + if r.debug { + fmt.Printf("Step %d: %s %s\n", i, step.Exec.Command, + strings.Join(step.Exec.Args, " ")) + } step := step if err := ctx.Err(); err != nil { return err diff --git a/integration/env.go b/integration/env.go index fb6d82adb4..89169c8124 100644 --- a/integration/env.go +++ b/integration/env.go @@ -3,6 +3,7 @@ package envtest import ( "context" "errors" + "flag" "fmt" "os" "path/filepath" @@ -78,6 +79,9 @@ func (e Env) IsAppServed(ctx context.Context, host chainconfig.Host) error { if err == nil && !ok { err = errors.New("app is not online") } + if HasTestVerboseFlag() { + fmt.Printf("IsAppServed at %s: %v\n", addr, err) + } return err } @@ -130,3 +134,7 @@ func (e Env) RequireExpectations() { func Contains(s, partial string) bool { return strings.Contains(s, strings.TrimSpace(partial)) } + +func HasTestVerboseFlag() bool { + return flag.Lookup("test.v").Value.String() == "true" +} diff --git a/integration/exec.go b/integration/exec.go index 3c37b74fb1..cdbc1951fb 100644 --- a/integration/exec.go +++ b/integration/exec.go @@ -75,6 +75,10 @@ func (e Env) Exec(msg string, steps step.Steps, options ...ExecOption) (ok bool) cmdrunner.DefaultStdout(io.MultiWriter(stdout, opts.stdout)), cmdrunner.DefaultStderr(io.MultiWriter(stderr, opts.stderr)), } + if HasTestVerboseFlag() { + fmt.Printf("Executing %d step(s) for %q\n", len(steps), msg) + copts = append(copts, cmdrunner.EnableDebug()) + } if isCI { copts = append(copts, cmdrunner.EndSignal(os.Kill)) } From c66131fd41a6fdfd7857dc1f339b9a064b97043b Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 11:28:30 +0200 Subject: [PATCH 12/42] fix: spinner hides os keyring prompt --- ignite/cmd/node_query_bank_balances.go | 5 ++--- ignite/cmd/node_tx_bank_send.go | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index 1d5450fec0..38e0c929c0 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -27,9 +27,6 @@ func NewNodeQueryBankBalances() *cobra.Command { func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { inputAccount := args[0] - session := cliui.New() - defer session.Cleanup() - client, err := newNodeCosmosClient(cmd) if err != nil { return err @@ -45,6 +42,8 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { return err } + session := cliui.New() + defer session.Cleanup() session.StartSpinner("Querying...") balances, err := client.BankBalances(cmd.Context(), address, pagination) if err != nil { diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index e026811cff..1322211093 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -36,11 +36,6 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { generateOnly = getGenerateOnly(cmd) ) - session := cliui.New() - defer session.Cleanup() - - session.StartSpinner("Sending transaction...") - client, err := newNodeCosmosClient(cmd) if err != nil { return err @@ -79,6 +74,8 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { return err } + session := cliui.New() + defer session.Cleanup() if generateOnly { json, err := tx.EncodeJSON() if err != nil { @@ -89,6 +86,7 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { return session.Println(string(json)) } + session.StartSpinner("Sending transaction...") if _, err := tx.Broadcast(); err != nil { return err } From e736ce31e12080ec80df84a1c9fe509650e1a077 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 14:25:02 +0200 Subject: [PATCH 13/42] Ensure bank send can take account name or address Also simplify the logic by removing the read of the --from flag, which is no longer used in this command. BroadcastTx now takes a cosmosaccount.Account instead of just an account name. Since ensure the account comes from the keyring, and avoid the BroadcastTx impl to re-check that (because the keyring is always checked before the call to BroadcastTx). --- ignite/cmd/node_query_bank_balances.go | 3 +- ignite/cmd/node_tx_bank_send.go | 38 +++++------- ignite/pkg/cosmosaccount/cosmosaccount.go | 19 ++++++ .../pkg/cosmosaccount/cosmosaccount_test.go | 19 ++++++ ignite/pkg/cosmosclient/bank.go | 7 ++- ignite/pkg/cosmosclient/cosmosclient.go | 58 ++++------------- ignite/services/network/campaign.go | 6 +- ignite/services/network/client.go | 2 +- ignite/services/network/join.go | 2 +- ignite/services/network/join_test.go | 62 +++++++++++++++++-- ignite/services/network/launch.go | 4 +- ignite/services/network/launch_test.go | 12 ++-- .../services/network/mocks/cosmos_client.go | 14 ++--- ignite/services/network/network.go | 2 +- ignite/services/network/publish.go | 8 +-- ignite/services/network/publish_test.go | 44 ++++++------- ignite/services/network/request.go | 2 +- ignite/services/network/reward.go | 2 +- ignite/services/network/reward_test.go | 4 +- 19 files changed, 179 insertions(+), 129 deletions(-) diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index 38e0c929c0..f862956fde 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -32,10 +32,11 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { return err } - address, err := client.Bech32Address(inputAccount) + account, err := client.Account(inputAccount) if err != nil { return err } + address := account.Info.GetAddress().String() pagination, err := getPagination(cmd) if err != nil { diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 1322211093..bed5ad15cd 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -1,9 +1,8 @@ package ignitecmd import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ignite/cli/ignite/pkg/cliui" "github.com/spf13/cobra" ) @@ -20,7 +19,6 @@ func NewNodeTxBankSend() *cobra.Command { c.Flags().AddFlagSet(flagSetKeyringBackend()) c.Flags().AddFlagSet(flagSetAccountPrefixes()) c.Flags().AddFlagSet(flagSetKeyringDir()) - c.Flags().AddFlagSet(flagSetTxFrom()) c.Flags().AddFlagSet(flagSetGenerateOnly()) c.Flags().AddFlagSet(flagSetGasFlags()) @@ -32,7 +30,6 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { fromAccountInput = args[0] toAccountInput = args[1] amount = args[2] - from = getFrom(cmd) generateOnly = getGenerateOnly(cmd) ) @@ -41,35 +38,30 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { return err } - // If from flag is missing, check if the "from account" argument is an account name and use that instead - if from == "" { - fromInputIsAccount, err := client.AccountExists(fromAccountInput) - if err != nil { - return err - } - if fromInputIsAccount { - from = fromAccountInput - } else { - return fmt.Errorf("\"--%s\" flag is required when from address is not an account name", flagFrom) - } - } - - fromAddress, err := client.Bech32Address(fromAccountInput) + // fromAccountInput must be an account of the keyring + fromAccount, err := client.Account(fromAccountInput) if err != nil { return err } - - toAddress, err := client.Bech32Address(toAccountInput) + // toAccountInput can be an account of the keyring or a raw address + var toAddress string + toAccount, err := client.Account(toAccountInput) if err != nil { - return err + // account not found in the keyring, ensure it is a raw address + _, _, err := bech32.DecodeAndConvert(toAccountInput) + if err != nil { + return err + } + toAddress = toAccountInput + } else { + toAddress = toAccount.Info.GetAddress().String() } - coins, err := sdk.ParseCoinsNormalized(amount) if err != nil { return err } - tx, err := client.BankSendTx(fromAddress, toAddress, coins, from) + tx, err := client.BankSendTx(fromAccount, toAddress, coins) if err != nil { return err } diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index ce0ecbf925..62b5ce2864 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -264,6 +264,25 @@ func (r Registry) GetByName(name string) (Account, error) { return acc, nil } +// GetByAddress returns an account by its address. +func (r Registry) GetByAddress(address string) (Account, error) { + sdkAddr, err := sdktypes.AccAddressFromBech32(address) + if err != nil { + return Account{}, err + } + info, err := r.Keyring.KeyByAddress(sdkAddr) + if errors.Is(err, dkeyring.ErrKeyNotFound) || errors.Is(err, sdkerrors.ErrKeyNotFound) { + return Account{}, &AccountDoesNotExistError{address} + } + if err != nil { + return Account{}, err + } + return Account{ + Name: info.GetName(), + Info: info, + }, nil +} + // List lists all accounts. func (r Registry) List() ([]Account, error) { info, err := r.Keyring.List() diff --git a/ignite/pkg/cosmosaccount/cosmosaccount_test.go b/ignite/pkg/cosmosaccount/cosmosaccount_test.go index 0588f1cb97..c3127787b7 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount_test.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount_test.go @@ -24,6 +24,22 @@ func TestRegistry(t *testing.T) { require.NoError(t, err) require.True(t, getAccount.Info.GetAddress().Equals(account.Info.GetAddress())) + addr := account.Info.GetAddress().String() + getAccount, err = registry.GetByAddress(addr) + require.NoError(t, err) + require.True(t, getAccount.Info.GetAddress().Equals(account.Info.GetAddress())) + require.Equal(t, getAccount.Name, testAccountName) + require.Equal(t, getAccount.Name, account.Name) + require.Equal(t, getAccount.Name, account.Info.GetName()) + + addr = account.Address("cosmos") + getAccount, err = registry.GetByAddress(addr) + require.NoError(t, err) + require.True(t, getAccount.Info.GetAddress().Equals(account.Info.GetAddress())) + require.Equal(t, getAccount.Name, testAccountName) + require.Equal(t, getAccount.Name, account.Name) + require.Equal(t, getAccount.Name, account.Info.GetName()) + secondTmpDir := t.TempDir() secondRegistry, err := cosmosaccount.New(cosmosaccount.WithHome(secondTmpDir)) require.NoError(t, err) @@ -48,4 +64,7 @@ func TestRegistry(t *testing.T) { _, err = registry.GetByName(testAccountName) var expectedErr *cosmosaccount.AccountDoesNotExistError require.ErrorAs(t, err, &expectedErr) + + _, err = registry.GetByAddress(addr) + require.ErrorAs(t, err, &expectedErr) } diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go index 8a6e220a96..de009e4bfc 100644 --- a/ignite/pkg/cosmosclient/bank.go +++ b/ignite/pkg/cosmosclient/bank.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/ignite/cli/ignite/pkg/cosmosaccount" ) func (c Client) BankBalances(ctx context.Context, address string, pagination *query.PageRequest) (sdk.Coins, error) { @@ -24,12 +25,12 @@ func (c Client) BankBalances(ctx context.Context, address string, pagination *qu return resp.Balances, nil } -func (c Client) BankSendTx(fromAddress string, toAddress string, amount sdk.Coins, fromAccountName string) (TxService, error) { +func (c Client) BankSendTx(fromAccount cosmosaccount.Account, toAddress string, amount sdk.Coins) (TxService, error) { msg := &banktypes.MsgSend{ - FromAddress: fromAddress, + FromAddress: fromAccount.Address(c.addressPrefix), ToAddress: toAddress, Amount: amount, } - return c.CreateTx(fromAccountName, msg) + return c.CreateTx(fromAccount, msg) } diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index ca2312da59..8106cf8326 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -21,7 +21,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdktypes "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -222,8 +221,13 @@ func New(ctx context.Context, options ...Option) (Client, error) { return c, nil } -func (c Client) Account(accountName string) (cosmosaccount.Account, error) { - return c.AccountRegistry.GetByName(accountName) +// Account returns the account with name or address equal to nameOrAddress. +func (c Client) Account(nameOrAddress string) (cosmosaccount.Account, error) { + a, err := c.AccountRegistry.GetByName(nameOrAddress) + if err == nil { + return a, nil + } + return c.AccountRegistry.GetByAddress(nameOrAddress) } // Address returns the account address from account name. @@ -235,39 +239,6 @@ func (c Client) Address(accountName string) (sdktypes.AccAddress, error) { return account.Info.GetAddress(), nil } -func (c Client) AccountExists(accountName string) (bool, error) { - _, err := c.Account(accountName) - var accErr *cosmosaccount.AccountDoesNotExistError - errNotFound := errors.As(err, &accErr) - if errNotFound { - return false, nil - } - - if err != nil { - return false, err - } - - return true, nil -} - -// Bech32Address returns the bech32 address, with the correct prefix, from account name or address. -func (c Client) Bech32Address(accountNameOrAddress string) (string, error) { - defer c.lockBech32Prefix()() - - _, _, err := bech32.DecodeAndConvert(accountNameOrAddress) - if err == nil { - // Already bech32 - return accountNameOrAddress, nil - } - - account, err := c.Account(accountNameOrAddress) - if err != nil { - return "", err - } - - return account.Address(c.addressPrefix), nil -} - func (c Client) Context() client.Context { return c.context } @@ -333,8 +304,8 @@ func performQuery[T any](c Client, q func() (T, error)) (T, error) { return q() } -func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, error) { - txService, err := c.CreateTx(accountName, msgs...) +func (c Client) BroadcastTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (Response, error) { + txService, err := c.CreateTx(account, msgs...) if err != nil { return Response{}, err } @@ -342,17 +313,12 @@ func (c Client) BroadcastTx(accountName string, msgs ...sdktypes.Msg) (Response, return txService.Broadcast() } -func (c Client) CreateTx(accountName string, msgs ...sdktypes.Msg) (TxService, error) { +func (c Client) CreateTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (TxService, error) { defer c.lockBech32Prefix()() - accountAddress, err := c.Address(accountName) - if err != nil { - return TxService{}, err - } - ctx := c.context. - WithFromName(accountName). - WithFromAddress(accountAddress) + WithFromName(account.Name). + WithFromAddress(account.Info.GetAddress()) txf, err := prepareFactory(ctx, c.Factory) if err != nil { diff --git a/ignite/services/network/campaign.go b/ignite/services/network/campaign.go index b32d5a79a7..d674a38ba9 100644 --- a/ignite/services/network/campaign.go +++ b/ignite/services/network/campaign.go @@ -88,7 +88,7 @@ func (n Network) CreateCampaign(name, metadata string, totalSupply sdk.Coins) (u totalSupply, []byte(metadata), ) - res, err := n.cosmos.BroadcastTx(n.account.Name, msgCreateCampaign) + res, err := n.cosmos.BroadcastTx(n.account, msgCreateCampaign) if err != nil { return 0, err } @@ -117,7 +117,7 @@ func (n Network) InitializeMainnet( mainnetChainID, ) - res, err := n.cosmos.BroadcastTx(n.account.Name, msg) + res, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return 0, err } @@ -162,7 +162,7 @@ func (n Network) UpdateCampaign( )) } - if _, err := n.cosmos.BroadcastTx(n.account.Name, msgs...); err != nil { + if _, err := n.cosmos.BroadcastTx(n.account, msgs...); err != nil { return err } n.ev.Send(events.New(events.StatusDone, fmt.Sprintf( diff --git a/ignite/services/network/client.go b/ignite/services/network/client.go index 05fd8b3538..a5ed289ac8 100644 --- a/ignite/services/network/client.go +++ b/ignite/services/network/client.go @@ -25,7 +25,7 @@ func (n Network) CreateClient( rewardsInfo.RevisionHeight, ) - res, err := n.cosmos.BroadcastTx(n.account.Name, msgCreateClient) + res, err := n.cosmos.BroadcastTx(n.account, msgCreateClient) if err != nil { return "", err } diff --git a/ignite/services/network/join.go b/ignite/services/network/join.go index f0d3149c00..82fc07dd31 100644 --- a/ignite/services/network/join.go +++ b/ignite/services/network/join.go @@ -140,7 +140,7 @@ func (n Network) sendValidatorRequest( n.ev.Send(events.New(events.StatusOngoing, "Broadcasting validator transaction")) - res, err := n.cosmos.BroadcastTx(n.account.Name, msg) + res, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return err } diff --git a/ignite/services/network/join_test.go b/ignite/services/network/join_test.go index 84408088e9..105d5ed86e 100644 --- a/ignite/services/network/join_test.go +++ b/ignite/services/network/join_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" launchtypes "github.com/tendermint/spn/x/launch/types" + "github.com/ignite/cli/ignite/pkg/cosmoserror" "github.com/ignite/cli/ignite/services/network/networktypes" "github.com/ignite/cli/ignite/services/network/testutil" ) @@ -44,7 +45,7 @@ func TestJoin(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgRequestAddValidator{ Creator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -97,7 +98,7 @@ func TestJoin(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgRequestAddValidator{ Creator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -146,7 +147,7 @@ func TestJoin(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgRequestAddValidator{ Creator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -201,7 +202,7 @@ func TestJoin(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgRequestAddValidator{ Creator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -225,7 +226,7 @@ func TestJoin(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgRequestAddAccount{ Creator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -295,6 +296,57 @@ func TestJoin(t *testing.T) { testutil.PeerAddress, ) gentxPath = gentx.SaveTo(t, tmp) + genesisPath = testutil.NewGenesis(testutil.ChainID).SaveTo(t, tmp) + suite, network = newSuite(account) + expectedError = errors.New("failed to create account") + ) + + suite.ChainMock.On("NodeID", context.Background()).Return(testutil.NodeID, nil).Once() + suite.ChainMock.On("GenesisPath").Return(genesisPath, nil).Once() + suite.ChainMock.On("DefaultGentxPath").Return(gentxPath, nil).Once() + + suite.LaunchQueryMock. + On( + "VestingAccount", + context.Background(), + &launchtypes.QueryGetVestingAccountRequest{ + Address: account.Address(networktypes.SPN), + LaunchID: testutil.LaunchID, + }). + Return(nil, cosmoserror.ErrNotFound). + Once() + suite.CosmosClientMock. + On( + "BroadcastTx", + account, + &launchtypes.MsgRequestAddAccount{ + Creator: account.Address(networktypes.SPN), + LaunchID: testutil.LaunchID, + Address: account.Address(networktypes.SPN), + Coins: sdk.NewCoins(sdk.NewCoin(TestDenom, sdk.NewInt(TestAmountInt))), + }, + ). + Return( + testutil.NewResponse(&launchtypes.MsgRequestAddAccountResponse{}), + expectedError, + ). + Once() + + joinErr := network.Join( + context.Background(), + suite.ChainMock, + testutil.LaunchID, + WithAccountRequest(sdk.NewCoins(sdk.NewCoin(TestDenom, sdk.NewInt(TestAmountInt)))), + WithPublicAddress(testutil.TCPAddress), + ) + require.Error(t, joinErr) + require.Equal(t, expectedError, joinErr) + suite.AssertAllMocks(t) + }) + + t.Run("failed to send join request, failed to read node id", func(t *testing.T) { + var ( + account = testutil.NewTestAccount(t, testutil.TestAccountName) suite, network = newSuite(account) expectedError = errors.New("failed to get node id") ) diff --git a/ignite/services/network/launch.go b/ignite/services/network/launch.go index 83c0b7204d..782750e68a 100644 --- a/ignite/services/network/launch.go +++ b/ignite/services/network/launch.go @@ -50,7 +50,7 @@ func (n Network) TriggerLaunch(ctx context.Context, launchID uint64, remainingTi msg := launchtypes.NewMsgTriggerLaunch(address, launchID, int64(remainingTime.Seconds())) n.ev.Send(events.New(events.StatusOngoing, "Setting launch time")) - res, err := n.cosmos.BroadcastTx(n.account.Name, msg) + res, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return err } @@ -72,7 +72,7 @@ func (n Network) RevertLaunch(launchID uint64, chain Chain) error { address := n.account.Address(networktypes.SPN) msg := launchtypes.NewMsgRevertLaunch(address, launchID) - _, err := n.cosmos.BroadcastTx(n.account.Name, msg) + _, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return err } diff --git a/ignite/services/network/launch_test.go b/ignite/services/network/launch_test.go index 560c0df475..6604edbcad 100644 --- a/ignite/services/network/launch_test.go +++ b/ignite/services/network/launch_test.go @@ -35,7 +35,7 @@ func TestTriggerLaunch(t *testing.T) { }, nil). Once() suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgTriggerLaunch{ + On("BroadcastTx", account, &launchtypes.MsgTriggerLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, RemainingTime: TestMaxRemainingTime, @@ -112,7 +112,7 @@ func TestTriggerLaunch(t *testing.T) { }, nil). Once() suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgTriggerLaunch{ + On("BroadcastTx", account, &launchtypes.MsgTriggerLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, RemainingTime: TestMaxRemainingTime, @@ -140,7 +140,7 @@ func TestTriggerLaunch(t *testing.T) { }, nil). Once() suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgTriggerLaunch{ + On("BroadcastTx", account, &launchtypes.MsgTriggerLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, RemainingTime: TestMaxRemainingTime, @@ -184,7 +184,7 @@ func TestRevertLaunch(t *testing.T) { suite.ChainMock.On("ResetGenesisTime").Return(nil).Once() suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgRevertLaunch{ + On("BroadcastTx", account, &launchtypes.MsgRevertLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, }). @@ -204,7 +204,7 @@ func TestRevertLaunch(t *testing.T) { ) suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgRevertLaunch{ + On("BroadcastTx", account, &launchtypes.MsgRevertLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, }). @@ -232,7 +232,7 @@ func TestRevertLaunch(t *testing.T) { Return(expectedError). Once() suite.CosmosClientMock. - On("BroadcastTx", account.Name, &launchtypes.MsgRevertLaunch{ + On("BroadcastTx", account, &launchtypes.MsgRevertLaunch{ Coordinator: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, }). diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index ece181cd7b..98f86cbd1d 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -66,27 +66,27 @@ func (_m *CosmosClient) Address(accountName string) (types.AccAddress, error) { return r0, r1 } -// BroadcastTx provides a mock function with given fields: accountName, msgs -func (_m *CosmosClient) BroadcastTx(accountName string, msgs ...types.Msg) (cosmosclient.Response, error) { +// BroadcastTx provides a mock function with given fields: account, msgs +func (_m *CosmosClient) BroadcastTx(account cosmosaccount.Account, msgs ...types.Msg) (cosmosclient.Response, error) { _va := make([]interface{}, len(msgs)) for _i := range msgs { _va[_i] = msgs[_i] } var _ca []interface{} - _ca = append(_ca, accountName) + _ca = append(_ca, account) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 cosmosclient.Response - if rf, ok := ret.Get(0).(func(string, ...types.Msg) cosmosclient.Response); ok { - r0 = rf(accountName, msgs...) + if rf, ok := ret.Get(0).(func(cosmosaccount.Account, ...types.Msg) cosmosclient.Response); ok { + r0 = rf(account, msgs...) } else { r0 = ret.Get(0).(cosmosclient.Response) } var r1 error - if rf, ok := ret.Get(1).(func(string, ...types.Msg) error); ok { - r1 = rf(accountName, msgs...) + if rf, ok := ret.Get(1).(func(cosmosaccount.Account, ...types.Msg) error); ok { + r1 = rf(account, msgs...) } else { r1 = ret.Error(1) } diff --git a/ignite/services/network/network.go b/ignite/services/network/network.go index b1349bf50e..8c43a2ed15 100644 --- a/ignite/services/network/network.go +++ b/ignite/services/network/network.go @@ -27,7 +27,7 @@ type CosmosClient interface { Account(accountName string) (cosmosaccount.Account, error) Address(accountName string) (sdktypes.AccAddress, error) Context() client.Context - BroadcastTx(accountName string, msgs ...sdktypes.Msg) (cosmosclient.Response, error) + BroadcastTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (cosmosclient.Response, error) Status(ctx context.Context) (*ctypes.ResultStatus, error) ConsensusInfo(ctx context.Context, height int64) (cosmosclient.ConsensusInfo, error) } diff --git a/ignite/services/network/publish.go b/ignite/services/network/publish.go index e834b72c7a..5abaf2ff8b 100644 --- a/ignite/services/network/publish.go +++ b/ignite/services/network/publish.go @@ -135,7 +135,7 @@ func (n Network) Publish(ctx context.Context, c Chain, options ...PublishOption) "", "", ) - if _, err := n.cosmos.BroadcastTx(n.account.Name, msgCreateCoordinator); err != nil { + if _, err := n.cosmos.BroadcastTx(n.account, msgCreateCoordinator); err != nil { return 0, 0, err } } else if err != nil { @@ -180,7 +180,7 @@ func (n Network) Publish(ctx context.Context, c Chain, options ...PublishOption) campaignID, campaigntypes.NewSharesFromCoins(sdk.NewCoins(coins...)), ) - _, err = n.cosmos.BroadcastTx(n.account.Name, msgMintVouchers) + _, err = n.cosmos.BroadcastTx(n.account, msgMintVouchers) if err != nil { return 0, 0, err } @@ -204,7 +204,7 @@ func (n Network) Publish(ctx context.Context, c Chain, options ...PublishOption) campaignID, nil, ) - res, err := n.cosmos.BroadcastTx(n.account.Name, msgCreateChain) + res, err := n.cosmos.BroadcastTx(n.account, msgCreateChain) if err != nil { return 0, 0, err } @@ -239,7 +239,7 @@ func (n Network) sendAccountRequest( ) n.ev.Send(events.New(events.StatusOngoing, "Broadcasting account transactions")) - res, err := n.cosmos.BroadcastTx(n.account.Name, msg) + res, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return err } diff --git a/ignite/services/network/publish_test.go b/ignite/services/network/publish_test.go index 7fdf20fdab..67b86dd735 100644 --- a/ignite/services/network/publish_test.go +++ b/ignite/services/network/publish_test.go @@ -59,7 +59,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -78,7 +78,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -136,7 +136,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, campaigntypes.NewMsgMintVouchers( account.Address(networktypes.SPN), testutil.CampaignID, @@ -148,7 +148,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -167,7 +167,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -230,7 +230,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -286,7 +286,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: customGenesisChainID, @@ -305,7 +305,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -352,7 +352,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -371,7 +371,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -421,7 +421,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -435,7 +435,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgInitializeMainnet{ Coordinator: account.Address(networktypes.SPN), CampaignID: testutil.CampaignID, @@ -486,7 +486,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -500,7 +500,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgInitializeMainnet{ Coordinator: account.Address(networktypes.SPN), CampaignID: testutil.CampaignID, @@ -554,7 +554,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -573,7 +573,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -587,7 +587,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &profiletypes.MsgCreateCoordinator{ Address: account.Address(networktypes.SPN), }, @@ -706,7 +706,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -751,7 +751,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -770,7 +770,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, @@ -817,7 +817,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &launchtypes.MsgCreateChain{ Coordinator: account.Address(networktypes.SPN), GenesisChainID: testutil.ChainID, @@ -836,7 +836,7 @@ func TestPublish(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &campaigntypes.MsgCreateCampaign{ Coordinator: account.Address(networktypes.SPN), CampaignName: testutil.ChainName, diff --git a/ignite/services/network/request.go b/ignite/services/network/request.go index 3e746afb80..6a1413b628 100644 --- a/ignite/services/network/request.go +++ b/ignite/services/network/request.go @@ -86,7 +86,7 @@ func (n Network) SubmitRequest(launchID uint64, reviewal ...Reviewal) error { ) } - res, err := n.cosmos.BroadcastTx(n.account.Name, messages...) + res, err := n.cosmos.BroadcastTx(n.account, messages...) if err != nil { return err } diff --git a/ignite/services/network/reward.go b/ignite/services/network/reward.go index 981960a838..3b12da4165 100644 --- a/ignite/services/network/reward.go +++ b/ignite/services/network/reward.go @@ -30,7 +30,7 @@ func (n Network) SetReward(launchID uint64, lastRewardHeight int64, coins sdk.Co lastRewardHeight, coins, ) - res, err := n.cosmos.BroadcastTx(n.account.Name, msg) + res, err := n.cosmos.BroadcastTx(n.account, msg) if err != nil { return err } diff --git a/ignite/services/network/reward_test.go b/ignite/services/network/reward_test.go index d770a75b3b..bf0149bfa7 100644 --- a/ignite/services/network/reward_test.go +++ b/ignite/services/network/reward_test.go @@ -25,7 +25,7 @@ func TestSetReward(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &rewardtypes.MsgSetRewards{ Provider: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, @@ -56,7 +56,7 @@ func TestSetReward(t *testing.T) { suite.CosmosClientMock. On( "BroadcastTx", - account.Name, + account, &rewardtypes.MsgSetRewards{ Provider: account.Address(networktypes.SPN), LaunchID: testutil.LaunchID, From fa89501fcb3caa1387924ff676ab18c1fcffdb16 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 14:43:41 +0200 Subject: [PATCH 14/42] fix after rebase --- ignite/services/network/join_test.go | 52 ------------------- .../services/network/mocks/cosmos_client.go | 5 +- ignite/services/network/queries.go | 42 +++++++++++++++ 3 files changed, 45 insertions(+), 54 deletions(-) diff --git a/ignite/services/network/join_test.go b/ignite/services/network/join_test.go index 105d5ed86e..166f6940e1 100644 --- a/ignite/services/network/join_test.go +++ b/ignite/services/network/join_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/require" launchtypes "github.com/tendermint/spn/x/launch/types" - "github.com/ignite/cli/ignite/pkg/cosmoserror" "github.com/ignite/cli/ignite/services/network/networktypes" "github.com/ignite/cli/ignite/services/network/testutil" ) @@ -296,57 +295,6 @@ func TestJoin(t *testing.T) { testutil.PeerAddress, ) gentxPath = gentx.SaveTo(t, tmp) - genesisPath = testutil.NewGenesis(testutil.ChainID).SaveTo(t, tmp) - suite, network = newSuite(account) - expectedError = errors.New("failed to create account") - ) - - suite.ChainMock.On("NodeID", context.Background()).Return(testutil.NodeID, nil).Once() - suite.ChainMock.On("GenesisPath").Return(genesisPath, nil).Once() - suite.ChainMock.On("DefaultGentxPath").Return(gentxPath, nil).Once() - - suite.LaunchQueryMock. - On( - "VestingAccount", - context.Background(), - &launchtypes.QueryGetVestingAccountRequest{ - Address: account.Address(networktypes.SPN), - LaunchID: testutil.LaunchID, - }). - Return(nil, cosmoserror.ErrNotFound). - Once() - suite.CosmosClientMock. - On( - "BroadcastTx", - account, - &launchtypes.MsgRequestAddAccount{ - Creator: account.Address(networktypes.SPN), - LaunchID: testutil.LaunchID, - Address: account.Address(networktypes.SPN), - Coins: sdk.NewCoins(sdk.NewCoin(TestDenom, sdk.NewInt(TestAmountInt))), - }, - ). - Return( - testutil.NewResponse(&launchtypes.MsgRequestAddAccountResponse{}), - expectedError, - ). - Once() - - joinErr := network.Join( - context.Background(), - suite.ChainMock, - testutil.LaunchID, - WithAccountRequest(sdk.NewCoins(sdk.NewCoin(TestDenom, sdk.NewInt(TestAmountInt)))), - WithPublicAddress(testutil.TCPAddress), - ) - require.Error(t, joinErr) - require.Equal(t, expectedError, joinErr) - suite.AssertAllMocks(t) - }) - - t.Run("failed to send join request, failed to read node id", func(t *testing.T) { - var ( - account = testutil.NewTestAccount(t, testutil.TestAccountName) suite, network = newSuite(account) expectedError = errors.New("failed to get node id") ) diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index 98f86cbd1d..2b89beae25 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -9,8 +9,9 @@ import ( coretypes "github.com/tendermint/tendermint/rpc/core/types" - "github.com/ignite/cli/ignite/pkg/cosmosaccount" - "github.com/ignite/cli/ignite/pkg/cosmosclient" + cosmosaccount "github.com/ignite/cli/ignite/pkg/cosmosaccount" + + cosmosclient "github.com/ignite/cli/ignite/pkg/cosmosclient" mock "github.com/stretchr/testify/mock" diff --git a/ignite/services/network/queries.go b/ignite/services/network/queries.go index 1f03bf5700..c77a67ea1e 100644 --- a/ignite/services/network/queries.go +++ b/ignite/services/network/queries.go @@ -210,6 +210,48 @@ func (n Network) MainnetAccounts(ctx context.Context, campaignID uint64) (genAcc return genAccs, nil } +func (n Network) GenesisAccount(ctx context.Context, launchID uint64, address string) (networktypes.GenesisAccount, error) { + n.ev.Send(events.New(events.StatusOngoing, "Fetching genesis accounts")) + res, err := n.launchQuery.GenesisAccount(ctx, &launchtypes.QueryGetGenesisAccountRequest{ + LaunchID: launchID, + Address: address, + }) + if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { + return networktypes.GenesisAccount{}, ErrObjectNotFound + } else if err != nil { + return networktypes.GenesisAccount{}, err + } + return networktypes.ToGenesisAccount(res.GenesisAccount), nil +} + +func (n Network) VestingAccount(ctx context.Context, launchID uint64, address string) (networktypes.VestingAccount, error) { + n.ev.Send(events.New(events.StatusOngoing, "Fetching vesting accounts")) + res, err := n.launchQuery.VestingAccount(ctx, &launchtypes.QueryGetVestingAccountRequest{ + LaunchID: launchID, + Address: address, + }) + if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { + return networktypes.VestingAccount{}, ErrObjectNotFound + } else if err != nil { + return networktypes.VestingAccount{}, err + } + return networktypes.ToVestingAccount(res.VestingAccount) +} + +func (n Network) GenesisValidator(ctx context.Context, launchID uint64, address string) (networktypes.GenesisValidator, error) { + n.ev.Send(events.New(events.StatusOngoing, "Fetching genesis validator")) + res, err := n.launchQuery.GenesisValidator(ctx, &launchtypes.QueryGetGenesisValidatorRequest{ + LaunchID: launchID, + Address: address, + }) + if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound { + return networktypes.GenesisValidator{}, ErrObjectNotFound + } else if err != nil { + return networktypes.GenesisValidator{}, err + } + return networktypes.ToGenesisValidator(res.GenesisValidator), nil +} + // ChainReward fetches the chain reward from SPN by launch id func (n Network) ChainReward(ctx context.Context, launchID uint64) (rewardtypes.RewardPool, error) { res, err := n.rewardQuery. From 2c38d0ddfb4ae57a08c5aa5ca576fc185d09632a Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 15:08:49 +0200 Subject: [PATCH 15/42] fix: bank balance can take an address absent of the keyring --- ignite/cmd/node.go | 14 ++++++++++++++ ignite/cmd/node_query_bank_balances.go | 3 +-- ignite/cmd/node_tx_bank_send.go | 16 +++------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index 15529e44d5..1d7710b73e 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -1,6 +1,7 @@ package ignitecmd import ( + "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ignite/cli/ignite/pkg/cosmosclient" "github.com/ignite/cli/ignite/pkg/xurl" "github.com/spf13/cobra" @@ -55,6 +56,19 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { return cosmosclient.New(cmd.Context(), options...) } +// lookupAddress returns a bech32 address from an account name or +// address, or accountNameOrAddress directly if it wasn't found in the keyring +// and if it's a valid becch32 address. +func lookupAddress(client cosmosclient.Client, accountNameOrAddress string) (string, error) { + a, err := client.Account(accountNameOrAddress) + if err == nil { + return a.Info.GetAddress().String(), nil + } + // account not found in the keyring, ensure it is a bech32 address + _, _, err = bech32.DecodeAndConvert(accountNameOrAddress) + return accountNameOrAddress, err +} + func getRPC(cmd *cobra.Command) (rpc string) { rpc, _ = cmd.Flags().GetString(flagNode) return diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index f862956fde..a49fb7ba19 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -32,11 +32,10 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { return err } - account, err := client.Account(inputAccount) + address, err := lookupAddress(client, inputAccount) if err != nil { return err } - address := account.Info.GetAddress().String() pagination, err := getPagination(cmd) if err != nil { diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index bed5ad15cd..d67198dafb 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -2,7 +2,6 @@ package ignitecmd import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ignite/cli/ignite/pkg/cliui" "github.com/spf13/cobra" ) @@ -43,19 +42,10 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { if err != nil { return err } + // toAccountInput can be an account of the keyring or a raw address - var toAddress string - toAccount, err := client.Account(toAccountInput) - if err != nil { - // account not found in the keyring, ensure it is a raw address - _, _, err := bech32.DecodeAndConvert(toAccountInput) - if err != nil { - return err - } - toAddress = toAccountInput - } else { - toAddress = toAccount.Info.GetAddress().String() - } + toAddress, err := lookupAddress(client, toAccountInput) + coins, err := sdk.ParseCoinsNormalized(amount) if err != nil { return err From 6fe217f8f566e798a4800aa77b57328b02ef11cf Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 15:47:03 +0200 Subject: [PATCH 16/42] fix tx broadcast error message --- ignite/pkg/cosmosclient/cosmosclient.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 8106cf8326..ac5c6edae9 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -432,14 +432,14 @@ func (c *Client) checkAccountBalance(ctx context.Context, address string) error func handleBroadcastResult(resp *sdktypes.TxResponse, err error) error { if err != nil { if strings.Contains(err.Error(), "not found") { - return errors.New("make sure that your SPN account has enough balance") + return errors.New("make sure that your account has enough balance") } return err } if resp.Code > 0 { - return fmt.Errorf("SPN error with '%d' code: %s", resp.Code, resp.RawLog) + return fmt.Errorf("error code: '%d' msg: '%s'", resp.Code, resp.RawLog) } return nil } From cb4ab7c7931392eb683a3d79a18d8328247e0333 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 23:17:56 +0200 Subject: [PATCH 17/42] add fees flag to node tx bank send cmd fees are required, at least in cosmos-hub to send funds to an other account. W/o fees the transaction returns this message: error code: '13' msg: 'insufficient fees; got: required: 8uatom: insufficient fee' Also increase the additional gas amount added to the simulated gas, because I got some insufficient gas error with the previous value. --- ignite/cmd/node.go | 4 ++++ ignite/cmd/node_tx.go | 6 ++++++ ignite/cmd/node_tx_bank_send.go | 1 + ignite/pkg/cosmosclient/cosmosclient.go | 13 +++++++++++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index 1d7710b73e..9614077683 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -36,6 +36,7 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { keyringDir = getKeyringDir(cmd) gas = getGas(cmd) gasPrices = getGasPrices(cmd) + fees = getFees(cmd) ) options := []cosmosclient.Option{ @@ -52,6 +53,9 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { if gasPrices != "" { options = append(options, cosmosclient.WithGasPrices(gasPrices)) } + if fees != "" { + options = append(options, cosmosclient.WithFees(fees)) + } return cosmosclient.New(cmd.Context(), options...) } diff --git a/ignite/cmd/node_tx.go b/ignite/cmd/node_tx.go index 93f048567c..aaa9d2a11e 100644 --- a/ignite/cmd/node_tx.go +++ b/ignite/cmd/node_tx.go @@ -13,6 +13,7 @@ const ( gasFlagAuto = "auto" flagGasPrices = "gas-prices" flagGas = "gas" + flagFees = "fees" ) func NewNodeTx() *cobra.Command { @@ -59,3 +60,8 @@ func getGas(cmd *cobra.Command) string { gas, _ := cmd.Flags().GetString(flagGas) return gas } + +func getFees(cmd *cobra.Command) string { + fees, _ := cmd.Flags().GetString(flagFees) + return fees +} diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index d67198dafb..75ad675383 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -20,6 +20,7 @@ func NewNodeTxBankSend() *cobra.Command { c.Flags().AddFlagSet(flagSetKeyringDir()) c.Flags().AddFlagSet(flagSetGenerateOnly()) c.Flags().AddFlagSet(flagSetGasFlags()) + c.Flags().String(flagFees, "", "Fees to pay along with transaction; eg: 10uatom") return c } diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index ac5c6edae9..3415156526 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -86,6 +86,7 @@ type Client struct { gas string gasPrices string + fees string } // Option configures your client. @@ -164,6 +165,13 @@ func WithGasPrices(gasPrices string) Option { } } +// WithFees sets the fees (e.g. 10uatom) +func WithFees(fees string) Option { + return func(c *Client) { + c.fees = fees + } +} + // New creates a new client with given options. func New(ctx context.Context, options ...Option) (Client, error) { c := Client{ @@ -337,10 +345,11 @@ func (c Client) CreateTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (T return TxService{}, err } // the simulated gas can vary from the actual gas needed for a real transaction - // we add an additional amount to endure sufficient gas is provided - gas += 10000 + // we add an additional amount to ensure sufficient gas is provided + gas += 20000 } txf = txf.WithGas(gas) + txf = txf.WithFees(c.fees) if c.gasPrices != "" { txf = txf.WithGasPrices(c.gasPrices) From acc08270402a124fff50c3137ab01b355a1070c3 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 29 Jul 2022 23:38:54 +0200 Subject: [PATCH 18/42] Change tx BroadcastMode to BroadcastSync Previous mode BroadcastBlock alweus triggered a timeout error, even if the tx was finally accepted in a block. RPC error -32603 - Internal error: timed out waiting for tx to be included in a block --- ignite/cmd/node.go | 2 +- ignite/pkg/cosmosclient/cosmosclient.go | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index 9614077683..b2f99cb128 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -62,7 +62,7 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { // lookupAddress returns a bech32 address from an account name or // address, or accountNameOrAddress directly if it wasn't found in the keyring -// and if it's a valid becch32 address. +// and if it's a valid bech32 address. func lookupAddress(client cosmosclient.Client, accountNameOrAddress string) (string, error) { a, err := client.Account(accountNameOrAddress) if err == nil { diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 3415156526..f890fc9ea5 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -508,7 +508,16 @@ func newContext( WithInput(os.Stdin). WithOutput(out). WithAccountRetriever(authtypes.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). + // NOTE(tb): Temporary comment for reviewers: + // + // BroadcastBlock mode doesn't work well with real nodes because it + // triggers a timeout, as explained in the godoc of the method + // client.Context.BroadcastTxCommit. + // + // Switching to BroadcastTxSync removes the timeout issue, that said I + // I don't know all the consequences of this change, hence this comment. + // WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.BroadcastSync). WithHomeDir(home). WithClient(c). WithSkipConfirmation(true) From 9f0901f9a7dfd34980a4bd534104dbf4c1d32aed Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sat, 30 Jul 2022 00:06:52 +0200 Subject: [PATCH 19/42] fix linter --- ignite/cmd/node_tx.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ignite/cmd/node_tx.go b/ignite/cmd/node_tx.go index aaa9d2a11e..ad3e332600 100644 --- a/ignite/cmd/node_tx.go +++ b/ignite/cmd/node_tx.go @@ -27,12 +27,6 @@ func NewNodeTx() *cobra.Command { return c } -func flagSetTxFrom() *flag.FlagSet { - fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.String(flagFrom, "", "Account name to use for sending transactions") - return fs -} - func flagSetGenerateOnly() *flag.FlagSet { fs := flag.NewFlagSet("", flag.ContinueOnError) fs.Bool(flagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT") From cba7268a4f2855f99d94ad6c549b9f4643bb6d46 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sat, 30 Jul 2022 00:13:41 +0200 Subject: [PATCH 20/42] fix other lint --- ignite/cmd/node_tx_bank_send.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 75ad675383..23d8a08d9b 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -46,6 +46,9 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { // toAccountInput can be an account of the keyring or a raw address toAddress, err := lookupAddress(client, toAccountInput) + if err != nil { + return err + } coins, err := sdk.ParseCoinsNormalized(amount) if err != nil { From ffc26b5fa296ecc8bd4d3fdb66d23a4e129bed94 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Mon, 1 Aug 2022 17:29:19 +0200 Subject: [PATCH 21/42] improve lookupAddress error report --- ignite/cmd/node.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index b2f99cb128..74058da982 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -1,6 +1,8 @@ package ignitecmd import ( + "fmt" + "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ignite/cli/ignite/pkg/cosmosclient" "github.com/ignite/cli/ignite/pkg/xurl" @@ -60,7 +62,7 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { return cosmosclient.New(cmd.Context(), options...) } -// lookupAddress returns a bech32 address from an account name or +// lookupAddress returns a bech32 address from an account name or an // address, or accountNameOrAddress directly if it wasn't found in the keyring // and if it's a valid bech32 address. func lookupAddress(client cosmosclient.Client, accountNameOrAddress string) (string, error) { @@ -70,7 +72,10 @@ func lookupAddress(client cosmosclient.Client, accountNameOrAddress string) (str } // account not found in the keyring, ensure it is a bech32 address _, _, err = bech32.DecodeAndConvert(accountNameOrAddress) - return accountNameOrAddress, err + if err != nil { + return "", fmt.Errorf("'%s' not an account nor a bech32 address: %w", accountNameOrAddress, err) + } + return accountNameOrAddress, nil } func getRPC(cmd *cobra.Command) (rpc string) { From 6b7357921b451ba733d60aba72a449b3f2dd7867 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Mon, 1 Aug 2022 17:55:30 +0200 Subject: [PATCH 22/42] fix typo --- ignite/pkg/cosmosaccount/cosmosaccount.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index 62b5ce2864..6f7e2ab27f 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -132,8 +132,7 @@ func (a Account) Address(accPrefix string) string { if accPrefix == "" { accPrefix = AccountPrefixCosmos } - - return toBench32(accPrefix, a.Info.GetPubKey().Address()) + return toBech32(accPrefix, a.Info.GetPubKey().Address()) } // PubKey returns a public key for account. @@ -141,7 +140,7 @@ func (a Account) PubKey() string { return a.Info.GetPubKey().String() } -func toBench32(prefix string, addr []byte) string { +func toBech32(prefix string, addr []byte) string { bech32Addr, err := bech32.ConvertAndEncode(prefix, addr) if err != nil { panic(err) From d06f79bbb90ab4ef6a3771fcf37f29f6a44d5698 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sun, 7 Aug 2022 14:30:08 +0200 Subject: [PATCH 23/42] wip --- ignite/services/network/mocks/account_info.go | 14 +++++--------- ignite/services/network/mocks/campaign_client.go | 14 +++++--------- ignite/services/network/mocks/chain.go | 14 +++++--------- ignite/services/network/mocks/cosmos_client.go | 14 +++++--------- ignite/services/network/mocks/launch_client.go | 14 +++++--------- ignite/services/network/mocks/profile_client.go | 14 +++++--------- ignite/services/network/mocks/reward_client.go | 14 +++++--------- integration/node/cmd_tx_bank_send_test.go | 6 ------ 8 files changed, 35 insertions(+), 69 deletions(-) diff --git a/ignite/services/network/mocks/account_info.go b/ignite/services/network/mocks/account_info.go index 55777aa49c..d32527f93e 100644 --- a/ignite/services/network/mocks/account_info.go +++ b/ignite/services/network/mocks/account_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -10,6 +10,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/cosmos/cosmos-sdk/types" ) @@ -115,15 +117,9 @@ func (_m *AccountInfo) GetType() keyring.KeyType { return r0 } -type mockConstructorTestingTNewAccountInfo interface { - mock.TestingT - Cleanup(func()) -} - -// NewAccountInfo creates a new instance of AccountInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountInfo(t mockConstructorTestingTNewAccountInfo) *AccountInfo { +// NewAccountInfo creates a new instance of AccountInfo. It also registers a cleanup function to assert the mocks expectations. +func NewAccountInfo(t testing.TB) *AccountInfo { mock := &AccountInfo{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/campaign_client.go b/ignite/services/network/mocks/campaign_client.go index 1c7b7b2b25..ef6886144c 100644 --- a/ignite/services/network/mocks/campaign_client.go +++ b/ignite/services/network/mocks/campaign_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/tendermint/spn/x/campaign/types" ) @@ -407,15 +409,9 @@ func (_m *CampaignClient) TotalShares(ctx context.Context, in *types.QueryTotalS return r0, r1 } -type mockConstructorTestingTNewCampaignClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewCampaignClient creates a new instance of CampaignClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCampaignClient(t mockConstructorTestingTNewCampaignClient) *CampaignClient { +// NewCampaignClient creates a new instance of CampaignClient. It also registers a cleanup function to assert the mocks expectations. +func NewCampaignClient(t testing.TB) *CampaignClient { mock := &CampaignClient{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/chain.go b/ignite/services/network/mocks/chain.go index a2c997f378..437beeb100 100644 --- a/ignite/services/network/mocks/chain.go +++ b/ignite/services/network/mocks/chain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -6,6 +6,8 @@ import ( context "context" mock "github.com/stretchr/testify/mock" + + testing "testing" ) // Chain is an autogenerated mock type for the Chain type @@ -251,15 +253,9 @@ func (_m *Chain) SourceURL() string { return r0 } -type mockConstructorTestingTNewChain interface { - mock.TestingT - Cleanup(func()) -} - -// NewChain creates a new instance of Chain. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChain(t mockConstructorTestingTNewChain) *Chain { +// NewChain creates a new instance of Chain. It also registers a cleanup function to assert the mocks expectations. +func NewChain(t testing.TB) *Chain { mock := &Chain{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index 2b89beae25..38472685a9 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -15,6 +15,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/cosmos/cosmos-sdk/types" ) @@ -153,15 +155,9 @@ func (_m *CosmosClient) Status(ctx context.Context) (*coretypes.ResultStatus, er return r0, r1 } -type mockConstructorTestingTNewCosmosClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewCosmosClient creates a new instance of CosmosClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCosmosClient(t mockConstructorTestingTNewCosmosClient) *CosmosClient { +// NewCosmosClient creates a new instance of CosmosClient. It also registers a cleanup function to assert the mocks expectations. +func NewCosmosClient(t testing.TB) *CosmosClient { mock := &CosmosClient{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/launch_client.go b/ignite/services/network/mocks/launch_client.go index 2b0a624386..d5a5e33554 100644 --- a/ignite/services/network/mocks/launch_client.go +++ b/ignite/services/network/mocks/launch_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/tendermint/spn/x/launch/types" ) @@ -347,15 +349,9 @@ func (_m *LaunchClient) VestingAccountAll(ctx context.Context, in *types.QueryAl return r0, r1 } -type mockConstructorTestingTNewLaunchClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewLaunchClient creates a new instance of LaunchClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLaunchClient(t mockConstructorTestingTNewLaunchClient) *LaunchClient { +// NewLaunchClient creates a new instance of LaunchClient. It also registers a cleanup function to assert the mocks expectations. +func NewLaunchClient(t testing.TB) *LaunchClient { mock := &LaunchClient{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/profile_client.go b/ignite/services/network/mocks/profile_client.go index 32f05d0962..23afb7bda2 100644 --- a/ignite/services/network/mocks/profile_client.go +++ b/ignite/services/network/mocks/profile_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/tendermint/spn/x/profile/types" ) @@ -197,15 +199,9 @@ func (_m *ProfileClient) ValidatorByOperatorAddress(ctx context.Context, in *typ return r0, r1 } -type mockConstructorTestingTNewProfileClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewProfileClient creates a new instance of ProfileClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProfileClient(t mockConstructorTestingTNewProfileClient) *ProfileClient { +// NewProfileClient creates a new instance of ProfileClient. It also registers a cleanup function to assert the mocks expectations. +func NewProfileClient(t testing.TB) *ProfileClient { mock := &ProfileClient{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/network/mocks/reward_client.go b/ignite/services/network/mocks/reward_client.go index 4f343046cf..9aa00cad61 100644 --- a/ignite/services/network/mocks/reward_client.go +++ b/ignite/services/network/mocks/reward_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.11.0. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( mock "github.com/stretchr/testify/mock" + testing "testing" + types "github.com/tendermint/spn/x/reward/types" ) @@ -107,15 +109,9 @@ func (_m *RewardClient) RewardPoolAll(ctx context.Context, in *types.QueryAllRew return r0, r1 } -type mockConstructorTestingTNewRewardClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewRewardClient creates a new instance of RewardClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRewardClient(t mockConstructorTestingTNewRewardClient) *RewardClient { +// NewRewardClient creates a new instance of RewardClient. It also registers a cleanup function to assert the mocks expectations. +func NewRewardClient(t testing.TB) *RewardClient { mock := &RewardClient{} - mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 5b639f95a4..8c30b7ca0c 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -122,7 +122,6 @@ func TestNodeTxBankSend(t *testing.T) { "alice", "bob", "100token", - "--from", "alice", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, @@ -145,7 +144,6 @@ func TestNodeTxBankSend(t *testing.T) { bobAccount.Address(testPrefix), aliceAccount.Address(testPrefix), "2stake", - "--from", "bob", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, @@ -168,8 +166,6 @@ func TestNodeTxBankSend(t *testing.T) { "alice", bobAccount.Address(testPrefix), "5token", - "--from", - "alice", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, @@ -275,7 +271,6 @@ func TestNodeTxBankSend(t *testing.T) { "bob", "alice", "100token", - "--from", "bob", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, @@ -297,7 +292,6 @@ func TestNodeTxBankSend(t *testing.T) { "alice", "bob", "100token", - "--from", "alice", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, From ba95a649baca210451d1f9a209941a76017dfeb9 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sun, 7 Aug 2022 16:13:08 +0200 Subject: [PATCH 24/42] simplify --- ignite/cmd/node.go | 19 -------- ignite/cmd/node_query_bank_balances.go | 5 ++- ignite/cmd/node_tx_bank_send.go | 4 +- ignite/pkg/cosmosclient/cosmosclient.go | 18 +++++--- .../services/network/mocks/cosmos_client.go | 44 ------------------- ignite/services/network/network.go | 2 - integration/node/cmd_query_bank_test.go | 28 ++++++------ 7 files changed, 32 insertions(+), 88 deletions(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index 74058da982..e3e5c3aaac 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -1,9 +1,6 @@ package ignitecmd import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ignite/cli/ignite/pkg/cosmosclient" "github.com/ignite/cli/ignite/pkg/xurl" "github.com/spf13/cobra" @@ -62,22 +59,6 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { return cosmosclient.New(cmd.Context(), options...) } -// lookupAddress returns a bech32 address from an account name or an -// address, or accountNameOrAddress directly if it wasn't found in the keyring -// and if it's a valid bech32 address. -func lookupAddress(client cosmosclient.Client, accountNameOrAddress string) (string, error) { - a, err := client.Account(accountNameOrAddress) - if err == nil { - return a.Info.GetAddress().String(), nil - } - // account not found in the keyring, ensure it is a bech32 address - _, _, err = bech32.DecodeAndConvert(accountNameOrAddress) - if err != nil { - return "", fmt.Errorf("'%s' not an account nor a bech32 address: %w", accountNameOrAddress, err) - } - return accountNameOrAddress, nil -} - func getRPC(cmd *cobra.Command) (rpc string) { rpc, _ = cmd.Flags().GetString(flagNode) return diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index a49fb7ba19..eff34eaa3d 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -32,9 +32,10 @@ func nodeQueryBankBalancesHandler(cmd *cobra.Command, args []string) error { return err } - address, err := lookupAddress(client, inputAccount) + // inputAccount can be an account of the keyring or a raw address + address, err := client.Address(inputAccount) if err != nil { - return err + address = inputAccount } pagination, err := getPagination(cmd) diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index 23d8a08d9b..dfce336c93 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -45,9 +45,9 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { } // toAccountInput can be an account of the keyring or a raw address - toAddress, err := lookupAddress(client, toAccountInput) + toAddress, err := client.Address(toAccountInput) if err != nil { - return err + toAddress = toAccountInput } coins, err := sdk.ParseCoinsNormalized(amount) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index f890fc9ea5..b45a20bc23 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -231,6 +231,12 @@ func New(ctx context.Context, options ...Option) (Client, error) { // Account returns the account with name or address equal to nameOrAddress. func (c Client) Account(nameOrAddress string) (cosmosaccount.Account, error) { + defer c.lockBech32Prefix()() + + return c.account(nameOrAddress) +} + +func (c Client) account(nameOrAddress string) (cosmosaccount.Account, error) { a, err := c.AccountRegistry.GetByName(nameOrAddress) if err == nil { return a, nil @@ -239,12 +245,14 @@ func (c Client) Account(nameOrAddress string) (cosmosaccount.Account, error) { } // Address returns the account address from account name. -func (c Client) Address(accountName string) (sdktypes.AccAddress, error) { - account, err := c.Account(accountName) +func (c Client) Address(accountName string) (string, error) { + defer c.lockBech32Prefix()() + + account, err := c.account(accountName) if err != nil { - return sdktypes.AccAddress{}, err + return "", err } - return account.Info.GetAddress(), nil + return account.Info.GetAddress().String(), nil } func (c Client) Context() client.Context { @@ -380,7 +388,7 @@ func (c *Client) prepareBroadcast(ctx context.Context, accountName string, _ []s // } // } - account, err := c.Account(accountName) + account, err := c.account(accountName) if err != nil { return err } diff --git a/ignite/services/network/mocks/cosmos_client.go b/ignite/services/network/mocks/cosmos_client.go index 38472685a9..4f3ad35c2d 100644 --- a/ignite/services/network/mocks/cosmos_client.go +++ b/ignite/services/network/mocks/cosmos_client.go @@ -25,50 +25,6 @@ type CosmosClient struct { mock.Mock } -// Account provides a mock function with given fields: accountName -func (_m *CosmosClient) Account(accountName string) (cosmosaccount.Account, error) { - ret := _m.Called(accountName) - - var r0 cosmosaccount.Account - if rf, ok := ret.Get(0).(func(string) cosmosaccount.Account); ok { - r0 = rf(accountName) - } else { - r0 = ret.Get(0).(cosmosaccount.Account) - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(accountName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Address provides a mock function with given fields: accountName -func (_m *CosmosClient) Address(accountName string) (types.AccAddress, error) { - ret := _m.Called(accountName) - - var r0 types.AccAddress - if rf, ok := ret.Get(0).(func(string) types.AccAddress); ok { - r0 = rf(accountName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(types.AccAddress) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(accountName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // BroadcastTx provides a mock function with given fields: account, msgs func (_m *CosmosClient) BroadcastTx(account cosmosaccount.Account, msgs ...types.Msg) (cosmosclient.Response, error) { _va := make([]interface{}, len(msgs)) diff --git a/ignite/services/network/network.go b/ignite/services/network/network.go index 8c43a2ed15..e001bdd60f 100644 --- a/ignite/services/network/network.go +++ b/ignite/services/network/network.go @@ -24,8 +24,6 @@ import ( //go:generate mockery --name CosmosClient --case underscore type CosmosClient interface { - Account(accountName string) (cosmosaccount.Account, error) - Address(accountName string) (sdktypes.AccAddress, error) Context() client.Context BroadcastTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (cosmosclient.Response, error) Status(ctx context.Context) (*ctypes.ResultStatus, error) diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index 38c20b5faf..aaba7ee7cb 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -111,6 +111,10 @@ func TestNodeQueryBankBalances(t *testing.T) { envtest.ExecStdout(b), ) + if env.HasFailed() { + return + } + var expectedBalances strings.Builder entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, []string{"5600", "atoken"}, @@ -118,10 +122,6 @@ func TestNodeQueryBankBalances(t *testing.T) { ) assert.Contains(t, b.String(), expectedBalances.String()) - if env.HasFailed() { - return - } - b.Reset() env.Exec("query bank balances by address", step.NewSteps(step.New( @@ -140,12 +140,12 @@ func TestNodeQueryBankBalances(t *testing.T) { envtest.ExecStdout(b), ) - assert.Contains(t, b.String(), expectedBalances.String()) - if env.HasFailed() { return } + assert.Contains(t, b.String(), expectedBalances.String()) + b.Reset() env.Exec("query bank balances with pagination -page 1", step.NewSteps(step.New( @@ -166,6 +166,10 @@ func TestNodeQueryBankBalances(t *testing.T) { envtest.ExecStdout(b), ) + if env.HasFailed() { + return + } + expectedBalances.Reset() entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, []string{"5600", "atoken"}, @@ -173,10 +177,6 @@ func TestNodeQueryBankBalances(t *testing.T) { assert.Contains(t, b.String(), expectedBalances.String()) assert.NotContains(t, b.String(), "btoken") - if env.HasFailed() { - return - } - b.Reset() env.Exec("query bank balances with pagination -page 2", step.NewSteps(step.New( @@ -197,6 +197,10 @@ func TestNodeQueryBankBalances(t *testing.T) { envtest.ExecStdout(b), ) + if env.HasFailed() { + return + } + expectedBalances.Reset() entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, []string{"1200", "btoken"}, @@ -204,10 +208,6 @@ func TestNodeQueryBankBalances(t *testing.T) { assert.Contains(t, b.String(), expectedBalances.String()) assert.NotContains(t, b.String(), "atoken") - if env.HasFailed() { - return - } - b.Reset() env.Exec("query bank balances fail with non-existent account name", step.NewSteps(step.New( From d54f7d2f6c1c8e6f81626c3dd258124ea5264d84 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sun, 7 Aug 2022 20:39:58 +0200 Subject: [PATCH 25/42] add assertBankBalanceOutput --- integration/node/cmd_query_bank_test.go | 34 +++++++++++------------ integration/node/cmd_tx_bank_send_test.go | 18 ++---------- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index aaba7ee7cb..4ea0076503 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -24,6 +25,18 @@ import ( const keyringTestDirName = "keyring-test" const testPrefix = "testpref" +func assertBankBalanceOutput(t *testing.T, output string, balances string) { + var table [][]string + coins, err := sdktypes.ParseCoinsNormalized(balances) + require.NoError(t, err, "wrong balances %s", balances) + for _, c := range coins { + table = append(table, []string{c.Amount.String(), c.Denom}) + } + var expectedBalances strings.Builder + entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, table...) + assert.Contains(t, output, expectedBalances.String()) +} + func TestNodeQueryBankBalances(t *testing.T) { var ( appname = randstr.Runes(10) @@ -115,12 +128,7 @@ func TestNodeQueryBankBalances(t *testing.T) { return } - var expectedBalances strings.Builder - entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, - []string{"5600", "atoken"}, - []string{"1200", "btoken"}, - ) - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "5600atoken,1200btoken") b.Reset() env.Exec("query bank balances by address", @@ -144,7 +152,7 @@ func TestNodeQueryBankBalances(t *testing.T) { return } - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "5600atoken,1200btoken") b.Reset() env.Exec("query bank balances with pagination -page 1", @@ -170,11 +178,7 @@ func TestNodeQueryBankBalances(t *testing.T) { return } - expectedBalances.Reset() - entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, - []string{"5600", "atoken"}, - ) - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "5600atoken") assert.NotContains(t, b.String(), "btoken") b.Reset() @@ -201,11 +205,7 @@ func TestNodeQueryBankBalances(t *testing.T) { return } - expectedBalances.Reset() - entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, - []string{"1200", "btoken"}, - ) - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "1200btoken") assert.NotContains(t, b.String(), "atoken") b.Reset() diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 8c30b7ca0c..e048cf4fb5 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -5,16 +5,13 @@ import ( "context" "fmt" "path/filepath" - "strings" "testing" "time" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ignite/cli/ignite/chainconfig" - "github.com/ignite/cli/ignite/pkg/cliui/entrywriter" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" "github.com/ignite/cli/ignite/pkg/randstr" @@ -195,12 +192,7 @@ func TestNodeTxBankSend(t *testing.T) { envtest.ExecStdout(b), ) - var expectedBalances strings.Builder - entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, - []string{"2", "stake"}, - []string{"1895", "token"}, - ) - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "2stake,1895token") if env.HasFailed() { return @@ -224,12 +216,7 @@ func TestNodeTxBankSend(t *testing.T) { envtest.ExecStdout(b), ) - expectedBalances.Reset() - entrywriter.MustWrite(&expectedBalances, []string{"Amount", "Denom"}, - []string{"99999998", "stake"}, - []string{"10105", "token"}, - ) - assert.Contains(t, b.String(), expectedBalances.String()) + assertBankBalanceOutput(t, b.String(), "99999998stake,10105token") // check generated tx b.Reset() @@ -314,7 +301,6 @@ func TestNodeTxBankSend(t *testing.T) { "alice", "bob", "100token", - "--from", "alice", "--node", node, "--keyring-dir", accKeyringDir, "--address-prefix", testPrefix, From 5d78357f93fe8c9aa184dc1da6d48f6aebef802a Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sun, 7 Aug 2022 20:40:35 +0200 Subject: [PATCH 26/42] wip find a way to wait for block height --- integration/node/cmd_tx_bank_send_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index e048cf4fb5..cace3f6e41 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -151,6 +151,9 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } + // NOTE(tb) need a small sleep or else alice account sequence is wrong + // Maybe implement something like a WaitBlockHeight or WaitNextBlock? + time.Sleep(time.Second) env.Exec("send 5token from alice to bob using a combination of address and account", step.NewSteps(step.New( @@ -173,6 +176,7 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } + time.Sleep(time.Second) b := &bytes.Buffer{} env.Exec("query bank balances for alice", From 31332300a4a8e87f1fac6ddf3c48cd2bd345f3a8 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Mon, 8 Aug 2022 11:57:15 +0200 Subject: [PATCH 27/42] test: replace time.Sleep with app.WaitNBlocks --- integration/app.go | 50 +++++++++++++++++++++++ integration/app/tx_test.go | 10 ++--- integration/node/cmd_tx_bank_send_test.go | 11 ++--- 3 files changed, 58 insertions(+), 13 deletions(-) diff --git a/integration/app.go b/integration/app.go index 19ecfe70ac..e5214cf736 100644 --- a/integration/app.go +++ b/integration/app.go @@ -1,6 +1,8 @@ package envtest import ( + "bytes" + "encoding/json" "fmt" "os" "path" @@ -93,6 +95,54 @@ func (a App) SourcePath() string { return a.path } +// Binary returns the binary name of the app. Can be executed directly w/o any +// path after app.Serve is called, since it should be in the $PATH. +func (a App) Binary() string { + return path.Base(a.path) + "d" +} + +// BlockHeight returns the current block height of a running app. +// Must be called after app.Serve() +func (a App) BlockHeight(flags ...string) int64 { + b := &bytes.Buffer{} + ok := a.env.Exec("get current block", + step.NewSteps(step.New( + step.Exec(a.Binary(), append([]string{"q", "block"}, flags...)...), + step.Stdout(b), + step.Stderr(b), + )), + ) + if !ok { + a.env.t.Fatalf("error while %s query block: %s", a.Binary(), b.String()) + } + var res struct { + Block *struct { + Height int64 + } + } + err := json.Unmarshal(b.Bytes(), &res) + if err != nil { + a.env.t.Fatalf("error while unmarshalling block: %v", err) + } + if res.Block == nil { + return 0 + } + return res.Block.Height +} + +// WaitNBlocks reads the current block height and then waits for anothers n +// blocks. Useful to ensure transactions are properly handled by the app. +// Must be called after app.Serve(). +func (a App) WaitNBlocks(n int64, flags ...string) { + start := a.BlockHeight(flags...) + for { + time.Sleep(time.Second) + if start+n >= a.BlockHeight(flags...) { + break + } + } +} + // Serve serves an application lives under path with options where msg describes the // execution from the serving action. // unless calling with Must(), Serve() will not exit test runtime on failure. diff --git a/integration/app/tx_test.go b/integration/app/tx_test.go index b6346a634e..31563ed272 100644 --- a/integration/app/tx_test.go +++ b/integration/app/tx_test.go @@ -61,7 +61,7 @@ func TestSignTxWithDashedAppName(t *testing.T) { steps := step.NewSteps( step.New( step.Exec( - appname+"d", + app.Binary(), "config", "output", "json", ), @@ -76,7 +76,7 @@ func TestSignTxWithDashedAppName(t *testing.T) { return err }), step.Exec( - appname+"d", + app.Binary(), "tx", "dashedappname", "create-item", @@ -144,7 +144,7 @@ func TestGetTxViaGRPCGateway(t *testing.T) { steps := step.NewSteps( step.New( step.Exec( - appname+"d", + app.Binary(), "config", "output", "json", ), @@ -154,7 +154,7 @@ func TestGetTxViaGRPCGateway(t *testing.T) { ), step.New( step.Exec( - appname+"d", + app.Binary(), "keys", "list", "--keyring-backend", "test", @@ -192,7 +192,7 @@ func TestGetTxViaGRPCGateway(t *testing.T) { // endpoint by asserting denom and amount. return cmdrunner.New().Run(ctx, step.New( step.Exec( - appname+"d", + app.Binary(), "tx", "bank", "send", diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index cace3f6e41..4260b49d98 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -6,7 +6,6 @@ import ( "fmt" "path/filepath" "testing" - "time" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/stretchr/testify/require" @@ -104,9 +103,7 @@ func TestNodeTxBankSend(t *testing.T) { return } - // error "account doesn't have any balances" occurs if a sleep is not included - // TODO find another way without sleep, with retry+ctx routine. - time.Sleep(time.Second * 1) + app.WaitNBlocks(1, "--node", node) env.Exec("send 100token from alice to bob", step.NewSteps(step.New( @@ -151,9 +148,7 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - // NOTE(tb) need a small sleep or else alice account sequence is wrong - // Maybe implement something like a WaitBlockHeight or WaitNextBlock? - time.Sleep(time.Second) + app.WaitNBlocks(1, "--node", node) env.Exec("send 5token from alice to bob using a combination of address and account", step.NewSteps(step.New( @@ -176,7 +171,7 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - time.Sleep(time.Second) + app.WaitNBlocks(1, "--node", node) b := &bytes.Buffer{} env.Exec("query bank balances for alice", From 510ffa37e1ce43dfd9b3978a60dde0dfea9b9bc9 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Mon, 8 Aug 2022 12:10:21 +0200 Subject: [PATCH 28/42] gofumpt --- ignite/cmd/node_tx_bank_send.go | 1 - integration/account/cmd_account_test.go | 10 +++++----- integration/app.go | 2 +- integration/node/cmd_query_bank_test.go | 6 ++++-- integration/node/cmd_tx_bank_send_test.go | 1 - 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index dfce336c93..ddfb5aa976 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -80,5 +80,4 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { session.StopSpinner() session.Println("Transaction broadcast successful!") return session.Printf("%s sent from %s to %s\n", amount, fromAccountInput, toAccountInput) - } diff --git a/integration/account/cmd_account_test.go b/integration/account/cmd_account_test.go index fffdce29d3..d97f8731a6 100644 --- a/integration/account/cmd_account_test.go +++ b/integration/account/cmd_account_test.go @@ -26,7 +26,7 @@ func TestAccount(t *testing.T) { )), )) - var listOutputBuffer = &bytes.Buffer{} + listOutputBuffer := &bytes.Buffer{} env.Must(env.Exec("list accounts", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), @@ -41,7 +41,7 @@ func TestAccount(t *testing.T) { )), )) - var listOutputAfterDeleteBuffer = &bytes.Buffer{} + listOutputAfterDeleteBuffer := &bytes.Buffer{} env.Must(env.Exec("list accounts after delete", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), @@ -56,7 +56,7 @@ func TestAccount(t *testing.T) { )), )) - var listOutputAfterImportBuffer = &bytes.Buffer{} + listOutputAfterImportBuffer := &bytes.Buffer{} env.Must(env.Exec("list accounts after import", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "account", "list", "--keyring-dir", tmpDir), @@ -68,7 +68,7 @@ testaccount42 cosmos1ytnkpns7mfd6jjkvq9ztdvjdrt2xvmft2qxzqd PubKeySecp256k1{02 `, listOutputAfterImportBuffer.String()) - var showOutputBuffer = &bytes.Buffer{} + showOutputBuffer := &bytes.Buffer{} env.Must(env.Exec("show account", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "account", "show", "testaccount42", "--keyring-dir", tmpDir), @@ -80,7 +80,7 @@ testaccount42 cosmos1ytnkpns7mfd6jjkvq9ztdvjdrt2xvmft2qxzqd PubKeySecp256k1{02 `, showOutputBuffer.String()) - var showOutputWithDifferentPrefixBuffer = &bytes.Buffer{} + showOutputWithDifferentPrefixBuffer := &bytes.Buffer{} env.Must(env.Exec("show account with address prefi", step.NewSteps(step.New( step.Exec(envtest.IgniteApp, "account", "show", "testaccount42", "--keyring-dir", tmpDir, "--address-prefix", "test"), diff --git a/integration/app.go b/integration/app.go index e5214cf736..698577506e 100644 --- a/integration/app.go +++ b/integration/app.go @@ -260,7 +260,7 @@ func (a App) UseRandomHomeDir() (homeDirPath string) { } func (a App) EditConfig(apply func(*chainconfig.Config)) { - f, err := os.OpenFile(a.configPath, os.O_RDWR|os.O_CREATE, 0755) + f, err := os.OpenFile(a.configPath, os.O_RDWR|os.O_CREATE, 0o755) require.NoError(a.env.t, err) defer f.Close() diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index 4ea0076503..3efdd432d7 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -22,8 +22,10 @@ import ( envtest "github.com/ignite/cli/integration" ) -const keyringTestDirName = "keyring-test" -const testPrefix = "testpref" +const ( + keyringTestDirName = "keyring-test" + testPrefix = "testpref" +) func assertBankBalanceOutput(t *testing.T, output string, balances string) { var table [][]string diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 4260b49d98..faa6c893c9 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -311,7 +311,6 @@ func TestNodeTxBankSend(t *testing.T) { envtest.ExecStdout(b), ) require.Contains(t, b.String(), `"fee":{"amount":[{"denom":"stake","amount":"178004"}],"gas_limit":"2000034"`) - }() env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) From bc80125862cfd03afc02ce3a554860c80a5a8e16 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Mon, 8 Aug 2022 18:10:16 +0200 Subject: [PATCH 29/42] fix integration test --- integration/app.go | 4 ++++ integration/chain/cmd_serve_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/integration/app.go b/integration/app.go index 698577506e..aa86d7699a 100644 --- a/integration/app.go +++ b/integration/app.go @@ -95,6 +95,10 @@ func (a App) SourcePath() string { return a.path } +func (a *App) SetConfigPath(path string) { + a.configPath = path +} + // Binary returns the binary name of the app. Can be executed directly w/o any // path after app.Serve is called, since it should be in the $PATH. func (a App) Binary() string { diff --git a/integration/chain/cmd_serve_test.go b/integration/chain/cmd_serve_test.go index d6193aa621..1fbbb7297f 100644 --- a/integration/chain/cmd_serve_test.go +++ b/integration/chain/cmd_serve_test.go @@ -95,6 +95,7 @@ func TestServeStargateWithCustomConfigFile(t *testing.T) { newConfigPath := filepath.Join(tmpDir, newConfig) err := os.Rename(filepath.Join(app.SourcePath(), "config.yml"), newConfigPath) require.NoError(t, err) + app.SetConfigPath(newConfigPath) servers := app.RandomizeServerPorts() From 497644cef91ccc398c87302fc304062532679472 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 9 Aug 2022 12:41:12 +0200 Subject: [PATCH 30/42] BroadcastBlock is deprecated --- ignite/pkg/chaincmd/chaincmd.go | 5 ++--- ignite/pkg/cosmosclient/cosmosclient.go | 9 --------- ignite/pkg/cosmoscmd/root.go | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ignite/pkg/chaincmd/chaincmd.go b/ignite/pkg/chaincmd/chaincmd.go index b9df53d33c..7d8c25b5f0 100644 --- a/ignite/pkg/chaincmd/chaincmd.go +++ b/ignite/pkg/chaincmd/chaincmd.go @@ -3,6 +3,7 @@ package chaincmd import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosver" ) @@ -50,7 +51,6 @@ const ( constTendermint = "tendermint" constJSON = "json" - constSync = "sync" ) type KeyringBackend string @@ -524,8 +524,7 @@ func (c ChainCmd) BankSendCommand(fromAddress, toAddress, amount string) step.Op fromAddress, toAddress, amount, - optionBroadcastMode, - constSync, + optionBroadcastMode, flags.BroadcastSync, optionYes, ) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index b45a20bc23..42ef1d732a 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -516,15 +516,6 @@ func newContext( WithInput(os.Stdin). WithOutput(out). WithAccountRetriever(authtypes.AccountRetriever{}). - // NOTE(tb): Temporary comment for reviewers: - // - // BroadcastBlock mode doesn't work well with real nodes because it - // triggers a timeout, as explained in the godoc of the method - // client.Context.BroadcastTxCommit. - // - // Switching to BroadcastTxSync removes the timeout issue, that said I - // I don't know all the consequences of this change, hence this comment. - // WithBroadcastMode(flags.BroadcastBlock). WithBroadcastMode(flags.BroadcastSync). WithHomeDir(home). WithClient(c). diff --git a/ignite/pkg/cosmoscmd/root.go b/ignite/pkg/cosmoscmd/root.go index 471b7ad57e..2619af626a 100644 --- a/ignite/pkg/cosmoscmd/root.go +++ b/ignite/pkg/cosmoscmd/root.go @@ -136,7 +136,7 @@ func NewRootCmd( WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.BroadcastSync). WithHomeDir(defaultNodeHome). WithViper(rootOptions.envPrefix) From 6be67e30e3347ed337718b19b0f543f40101a5b3 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 9 Aug 2022 14:54:33 +0200 Subject: [PATCH 31/42] simplify node query --- ignite/pkg/cosmosclient/bank.go | 7 +++---- ignite/pkg/cosmosclient/cosmosclient.go | 14 +++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go index de009e4bfc..46f13fd9d2 100644 --- a/ignite/pkg/cosmosclient/bank.go +++ b/ignite/pkg/cosmosclient/bank.go @@ -10,18 +10,17 @@ import ( ) func (c Client) BankBalances(ctx context.Context, address string, pagination *query.PageRequest) (sdk.Coins, error) { + defer c.lockBech32Prefix()() + req := &banktypes.QueryAllBalancesRequest{ Address: address, Pagination: pagination, } - resp, err := performQuery(c, func() (*banktypes.QueryAllBalancesResponse, error) { - return banktypes.NewQueryClient(c.context).AllBalances(ctx, req) - }) + resp, err := banktypes.NewQueryClient(c.context).AllBalances(ctx, req) if err != nil { return nil, err } - return resp.Balances, nil } diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 42ef1d732a..c5e5869eda 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -273,9 +273,11 @@ type Response struct { // e.g., for the following CreateChain func the type would be: `types.MsgCreateChainResponse`. // // ```proto -// service Msg { -// rpc CreateChain(MsgCreateChain) returns (MsgCreateChainResponse); -// } +// +// service Msg { +// rpc CreateChain(MsgCreateChain) returns (MsgCreateChainResponse); +// } +// // ``` func (r Response) Decode(message proto.Message) error { data, err := hex.DecodeString(r.Data) @@ -314,12 +316,6 @@ func (c Client) lockBech32Prefix() (unlockFn func()) { return mconf.Unlock } -func performQuery[T any](c Client, q func() (T, error)) (T, error) { - defer c.lockBech32Prefix()() - - return q() -} - func (c Client) BroadcastTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (Response, error) { txService, err := c.CreateTx(account, msgs...) if err != nil { From ea35e75ad2a53582cd5954be1267e503744a20c6 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 9 Aug 2022 16:41:45 +0200 Subject: [PATCH 32/42] feat: move WaitForBlock methods in cosmosclient --- ignite/pkg/cosmosclient/cosmosclient.go | 52 +++++++++++++++++++++++ integration/app.go | 44 ------------------- integration/node/cmd_tx_bank_send_test.go | 12 ++++-- 3 files changed, 61 insertions(+), 47 deletions(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index c5e5869eda..eda126d4c5 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -229,6 +229,58 @@ func New(ctx context.Context, options ...Option) (Client, error) { return c, nil } +// LatestBlockHeight returns the lastest block height of the app. +func (c Client) LatestBlockHeight() (int64, error) { + resp, err := c.Status(context.Background()) + if err != nil { + return 0, err + } + return resp.SyncInfo.LatestBlockHeight, nil +} + +// WaitForNextBlock waits until next block is committed. +// WaitForNextBlock reads the current block height and then waits for another +// block to be committed. +// Useful to ensure transactions are properly handled by the app. +func (c Client) WaitForNextBlock() error { + return c.WaitForNBlocks(1) +} + +// WaitForNBlocks reads the current block height and then waits for anothers n +// blocks to be committed. +// Useful to ensure transactions are properly handled by the app. +// Must be called after app.Serve(). +func (c Client) WaitForNBlocks(n int64) error { + start, err := c.LatestBlockHeight() + if err != nil { + return err + } + return c.WaitForBlockHeight(start + n) +} + +// WaitForBlockHeight waits until block height h is committed, or return an +// error if a timeout is reached (10s). +func (c Client) WaitForBlockHeight(h int64) error { + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + timeout := time.After(10 * time.Second) + + for { + status, err := c.RPC.Status(context.Background()) + if err != nil { + return err + } + if status.SyncInfo.LatestBlockHeight >= h { + return nil + } + select { + case <-timeout: + return errors.New("timeout exceeded waiting for block") + case <-ticker.C: + } + } +} + // Account returns the account with name or address equal to nameOrAddress. func (c Client) Account(nameOrAddress string) (cosmosaccount.Account, error) { defer c.lockBech32Prefix()() diff --git a/integration/app.go b/integration/app.go index aa86d7699a..c1e585d18f 100644 --- a/integration/app.go +++ b/integration/app.go @@ -1,8 +1,6 @@ package envtest import ( - "bytes" - "encoding/json" "fmt" "os" "path" @@ -105,48 +103,6 @@ func (a App) Binary() string { return path.Base(a.path) + "d" } -// BlockHeight returns the current block height of a running app. -// Must be called after app.Serve() -func (a App) BlockHeight(flags ...string) int64 { - b := &bytes.Buffer{} - ok := a.env.Exec("get current block", - step.NewSteps(step.New( - step.Exec(a.Binary(), append([]string{"q", "block"}, flags...)...), - step.Stdout(b), - step.Stderr(b), - )), - ) - if !ok { - a.env.t.Fatalf("error while %s query block: %s", a.Binary(), b.String()) - } - var res struct { - Block *struct { - Height int64 - } - } - err := json.Unmarshal(b.Bytes(), &res) - if err != nil { - a.env.t.Fatalf("error while unmarshalling block: %v", err) - } - if res.Block == nil { - return 0 - } - return res.Block.Height -} - -// WaitNBlocks reads the current block height and then waits for anothers n -// blocks. Useful to ensure transactions are properly handled by the app. -// Must be called after app.Serve(). -func (a App) WaitNBlocks(n int64, flags ...string) { - start := a.BlockHeight(flags...) - for { - time.Sleep(time.Second) - if start+n >= a.BlockHeight(flags...) { - break - } - } -} - // Serve serves an application lives under path with options where msg describes the // execution from the serving action. // unless calling with Must(), Serve() will not exit test runtime on failure. diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index faa6c893c9..694ae094d3 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -13,6 +13,7 @@ import ( "github.com/ignite/cli/ignite/chainconfig" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/cosmosclient" "github.com/ignite/cli/ignite/pkg/randstr" "github.com/ignite/cli/ignite/pkg/xurl" envtest "github.com/ignite/cli/integration" @@ -102,8 +103,13 @@ func TestNodeTxBankSend(t *testing.T) { if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { return } + client, err := cosmosclient.New(context.Background(), + cosmosclient.WithAddressPrefix(testPrefix), + cosmosclient.WithNodeAddress(node), + ) + require.NoError(t, err) - app.WaitNBlocks(1, "--node", node) + require.NoError(t, client.WaitForNextBlock()) env.Exec("send 100token from alice to bob", step.NewSteps(step.New( @@ -148,7 +154,7 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - app.WaitNBlocks(1, "--node", node) + require.NoError(t, client.WaitForNextBlock()) env.Exec("send 5token from alice to bob using a combination of address and account", step.NewSteps(step.New( @@ -171,7 +177,7 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - app.WaitNBlocks(1, "--node", node) + require.NoError(t, client.WaitForNextBlock()) b := &bytes.Buffer{} env.Exec("query bank balances for alice", From f8b63f04942dd217a6254b8eb68ae3472d660ffb Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Wed, 10 Aug 2022 15:56:12 +0200 Subject: [PATCH 33/42] fix: revert usage of BroadcastSync mode --- ignite/pkg/cosmosclient/cosmosclient.go | 2 +- ignite/pkg/cosmoscmd/root.go | 2 +- integration/node/cmd_query_bank_test.go | 13 ++++++++----- integration/node/cmd_tx_bank_send_test.go | 5 +---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index eda126d4c5..2df1605fb7 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -564,7 +564,7 @@ func newContext( WithInput(os.Stdin). WithOutput(out). WithAccountRetriever(authtypes.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastSync). + WithBroadcastMode(flags.BroadcastBlock). WithHomeDir(home). WithClient(c). WithSkipConfirmation(true) diff --git a/ignite/pkg/cosmoscmd/root.go b/ignite/pkg/cosmoscmd/root.go index 2619af626a..471b7ad57e 100644 --- a/ignite/pkg/cosmoscmd/root.go +++ b/ignite/pkg/cosmoscmd/root.go @@ -136,7 +136,7 @@ func NewRootCmd( WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastSync). + WithBroadcastMode(flags.BroadcastBlock). WithHomeDir(defaultNodeHome). WithViper(rootOptions.envPrefix) diff --git a/integration/node/cmd_query_bank_test.go b/integration/node/cmd_query_bank_test.go index 3efdd432d7..43159a1fbf 100644 --- a/integration/node/cmd_query_bank_test.go +++ b/integration/node/cmd_query_bank_test.go @@ -6,7 +6,6 @@ import ( "path/filepath" "strings" "testing" - "time" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdktypes "github.com/cosmos/cosmos-sdk/types" @@ -17,6 +16,7 @@ import ( "github.com/ignite/cli/ignite/pkg/cliui/entrywriter" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/ignite/pkg/cosmosclient" "github.com/ignite/cli/ignite/pkg/randstr" "github.com/ignite/cli/ignite/pkg/xurl" envtest "github.com/ignite/cli/integration" @@ -57,7 +57,7 @@ func TestNodeQueryBankBalances(t *testing.T) { ca, err := cosmosaccount.New( cosmosaccount.WithHome(filepath.Join(home, keyringTestDirName)), - cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringMemory), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringTest), ) require.NoError(t, err) @@ -103,9 +103,12 @@ func TestNodeQueryBankBalances(t *testing.T) { return } - // error "account doesn't have any balances" occurs if a sleep is not included - // TODO find another way without sleep, with retry+ctx routine. - time.Sleep(time.Second * 1) + client, err := cosmosclient.New(context.Background(), + cosmosclient.WithAddressPrefix(testPrefix), + cosmosclient.WithNodeAddress(node), + ) + require.NoError(t, err) + require.NoError(t, client.WaitForNextBlock()) b := &bytes.Buffer{} diff --git a/integration/node/cmd_tx_bank_send_test.go b/integration/node/cmd_tx_bank_send_test.go index 694ae094d3..766c6f28c1 100644 --- a/integration/node/cmd_tx_bank_send_test.go +++ b/integration/node/cmd_tx_bank_send_test.go @@ -61,9 +61,9 @@ func TestNodeTxBankSend(t *testing.T) { Coins: []string{"10000token", "100000000stake"}, }, } + conf.Faucet = chainconfig.Faucet{} conf.Init.KeyringBackend = keyring.BackendTest }) - env.Must(env.Exec("import alice", step.NewSteps(step.New( step.Exec( @@ -108,7 +108,6 @@ func TestNodeTxBankSend(t *testing.T) { cosmosclient.WithNodeAddress(node), ) require.NoError(t, err) - require.NoError(t, client.WaitForNextBlock()) env.Exec("send 100token from alice to bob", @@ -154,7 +153,6 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - require.NoError(t, client.WaitForNextBlock()) env.Exec("send 5token from alice to bob using a combination of address and account", step.NewSteps(step.New( @@ -177,7 +175,6 @@ func TestNodeTxBankSend(t *testing.T) { if env.HasFailed() { return } - require.NoError(t, client.WaitForNextBlock()) b := &bytes.Buffer{} env.Exec("query bank balances for alice", From 89a034983137e3eeaa3ea53b5c5c1eaea7679de4 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Wed, 10 Aug 2022 15:57:40 +0200 Subject: [PATCH 34/42] docs: adapt blog tutorial to cosmosclient changes --- docs/docs/guide/03-blog/02-connect-blockchain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/guide/03-blog/02-connect-blockchain.md b/docs/docs/guide/03-blog/02-connect-blockchain.md index c85ed93a89..9cd95e42aa 100644 --- a/docs/docs/guide/03-blog/02-connect-blockchain.md +++ b/docs/docs/guide/03-blog/02-connect-blockchain.md @@ -116,7 +116,7 @@ func main() { // Broadcast a transaction from account `alice` with the message // to create a post store response in txResp - txResp, err := cosmos.BroadcastTx(accountName, msg) + txResp, err := cosmos.BroadcastTx(account, msg) if err != nil { log.Fatal(err) } From e3b92cf5cc59a2a388d8b87027eeabac7c8f6900 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 11 Aug 2022 11:11:56 +0200 Subject: [PATCH 35/42] feat: add --broadcasd-mode flag to node tx command The default value is still block but the flag can change to sync in order to avoid timeout when the tx is broadcasted to busy nodes. Also add a `node query tx` so the user can check when his tx is included in a block. --- ignite/cmd/node.go | 2 + ignite/cmd/node_query.go | 1 + ignite/cmd/node_query_tx.go | 41 +++++++++++ ignite/cmd/node_tx.go | 23 +++++- ignite/cmd/node_tx_bank_send.go | 22 +++--- ignite/pkg/cosmosclient/cosmosclient.go | 37 ++++++---- integration/node/cmd_query_tx_test.go | 97 +++++++++++++++++++++++++ 7 files changed, 192 insertions(+), 31 deletions(-) create mode 100644 ignite/cmd/node_query_tx.go create mode 100644 integration/node/cmd_query_tx_test.go diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index e3e5c3aaac..c928e733af 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -36,6 +36,7 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { gas = getGas(cmd) gasPrices = getGasPrices(cmd) fees = getFees(cmd) + broadcastMode = getBroadcastMode(cmd) ) options := []cosmosclient.Option{ @@ -44,6 +45,7 @@ func newNodeCosmosClient(cmd *cobra.Command) (cosmosclient.Client, error) { cosmosclient.WithKeyringBackend(keyringBackend), cosmosclient.WithKeyringDir(keyringDir), cosmosclient.WithNodeAddress(xurl.HTTPEnsurePort(node)), + cosmosclient.WithBroadcastMode(broadcastMode), } if gas != "" { diff --git a/ignite/cmd/node_query.go b/ignite/cmd/node_query.go index c5295e90da..0acdd4499f 100644 --- a/ignite/cmd/node_query.go +++ b/ignite/cmd/node_query.go @@ -26,6 +26,7 @@ func NewNodeQuery() *cobra.Command { } c.AddCommand(NewNodeQueryBank()) + c.AddCommand(NewNodeQueryTx()) return c } diff --git a/ignite/cmd/node_query_tx.go b/ignite/cmd/node_query_tx.go new file mode 100644 index 0000000000..39d84ee0b7 --- /dev/null +++ b/ignite/cmd/node_query_tx.go @@ -0,0 +1,41 @@ +package ignitecmd + +import ( + "encoding/hex" + "encoding/json" + "fmt" + + sdkclient "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" +) + +func NewNodeQueryTx() *cobra.Command { + c := &cobra.Command{ + Use: "tx [hash]", + Short: "Query for transaction by hash", + RunE: nodeQueryTxHandler, + Args: cobra.ExactArgs(1), + } + return c +} + +func nodeQueryTxHandler(cmd *cobra.Command, args []string) error { + bz, err := hex.DecodeString(args[0]) + if err != nil { + return err + } + rpc, err := sdkclient.NewClientFromNode(getRPC(cmd)) + if err != nil { + return err + } + resp, err := rpc.Tx(cmd.Context(), bz, false) + if err != nil { + return err + } + bz, err = json.MarshalIndent(resp, "", " ") + if err != nil { + return err + } + fmt.Println(string(bz)) + return nil +} diff --git a/ignite/cmd/node_tx.go b/ignite/cmd/node_tx.go index ad3e332600..006bec27d2 100644 --- a/ignite/cmd/node_tx.go +++ b/ignite/cmd/node_tx.go @@ -3,6 +3,7 @@ package ignitecmd import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" flag "github.com/spf13/pflag" ) @@ -10,10 +11,11 @@ import ( const ( flagGenerateOnly = "generate-only" - gasFlagAuto = "auto" - flagGasPrices = "gas-prices" - flagGas = "gas" - flagFees = "fees" + gasFlagAuto = "auto" + flagGasPrices = "gas-prices" + flagGas = "gas" + flagFees = "fees" + flagBroadcastMode = "broadcast-mode" ) func NewNodeTx() *cobra.Command { @@ -21,6 +23,14 @@ func NewNodeTx() *cobra.Command { Use: "tx", Short: "Transactions subcommands", } + c.PersistentFlags().AddFlagSet(flagSetHome()) + c.PersistentFlags().AddFlagSet(flagSetKeyringBackend()) + c.PersistentFlags().AddFlagSet(flagSetAccountPrefixes()) + c.PersistentFlags().AddFlagSet(flagSetKeyringDir()) + c.PersistentFlags().AddFlagSet(flagSetGenerateOnly()) + c.PersistentFlags().AddFlagSet(flagSetGasFlags()) + c.PersistentFlags().String(flagFees, "", "Fees to pay along with transaction; eg: 10uatom") + c.PersistentFlags().String(flagBroadcastMode, flags.BroadcastBlock, "Transaction broadcasting mode (sync|async|block), use sync if you encounter timeouts") c.AddCommand(NewNodeTxBank()) @@ -59,3 +69,8 @@ func getFees(cmd *cobra.Command) string { fees, _ := cmd.Flags().GetString(flagFees) return fees } + +func getBroadcastMode(cmd *cobra.Command) string { + broadcastMode, _ := cmd.Flags().GetString(flagBroadcastMode) + return broadcastMode +} diff --git a/ignite/cmd/node_tx_bank_send.go b/ignite/cmd/node_tx_bank_send.go index ddfb5aa976..5665c6f690 100644 --- a/ignite/cmd/node_tx_bank_send.go +++ b/ignite/cmd/node_tx_bank_send.go @@ -1,6 +1,7 @@ package ignitecmd import ( + "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ignite/cli/ignite/pkg/cliui" "github.com/spf13/cobra" @@ -14,14 +15,6 @@ func NewNodeTxBankSend() *cobra.Command { Args: cobra.ExactArgs(3), } - c.Flags().AddFlagSet(flagSetHome()) - c.Flags().AddFlagSet(flagSetKeyringBackend()) - c.Flags().AddFlagSet(flagSetAccountPrefixes()) - c.Flags().AddFlagSet(flagSetKeyringDir()) - c.Flags().AddFlagSet(flagSetGenerateOnly()) - c.Flags().AddFlagSet(flagSetGasFlags()) - c.Flags().String(flagFees, "", "Fees to pay along with transaction; eg: 10uatom") - return c } @@ -73,11 +66,18 @@ func nodeTxBankSendHandler(cmd *cobra.Command, args []string) error { } session.StartSpinner("Sending transaction...") - if _, err := tx.Broadcast(); err != nil { + resp, err := tx.Broadcast() + if err != nil { return err } session.StopSpinner() - session.Println("Transaction broadcast successful!") - return session.Printf("%s sent from %s to %s\n", amount, fromAccountInput, toAccountInput) + session.Printf("Transaction broadcast successful! (hash = %s)\n", resp.TxHash) + session.Printf("%s sent from %s to %s\n", amount, fromAccountInput, toAccountInput) + if getBroadcastMode(cmd) != flags.BroadcastBlock { + session.Println("Transaction waiting to be included in a block.") + session.Println("Run the following command to follow the transaction status:") + session.Printf(" ignite node --node %s q tx %s\n", getRPC(cmd), resp.TxHash) + } + return nil } diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 2df1605fb7..c535b97fc8 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -84,9 +84,10 @@ type Client struct { keyringBackend cosmosaccount.KeyringBackend keyringDir string - gas string - gasPrices string - fees string + gas string + gasPrices string + fees string + broadcastMode string } // Option configures your client. @@ -172,6 +173,13 @@ func WithFees(fees string) Option { } } +// WithBroadcastMode sets the broadcast mode +func WithBroadcastMode(broadcastMode string) Option { + return func(c *Client) { + c.broadcastMode = broadcastMode + } +} + // New creates a new client with given options. func New(ctx context.Context, options ...Option) (Client, error) { c := Client{ @@ -183,6 +191,7 @@ func New(ctx context.Context, options ...Option) (Client, error) { faucetMinAmount: defaultFaucetMinAmount, out: io.Discard, gas: strconv.Itoa(defaultGasLimit), + broadcastMode: flags.BroadcastBlock, } var err error @@ -223,7 +232,7 @@ func New(ctx context.Context, options ...Option) (Client, error) { return Client{}, err } - c.context = newContext(c.RPC, c.out, c.chainID, c.homePath).WithKeyring(c.AccountRegistry.Keyring) + c.context = c.newContext() c.Factory = newFactory(c.context) return c, nil @@ -535,12 +544,7 @@ func prepareFactory(clientCtx client.Context, txf tx.Factory) (tx.Factory, error return txf, nil } -func newContext( - c *rpchttp.HTTP, - out io.Writer, - chainID, - home string, -) client.Context { +func (c Client) newContext() client.Context { var ( amino = codec.NewLegacyAmino() interfaceRegistry = codectypes.NewInterfaceRegistry() @@ -556,18 +560,19 @@ func newContext( banktypes.RegisterInterfaces(interfaceRegistry) return client.Context{}. - WithChainID(chainID). + WithChainID(c.chainID). WithInterfaceRegistry(interfaceRegistry). WithCodec(marshaler). WithTxConfig(txConfig). WithLegacyAmino(amino). WithInput(os.Stdin). - WithOutput(out). + WithOutput(c.out). WithAccountRetriever(authtypes.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). - WithHomeDir(home). - WithClient(c). - WithSkipConfirmation(true) + WithBroadcastMode(c.broadcastMode). + WithHomeDir(c.homePath). + WithClient(c.RPC). + WithSkipConfirmation(true). + WithKeyring(c.AccountRegistry.Keyring) } func newFactory(clientCtx client.Context) tx.Factory { diff --git a/integration/node/cmd_query_tx_test.go b/integration/node/cmd_query_tx_test.go new file mode 100644 index 0000000000..7506d9a915 --- /dev/null +++ b/integration/node/cmd_query_tx_test.go @@ -0,0 +1,97 @@ +package node_test + +import ( + "bytes" + "context" + "regexp" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/cosmosclient" + "github.com/ignite/cli/ignite/pkg/randstr" + "github.com/ignite/cli/ignite/pkg/xurl" + envtest "github.com/ignite/cli/integration" +) + +func TestNodeQueryTx(t *testing.T) { + var ( + appname = randstr.Runes(10) + // alice = "alice" + // bob = "bob" + + env = envtest.New(t) + app = env.Scaffold(appname) + home = env.AppHome(appname) + servers = app.RandomizeServerPorts() + + // accKeyringDir = t.TempDir() + ) + + node, err := xurl.HTTP(servers.RPC) + require.NoError(t, err) + + var ( + ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) + isBackendAliveErr error + ) + + go func() { + defer cancel() + + if isBackendAliveErr = env.IsAppServed(ctx, servers); isBackendAliveErr != nil { + return + } + client, err := cosmosclient.New(context.Background(), + cosmosclient.WithAddressPrefix(testPrefix), + cosmosclient.WithNodeAddress(node), + ) + require.NoError(t, err) + require.NoError(t, client.WaitForNextBlock()) + + b := &bytes.Buffer{} + env.Exec("send 100token from alice to bob", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "tx", + "bank", + "send", + "alice", + "bob", + "100token", + "--node", node, + "--keyring-dir", home, + "--broadcast-mode", "sync", + ), + step.Stdout(b), + )), + ) + require.False(t, env.HasFailed(), b.String()) + + // Parse tx hash from output + res := regexp.MustCompile(`\(hash = (\w+)\)`).FindAllStringSubmatch(b.String(), -1) + require.Len(t, res[0], 2, "can't extract hash from command output") + hash := res[0][1] + require.NoError(t, client.WaitForNextBlock()) + + env.Must(env.Exec("query tx", + step.NewSteps(step.New( + step.Exec( + envtest.IgniteApp, + "node", + "query", + "tx", + hash, + "--node", node, + ), + )), + )) + }() + + env.Must(app.Serve("should serve with Stargate version", envtest.ExecCtx(ctx))) + + require.NoError(t, isBackendAliveErr, "app cannot get online in time") +} From c1aabe2db4fc82cf81fbcbfb5de876c873739c0a Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 11 Aug 2022 12:28:15 +0200 Subject: [PATCH 36/42] comments --- ignite/pkg/cosmosclient/cosmosclient.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index c535b97fc8..a028194e72 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -248,17 +248,14 @@ func (c Client) LatestBlockHeight() (int64, error) { } // WaitForNextBlock waits until next block is committed. -// WaitForNextBlock reads the current block height and then waits for another -// block to be committed. -// Useful to ensure transactions are properly handled by the app. +// It reads the current block height and then waits for another block to be +// committed. func (c Client) WaitForNextBlock() error { return c.WaitForNBlocks(1) } // WaitForNBlocks reads the current block height and then waits for anothers n // blocks to be committed. -// Useful to ensure transactions are properly handled by the app. -// Must be called after app.Serve(). func (c Client) WaitForNBlocks(n int64) error { start, err := c.LatestBlockHeight() if err != nil { From a9b9f9b9493b9ee0b2e4e37e50d05ae43b877c4b Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 12 Aug 2022 16:21:04 +0200 Subject: [PATCH 37/42] style: consolidate arg names --- ignite/cmd/node_query_bank_balances.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/cmd/node_query_bank_balances.go b/ignite/cmd/node_query_bank_balances.go index eff34eaa3d..8aa4acbc96 100644 --- a/ignite/cmd/node_query_bank_balances.go +++ b/ignite/cmd/node_query_bank_balances.go @@ -9,7 +9,7 @@ import ( func NewNodeQueryBankBalances() *cobra.Command { c := &cobra.Command{ - Use: "balances [account-name|address]", + Use: "balances [from_account_or_address]", Short: "Query for account balances by account name or address", RunE: nodeQueryBankBalancesHandler, Args: cobra.ExactArgs(1), From 10bd29e275239ee83bda878b1cb82217c090904f Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 12 Aug 2022 16:39:15 +0200 Subject: [PATCH 38/42] fix: add port to default node --- ignite/cmd/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/cmd/node.go b/ignite/cmd/node.go index c928e733af..5a91fc9835 100644 --- a/ignite/cmd/node.go +++ b/ignite/cmd/node.go @@ -8,7 +8,7 @@ import ( const ( flagNode = "node" - cosmosRPCAddress = "https://rpc.cosmos.network" + cosmosRPCAddress = "https://rpc.cosmos.network:443" ) func NewNode() *cobra.Command { From 99b7748129df683068aed3a7740a4fec90d0876c Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Tue, 16 Aug 2022 12:22:42 +0200 Subject: [PATCH 39/42] merge const decls --- integration/env.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/integration/env.go b/integration/env.go index 89169c8124..15923ebead 100644 --- a/integration/env.go +++ b/integration/env.go @@ -24,10 +24,7 @@ import ( const ( IgniteApp = "ignite" -) - -const ( - Stargate = "stargate" + Stargate = "stargate" ) var isCI, _ = strconv.ParseBool(os.Getenv("CI")) From 3fa66779ed22a9eac6aa9a7c998e4e6035f203b3 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 16 Aug 2022 09:42:33 -0400 Subject: [PATCH 40/42] fix merge error --- integration/chain/cmd_serve_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/chain/cmd_serve_test.go b/integration/chain/cmd_serve_test.go index 645f40ae8e..27d0a74219 100644 --- a/integration/chain/cmd_serve_test.go +++ b/integration/chain/cmd_serve_test.go @@ -93,7 +93,7 @@ func TestServeStargateWithCustomConfigFile(t *testing.T) { // Move config newConfig := "new_config.yml" newConfigPath := filepath.Join(tmpDir, newConfig) - err := xos.Rename(filepath.Join(apath, "config.yml"), newConfigPath) + err := xos.Rename(filepath.Join(app.SourcePath(), "config.yml"), newConfigPath) require.NoError(t, err) app.SetConfigPath(newConfigPath) From e8c08492b81b334a515024be7d74d7dc481e7c8a Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Wed, 17 Aug 2022 23:52:19 +0200 Subject: [PATCH 41/42] fix after merge --- ignite/pkg/cosmosclient/cosmosclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 85d54433e2..dfba365b1c 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -448,7 +448,7 @@ func (c Client) CreateTx(account cosmosaccount.Account, msgs ...sdktypes.Msg) (T txf = txf.WithGasPrices(c.gasPrices) } - txUnsigned, err := tx.BuildUnsignedTx(txf, msgs...) + txUnsigned, err := txf.BuildUnsignedTx(msgs...) if err != nil { return TxService{}, err } From daebe1d720ade509092356d24af5bade59f96682 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 18 Aug 2022 00:15:51 +0200 Subject: [PATCH 42/42] fix after merge --- go.mod | 1 - go.sum | 2 -- ignite/pkg/cosmosclient/consensus.go | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/go.mod b/go.mod index b01c49ef5d..8f664f1a14 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/charmbracelet/glow v1.4.0 github.com/cosmos/cosmos-sdk v0.46.0 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.2.0 github.com/cosmos/ibc-go/v5 v5.0.0-beta1 github.com/docker/docker v20.10.17+incompatible github.com/emicklei/proto v1.9.0 diff --git a/go.sum b/go.sum index 473587cc8b..33c9ae9560 100644 --- a/go.sum +++ b/go.sum @@ -509,8 +509,6 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.0 h1:sgyrjqOkycXiN7Tuupuo4QAldKFg7Sipyfeg/IL7cps= github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA= -github.com/cosmos/ibc-go/v3 v3.2.0 h1:Mh+RWo5FHPMM1Xsrar3uwKufdEGdIp5LDkVk9cYKYYA= -github.com/cosmos/ibc-go/v3 v3.2.0/go.mod h1:DrDYXJjWNwgv72cK1Il+BegtyGIDXcx+cnJwWGzve6o= github.com/cosmos/ibc-go/v5 v5.0.0-beta1 h1:YqC9giQlZId8Wui8xpaUFI+TpVmEupQZSoDlmxAu6yI= github.com/cosmos/ibc-go/v5 v5.0.0-beta1/go.mod h1:9mmcbzuidgX7nhafIKng/XhXAHDEnRqDjGy/60W1cvg= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= diff --git a/ignite/pkg/cosmosclient/consensus.go b/ignite/pkg/cosmosclient/consensus.go index 3911ff442c..6baffcf167 100644 --- a/ignite/pkg/cosmosclient/consensus.go +++ b/ignite/pkg/cosmosclient/consensus.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "time" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" "github.com/tendermint/tendermint/libs/bytes" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types"