formatting fixes (#1783)

This commit is contained in:
Draco 2023-11-21 14:08:07 -05:00 committed by drklee3
parent c1e6321179
commit 821d67a20b
No known key found for this signature in database
GPG Key ID: A8F9A6E3133E0F6A
14 changed files with 15 additions and 16 deletions

View File

@ -42,7 +42,7 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []
// prepare for fresh start at zero height // prepare for fresh start at zero height
// NOTE zero height genesis is a temporary feature which will be deprecated // NOTE zero height genesis is a temporary feature which will be deprecated
// in favour of export at a block height // in favour of export at a block height
func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) { func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) {
applyWhiteList := false applyWhiteList := false

View File

@ -13,10 +13,10 @@ import (
// All methods return the builder so method calls can be chained together. // All methods return the builder so method calls can be chained together.
// //
// Example: // Example:
// // create a single account genesis state
// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins)
// genesisState := builder.BuildMarshalled()
// //
// // create a single account genesis state
// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins)
// genesisState := builder.BuildMarshalled()
type AuthBankGenesisBuilder struct { type AuthBankGenesisBuilder struct {
AuthGenesis authtypes.GenesisState AuthGenesis authtypes.GenesisState
BankGenesis banktypes.GenesisState BankGenesis banktypes.GenesisState

View File

@ -24,6 +24,5 @@ The process is:
On each release we can delete the previous releases migration and old GenesisState type. On each release we can delete the previous releases migration and old GenesisState type.
eg kava-3 migrates `auth.GenesisState` from kava-2 to `auth.GenesisState` from kava-3, eg kava-3 migrates `auth.GenesisState` from kava-2 to `auth.GenesisState` from kava-3,
but for kava-4 we don't need to keep around kava-2's `auth.GenesisState` type. but for kava-4 we don't need to keep around kava-2's `auth.GenesisState` type.
*/ */
package migrate package migrate

View File

@ -11,7 +11,7 @@ import (
) )
// ParseAddrFromHexOrBech32 parses a string address that can be either a hex or // ParseAddrFromHexOrBech32 parses a string address that can be either a hex or
//Bech32 string. // Bech32 string.
func ParseAddrFromHexOrBech32(addrString string) (common.Address, error) { func ParseAddrFromHexOrBech32(addrString string) (common.Address, error) {
if common.IsHexAddress(addrString) { if common.IsHexAddress(addrString) {
return common.HexToAddress(addrString), nil return common.HexToAddress(addrString), nil

View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"time" "time"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkmath "cosmossdk.io/math" sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
) )

View File

@ -1,9 +1,9 @@
package kavadist package kavadist
import ( import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/kava-labs/kava/x/kavadist/keeper" "github.com/kava-labs/kava/x/kavadist/keeper"

View File

@ -1,9 +1,9 @@
package keeper package keeper
import ( import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
"github.com/kava-labs/kava/x/kavadist/types" "github.com/kava-labs/kava/x/kavadist/types"
) )

View File

@ -1,10 +1,10 @@
package keeper package keeper
import ( import (
errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
abci "github.com/tendermint/tendermint/abci/types" abci "github.com/tendermint/tendermint/abci/types"

View File

@ -4,11 +4,11 @@ import (
fmt "fmt" fmt "fmt"
"testing" "testing"
sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
sdkmath "cosmossdk.io/math"
"github.com/kava-labs/kava/x/liquid/types" "github.com/kava-labs/kava/x/liquid/types"
) )

View File

@ -5,12 +5,12 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/version"
"github.com/kava-labs/kava/x/router/types" "github.com/kava-labs/kava/x/router/types"

View File

@ -4,9 +4,9 @@ import (
"context" "context"
"time" "time"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
earntypes "github.com/kava-labs/kava/x/earn/types" earntypes "github.com/kava-labs/kava/x/earn/types"

View File

@ -1,9 +1,9 @@
package types package types
import ( import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
) )

View File

@ -4,8 +4,8 @@ import (
"github.com/kava-labs/kava/x/swap/types" "github.com/kava-labs/kava/x/swap/types"
"github.com/kava-labs/kava/x/swap/types/mocks" "github.com/kava-labs/kava/x/swap/types/mocks"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkmath "cosmossdk.io/math" sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
) )

View File

@ -3,8 +3,8 @@
package mocks package mocks
import ( import (
mock "github.com/stretchr/testify/mock"
math "cosmossdk.io/math" math "cosmossdk.io/math"
mock "github.com/stretchr/testify/mock"
types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types"
) )