style: add gci linter (#16605)
This commit is contained in:
parent
5de6710803
commit
6afece635c
@ -15,6 +15,7 @@ linters:
|
||||
- exportloopref
|
||||
- goconst
|
||||
- gocritic
|
||||
- gci
|
||||
- gofumpt
|
||||
- gosec
|
||||
- gosimple
|
||||
@ -32,25 +33,25 @@ linters:
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- text: "Use of weak random number generator"
|
||||
- text: 'Use of weak random number generator'
|
||||
linters:
|
||||
- gosec
|
||||
- text: "ST1003:"
|
||||
- text: 'ST1003:'
|
||||
linters:
|
||||
- stylecheck
|
||||
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
|
||||
# https://github.com/dominikh/go-tools/issues/389
|
||||
- text: "ST1016:"
|
||||
- text: 'ST1016:'
|
||||
linters:
|
||||
- stylecheck
|
||||
- path: "migrations"
|
||||
text: "SA1019:"
|
||||
- path: 'migrations'
|
||||
text: 'SA1019:'
|
||||
linters:
|
||||
- staticcheck
|
||||
- text: "SA1019: codec.NewAminoCodec is deprecated" # TODO remove once migration path is set out
|
||||
- text: 'SA1019: codec.NewAminoCodec is deprecated' # TODO remove once migration path is set out
|
||||
linters:
|
||||
- staticcheck
|
||||
- text: "leading space"
|
||||
- text: 'leading space'
|
||||
linters:
|
||||
- nolintlint
|
||||
|
||||
@ -58,6 +59,14 @@ issues:
|
||||
max-same-issues: 10000
|
||||
|
||||
linters-settings:
|
||||
gci:
|
||||
custom-order: true
|
||||
sections:
|
||||
- standard # Standard section: captures all standard packages.
|
||||
- default # Default section: contains all imports that could not be matched to another section type.
|
||||
- prefix(cosmossdk.io)
|
||||
- prefix(github.com/cosmos/cosmos-sdk)
|
||||
|
||||
gosec:
|
||||
# To select a subset of rules to run.
|
||||
# Available rules: https://github.com/securego/gosec#available-rules
|
||||
@ -111,7 +120,7 @@ linters-settings:
|
||||
require-explanation: true
|
||||
require-specific: false
|
||||
gosimple:
|
||||
checks: ["all"]
|
||||
checks: ['all']
|
||||
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
|
||||
@ -10,11 +10,6 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
coreheader "cosmossdk.io/core/header"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/store/rootmulti"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
"github.com/cockroachdb/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
@ -22,6 +17,12 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
grpcstatus "google.golang.org/grpc/status"
|
||||
|
||||
coreheader "cosmossdk.io/core/header"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/store/rootmulti"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/telemetry"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
@ -9,17 +9,18 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
|
||||
|
||||
@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"github.com/cockroachdb/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
@ -14,6 +13,8 @@ import (
|
||||
protoio "github.com/cosmos/gogoproto/io"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/mempool"
|
||||
|
||||
@ -6,8 +6,6 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"github.com/cockroachdb/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
"github.com/cometbft/cometbft/crypto/tmhash"
|
||||
@ -17,6 +15,8 @@ import (
|
||||
"golang.org/x/exp/maps"
|
||||
protov2 "google.golang.org/protobuf/proto"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store"
|
||||
storemetrics "cosmossdk.io/store/metrics"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
|
||||
@ -7,13 +7,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/metrics"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/rootmulti"
|
||||
|
||||
@ -3,8 +3,9 @@ package baseapp
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"cosmossdk.io/core/genesis"
|
||||
"github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"cosmossdk.io/core/genesis"
|
||||
)
|
||||
|
||||
var _ genesis.TxHandler = (*BaseApp)(nil)
|
||||
|
||||
@ -5,11 +5,11 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpcrecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
@ -13,6 +12,8 @@ import (
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
|
||||
@ -4,12 +4,13 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/store/metrics"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -5,9 +5,10 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
|
||||
"cosmossdk.io/store/streaming"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
"github.com/spf13/cast"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
|
||||
@ -5,11 +5,12 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
|
||||
)
|
||||
|
||||
@ -13,21 +13,19 @@ import (
|
||||
"testing"
|
||||
"unsafe"
|
||||
|
||||
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
|
||||
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
"cosmossdk.io/depinject"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
|
||||
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
"cosmossdk.io/core/appconfig"
|
||||
"cosmossdk.io/depinject"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -36,6 +34,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/mock"
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/types/mempool"
|
||||
|
||||
@ -5,14 +5,15 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/config"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -16,10 +16,9 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all.
|
||||
"github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/version"
|
||||
|
||||
legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all.
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
)
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package cmtservice
|
||||
|
||||
import (
|
||||
cmtprototypes "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
|
||||
@ -6,16 +6,15 @@ import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
||||
"google.golang.org/grpc/encoding"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
gogogrpc "github.com/cosmos/gogoproto/grpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/encoding"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
|
||||
@ -4,9 +4,6 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
cmtjson "github.com/cometbft/cometbft/libs/json"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
@ -14,6 +11,10 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/go-bip39"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -17,7 +18,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
"github.com/cosmos/go-bip39"
|
||||
)
|
||||
|
||||
func Test_runAddCmdBasic(t *testing.T) {
|
||||
|
||||
@ -9,14 +9,13 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
)
|
||||
|
||||
func Test_runExportCmd(t *testing.T) {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package keys
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
)
|
||||
|
||||
const flagListNames = "list-names"
|
||||
|
||||
@ -4,12 +4,11 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||
kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
|
||||
@ -3,8 +3,9 @@ package client_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
)
|
||||
|
||||
func TestValidatePromptNotEmpty(t *testing.T) {
|
||||
|
||||
@ -4,13 +4,13 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/rootmulti"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
|
||||
@ -6,10 +6,10 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
|
||||
cmt "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
|
||||
@ -3,10 +3,9 @@ package rpc
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cometbft/cometbft/p2p"
|
||||
coretypes "github.com/cometbft/cometbft/rpc/core/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package snapshot
|
||||
|
||||
import (
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
)
|
||||
|
||||
// Cmd returns the snapshots group command
|
||||
|
||||
@ -3,8 +3,9 @@ package snapshot
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
)
|
||||
|
||||
func DeleteSnapshotCmd() *cobra.Command {
|
||||
|
||||
@ -9,8 +9,9 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
)
|
||||
|
||||
// DumpArchiveCmd returns a command to dump the snapshot as portable archive format
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package snapshot
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// ExportSnapshotCmd returns a command to take a snapshot of the application state
|
||||
|
||||
@ -3,8 +3,9 @@ package snapshot
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
)
|
||||
|
||||
// ListSnapshotsCmd returns the command to list local snapshots
|
||||
|
||||
@ -10,10 +10,11 @@ import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
)
|
||||
|
||||
const SnapshotFileName = "_snapshot"
|
||||
|
||||
@ -4,10 +4,11 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"cosmossdk.io/log"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
)
|
||||
|
||||
@ -10,6 +10,7 @@ import (
|
||||
txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1"
|
||||
txsigning "cosmossdk.io/x/tx/signing"
|
||||
"cosmossdk.io/x/tx/signing/aminojson"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
@ -6,10 +6,10 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"github.com/cosmos/go-bip39"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/cosmos/go-bip39"
|
||||
"cosmossdk.io/math"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
|
||||
@ -3,9 +3,10 @@ package tx_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestFactoryPrepate(t *testing.T) {
|
||||
|
||||
@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
txsigning "cosmossdk.io/x/tx/signing"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/tx"
|
||||
|
||||
@ -3,17 +3,17 @@ package autocli
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"cosmossdk.io/client/v2/autocli/flag"
|
||||
"cosmossdk.io/core/address"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/depinject"
|
||||
|
||||
"cosmossdk.io/client/v2/autocli/flag"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// AppOptions are autocli options for an app. These options can be built via depinject based on an app config. Ex:
|
||||
|
||||
@ -5,14 +5,15 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"cosmossdk.io/client/v2/internal/util"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
)
|
||||
|
||||
func (b *Builder) buildMethodCommandCommon(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions, exec func(cmd *cobra.Command, input protoreflect.Message) error) (*cobra.Command, error) {
|
||||
|
||||
@ -12,11 +12,11 @@ import (
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
reflectionv2alpha1 "cosmossdk.io/api/cosmos/base/reflection/v2alpha1"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
|
||||
|
||||
"cosmossdk.io/client/v2/autocli/flag"
|
||||
"cosmossdk.io/client/v2/internal/testpb"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
|
||||
)
|
||||
|
||||
func testExecCommon(t *testing.T, buildModuleCommand func(string, *Builder) (*cobra.Command, error), args ...string) *testClientConn {
|
||||
|
||||
@ -3,9 +3,10 @@ package flag
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
"cosmossdk.io/core/coins"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
)
|
||||
|
||||
type coinType struct{}
|
||||
|
||||
@ -4,13 +4,12 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
cosmos_proto "github.com/cosmos/cosmos-proto"
|
||||
"github.com/spf13/pflag"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
cosmos_proto "github.com/cosmos/cosmos-proto"
|
||||
|
||||
"cosmossdk.io/client/v2/internal/util"
|
||||
)
|
||||
|
||||
|
||||
@ -3,10 +3,10 @@ package flag
|
||||
import (
|
||||
"context"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"github.com/spf13/pflag"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"cosmossdk.io/client/v2/internal/util"
|
||||
)
|
||||
|
||||
|
||||
@ -4,10 +4,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
)
|
||||
|
||||
func (b *Builder) AddMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions) (*MessageBinder, error) {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package autocli
|
||||
|
||||
import (
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
)
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/testing/protocmp"
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/golden"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
"cosmossdk.io/client/v2/internal/testpb"
|
||||
)
|
||||
|
||||
|
||||
@ -3,10 +3,10 @@ package autocli
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"cosmossdk.io/client/v2/internal/strcase"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// findSubCommand finds a sub-command of the provided command whose Use
|
||||
|
||||
@ -3,8 +3,9 @@ package strcase_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/client/v2/internal/strcase"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"cosmossdk.io/client/v2/internal/strcase"
|
||||
)
|
||||
|
||||
func toKebab(t testing.TB) {
|
||||
|
||||
@ -3,11 +3,12 @@ package codec_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
"github.com/stretchr/testify/require"
|
||||
protov2 "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/dynamicpb"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
|
||||
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
@ -4,12 +4,11 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
gogotypes "github.com/cosmos/gogoproto/types"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
collcodec "cosmossdk.io/collections/codec"
|
||||
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
)
|
||||
|
||||
// BoolValue implements a ValueCodec that saves the bool value
|
||||
|
||||
@ -3,14 +3,14 @@ package codec_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
gogotypes "github.com/cosmos/gogoproto/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections/colltest"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
gogotypes "github.com/cosmos/gogoproto/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
)
|
||||
|
||||
func TestCollectionsCorrectness(t *testing.T) {
|
||||
|
||||
@ -4,10 +4,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestRegisterAminoMsg(t *testing.T) {
|
||||
|
||||
@ -5,9 +5,6 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
"cosmossdk.io/x/tx/signing"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
@ -16,6 +13,10 @@ import (
|
||||
protov2 "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
"cosmossdk.io/x/tx/signing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"cosmossdk.io/x/tx/signing"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/x/tx/signing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/address"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
)
|
||||
|
||||
|
||||
@ -4,9 +4,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
@ -3,10 +3,9 @@ package codec_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
)
|
||||
|
||||
@ -5,10 +5,10 @@ import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
)
|
||||
|
||||
type testStore struct {
|
||||
|
||||
@ -6,11 +6,10 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/collections/codec"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"cosmossdk.io/collections/codec"
|
||||
)
|
||||
|
||||
// TestKeyCodec asserts the correct behavior of a KeyCodec over the type T.
|
||||
|
||||
@ -3,8 +3,9 @@ package colltest
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
)
|
||||
|
||||
type contextStoreKey struct{}
|
||||
|
||||
@ -6,8 +6,9 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
)
|
||||
|
||||
func TestDefaultGenesis(t *testing.T) {
|
||||
|
||||
@ -3,10 +3,11 @@ package collections_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/collections/colltest"
|
||||
"cosmossdk.io/collections/indexes"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type company struct {
|
||||
|
||||
@ -3,8 +3,9 @@ package indexes
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
)
|
||||
|
||||
func TestHelpers(t *testing.T) {
|
||||
|
||||
@ -3,8 +3,9 @@ package indexes
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
)
|
||||
|
||||
// TODO remove this when we add testStore to core/store.
|
||||
|
||||
@ -3,8 +3,9 @@ package indexes
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
)
|
||||
|
||||
func TestMultiIndex(t *testing.T) {
|
||||
|
||||
@ -3,8 +3,9 @@ package indexes
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@ -3,8 +3,9 @@ package indexes
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
)
|
||||
|
||||
func TestUniqueIndex(t *testing.T) {
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
"cosmossdk.io/collections/codec"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
)
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
)
|
||||
|
||||
|
||||
@ -13,10 +13,8 @@ import (
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
|
||||
"cosmossdk.io/core/internal"
|
||||
"cosmossdk.io/depinject"
|
||||
)
|
||||
|
||||
// LoadJSON loads an app config in JSON format.
|
||||
|
||||
@ -10,12 +10,11 @@ import (
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
|
||||
"cosmossdk.io/core/appconfig"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/internal"
|
||||
"cosmossdk.io/core/internal/testpb"
|
||||
"cosmossdk.io/depinject"
|
||||
)
|
||||
|
||||
func expectContainerErrorContains(t *testing.T, option depinject.Config, contains string) {
|
||||
|
||||
@ -3,8 +3,9 @@ package appmodule
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
)
|
||||
|
||||
// AppModule is a tag interface for app module implementations to use as a basis
|
||||
|
||||
@ -5,10 +5,11 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
"cosmossdk.io/core/coins"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// coinsJsonTest is the type of test cases in the coin.json file.
|
||||
|
||||
@ -9,10 +9,10 @@ import (
|
||||
|
||||
"github.com/cometbft/cometbft/crypto"
|
||||
"golang.org/x/crypto/argon2"
|
||||
"golang.org/x/crypto/chacha20poly1305"
|
||||
"golang.org/x/crypto/openpgp/armor" //nolint:staticcheck //TODO: remove this dependency
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"golang.org/x/crypto/chacha20poly1305"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/bcrypt"
|
||||
|
||||
@ -8,9 +8,6 @@ import (
|
||||
"testing"
|
||||
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/xsalsa20symmetric"
|
||||
|
||||
_ "github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -25,6 +22,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/bcrypt"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/xsalsa20symmetric"
|
||||
_ "github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/configurator"
|
||||
"github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
@ -12,13 +12,11 @@ import (
|
||||
|
||||
"github.com/99designs/keyring"
|
||||
"github.com/cockroachdb/errors"
|
||||
|
||||
"github.com/cosmos/go-bip39"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/input"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/crypto"
|
||||
|
||||
@ -7,11 +7,10 @@ import (
|
||||
"github.com/99designs/keyring"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
|
||||
@ -4,13 +4,12 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
|
||||
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
)
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
package bcrypt
|
||||
|
||||
// The code is a port of Provos and Mazières's C implementation.
|
||||
|
||||
import (
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
|
||||
@ -8,11 +8,12 @@ import (
|
||||
"io"
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cometbft/cometbft/crypto"
|
||||
secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"golang.org/x/crypto/ripemd160" //nolint: staticcheck // keep around for backwards compatibility
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
@ -6,10 +6,9 @@ package secp256k1
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/cometbft/cometbft/crypto"
|
||||
secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
|
||||
|
||||
"github.com/cometbft/cometbft/crypto"
|
||||
)
|
||||
|
||||
// Sign creates an ECDSA signature on curve Secp256k1, using SHA256 on the msg.
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
|
||||
@ -5,10 +5,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/regen-network/gocuke"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/depinject"
|
||||
)
|
||||
|
||||
@ -6,8 +6,9 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
bip39 "github.com/cosmos/go-bip39"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
)
|
||||
|
||||
func mnemonicToSeed(mnemonic string) []byte {
|
||||
|
||||
@ -7,8 +7,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"github.com/rs/zerolog"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
const message = "test message"
|
||||
|
||||
@ -3,8 +3,9 @@ package log_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
func TestParseLogLevel(t *testing.T) {
|
||||
|
||||
@ -5,8 +5,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
func TestFilteredWriter(t *testing.T) {
|
||||
|
||||
@ -8,8 +8,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
)
|
||||
|
||||
type uintTestSuite struct {
|
||||
|
||||
@ -3,11 +3,11 @@ package ormfield
|
||||
import (
|
||||
"io"
|
||||
|
||||
"cosmossdk.io/orm/types/ormerrors"
|
||||
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/types/known/durationpb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
// Codec defines an interface for decoding and encoding values in ORM index keys.
|
||||
|
||||
@ -4,12 +4,12 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cosmos/cosmos-proto/generator"
|
||||
"google.golang.org/protobuf/compiler/protogen"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/pluginpb"
|
||||
|
||||
ormv1 "cosmossdk.io/api/cosmos/orm/v1"
|
||||
"github.com/cosmos/cosmos-proto/generator"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -7,7 +7,6 @@ import (
|
||||
"google.golang.org/protobuf/types/dynamicpb"
|
||||
|
||||
ormv1 "cosmossdk.io/api/cosmos/orm/v1"
|
||||
|
||||
"cosmossdk.io/orm/model/ormtable"
|
||||
)
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import (
|
||||
"google.golang.org/protobuf/types/dynamicpb"
|
||||
|
||||
ormv1 "cosmossdk.io/api/cosmos/orm/v1"
|
||||
|
||||
"cosmossdk.io/orm/internal/fieldnames"
|
||||
"cosmossdk.io/orm/model/ormtable"
|
||||
)
|
||||
|
||||
@ -4,7 +4,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
)
|
||||
|
||||
|
||||
@ -3,14 +3,13 @@ package stablejson_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-proto/anyutil"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1"
|
||||
"github.com/cosmos/cosmos-proto/anyutil"
|
||||
|
||||
"cosmossdk.io/orm/internal/stablejson"
|
||||
)
|
||||
|
||||
|
||||
@ -5,12 +5,11 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/errors"
|
||||
|
||||
"cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
|
||||
@ -7,15 +7,14 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/store"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protodesc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
|
||||
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/orm/encoding/encodeutil"
|
||||
"cosmossdk.io/orm/encoding/ormkv"
|
||||
"cosmossdk.io/orm/model/ormtable"
|
||||
|
||||
@ -8,6 +8,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/golang/mock/gomock"
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/golden"
|
||||
|
||||
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
ormmodulev1alpha1 "cosmossdk.io/api/cosmos/orm/module/v1alpha1"
|
||||
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
||||
@ -16,12 +21,6 @@ import (
|
||||
"cosmossdk.io/core/genesis"
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/depinject"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/golden"
|
||||
|
||||
_ "cosmossdk.io/orm" // required for ORM module registration
|
||||
"cosmossdk.io/orm/internal/testkv"
|
||||
"cosmossdk.io/orm/internal/testpb"
|
||||
|
||||
@ -5,7 +5,6 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
queryv1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1"
|
||||
|
||||
"cosmossdk.io/orm/internal/listinternal"
|
||||
)
|
||||
|
||||
|
||||
@ -5,9 +5,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"cosmossdk.io/orm/internal/testkv"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user