diff --git a/.golangci.yml b/.golangci.yml index a8c7132f..b53eceb4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,6 +11,7 @@ linters: - errcheck - goconst - gocritic + - gci - gofumpt - gosec - gosimple @@ -32,6 +33,7 @@ linters: - nolintlint issues: + fix: true exclude-rules: - text: "Use of weak random number generator" linters: @@ -59,6 +61,20 @@ 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(github.com/cometbft/cometbft) + - prefix(github.com/CosmWasm) + - prefix(github.com/cosmos) + - prefix(github.com/cosmos/ibc) + - prefix(cosmossdk.io) + - prefix(github.com/cosmos/cosmos-sdk) + - prefix(github.com/sedaprotocol) + - prefix(github.com/sedaprotocol/seda-chain) + skip-generated: false dogsled: max-blank-identifiers: 3 maligned: diff --git a/app/app.go b/app/app.go index dd9d4953..bb047d2f 100644 --- a/app/app.go +++ b/app/app.go @@ -11,12 +11,48 @@ import ( "github.com/spf13/cast" + abci "github.com/cometbft/cometbft/abci/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + wasmapp "github.com/CosmWasm/wasmd/app" + wasm "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/gogoproto/proto" + + "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward" + packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" + packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" + "github.com/cosmos/ibc-go/modules/capability" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcporttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/circuit" @@ -32,13 +68,7 @@ import ( "cosmossdk.io/x/upgrade" upgradekeeper "cosmossdk.io/x/upgrade/keeper" upgradetypes "cosmossdk.io/x/upgrade/types" - wasmapp "github.com/CosmWasm/wasmd/app" - wasm "github.com/CosmWasm/wasmd/x/wasm" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - abci "github.com/cometbft/cometbft/abci/types" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" @@ -65,7 +95,6 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/authz" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" @@ -98,36 +127,6 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" sdkstakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/gogoproto/proto" - "github.com/cosmos/ibc-go/modules/capability" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - - // ibc - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward" - packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" - packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types" - ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v8/modules/core" - ibcporttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - - // ica - ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" "github.com/sedaprotocol/seda-chain/app/keepers" appparams "github.com/sedaprotocol/seda-chain/app/params" diff --git a/app/export.go b/app/export.go index b2389b41..09b10492 100644 --- a/app/export.go +++ b/app/export.go @@ -5,10 +5,10 @@ import ( "fmt" "log" - storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + storetypes "cosmossdk.io/store/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" diff --git a/app/genesis.go b/app/genesis.go index 21a9bd7d..dda6606c 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -5,6 +5,7 @@ import ( "encoding/json" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 4e2cf93a..51964d99 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -1,10 +1,21 @@ package keepers import ( + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + + packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + circuitkeeper "cosmossdk.io/x/circuit/keeper" evidencekeeper "cosmossdk.io/x/evidence/keeper" feegrantkeeper "cosmossdk.io/x/feegrant/keeper" upgradekeeper "cosmossdk.io/x/upgrade/keeper" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -15,18 +26,6 @@ import ( groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - - // ibc - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper" - ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - - // ica - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" stakingkeeper "github.com/sedaprotocol/seda-chain/x/staking/keeper" ) diff --git a/app/utils/vrf_key.go b/app/utils/vrf_key.go index c5e0cc8e..f26b9c76 100644 --- a/app/utils/vrf_key.go +++ b/app/utils/vrf_key.go @@ -6,8 +6,6 @@ import ( "os" "path/filepath" - vrf "github.com/sedaprotocol/vrf-go" - cfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" @@ -21,6 +19,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + + vrf "github.com/sedaprotocol/vrf-go" ) const VRFKeyFileName = "vrf_key.json" diff --git a/cmd/sedad/cmd/init.go b/cmd/sedad/cmd/init.go index 5c0e61d6..8cd2bb74 100644 --- a/cmd/sedad/cmd/init.go +++ b/cmd/sedad/cmd/init.go @@ -14,9 +14,10 @@ import ( cmtos "github.com/cometbft/cometbft/libs/os" "github.com/cometbft/cometbft/privval" + "github.com/cosmos/go-bip39" + "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/go-bip39" "github.com/sedaprotocol/seda-chain/cmd/sedad/utils" ) diff --git a/cmd/sedad/cmd/root.go b/cmd/sedad/cmd/root.go index ef376a6f..9638250a 100644 --- a/cmd/sedad/cmd/root.go +++ b/cmd/sedad/cmd/root.go @@ -6,6 +6,18 @@ import ( "os" "path/filepath" + "github.com/spf13/cast" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "google.golang.org/grpc" + "google.golang.org/protobuf/reflect/protoregistry" + + tmcli "github.com/cometbft/cometbft/libs/cli" + + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/client/v2/autocli" "cosmossdk.io/client/v2/autocli/flag" "cosmossdk.io/log" @@ -14,15 +26,7 @@ import ( snapshottypes "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" confixcmd "cosmossdk.io/tools/confix/cmd" - tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/spf13/cast" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "google.golang.org/grpc" - "google.golang.org/protobuf/reflect/protoregistry" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -46,6 +50,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/sedaprotocol/seda-chain/app" appparams "github.com/sedaprotocol/seda-chain/app/params" ) diff --git a/cmd/sedad/gentx/collect_gentxs.go b/cmd/sedad/gentx/collect_gentxs.go index 0b407116..2579b5fa 100644 --- a/cmd/sedad/gentx/collect_gentxs.go +++ b/cmd/sedad/gentx/collect_gentxs.go @@ -9,11 +9,12 @@ import ( "sort" "strings" - "cosmossdk.io/errors" "github.com/spf13/cobra" cfg "github.com/cometbft/cometbft/config" + "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" diff --git a/cmd/sedad/gentx/gentx.go b/cmd/sedad/gentx/gentx.go index 9203468f..97ea2d89 100644 --- a/cmd/sedad/gentx/gentx.go +++ b/cmd/sedad/gentx/gentx.go @@ -9,9 +9,10 @@ import ( "os" "path/filepath" + "github.com/spf13/cobra" + address "cosmossdk.io/core/address" "cosmossdk.io/errors" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/cmd/sedad/main.go b/cmd/sedad/main.go index e10ab0bb..a44e478e 100644 --- a/cmd/sedad/main.go +++ b/cmd/sedad/main.go @@ -4,6 +4,7 @@ import ( "os" "cosmossdk.io/log" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/sedaprotocol/seda-chain/app" diff --git a/e2e/e2e_gov_test.go b/e2e/e2e_gov_test.go index 3cf485f6..f3a9fd1f 100644 --- a/e2e/e2e_gov_test.go +++ b/e2e/e2e_gov_test.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" diff --git a/e2e/e2e_register_proxy_contract_test.go b/e2e/e2e_register_proxy_contract_test.go index 0446f4cc..b75efc8e 100644 --- a/e2e/e2e_register_proxy_contract_test.go +++ b/e2e/e2e_register_proxy_contract_test.go @@ -8,6 +8,7 @@ import ( "time" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + sdktypes "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" diff --git a/e2e/e2e_setup_test.go b/e2e/e2e_setup_test.go index 47e03f0b..bc7a5ba5 100644 --- a/e2e/e2e_setup_test.go +++ b/e2e/e2e_setup_test.go @@ -12,8 +12,6 @@ import ( "testing" "time" - "cosmossdk.io/math" - evidencetypes "cosmossdk.io/x/evidence/types" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" "github.com/spf13/viper" @@ -22,6 +20,9 @@ import ( tmconfig "github.com/cometbft/cometbft/config" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "cosmossdk.io/math" + evidencetypes "cosmossdk.io/x/evidence/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/server" diff --git a/e2e/genesis.go b/e2e/genesis.go index 1db104d8..85b3cd83 100644 --- a/e2e/genesis.go +++ b/e2e/genesis.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "cosmossdk.io/math" - cmttypes "github.com/cometbft/cometbft/types" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/e2e/util.go b/e2e/util.go index e36b2785..24598e2d 100644 --- a/e2e/util.go +++ b/e2e/util.go @@ -7,9 +7,10 @@ import ( "net/url" "os" + "github.com/cosmos/go-bip39" + "github.com/cosmos/cosmos-sdk/codec/unknownproto" sdktx "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/go-bip39" ) // createMnemonic creates a random string mnemonic diff --git a/e2e/validator.go b/e2e/validator.go index 804f5f8a..196c4dcf 100644 --- a/e2e/validator.go +++ b/e2e/validator.go @@ -8,14 +8,14 @@ import ( "path" "path/filepath" - "cosmossdk.io/math" - tmcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/crypto/ed25519" tmos "github.com/cometbft/cometbft/libs/os" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/privval" + "cosmossdk.io/math" + sdkcrypto "github.com/cosmos/cosmos-sdk/crypto" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" diff --git a/integration/integration.go b/integration/integration.go index bd0ecedf..cd55aaff 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -6,6 +6,7 @@ import ( cmtabcitypes "github.com/cometbft/cometbft/abci/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/core/appmodule" diff --git a/interchaintest/chain_core_test.go b/interchaintest/chain_core_test.go index 73b27068..b55ac3c2 100644 --- a/interchaintest/chain_core_test.go +++ b/interchaintest/chain_core_test.go @@ -7,14 +7,15 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/stretchr/testify/require" + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/interchaintest/chain_start_test.go b/interchaintest/chain_start_test.go index 9834f5e7..deb681e2 100644 --- a/interchaintest/chain_start_test.go +++ b/interchaintest/chain_start_test.go @@ -3,11 +3,13 @@ package interchaintest import ( "testing" - "cosmossdk.io/math" - "github.com/sedaprotocol/seda-chain/interchaintest/conformance" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + + "github.com/sedaprotocol/seda-chain/interchaintest/conformance" ) func TestChainStart(t *testing.T) { diff --git a/interchaintest/chain_upgrade_test.go b/interchaintest/chain_upgrade_test.go index 89b26957..b364afdc 100644 --- a/interchaintest/chain_upgrade_test.go +++ b/interchaintest/chain_upgrade_test.go @@ -6,17 +6,18 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/docker/docker/client" - "github.com/sedaprotocol/seda-chain/interchaintest/conformance" - "github.com/sedaprotocol/seda-chain/interchaintest/helpers" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" + "cosmossdk.io/math" upgradetypes "cosmossdk.io/x/upgrade/types" + + "github.com/sedaprotocol/seda-chain/interchaintest/conformance" + "github.com/sedaprotocol/seda-chain/interchaintest/helpers" ) const ( diff --git a/interchaintest/ibc_transfer_test.go b/interchaintest/ibc_transfer_test.go index bc5fe800..5f5ff711 100644 --- a/interchaintest/ibc_transfer_test.go +++ b/interchaintest/ibc_transfer_test.go @@ -4,7 +4,6 @@ import ( "context" "testing" - "cosmossdk.io/math" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" @@ -15,6 +14,8 @@ import ( "go.uber.org/zap/zaptest" transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + + "cosmossdk.io/math" ) // TestIBCTransfer spins up a Seda and Gaia network, initializes an IBC connection between them, diff --git a/interchaintest/ica_test.go b/interchaintest/ica_test.go index 56b135d4..5ccad1b4 100644 --- a/interchaintest/ica_test.go +++ b/interchaintest/ica_test.go @@ -6,9 +6,6 @@ import ( "strings" "testing" - "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - chantypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" @@ -17,6 +14,12 @@ import ( "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" + + chantypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keyring" ) // TestInterchainAccounts is a test case that performs simulations and assertions around some basic diff --git a/interchaintest/pfm_test.go b/interchaintest/pfm_test.go index f332fcc9..80efc087 100644 --- a/interchaintest/pfm_test.go +++ b/interchaintest/pfm_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" @@ -19,6 +18,8 @@ import ( transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/interchaintest/setup.go b/interchaintest/setup.go index 374dbc3c..a935f376 100644 --- a/interchaintest/setup.go +++ b/interchaintest/setup.go @@ -5,11 +5,7 @@ import ( "fmt" "testing" - "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/docker/docker/client" - "github.com/sedaprotocol/seda-chain/interchaintest/types" "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" @@ -18,7 +14,14 @@ import ( "go.uber.org/zap/zaptest" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + ibclocalhost "github.com/cosmos/ibc-go/v8/modules/light-clients/09-localhost" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/types/module/testutil" + + "github.com/sedaprotocol/seda-chain/interchaintest/types" ) var ( diff --git a/plugins/indexing/auth/module.go b/plugins/indexing/auth/module.go index 91d3ab09..1ad2a89a 100644 --- a/plugins/indexing/auth/module.go +++ b/plugins/indexing/auth/module.go @@ -4,6 +4,7 @@ import ( "bytes" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/plugins/indexing/bank/module.go b/plugins/indexing/bank/module.go index 5884a7b6..5d2d6e39 100644 --- a/plugins/indexing/bank/module.go +++ b/plugins/indexing/bank/module.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/plugins/indexing/base/block.go b/plugins/indexing/base/block.go index 6d74584d..e8b5c12c 100644 --- a/plugins/indexing/base/block.go +++ b/plugins/indexing/base/block.go @@ -6,6 +6,7 @@ import ( "time" abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/plugins/indexing/types" diff --git a/plugins/indexing/base/transaction.go b/plugins/indexing/base/transaction.go index d57d251d..734124da 100644 --- a/plugins/indexing/base/transaction.go +++ b/plugins/indexing/base/transaction.go @@ -7,6 +7,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" diff --git a/plugins/indexing/plugin.go b/plugins/indexing/plugin.go index c086a973..7453ca02 100644 --- a/plugins/indexing/plugin.go +++ b/plugins/indexing/plugin.go @@ -6,20 +6,22 @@ import ( "github.com/hashicorp/go-plugin" + abci "github.com/cometbft/cometbft/abci/types" + + "github.com/cosmos/gogoproto/proto" + streamingabci "cosmossdk.io/store/streaming/abci" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/tx/signing" - abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" "github.com/sedaprotocol/seda-chain/app" "github.com/sedaprotocol/seda-chain/app/params" - "github.com/sedaprotocol/seda-chain/plugins/indexing/auth" "github.com/sedaprotocol/seda-chain/plugins/indexing/bank" "github.com/sedaprotocol/seda-chain/plugins/indexing/base" diff --git a/plugins/indexing/staking/module.go b/plugins/indexing/staking/module.go index ffffdcd1..62dd0472 100644 --- a/plugins/indexing/staking/module.go +++ b/plugins/indexing/staking/module.go @@ -3,13 +3,15 @@ package staking import ( "bytes" + gogotypes "github.com/cosmos/gogoproto/types" + "cosmossdk.io/collections" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - gogotypes "github.com/cosmos/gogoproto/types" "github.com/sedaprotocol/seda-chain/plugins/indexing/log" "github.com/sedaprotocol/seda-chain/plugins/indexing/types" diff --git a/simulation/helpers_test.go b/simulation/helpers_test.go index d27e19bd..2a084ef0 100644 --- a/simulation/helpers_test.go +++ b/simulation/helpers_test.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/simulation/simulation_test.go b/simulation/simulation_test.go index cdd3f78a..c49c6561 100644 --- a/simulation/simulation_test.go +++ b/simulation/simulation_test.go @@ -14,9 +14,13 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + dbm "github.com/cosmos/cosmos-db" + + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + "cosmossdk.io/log" evidencetypes "cosmossdk.io/x/evidence/types" - dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -32,7 +36,6 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/sedaprotocol/seda-chain/app" ) diff --git a/testutil/network/network.go b/testutil/network/network.go index 962727f8..79e58c01 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -5,12 +5,14 @@ import ( "testing" "time" - pruningtypes "cosmossdk.io/store/pruning/types" "github.com/stretchr/testify/require" tmrand "github.com/cometbft/cometbft/libs/rand" dbm "github.com/cosmos/cosmos-db" + + pruningtypes "cosmossdk.io/store/pruning/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index f958c0bd..41c78b26 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -4,11 +4,12 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" + "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index d13c470a..0e3819d9 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -3,9 +3,10 @@ package keeper import ( "context" "fmt" - stdmath "math" + "math" + + sdkmath "cosmossdk.io/math" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -34,8 +35,8 @@ func (k *Keeper) SetHooks(sh types.StakingHooks) { // entries to ensure that all redelegations are matched by sufficient shares. // Note that no tokens are transferred to or from any pool or account, since no // delegation is actually changing state. -func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantShares math.LegacyDec) (math.LegacyDec, error) { - transferred := math.LegacyZeroDec() +func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantShares sdkmath.LegacyDec) (sdkmath.LegacyDec, error) { + transferred := sdkmath.LegacyZeroDec() // sanity checks if !wantShares.IsPositive() { @@ -104,7 +105,7 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc delTo, err := k.GetDelegation(ctx, toAddr, valAddr) if err != nil { if err == types.ErrNoDelegation { - delTo = types.NewDelegation(toAddr.String(), validator.GetOperator(), math.LegacyZeroDec()) + delTo = types.NewDelegation(toAddr.String(), validator.GetOperator(), sdkmath.LegacyZeroDec()) err = k.Hooks().BeforeDelegationCreated(ctx, toAddr, valAddr) } else { return transferred, err @@ -161,7 +162,7 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc // keeping a liability for 25 shares and transferring one for 75 shares. // Of course, the redelegations themselves can have multiple entries for // different timestamps, so we're actually working at a finer granularity. - redelegations, err := k.GetRedelegations(ctx, fromAddr, stdmath.MaxUint16) + redelegations, err := k.GetRedelegations(ctx, fromAddr, math.MaxUint16) if err != nil { return transferred, err } @@ -188,7 +189,7 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc // Partition SharesDst between keeping and sending sharesToKeep := entry.SharesDst - sharesToSend := math.LegacyZeroDec() + sharesToSend := sdkmath.LegacyZeroDec() if entry.SharesDst.GT(remaining) { sharesToKeep = remaining sharesToSend = entry.SharesDst.Sub(sharesToKeep) @@ -204,7 +205,7 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc // Transfer the whole entry, delete locally toRed, err := k.SetRedelegationEntry( ctx, toAddr, valSrcAddr, valDstAddr, - entry.CreationHeight, entry.CompletionTime, entry.InitialBalance, math.LegacyZeroDec(), sharesToSend, + entry.CreationHeight, entry.CompletionTime, entry.InitialBalance, sdkmath.LegacyZeroDec(), sharesToSend, ) if err != nil { return transferred, err @@ -224,7 +225,7 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc balanceToKeep := entry.InitialBalance.Sub(balanceToSend) toRed, err := k.SetRedelegationEntry( ctx, toAddr, valSrcAddr, valDstAddr, - entry.CreationHeight, entry.CompletionTime, balanceToSend, math.LegacyZeroDec(), sharesToSend, + entry.CreationHeight, entry.CompletionTime, balanceToSend, sdkmath.LegacyZeroDec(), sharesToSend, ) if err != nil { return transferred, err @@ -262,8 +263,8 @@ func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.Acc // TransferUnbonding changes the ownership of UnbondingDelegation entries // until the desired number of tokens have changed hands. Returns the actual // number of tokens transferred. -func (k Keeper) TransferUnbonding(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantAmt math.Int) (math.Int, error) { - transferred := math.ZeroInt() +func (k Keeper) TransferUnbonding(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantAmt sdkmath.Int) (sdkmath.Int, error) { + transferred := sdkmath.ZeroInt() ubdFrom, err := k.GetUnbondingDelegation(ctx, fromAddr, valAddr) if err != nil { return transferred, err diff --git a/x/tally/keeper/abci.go b/x/tally/keeper/abci.go index 832cfc02..c5daf3c5 100644 --- a/x/tally/keeper/abci.go +++ b/x/tally/keeper/abci.go @@ -9,10 +9,10 @@ import ( "strconv" "strings" - "github.com/sedaprotocol/seda-wasm-vm/tallyvm" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/sedaprotocol/seda-wasm-vm/tallyvm" + "github.com/sedaprotocol/seda-chain/x/tally/types" ) @@ -67,7 +67,9 @@ func (k Keeper) ProcessTallies(ctx sdk.Context) error { // Loop through the list to apply filter, execute tally, and post // execution result. - for _, req := range tallyList { + sudoMsgs := make([]types.Sudo, len(tallyList)) + vmResults := make([]tallyvm.VmResult, len(tallyList)) + for i, req := range tallyList { // Construct barebone sudo message to be posted to the contract // here and populate its results fields after FilterAndTally. sudoMsg := types.Sudo{ @@ -97,45 +99,54 @@ func (k Keeper) ProcessTallies(ctx sdk.Context) error { sudoMsg.Result.Result = vmRes.Result sudoMsg.Result.Consensus = consensus } - - // Post results to the SEDA contract. - msg, err := json.Marshal(struct { - PostDataResult types.Sudo `json:"post_data_result"` - }{ - PostDataResult: sudoMsg, - }) - if err != nil { - return err - } - k.Logger(ctx).Info( - "posting execution results to SEDA contract", + "completed tally execution", "request_id", req.ID, "execution_result", vmRes, "sudo_message", sudoMsg, ) - postRes, err := k.wasmKeeper.Sudo(ctx, coreContract, msg) - if err != nil { - return err - } + sudoMsgs[i] = sudoMsg + vmResults[i] = vmRes + } + + msg, err := json.Marshal(struct { + PostDataResults struct { + Results []types.Sudo `json:"results"` + } `json:"post_data_results"` + }{ + PostDataResults: struct { + Results []types.Sudo `json:"results"` + }{ + Results: sudoMsgs, + }, + }) + if err != nil { + return err + } + + postRes, err := k.wasmKeeper.Sudo(ctx, coreContract, msg) + if err != nil { + return err + } + + for i := range sudoMsgs { k.Logger(ctx).Info( "tally flow completed", - "request_id", req.ID, + "request_id", sudoMsgs[i].ID, "post_result", postRes, ) ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeTallyCompletion, - sdk.NewAttribute(types.AttributeDataRequestID, req.ID), - sdk.NewAttribute(types.AttributeTypeConsensus, strconv.FormatBool(consensus)), - sdk.NewAttribute(types.AttributeTallyVMStdOut, strings.Join(vmRes.Stdout, "\n")), - sdk.NewAttribute(types.AttributeTallyVMStdErr, strings.Join(vmRes.Stderr, "\n")), - sdk.NewAttribute(types.AttributeTallyExitCode, fmt.Sprintf("%02x", sudoMsg.ExitCode)), + sdk.NewAttribute(types.AttributeDataRequestID, sudoMsgs[i].ID), + sdk.NewAttribute(types.AttributeTypeConsensus, strconv.FormatBool(sudoMsgs[i].Result.Consensus)), + sdk.NewAttribute(types.AttributeTallyVMStdOut, strings.Join(vmResults[i].Stdout, "\n")), + sdk.NewAttribute(types.AttributeTallyVMStdErr, strings.Join(vmResults[i].Stderr, "\n")), + sdk.NewAttribute(types.AttributeTallyExitCode, fmt.Sprintf("%02x", sudoMsgs[i].ExitCode)), ), ) } - return nil } diff --git a/x/tally/keeper/filter_fuzz_test.go b/x/tally/keeper/filter_fuzz_test.go index ae265e69..ec58e216 100644 --- a/x/tally/keeper/filter_fuzz_test.go +++ b/x/tally/keeper/filter_fuzz_test.go @@ -7,11 +7,11 @@ import ( "fmt" "math" "math/rand" - "slices" "testing" "time" "github.com/stretchr/testify/require" + "slices" "github.com/sedaprotocol/seda-chain/x/tally/keeper" "github.com/sedaprotocol/seda-chain/x/tally/types" diff --git a/x/tally/keeper/integration_test.go b/x/tally/keeper/integration_test.go index 9be4d1a4..d9301f10 100644 --- a/x/tally/keeper/integration_test.go +++ b/x/tally/keeper/integration_test.go @@ -7,9 +7,6 @@ import ( "testing" "time" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" "github.com/rs/zerolog" "github.com/stretchr/testify/require" gomock "go.uber.org/mock/gomock" @@ -19,6 +16,11 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/tally/keeper/keeper.go b/x/tally/keeper/keeper.go index e61a34af..df66b242 100644 --- a/x/tally/keeper/keeper.go +++ b/x/tally/keeper/keeper.go @@ -3,9 +3,10 @@ package keeper import ( "fmt" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "cosmossdk.io/log" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/x/tally/types" diff --git a/x/tally/keeper/testdata/contracts.go b/x/tally/keeper/testdata/contracts.go new file mode 100644 index 00000000..d56d0ce6 --- /dev/null +++ b/x/tally/keeper/testdata/contracts.go @@ -0,0 +1,23 @@ +package testdata + +import ( + _ "embed" +) + +var ( + //go:embed seda_contract.wasm + sedaContract []byte + + //go:embed sample_tally.wasm + sampleTallyWasm []byte +) + +func SedaContractWasm() []byte { + return sedaContract +} + +// SampleTallyWasm returns the sample tally wasm binary, whose Keccak256 +// hash is 8ade60039246740faa80bf424fc29e79fe13b32087043e213e7bc36620111f6b. +func SampleTallyWasm() []byte { + return sampleTallyWasm +} diff --git a/x/tally/keeper/testdata/data_requests.wasm b/x/tally/keeper/testdata/data_requests.wasm new file mode 100644 index 00000000..eb8dada3 Binary files /dev/null and b/x/tally/keeper/testdata/data_requests.wasm differ diff --git a/x/tally/keeper/testdata/sample_tally.wasm b/x/tally/keeper/testdata/sample_tally.wasm new file mode 100644 index 00000000..03e12916 Binary files /dev/null and b/x/tally/keeper/testdata/sample_tally.wasm differ diff --git a/x/tally/keeper/testdata/seda_contract.wasm b/x/tally/keeper/testdata/seda_contract.wasm new file mode 100644 index 00000000..9db670d6 Binary files /dev/null and b/x/tally/keeper/testdata/seda_contract.wasm differ diff --git a/x/tally/module.go b/x/tally/module.go index 7022e793..6f19f0f6 100644 --- a/x/tally/module.go +++ b/x/tally/module.go @@ -4,12 +4,13 @@ import ( "context" "encoding/json" - "cosmossdk.io/core/appmodule" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/tally/types/filters.go b/x/tally/types/filters.go index 86d117a8..398c2609 100644 --- a/x/tally/types/filters.go +++ b/x/tally/types/filters.go @@ -3,9 +3,9 @@ package types import ( "bytes" "encoding/binary" - "slices" "golang.org/x/exp/constraints" + "slices" ) type Filter interface { diff --git a/x/vesting/keeper/clawback_test.go b/x/vesting/keeper/clawback_test.go index 426b190a..f10791e9 100644 --- a/x/vesting/keeper/clawback_test.go +++ b/x/vesting/keeper/clawback_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" sdkstakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" diff --git a/x/vesting/keeper/integration_test.go b/x/vesting/keeper/integration_test.go index dc79916d..f7a9e5a9 100644 --- a/x/vesting/keeper/integration_test.go +++ b/x/vesting/keeper/integration_test.go @@ -4,13 +4,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/core/appmodule" "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "github.com/stretchr/testify/require" - - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" diff --git a/x/vesting/keeper/msg_server.go b/x/vesting/keeper/msg_server.go index e39e47f3..7156d11e 100644 --- a/x/vesting/keeper/msg_server.go +++ b/x/vesting/keeper/msg_server.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/go-metrics" errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/vesting/module.go b/x/vesting/module.go index e8d68861..a4b2bcef 100644 --- a/x/vesting/module.go +++ b/x/vesting/module.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/vesting/simulation/operations.go b/x/vesting/simulation/operations.go index bc718bc9..8ae6dd4b 100644 --- a/x/vesting/simulation/operations.go +++ b/x/vesting/simulation/operations.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" - // codectypes "github.com/cosmos/cosmos-sdk/codec/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/vesting/types/expected_keepers.go b/x/vesting/types/expected_keepers.go index 2b046f00..c2f85c42 100644 --- a/x/vesting/types/expected_keepers.go +++ b/x/vesting/types/expected_keepers.go @@ -5,6 +5,7 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/x/wasm-storage/client/cli/tx.go b/x/wasm-storage/client/cli/tx.go index bed3bcf2..c41d5164 100644 --- a/x/wasm-storage/client/cli/tx.go +++ b/x/wasm-storage/client/cli/tx.go @@ -7,6 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/CosmWasm/wasmd/x/wasm/ioutils" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/wasm-storage/genesis.go b/x/wasm-storage/genesis.go index 18a00884..ee9c4c85 100644 --- a/x/wasm-storage/genesis.go +++ b/x/wasm-storage/genesis.go @@ -4,6 +4,7 @@ import ( "errors" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/x/wasm-storage/keeper" diff --git a/x/wasm-storage/keeper/abci.go b/x/wasm-storage/keeper/abci.go index 494b8dab..b0af0618 100644 --- a/x/wasm-storage/keeper/abci.go +++ b/x/wasm-storage/keeper/abci.go @@ -4,6 +4,7 @@ import ( "encoding/hex" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/x/wasm-storage/types" diff --git a/x/wasm-storage/keeper/common_test.go b/x/wasm-storage/keeper/common_test.go index c1170488..0b042dd0 100644 --- a/x/wasm-storage/keeper/common_test.go +++ b/x/wasm-storage/keeper/common_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "testing" - storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/suite" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/wasm-storage/keeper/keeper.go b/x/wasm-storage/keeper/keeper.go index e8623127..9f32da2f 100644 --- a/x/wasm-storage/keeper/keeper.go +++ b/x/wasm-storage/keeper/keeper.go @@ -6,13 +6,15 @@ import ( "errors" "fmt" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" "cosmossdk.io/log" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/sedaprotocol/seda-chain/x/wasm-storage/types" ) diff --git a/x/wasm-storage/keeper/keeper_test.go b/x/wasm-storage/keeper/keeper_test.go index 0ed0005c..14886974 100644 --- a/x/wasm-storage/keeper/keeper_test.go +++ b/x/wasm-storage/keeper/keeper_test.go @@ -7,9 +7,10 @@ import ( "strconv" "time" - "cosmossdk.io/collections" "github.com/CosmWasm/wasmd/x/wasm/ioutils" + "cosmossdk.io/collections" + "github.com/sedaprotocol/seda-chain/x/wasm-storage/types" ) diff --git a/x/wasm-storage/keeper/msg_server.go b/x/wasm-storage/keeper/msg_server.go index 93314be6..75f9995d 100644 --- a/x/wasm-storage/keeper/msg_server.go +++ b/x/wasm-storage/keeper/msg_server.go @@ -6,11 +6,11 @@ import ( "encoding/json" "fmt" - "cosmossdk.io/errors" + "github.com/CosmWasm/wasmd/x/wasm/ioutils" "cosmossdk.io/collections" + "cosmossdk.io/errors" - "github.com/CosmWasm/wasmd/x/wasm/ioutils" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/x/wasm-storage/types" diff --git a/x/wasm-storage/keeper/msg_server_test.go b/x/wasm-storage/keeper/msg_server_test.go index 19aec5a4..7a8e710e 100644 --- a/x/wasm-storage/keeper/msg_server_test.go +++ b/x/wasm-storage/keeper/msg_server_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/CosmWasm/wasmd/x/wasm/ioutils" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sedaprotocol/seda-chain/x/wasm-storage/keeper" diff --git a/x/wasm-storage/module.go b/x/wasm-storage/module.go index c7fd7b39..cb87dd25 100644 --- a/x/wasm-storage/module.go +++ b/x/wasm-storage/module.go @@ -5,12 +5,13 @@ import ( "encoding/json" "fmt" - "cosmossdk.io/core/appmodule" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/wasm-storage/types/tx.go b/x/wasm-storage/types/tx.go index 9825a52d..7438be78 100644 --- a/x/wasm-storage/types/tx.go +++ b/x/wasm-storage/types/tx.go @@ -4,6 +4,7 @@ import ( fmt "fmt" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" )