diff --git a/.golangci.yml b/.golangci.yml index 41e315d1f9..9565682069 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,6 +6,7 @@ linters: - ineffassign - unconvert - misspell + - goimports - govet - gosec - stylecheck diff --git a/app/ante/ante.go b/app/ante/ante.go index 9e222cbadc..b6029c33c9 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -17,9 +17,10 @@ package ante import ( "fmt" + "runtime/debug" + ethante "github.com/evmos/ethermint/app/ante" cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types" - "runtime/debug" tmlog "github.com/tendermint/tendermint/libs/log" diff --git a/app/ante/authz.go b/app/ante/authz.go index 42570237aa..e43baa1baa 100644 --- a/app/ante/authz.go +++ b/app/ante/authz.go @@ -1,8 +1,9 @@ package ante import ( - errorsmod "cosmossdk.io/errors" "fmt" + + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index c27329fa7e..13185207d9 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -18,6 +18,7 @@ package ante import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" diff --git a/app/app.go b/app/app.go index 13d6c35db8..6940a09798 100644 --- a/app/app.go +++ b/app/app.go @@ -1,53 +1,28 @@ package app import ( - zetaCoreModuleKeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" + "io" + "net/http" + "os" "time" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/simapp" - appparams "github.com/cosmos/cosmos-sdk/simapp/params" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "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" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/cosmos-sdk/x/group" - groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - evmante "github.com/evmos/ethermint/app/ante" - ethermint "github.com/evmos/ethermint/types" - "github.com/evmos/ethermint/x/evm" - "github.com/evmos/ethermint/x/evm/vm/geth" - "github.com/evmos/ethermint/x/feemarket" - feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - "github.com/zeta-chain/zetacore/app/ante" - srvflags "github.com/zeta-chain/zetacore/server/flags" - emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" - emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" - fungibleModuleKeeper "github.com/zeta-chain/zetacore/x/fungible/keeper" - fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types" - - "io" - "net/http" - "os" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/simapp" + appparams "github.com/cosmos/cosmos-sdk/simapp/params" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" @@ -56,6 +31,9 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/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" "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -79,11 +57,10 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - evmkeeper "github.com/evmos/ethermint/x/evm/keeper" - evmtypes "github.com/evmos/ethermint/x/evm/types" - feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" - "github.com/zeta-chain/zetacore/docs/openapi" - + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/group" + groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" + groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" @@ -99,13 +76,37 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + abci "github.com/tendermint/tendermint/abci/types" tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" + dbm "github.com/tendermint/tm-db" + + evmante "github.com/evmos/ethermint/app/ante" + ethermint "github.com/evmos/ethermint/types" + "github.com/evmos/ethermint/x/evm" + evmkeeper "github.com/evmos/ethermint/x/evm/keeper" + evmtypes "github.com/evmos/ethermint/x/evm/types" + "github.com/evmos/ethermint/x/evm/vm/geth" + "github.com/evmos/ethermint/x/feemarket" + feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" + + "github.com/zeta-chain/zetacore/app/ante" + "github.com/zeta-chain/zetacore/docs/openapi" + srvflags "github.com/zeta-chain/zetacore/server/flags" zetaCoreModule "github.com/zeta-chain/zetacore/x/crosschain" + zetaCoreModuleKeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" zetaCoreModuleTypes "github.com/zeta-chain/zetacore/x/crosschain/types" emissionsModule "github.com/zeta-chain/zetacore/x/emissions" + emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" + emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" + fungibleModule "github.com/zeta-chain/zetacore/x/fungible" + fungibleModuleKeeper "github.com/zeta-chain/zetacore/x/fungible/keeper" + fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverModule "github.com/zeta-chain/zetacore/x/observer" zetaObserverModuleKeeper "github.com/zeta-chain/zetacore/x/observer/keeper" diff --git a/cmd/zetaclientd/keygen_tss.go b/cmd/zetaclientd/keygen_tss.go index 945f77ee96..c92fccbaaa 100644 --- a/cmd/zetaclientd/keygen_tss.go +++ b/cmd/zetaclientd/keygen_tss.go @@ -3,6 +3,8 @@ package main import ( "errors" "fmt" + "time" + "github.com/rs/zerolog" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/zeta-chain/zetacore/common" @@ -12,7 +14,6 @@ import ( tsscommon "gitlab.com/thorchain/tss/go-tss/common" "gitlab.com/thorchain/tss/go-tss/keygen" "gitlab.com/thorchain/tss/go-tss/p2p" - "time" ) func GenerateTss(logger zerolog.Logger, cfg *config.Config, zetaBridge *mc.ZetaCoreBridge, peers p2p.AddrList, priKey secp256k1.PrivKey, ts *mc.TelemetryServer) (*mc.TSS, error) { diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index 7043afc74a..570e7eb0fc 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -9,6 +9,7 @@ import ( "github.com/zeta-chain/zetacore/cmd" "github.com/zeta-chain/zetacore/common/cosmos" + //mcconfig "github.com/Meta-Protocol/zetacore/metaclient/config" "github.com/cosmos/cosmos-sdk/types" diff --git a/cmd/zetaclientd/p2p_diagnostics.go b/cmd/zetaclientd/p2p_diagnostics.go index 1b2e77ec6a..9d94b3c64a 100644 --- a/cmd/zetaclientd/p2p_diagnostics.go +++ b/cmd/zetaclientd/p2p_diagnostics.go @@ -3,6 +3,10 @@ package main import ( "context" "fmt" + "os" + "sync" + "time" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/libp2p/go-libp2p" dht "github.com/libp2p/go-libp2p-kad-dht" @@ -19,9 +23,6 @@ import ( mc "github.com/zeta-chain/zetacore/zetaclient" "github.com/zeta-chain/zetacore/zetaclient/config" "gitlab.com/thorchain/tss/go-tss/p2p" - "os" - "sync" - "time" ) func RunDiagnostics(startLogger zerolog.Logger, peers p2p.AddrList, bridgePk cryptotypes.PrivKey, cfg *config.Config) error { diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index 2e3ac21ede..d6901688c4 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -3,6 +3,13 @@ package main import ( "encoding/json" "fmt" + "io/ioutil" + "os" + "os/signal" + "path/filepath" + "syscall" + "time" + "github.com/libp2p/go-libp2p/core" maddr "github.com/multiformats/go-multiaddr" "github.com/pkg/errors" @@ -14,12 +21,6 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/config" metrics2 "github.com/zeta-chain/zetacore/zetaclient/metrics" "gitlab.com/thorchain/tss/go-tss/p2p" - "io/ioutil" - "os" - "os/signal" - "path/filepath" - "syscall" - "time" ) type Multiaddr = core.Multiaddr diff --git a/cmd/zetaclientd/start_utils.go b/cmd/zetaclientd/start_utils.go index c6ee5ad0c4..d11776e27d 100644 --- a/cmd/zetaclientd/start_utils.go +++ b/cmd/zetaclientd/start_utils.go @@ -2,14 +2,15 @@ package main import ( "fmt" - "github.com/pkg/errors" - "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/zetaclient/config" - "google.golang.org/grpc" "net" "os" "strings" "time" + + "github.com/pkg/errors" + "github.com/rs/zerolog" + "github.com/zeta-chain/zetacore/zetaclient/config" + "google.golang.org/grpc" ) func setMYIP(cfg *config.Config, logger zerolog.Logger) { diff --git a/cmd/zetaclientd/version.go b/cmd/zetaclientd/version.go index 037b5bf966..285545e74f 100644 --- a/cmd/zetaclientd/version.go +++ b/cmd/zetaclientd/version.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/common" ) diff --git a/cmd/zetacore_utils/main.go b/cmd/zetacore_utils/main.go index 1068a160ce..42a593fa5a 100644 --- a/cmd/zetacore_utils/main.go +++ b/cmd/zetacore_utils/main.go @@ -2,15 +2,16 @@ package main import ( "bufio" - sdkmath "cosmossdk.io/math" "encoding/json" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/cmd/zetacored/config" "os" "os/exec" "path/filepath" "time" + + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/zeta-chain/zetacore/cmd/zetacored/config" ) const node = "tcp://3.218.170.198:26657" diff --git a/cmd/zetacored/addr_converter.go b/cmd/zetacored/addr_converter.go index fb4f26a80a..63d66e6f86 100644 --- a/cmd/zetacored/addr_converter.go +++ b/cmd/zetacored/addr_converter.go @@ -2,6 +2,7 @@ package main import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/spf13/cobra" diff --git a/cmd/zetacored/collect_observer_info.go b/cmd/zetacored/collect_observer_info.go index c480e8cbc4..9b74042422 100644 --- a/cmd/zetacored/collect_observer_info.go +++ b/cmd/zetacored/collect_observer_info.go @@ -2,10 +2,11 @@ package main import ( "encoding/json" - "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/app" "os" "path/filepath" + + "github.com/spf13/cobra" + "github.com/zeta-chain/zetacore/app" ) func CollectObserverInfoCmd() *cobra.Command { diff --git a/cmd/zetacored/genaccounts.go b/cmd/zetacored/genaccounts.go index 1de16c31c5..43a20abe10 100644 --- a/cmd/zetacored/genaccounts.go +++ b/cmd/zetacored/genaccounts.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/ethereum/go-ethereum/common" ethermint "github.com/evmos/ethermint/types" evmtypes "github.com/evmos/ethermint/x/evm/types" diff --git a/cmd/zetacored/get_pubkey.go b/cmd/zetacored/get_pubkey.go index 9a20a974c7..77165cb531 100644 --- a/cmd/zetacored/get_pubkey.go +++ b/cmd/zetacored/get_pubkey.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto" "github.com/spf13/cobra" diff --git a/cmd/zetacored/main.go b/cmd/zetacored/main.go index c53112b41d..4abdc3366b 100644 --- a/cmd/zetacored/main.go +++ b/cmd/zetacored/main.go @@ -1,9 +1,10 @@ package main import ( + "os" + "github.com/cosmos/cosmos-sdk/server" cmdcfg "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "os" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/zeta-chain/zetacore/app" diff --git a/cmd/zetacored/observer_accounts.go b/cmd/zetacored/observer_accounts.go index f3600c3cea..5efc118277 100644 --- a/cmd/zetacored/observer_accounts.go +++ b/cmd/zetacored/observer_accounts.go @@ -3,6 +3,8 @@ package main import ( "encoding/json" "fmt" + "path/filepath" + "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" @@ -24,7 +26,6 @@ import ( "github.com/zeta-chain/zetacore/common" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/observer/types" - "path/filepath" ) const ( diff --git a/cmd/zetacored/parsers_test.go b/cmd/zetacored/parsers_test.go index 480e292ec1..cb7cb62190 100644 --- a/cmd/zetacored/parsers_test.go +++ b/cmd/zetacored/parsers_test.go @@ -5,12 +5,13 @@ package main import ( "encoding/json" + "io/ioutil" + "os" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/tendermint/tendermint/crypto" "github.com/zeta-chain/zetacore/app" - "io/ioutil" - "os" //"os" "testing" diff --git a/common/address_test.go b/common/address_test.go index 1fe65b3965..2d0afc1982 100644 --- a/common/address_test.go +++ b/common/address_test.go @@ -1,8 +1,9 @@ package common import ( - . "gopkg.in/check.v1" "testing" + + . "gopkg.in/check.v1" ) func TestPackage(t *testing.T) { TestingT(t) } diff --git a/common/chain.go b/common/chain.go index 3c395b540b..59c2ceb30e 100644 --- a/common/chain.go +++ b/common/chain.go @@ -2,10 +2,11 @@ package common import ( "fmt" + "strings" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" - "strings" ) var ( diff --git a/common/common.pb.go b/common/common.pb.go index 465590adb7..b28dff3b8a 100644 --- a/common/common.pb.go +++ b/common/common.pb.go @@ -5,11 +5,12 @@ package common import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/contrib/localnet/orchestrator/smoketest/contracts/zevmswap/bindings.go b/contrib/localnet/orchestrator/smoketest/contracts/zevmswap/bindings.go index d6e7ceff19..9f814d41b2 100644 --- a/contrib/localnet/orchestrator/smoketest/contracts/zevmswap/bindings.go +++ b/contrib/localnet/orchestrator/smoketest/contracts/zevmswap/bindings.go @@ -9,6 +9,7 @@ package zevmswap import ( _ "embed" "encoding/json" + "github.com/ethereum/go-ethereum/accounts/abi" evmtypes "github.com/evmos/ethermint/x/evm/types" ) diff --git a/contrib/localnet/orchestrator/smoketest/main.go b/contrib/localnet/orchestrator/smoketest/main.go index a54381ebc4..082334b995 100644 --- a/contrib/localnet/orchestrator/smoketest/main.go +++ b/contrib/localnet/orchestrator/smoketest/main.go @@ -6,16 +6,17 @@ package main import ( "context" "fmt" + "math/big" + "os" + "sync" + "time" + "github.com/btcsuite/btcutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/zevmswap" "github.com/zeta-chain/zetacore/zetaclient/config" - "math/big" - "os" - "sync" - "time" "github.com/btcsuite/btcd/rpcclient" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/contrib/localnet/orchestrator/smoketest/test_accounting.go b/contrib/localnet/orchestrator/smoketest/test_accounting.go index d118a97a1a..dbca006899 100644 --- a/contrib/localnet/orchestrator/smoketest/test_accounting.go +++ b/contrib/localnet/orchestrator/smoketest/test_accounting.go @@ -7,10 +7,11 @@ import ( "context" "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "io/ioutil" "math/big" "net/http" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" ) func (sm *SmokeTest) CheckZRC20ReserveAndSupply() { diff --git a/contrib/localnet/orchestrator/smoketest/test_crosschain_swap.go b/contrib/localnet/orchestrator/smoketest/test_crosschain_swap.go index 6cd1c299b8..0dd382efc3 100644 --- a/contrib/localnet/orchestrator/smoketest/test_crosschain_swap.go +++ b/contrib/localnet/orchestrator/smoketest/test_crosschain_swap.go @@ -5,11 +5,12 @@ package main import ( "fmt" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/zeta-chain/zetacore/x/crosschain/types" "math/big" "time" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/zeta-chain/zetacore/x/crosschain/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" ) diff --git a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go index e8c0a3f143..f44fcb44aa 100644 --- a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go +++ b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go @@ -6,11 +6,12 @@ package main import ( "context" "fmt" + "math/big" + "time" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient" - "math/big" - "time" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethtypes "github.com/ethereum/go-ethereum/core/types" diff --git a/contrib/localnet/orchestrator/smoketest/test_message_passing.go b/contrib/localnet/orchestrator/smoketest/test_message_passing.go index 62335e4ce8..c4f0f93da7 100644 --- a/contrib/localnet/orchestrator/smoketest/test_message_passing.go +++ b/contrib/localnet/orchestrator/smoketest/test_message_passing.go @@ -6,10 +6,11 @@ package main import ( "context" "fmt" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "math/big" "time" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + ethcommon "github.com/ethereum/go-ethereum/common" zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.eth.sol" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/testdapp" diff --git a/contrib/localnet/orchestrator/smoketest/test_stress.go b/contrib/localnet/orchestrator/smoketest/test_stress.go index 3a0b648280..ab28ad7e1f 100644 --- a/contrib/localnet/orchestrator/smoketest/test_stress.go +++ b/contrib/localnet/orchestrator/smoketest/test_stress.go @@ -6,6 +6,11 @@ package main import ( "context" "fmt" + "math/big" + "os" + "sort" + "time" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -18,10 +23,6 @@ import ( types2 "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" "google.golang.org/grpc" - "math/big" - "os" - "sort" - "time" ) const ( diff --git a/contrib/localnet/orchestrator/smoketest/test_zeta_in_and_out.go b/contrib/localnet/orchestrator/smoketest/test_zeta_in_and_out.go index 5bb0a79b50..d963f33fe5 100644 --- a/contrib/localnet/orchestrator/smoketest/test_zeta_in_and_out.go +++ b/contrib/localnet/orchestrator/smoketest/test_zeta_in_and_out.go @@ -6,10 +6,11 @@ package main import ( "context" "fmt" - "github.com/zeta-chain/zetacore/common" "math/big" "time" + "github.com/zeta-chain/zetacore/common" + ethcommon "github.com/ethereum/go-ethereum/common" zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.eth.sol" connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/connectorzevm.sol" diff --git a/contrib/localnet/orchestrator/smoketest/utils.go b/contrib/localnet/orchestrator/smoketest/utils.go index 09dea03b6d..2f37483a84 100644 --- a/contrib/localnet/orchestrator/smoketest/utils.go +++ b/contrib/localnet/orchestrator/smoketest/utils.go @@ -7,9 +7,10 @@ import ( "context" "encoding/hex" "fmt" + "time" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" - "time" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" diff --git a/scripts/protoc-gen-go.sh b/scripts/protoc-gen-go.sh index 4ecc9a1f61..5b8e546256 100755 --- a/scripts/protoc-gen-go.sh +++ b/scripts/protoc-gen-go.sh @@ -5,6 +5,9 @@ go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@latest +# Install goimports for formatting proto go imports. +go install golang.org/x/tools/cmd/goimports@latest + # Define a shell function for generating proto code. generate_proto() { local dir="$1" @@ -30,4 +33,7 @@ cd .. # Move proto files to the right places. cp -r github.com/zeta-chain/zetacore/* ./ -rm -rf github.com \ No newline at end of file +rm -rf github.com + +# Format proto go imports. +goimports -w . \ No newline at end of file diff --git a/testutil/keeper/fungible.go b/testutil/keeper/fungible.go index 1564ec9822..047c9c5eb3 100644 --- a/testutil/keeper/fungible.go +++ b/testutil/keeper/fungible.go @@ -1,6 +1,8 @@ package keeper import ( + "testing" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -17,7 +19,6 @@ import ( "github.com/zeta-chain/zetacore/x/fungible/keeper" "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverModuleKeeper "github.com/zeta-chain/zetacore/x/observer/keeper" - "testing" ) func FungibleKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/network/genesis_state.go b/testutil/network/genesis_state.go index 32cd55cdc7..fe6717a1d6 100644 --- a/testutil/network/genesis_state.go +++ b/testutil/network/genesis_state.go @@ -2,6 +2,8 @@ package network import ( "encoding/json" + "testing" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -13,7 +15,6 @@ import ( "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" - "testing" ) func Setconfig() { diff --git a/testutil/network/network_config.go b/testutil/network/network_config.go index 4698a7ef86..29391739af 100644 --- a/testutil/network/network_config.go +++ b/testutil/network/network_config.go @@ -2,9 +2,10 @@ package network import ( "fmt" - "github.com/zeta-chain/zetacore/cmd/zetacored/config" "time" + "github.com/zeta-chain/zetacore/cmd/zetacored/config" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/testutil/simapp/default_constants.go b/testutil/simapp/default_constants.go index 3b58301892..c063f0ca91 100644 --- a/testutil/simapp/default_constants.go +++ b/testutil/simapp/default_constants.go @@ -1,10 +1,11 @@ package simapp import ( + "time" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - "time" ) var defaultConsensusParams = &abci.ConsensusParams{ diff --git a/testutil/simapp/simapp.go b/testutil/simapp/simapp.go index ae633d0247..698af75a72 100644 --- a/testutil/simapp/simapp.go +++ b/testutil/simapp/simapp.go @@ -2,6 +2,9 @@ package simapp import ( "encoding/json" + "testing" + "time" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/simapp" @@ -14,8 +17,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" "github.com/zeta-chain/zetacore/cmd/zetacored/config" emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" - "testing" - "time" + //"github.com/ignite-hq/cli/ignite/pkg/cosmoscmd" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index 398108765a..a2c85ad8c2 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -2,10 +2,11 @@ package cli import ( "context" - "cosmossdk.io/math" "fmt" "strconv" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/crosschain/client/cli/cli_chain_nonce.go b/x/crosschain/client/cli/cli_chain_nonce.go index 2230fd875d..e6add33648 100644 --- a/x/crosschain/client/cli/cli_chain_nonce.go +++ b/x/crosschain/client/cli/cli_chain_nonce.go @@ -2,12 +2,13 @@ package cli import ( "context" + "strconv" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/x/crosschain/types" - "strconv" ) func CmdListChainNonces() *cobra.Command { diff --git a/x/crosschain/client/cli/cli_out_tx_tracker.go b/x/crosschain/client/cli/cli_out_tx_tracker.go index 228984eb8d..87535ea0be 100644 --- a/x/crosschain/client/cli/cli_out_tx_tracker.go +++ b/x/crosschain/client/cli/cli_out_tx_tracker.go @@ -2,12 +2,13 @@ package cli import ( "context" + "strconv" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/x/crosschain/types" - "strconv" ) func CmdListOutTxTracker() *cobra.Command { diff --git a/x/crosschain/client/cli/cli_params.go b/x/crosschain/client/cli/cli_params.go index 526888bf0f..6a42068cfa 100644 --- a/x/crosschain/client/cli/cli_params.go +++ b/x/crosschain/client/cli/cli_params.go @@ -2,6 +2,7 @@ package cli import ( "context" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" diff --git a/x/crosschain/client/cli/cli_tss.go b/x/crosschain/client/cli/cli_tss.go index 837257798b..ea5a3e36a4 100644 --- a/x/crosschain/client/cli/cli_tss.go +++ b/x/crosschain/client/cli/cli_tss.go @@ -3,10 +3,11 @@ package cli import ( "context" "fmt" + "strconv" + "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cast" "github.com/zeta-chain/zetacore/common" - "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/crosschain/client/cli/query.go b/x/crosschain/client/cli/query.go index e9fbb213e9..729411d414 100644 --- a/x/crosschain/client/cli/query.go +++ b/x/crosschain/client/cli/query.go @@ -2,6 +2,7 @@ package cli import ( "fmt" + "github.com/zeta-chain/zetacore/x/observer/client/cli" // "strings" diff --git a/x/crosschain/client/cli/tx.go b/x/crosschain/client/cli/tx.go index 7b0b14303a..952441964c 100644 --- a/x/crosschain/client/cli/tx.go +++ b/x/crosschain/client/cli/tx.go @@ -2,10 +2,12 @@ package cli import ( "fmt" + "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/zeta-chain/zetacore/x/observer/client/cli" + // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/zeta-chain/zetacore/x/crosschain/types" ) diff --git a/x/crosschain/client/integrationtests/cli_helpers.go b/x/crosschain/client/integrationtests/cli_helpers.go index e5c39d9623..f493d1d876 100644 --- a/x/crosschain/client/integrationtests/cli_helpers.go +++ b/x/crosschain/client/integrationtests/cli_helpers.go @@ -4,8 +4,12 @@ package integrationtests import ( - "cosmossdk.io/math" "fmt" + "os" + "strconv" + "testing" + + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,9 +20,6 @@ import ( "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/testutil/network" "github.com/zeta-chain/zetacore/x/crosschain/types" - "os" - "strconv" - "testing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/x/crosschain/client/integrationtests/cli_test.go b/x/crosschain/client/integrationtests/cli_test.go index 621bf3fc21..cd5af20871 100644 --- a/x/crosschain/client/integrationtests/cli_test.go +++ b/x/crosschain/client/integrationtests/cli_test.go @@ -4,9 +4,10 @@ package integrationtests import ( + "testing" + "github.com/stretchr/testify/suite" "github.com/zeta-chain/zetacore/testutil/network" - "testing" ) func TestIntegrationTestSuite(t *testing.T) { diff --git a/x/crosschain/client/querytests/cctx.go b/x/crosschain/client/querytests/cctx.go index 13f5287dc5..9ed8d437ec 100644 --- a/x/crosschain/client/querytests/cctx.go +++ b/x/crosschain/client/querytests/cctx.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/crosschain/client/querytests/chain_nonces.go b/x/crosschain/client/querytests/chain_nonces.go index c1de87e461..5aa6f4d5e3 100644 --- a/x/crosschain/client/querytests/chain_nonces.go +++ b/x/crosschain/client/querytests/chain_nonces.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/crosschain/client/querytests/cli_test.go b/x/crosschain/client/querytests/cli_test.go index 861af2e718..ad30a35dc1 100644 --- a/x/crosschain/client/querytests/cli_test.go +++ b/x/crosschain/client/querytests/cli_test.go @@ -2,6 +2,9 @@ package querytests import ( "fmt" + "testing" + "time" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -15,8 +18,6 @@ import ( "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/cmd/zetacored/config" "github.com/zeta-chain/zetacore/testutil/network" - "testing" - "time" ) func TestCLIQuerySuite(t *testing.T) { diff --git a/x/crosschain/client/querytests/gas_price.go b/x/crosschain/client/querytests/gas_price.go index ce7df5e1df..4c08797849 100644 --- a/x/crosschain/client/querytests/gas_price.go +++ b/x/crosschain/client/querytests/gas_price.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/crosschain/client/querytests/intx_hash.go b/x/crosschain/client/querytests/intx_hash.go index 1c5b89a8d4..ea0802aa65 100644 --- a/x/crosschain/client/querytests/intx_hash.go +++ b/x/crosschain/client/querytests/intx_hash.go @@ -2,16 +2,18 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "google.golang.org/grpc/codes" + "strconv" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/client/cli" "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/status" - "strconv" ) func (s *CliTestSuite) TestShowInTxHashToCctx() { diff --git a/x/crosschain/client/querytests/last_block_height.go b/x/crosschain/client/querytests/last_block_height.go index d42924f299..88c6b04a44 100644 --- a/x/crosschain/client/querytests/last_block_height.go +++ b/x/crosschain/client/querytests/last_block_height.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/crosschain/client/querytests/out_tx_tracker.go b/x/crosschain/client/querytests/out_tx_tracker.go index 14c89405d2..599e365ab8 100644 --- a/x/crosschain/client/querytests/out_tx_tracker.go +++ b/x/crosschain/client/querytests/out_tx_tracker.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/crosschain/client/querytests/suite.go b/x/crosschain/client/querytests/suite.go index 996ba25d22..dfb27ae530 100644 --- a/x/crosschain/client/querytests/suite.go +++ b/x/crosschain/client/querytests/suite.go @@ -1,8 +1,10 @@ package querytests import ( - "cosmossdk.io/math" "fmt" + "strconv" + + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ethcfg "github.com/evmos/ethermint/cmd/config" "github.com/stretchr/testify/suite" @@ -12,7 +14,6 @@ import ( "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" - "strconv" ) type CliTestSuite struct { diff --git a/x/crosschain/client/querytests/tss.go b/x/crosschain/client/querytests/tss.go index 4a25330909..ba8d1e506a 100644 --- a/x/crosschain/client/querytests/tss.go +++ b/x/crosschain/client/querytests/tss.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/zeta-chain/zetacore/x/crosschain/client/cli" diff --git a/x/crosschain/keeper/events.go b/x/crosschain/keeper/events.go index 08aced9e4e..3306b7d1f8 100644 --- a/x/crosschain/keeper/events.go +++ b/x/crosschain/keeper/events.go @@ -1,9 +1,10 @@ package keeper import ( - "github.com/zeta-chain/zetacore/common" "strconv" + "github.com/zeta-chain/zetacore/common" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" ) diff --git a/x/crosschain/keeper/evm_deposit.go b/x/crosschain/keeper/evm_deposit.go index abcf8e4a99..13ec456799 100644 --- a/x/crosschain/keeper/evm_deposit.go +++ b/x/crosschain/keeper/evm_deposit.go @@ -3,6 +3,7 @@ package keeper import ( "encoding/hex" "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" diff --git a/x/crosschain/keeper/evm_hooks.go b/x/crosschain/keeper/evm_hooks.go index 4fb53b6c40..e353949d9a 100644 --- a/x/crosschain/keeper/evm_hooks.go +++ b/x/crosschain/keeper/evm_hooks.go @@ -1,10 +1,11 @@ package keeper import ( - "cosmossdk.io/math" "encoding/hex" "fmt" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" diff --git a/x/crosschain/keeper/grpc_query_get_tss_address.go b/x/crosschain/keeper/grpc_query_get_tss_address.go index 9fb5e70673..e7f5001361 100644 --- a/x/crosschain/keeper/grpc_query_get_tss_address.go +++ b/x/crosschain/keeper/grpc_query_get_tss_address.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" diff --git a/x/crosschain/keeper/grpc_zevm.go b/x/crosschain/keeper/grpc_zevm.go index 9a7c31330a..bccb527496 100644 --- a/x/crosschain/keeper/grpc_zevm.go +++ b/x/crosschain/keeper/grpc_zevm.go @@ -8,6 +8,9 @@ import ( "encoding/json" "errors" "fmt" + "math" + "strings" + sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -19,8 +22,6 @@ import ( "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "math" - "strings" ) const ( diff --git a/x/crosschain/keeper/in_tx_hash_to_cctx_test.go b/x/crosschain/keeper/in_tx_hash_to_cctx_test.go index 3c8113b7ce..00e5006864 100644 --- a/x/crosschain/keeper/in_tx_hash_to_cctx_test.go +++ b/x/crosschain/keeper/in_tx_hash_to_cctx_test.go @@ -1,10 +1,11 @@ package keeper_test import ( - "github.com/zeta-chain/zetacore/x/crosschain/keeper" "strconv" "testing" + "github.com/zeta-chain/zetacore/x/crosschain/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" diff --git a/x/crosschain/keeper/keeper.go b/x/crosschain/keeper/keeper.go index 81218c877b..bc370e2b82 100644 --- a/x/crosschain/keeper/keeper.go +++ b/x/crosschain/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + storetypes "github.com/cosmos/cosmos-sdk/store/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/crosschain/keeper/keeper_chain_nonces_test.go b/x/crosschain/keeper/keeper_chain_nonces_test.go index e1409a2950..693bd49a21 100644 --- a/x/crosschain/keeper/keeper_chain_nonces_test.go +++ b/x/crosschain/keeper/keeper_chain_nonces_test.go @@ -2,11 +2,12 @@ package keeper import ( "fmt" + "testing" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" diff --git a/x/crosschain/keeper/keeper_cross_chain_tx.go b/x/crosschain/keeper/keeper_cross_chain_tx.go index 36b0debb74..7f15cfec08 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx.go @@ -2,8 +2,9 @@ package keeper import ( "context" - "cosmossdk.io/math" "fmt" + + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" diff --git a/x/crosschain/keeper/keeper_cross_chain_tx_test.go b/x/crosschain/keeper/keeper_cross_chain_tx_test.go index 76eba4d061..6de7b4b5cb 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx_test.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx_test.go @@ -1,11 +1,12 @@ package keeper import ( - "cosmossdk.io/math" "fmt" "math/rand" "testing" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" diff --git a/x/crosschain/keeper/keeper_cross_chain_tx_vote_inbound_tx_test.go b/x/crosschain/keeper/keeper_cross_chain_tx_vote_inbound_tx_test.go index 7801d2a30b..ef6c8fe3d1 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx_vote_inbound_tx_test.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx_vote_inbound_tx_test.go @@ -1,9 +1,10 @@ package keeper import ( + "testing" + "github.com/stretchr/testify/assert" "github.com/zeta-chain/zetacore/x/crosschain/types" - "testing" ) // FIMXE: make it work diff --git a/x/crosschain/keeper/keeper_gas_price_test.go b/x/crosschain/keeper/keeper_gas_price_test.go index d8587e8226..b7848e6ef6 100644 --- a/x/crosschain/keeper/keeper_gas_price_test.go +++ b/x/crosschain/keeper/keeper_gas_price_test.go @@ -1,12 +1,13 @@ package keeper import ( + "strconv" + "testing" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "strconv" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" diff --git a/x/crosschain/keeper/keeper_last_block_height.go b/x/crosschain/keeper/keeper_last_block_height.go index f7dc904d83..a0a0b3de24 100644 --- a/x/crosschain/keeper/keeper_last_block_height.go +++ b/x/crosschain/keeper/keeper_last_block_height.go @@ -2,13 +2,14 @@ package keeper import ( "context" + math2 "math" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - math2 "math" ) // SetLastBlockHeight set a specific lastBlockHeight in the store from its index diff --git a/x/crosschain/keeper/keeper_last_block_height_test.go b/x/crosschain/keeper/keeper_last_block_height_test.go index a15aaf2794..4ced4f17a8 100644 --- a/x/crosschain/keeper/keeper_last_block_height_test.go +++ b/x/crosschain/keeper/keeper_last_block_height_test.go @@ -2,11 +2,12 @@ package keeper import ( "fmt" + "testing" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" diff --git a/x/crosschain/keeper/keeper_out_tx_tracker_test.go b/x/crosschain/keeper/keeper_out_tx_tracker_test.go index 9267871da6..16570daad4 100644 --- a/x/crosschain/keeper/keeper_out_tx_tracker_test.go +++ b/x/crosschain/keeper/keeper_out_tx_tracker_test.go @@ -2,10 +2,11 @@ package keeper_test import ( "fmt" - "github.com/zeta-chain/zetacore/x/crosschain/keeper" "strconv" "testing" + "github.com/zeta-chain/zetacore/x/crosschain/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" diff --git a/x/crosschain/keeper/keeper_params.go b/x/crosschain/keeper/keeper_params.go index 3b3b364b8a..333919e5de 100644 --- a/x/crosschain/keeper/keeper_params.go +++ b/x/crosschain/keeper/keeper_params.go @@ -2,6 +2,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/codes" diff --git a/x/crosschain/keeper/keeper_pending_nonces.go b/x/crosschain/keeper/keeper_pending_nonces.go index 95c91364cd..da1648b104 100644 --- a/x/crosschain/keeper/keeper_pending_nonces.go +++ b/x/crosschain/keeper/keeper_pending_nonces.go @@ -3,6 +3,7 @@ package keeper import ( "context" "fmt" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" diff --git a/x/crosschain/keeper/keeper_tss.go b/x/crosschain/keeper/keeper_tss.go index 2b54a4ce92..b3a39bcd74 100644 --- a/x/crosschain/keeper/keeper_tss.go +++ b/x/crosschain/keeper/keeper_tss.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" diff --git a/x/crosschain/keeper/keeper_tss_test.go b/x/crosschain/keeper/keeper_tss_test.go index 137b83947e..e7a42557ce 100644 --- a/x/crosschain/keeper/keeper_tss_test.go +++ b/x/crosschain/keeper/keeper_tss_test.go @@ -1,10 +1,11 @@ package keeper import ( + "testing" + "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" diff --git a/x/crosschain/keeper/keeper_utils.go b/x/crosschain/keeper/keeper_utils.go index 12ed8987e8..dc4bf08d87 100644 --- a/x/crosschain/keeper/keeper_utils.go +++ b/x/crosschain/keeper/keeper_utils.go @@ -1,15 +1,16 @@ package keeper import ( - "cosmossdk.io/math" "fmt" + "math/big" + + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/zeta-chain/zetacore/cmd/zetacored/config" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" - "math/big" ) // IsAuthorized checks whether a signer is authorized to sign , by checking their address against the observer mapper which contains the observer list for the chain and type diff --git a/x/crosschain/keeper/zeta_conversion_rate.go b/x/crosschain/keeper/zeta_conversion_rate.go index 2ff34b1687..22be86641a 100644 --- a/x/crosschain/keeper/zeta_conversion_rate.go +++ b/x/crosschain/keeper/zeta_conversion_rate.go @@ -2,6 +2,8 @@ package keeper import ( "context" + "math/big" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/common" @@ -9,7 +11,6 @@ import ( zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "math/big" ) func (k Keeper) ConvertGasToZeta(context context.Context, request *types.QueryConvertGasToZetaRequest) (*types.QueryConvertGasToZetaResponse, error) { diff --git a/x/crosschain/module.go b/x/crosschain/module.go index 83a933a7db..316c2e12d1 100644 --- a/x/crosschain/module.go +++ b/x/crosschain/module.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" diff --git a/x/crosschain/types/chain_nonces.pb.go b/x/crosschain/types/chain_nonces.pb.go index 7eff1c28db..9fea4ec405 100644 --- a/x/crosschain/types/chain_nonces.pb.go +++ b/x/crosschain/types/chain_nonces.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/cross_chain_tx.pb.go b/x/crosschain/types/cross_chain_tx.pb.go index 2a12120238..825fba6e96 100644 --- a/x/crosschain/types/cross_chain_tx.pb.go +++ b/x/crosschain/types/cross_chain_tx.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" common "github.com/zeta-chain/zetacore/common" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/events.pb.go b/x/crosschain/types/events.pb.go index 4c8c8a2b89..0c60abeaaa 100644 --- a/x/crosschain/types/events.pb.go +++ b/x/crosschain/types/events.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/common" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/zeta-chain/zetacore/common" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/gas_price.pb.go b/x/crosschain/types/gas_price.pb.go index cd3e77a991..eb6d19546f 100644 --- a/x/crosschain/types/gas_price.pb.go +++ b/x/crosschain/types/gas_price.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/genesis.go b/x/crosschain/types/genesis.go index 09bff11162..2c9c599b09 100644 --- a/x/crosschain/types/genesis.go +++ b/x/crosschain/types/genesis.go @@ -3,6 +3,7 @@ package types import ( "encoding/json" "fmt" + "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/x/crosschain/types/genesis.pb.go b/x/crosschain/types/genesis.pb.go index 2fbd818642..1a470ab50c 100644 --- a/x/crosschain/types/genesis.pb.go +++ b/x/crosschain/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/genesis_test.go b/x/crosschain/types/genesis_test.go index 57241bb186..c15934b783 100644 --- a/x/crosschain/types/genesis_test.go +++ b/x/crosschain/types/genesis_test.go @@ -1,9 +1,10 @@ package types_test import ( + "testing" + "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/x/crosschain/types" - "testing" ) // FIXME: make it work diff --git a/x/crosschain/types/in_tx_hash_to_cctx.pb.go b/x/crosschain/types/in_tx_hash_to_cctx.pb.go index 2c5e64788f..8cbac3ddde 100644 --- a/x/crosschain/types/in_tx_hash_to_cctx.pb.go +++ b/x/crosschain/types/in_tx_hash_to_cctx.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/keys.go b/x/crosschain/types/keys.go index d25eee8be4..3ca0c15ad8 100644 --- a/x/crosschain/types/keys.go +++ b/x/crosschain/types/keys.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" diff --git a/x/crosschain/types/last_block_height.pb.go b/x/crosschain/types/last_block_height.pb.go index 310c325c0f..d431227aec 100644 --- a/x/crosschain/types/last_block_height.pb.go +++ b/x/crosschain/types/last_block_height.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/message_set_node_keys.go b/x/crosschain/types/message_set_node_keys.go index acaca7762b..3b2c1abd48 100644 --- a/x/crosschain/types/message_set_node_keys.go +++ b/x/crosschain/types/message_set_node_keys.go @@ -3,6 +3,7 @@ package types import ( "bytes" "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/zeta-chain/zetacore/common" diff --git a/x/crosschain/types/message_set_node_keys_test.go b/x/crosschain/types/message_set_node_keys_test.go index 81684330d9..caddf48817 100644 --- a/x/crosschain/types/message_set_node_keys_test.go +++ b/x/crosschain/types/message_set_node_keys_test.go @@ -1,6 +1,8 @@ package types_test import ( + "testing" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -13,7 +15,6 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/zeta-chain/zetacore/x/crosschain/types" mc "github.com/zeta-chain/zetacore/zetaclient" - "testing" ) func TestMsgSetNodeKeys_ValidateBasic(t *testing.T) { diff --git a/x/crosschain/types/messages_tss_voter.go b/x/crosschain/types/messages_tss_voter.go index 8cd7df9238..683f792064 100644 --- a/x/crosschain/types/messages_tss_voter.go +++ b/x/crosschain/types/messages_tss_voter.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/zeta-chain/zetacore/common" diff --git a/x/crosschain/types/nonce_to_cctx.pb.go b/x/crosschain/types/nonce_to_cctx.pb.go index 2a9272a073..0d5ef41237 100644 --- a/x/crosschain/types/nonce_to_cctx.pb.go +++ b/x/crosschain/types/nonce_to_cctx.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/out_tx_tracker.pb.go b/x/crosschain/types/out_tx_tracker.pb.go index f683232193..86eba158a2 100644 --- a/x/crosschain/types/out_tx_tracker.pb.go +++ b/x/crosschain/types/out_tx_tracker.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/params.pb.go b/x/crosschain/types/params.pb.go index 2ff9ec7124..ad3305a765 100644 --- a/x/crosschain/types/params.pb.go +++ b/x/crosschain/types/params.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/query.pb.go b/x/crosschain/types/query.pb.go index d6e60fe478..19a00356b5 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -14,9 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/tss.pb.go b/x/crosschain/types/tss.pb.go index bf66cb97ca..7351ddbce3 100644 --- a/x/crosschain/types/tss.pb.go +++ b/x/crosschain/types/tss.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index e846fc7274..fcb42603e3 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -14,9 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/emissions/abci_test.go b/x/emissions/abci_test.go index b2647b3a33..ebe181d539 100644 --- a/x/emissions/abci_test.go +++ b/x/emissions/abci_test.go @@ -3,6 +3,13 @@ package emissions_test import ( "encoding/json" "fmt" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strconv" + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -15,12 +22,6 @@ import ( "github.com/zeta-chain/zetacore/testutil/simapp" emissionsModule "github.com/zeta-chain/zetacore/x/emissions" emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "testing" ) func getaZetaFromString(amount string) sdk.Coins { diff --git a/x/emissions/client/cli/tx.go b/x/emissions/client/cli/tx.go index 6635a6e3a7..53f12c7cc0 100644 --- a/x/emissions/client/cli/tx.go +++ b/x/emissions/client/cli/tx.go @@ -2,6 +2,7 @@ package cli import ( "fmt" + "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" diff --git a/x/emissions/keeper/keeper.go b/x/emissions/keeper/keeper.go index a1c17d34dc..97e7b19810 100644 --- a/x/emissions/keeper/keeper.go +++ b/x/emissions/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/tendermint/tendermint/libs/log" diff --git a/x/emissions/types/events.pb.go b/x/emissions/types/events.pb.go index 316b1238a0..c6ee1af66e 100644 --- a/x/emissions/types/events.pb.go +++ b/x/emissions/types/events.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/emissions/types/genesis.pb.go b/x/emissions/types/genesis.pb.go index edc5299d6c..825327a196 100644 --- a/x/emissions/types/genesis.pb.go +++ b/x/emissions/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/emissions/types/params.go b/x/emissions/types/params.go index 6230b51ab9..bef229231f 100644 --- a/x/emissions/types/params.go +++ b/x/emissions/types/params.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "gopkg.in/yaml.v2" diff --git a/x/emissions/types/params.pb.go b/x/emissions/types/params.pb.go index 405ebe2d43..bb4d269f26 100644 --- a/x/emissions/types/params.pb.go +++ b/x/emissions/types/params.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/emissions/types/query.pb.go b/x/emissions/types/query.pb.go index 6e8667dab2..9e33944afb 100644 --- a/x/emissions/types/query.pb.go +++ b/x/emissions/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -14,9 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/emissions/types/tx.pb.go b/x/emissions/types/tx.pb.go index 74e1b2b4c7..1305c4182f 100644 --- a/x/emissions/types/tx.pb.go +++ b/x/emissions/types/tx.pb.go @@ -6,11 +6,12 @@ package types import ( context "context" fmt "fmt" + math "math" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/client/cli/tx.go b/x/fungible/client/cli/tx.go index 90c7fa92d3..4f17f8372f 100644 --- a/x/fungible/client/cli/tx.go +++ b/x/fungible/client/cli/tx.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" + // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/zeta-chain/zetacore/x/fungible/types" ) diff --git a/x/fungible/keeper/begin_blocker_deploy_system_contracts_testnet.go b/x/fungible/keeper/begin_blocker_deploy_system_contracts_testnet.go index 71622a9574..aa75f4875d 100644 --- a/x/fungible/keeper/begin_blocker_deploy_system_contracts_testnet.go +++ b/x/fungible/keeper/begin_blocker_deploy_system_contracts_testnet.go @@ -4,6 +4,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/zeta-chain/zetacore/common" diff --git a/x/fungible/keeper/deposits.go b/x/fungible/keeper/deposits.go index 0e5286ec31..fb47468fe7 100644 --- a/x/fungible/keeper/deposits.go +++ b/x/fungible/keeper/deposits.go @@ -1,10 +1,11 @@ package keeper import ( + "math/big" + "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" - "math/big" sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" diff --git a/x/fungible/keeper/foreign_coins.go b/x/fungible/keeper/foreign_coins.go index ad363dc5c7..258f4593d8 100644 --- a/x/fungible/keeper/foreign_coins.go +++ b/x/fungible/keeper/foreign_coins.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/common" diff --git a/x/fungible/keeper/foreign_coins_test.go b/x/fungible/keeper/foreign_coins_test.go index dfee00bcd8..7ee818ca8a 100644 --- a/x/fungible/keeper/foreign_coins_test.go +++ b/x/fungible/keeper/foreign_coins_test.go @@ -1,10 +1,11 @@ package keeper_test import ( + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/fungible/keeper" "github.com/zeta-chain/zetacore/x/fungible/types" - "strconv" ) // Prevent strconv unused error diff --git a/x/fungible/keeper/keeper.go b/x/fungible/keeper/keeper.go index bb1b75664a..c697b64758 100644 --- a/x/fungible/keeper/keeper.go +++ b/x/fungible/keeper/keeper.go @@ -2,7 +2,7 @@ package keeper import ( "fmt" - + "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/fungible/keeper/system_contract_test.go b/x/fungible/keeper/system_contract_test.go index f4ac4743dc..98f89b0b78 100644 --- a/x/fungible/keeper/system_contract_test.go +++ b/x/fungible/keeper/system_contract_test.go @@ -2,9 +2,10 @@ package keeper_test import ( "fmt" + "testing" + keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/x/fungible/types" - "testing" ) func TestKeeper_GetSystemContract(t *testing.T) { diff --git a/x/fungible/types/foreign_coins.pb.go b/x/fungible/types/foreign_coins.pb.go index 55c16461ff..4158066524 100644 --- a/x/fungible/types/foreign_coins.pb.go +++ b/x/fungible/types/foreign_coins.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" + common "github.com/zeta-chain/zetacore/common" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/types/genesis.pb.go b/x/fungible/types/genesis.pb.go index f0f510f26e..01a6e80047 100644 --- a/x/fungible/types/genesis.pb.go +++ b/x/fungible/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/types/params.pb.go b/x/fungible/types/params.pb.go index 9f9101eff5..7d485a75b0 100644 --- a/x/fungible/types/params.pb.go +++ b/x/fungible/types/params.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/types/query.pb.go b/x/fungible/types/query.pb.go index ee8795e4e8..d0572ef043 100644 --- a/x/fungible/types/query.pb.go +++ b/x/fungible/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -14,9 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/types/system_contract.pb.go b/x/fungible/types/system_contract.pb.go index 3564e94721..41116ea298 100644 --- a/x/fungible/types/system_contract.pb.go +++ b/x/fungible/types/system_contract.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/fungible/types/tx.pb.go b/x/fungible/types/tx.pb.go index 72e586c54b..eaa683529e 100644 --- a/x/fungible/types/tx.pb.go +++ b/x/fungible/types/tx.pb.go @@ -6,15 +6,16 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" common "github.com/zeta-chain/zetacore/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/abci.go b/x/observer/abci.go index 991b92159c..413d6c4fc4 100644 --- a/x/observer/abci.go +++ b/x/observer/abci.go @@ -1,10 +1,11 @@ package observer import ( + "math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/keeper" "github.com/zeta-chain/zetacore/x/observer/types" - "math" ) func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { diff --git a/x/observer/client/cli/cli_supported_chains.go b/x/observer/client/cli/cli_supported_chains.go index ea80cebcc2..aeb870ec27 100644 --- a/x/observer/client/cli/cli_supported_chains.go +++ b/x/observer/client/cli/cli_supported_chains.go @@ -2,6 +2,7 @@ package cli import ( "context" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" diff --git a/x/observer/client/cli/tx.go b/x/observer/client/cli/tx.go index 826fe0586c..bd4c89f72a 100644 --- a/x/observer/client/cli/tx.go +++ b/x/observer/client/cli/tx.go @@ -2,8 +2,10 @@ package cli import ( "fmt" + "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" + // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/x/observer/client/cli/tx_permission_flags.go b/x/observer/client/cli/tx_permission_flags.go index 9a54d74d86..2f39dab4c7 100644 --- a/x/observer/client/cli/tx_permission_flags.go +++ b/x/observer/client/cli/tx_permission_flags.go @@ -1,12 +1,13 @@ package cli import ( + "strconv" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/x/observer/types" - "strconv" ) func CmdUpdatePermissionFlags() *cobra.Command { diff --git a/x/observer/client/querytests/cli_test.go b/x/observer/client/querytests/cli_test.go index 861af2e718..ad30a35dc1 100644 --- a/x/observer/client/querytests/cli_test.go +++ b/x/observer/client/querytests/cli_test.go @@ -2,6 +2,9 @@ package querytests import ( "fmt" + "testing" + "time" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -15,8 +18,6 @@ import ( "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/cmd/zetacored/config" "github.com/zeta-chain/zetacore/testutil/network" - "testing" - "time" ) func TestCLIQuerySuite(t *testing.T) { diff --git a/x/observer/client/querytests/keygen.go b/x/observer/client/querytests/keygen.go index 06d95170dc..2cf801e448 100644 --- a/x/observer/client/querytests/keygen.go +++ b/x/observer/client/querytests/keygen.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/zeta-chain/zetacore/x/observer/client/cli" diff --git a/x/observer/client/querytests/node_account.go b/x/observer/client/querytests/node_account.go index fd2880676f..4f3a1547b1 100644 --- a/x/observer/client/querytests/node_account.go +++ b/x/observer/client/querytests/node_account.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/zeta-chain/zetacore/x/observer/client/cli" diff --git a/x/observer/client/querytests/permission_flags.go b/x/observer/client/querytests/permission_flags.go index 6d4035a205..e1de43472e 100644 --- a/x/observer/client/querytests/permission_flags.go +++ b/x/observer/client/querytests/permission_flags.go @@ -2,6 +2,7 @@ package querytests import ( "fmt" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/zeta-chain/zetacore/testutil/nullify" diff --git a/x/observer/client/querytests/suite.go b/x/observer/client/querytests/suite.go index 644cdb36da..1719733e38 100644 --- a/x/observer/client/querytests/suite.go +++ b/x/observer/client/querytests/suite.go @@ -1,8 +1,10 @@ package querytests import ( - "cosmossdk.io/math" "fmt" + "strconv" + + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ethcfg "github.com/evmos/ethermint/cmd/config" "github.com/stretchr/testify/suite" @@ -12,7 +14,6 @@ import ( "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" - "strconv" ) type CliTestSuite struct { diff --git a/x/observer/keeper/ballot.go b/x/observer/keeper/ballot.go index f0d08fd66e..72a027e206 100644 --- a/x/observer/keeper/ballot.go +++ b/x/observer/keeper/ballot.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" diff --git a/x/observer/keeper/ballot_test.go b/x/observer/keeper/ballot_test.go index 54fcd0471a..13415cdaac 100644 --- a/x/observer/keeper/ballot_test.go +++ b/x/observer/keeper/ballot_test.go @@ -1,9 +1,10 @@ package keeper import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" - "testing" ) func TestKeeper_GetBallot(t *testing.T) { diff --git a/x/observer/keeper/blame.go b/x/observer/keeper/blame.go index 46a4e1a6cf..6acab15c64 100644 --- a/x/observer/keeper/blame.go +++ b/x/observer/keeper/blame.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" diff --git a/x/observer/keeper/events.go b/x/observer/keeper/events.go index 487521792e..fd9bc01212 100644 --- a/x/observer/keeper/events.go +++ b/x/observer/keeper/events.go @@ -1,9 +1,10 @@ package keeper import ( + "strconv" + types2 "github.com/coinbase/rosetta-sdk-go/types" sdk "github.com/cosmos/cosmos-sdk/types" - "strconv" types "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/x/observer/keeper/grpc_query_params.go b/x/observer/keeper/grpc_query_params.go index 5cac0c99ad..279d58db1c 100644 --- a/x/observer/keeper/grpc_query_params.go +++ b/x/observer/keeper/grpc_query_params.go @@ -2,6 +2,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" diff --git a/x/observer/keeper/keeper.go b/x/observer/keeper/keeper.go index cb4079eb87..67526ecbfc 100644 --- a/x/observer/keeper/keeper.go +++ b/x/observer/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/tendermint/tendermint/libs/log" diff --git a/x/observer/keeper/keeper_keygen.go b/x/observer/keeper/keeper_keygen.go index a0e4e8fe51..daa79935dd 100644 --- a/x/observer/keeper/keeper_keygen.go +++ b/x/observer/keeper/keeper_keygen.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" diff --git a/x/observer/keeper/keeper_node_account_test.go b/x/observer/keeper/keeper_node_account_test.go index 61f3f7ca5b..e8d6b90eba 100644 --- a/x/observer/keeper/keeper_node_account_test.go +++ b/x/observer/keeper/keeper_node_account_test.go @@ -2,11 +2,12 @@ package keeper import ( "fmt" + "testing" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" diff --git a/x/observer/keeper/keeper_supported_chain.go b/x/observer/keeper/keeper_supported_chain.go index eba949aa83..ab7dd1468c 100644 --- a/x/observer/keeper/keeper_supported_chain.go +++ b/x/observer/keeper/keeper_supported_chain.go @@ -2,6 +2,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/x/observer/keeper/keeper_test.go b/x/observer/keeper/keeper_test.go index d79207956a..f876c90563 100644 --- a/x/observer/keeper/keeper_test.go +++ b/x/observer/keeper/keeper_test.go @@ -1,6 +1,8 @@ package keeper import ( + "testing" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -12,7 +14,6 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmdb "github.com/tendermint/tm-db" "github.com/zeta-chain/zetacore/x/observer/types" - "testing" ) func SetupKeeper(t testing.TB) (*Keeper, sdk.Context) { diff --git a/x/observer/keeper/keeper_utils.go b/x/observer/keeper/keeper_utils.go index fbf7eb8459..1a96070758 100644 --- a/x/observer/keeper/keeper_utils.go +++ b/x/observer/keeper/keeper_utils.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" "github.com/zeta-chain/zetacore/common" diff --git a/x/observer/keeper/msg_server_add_blame_vote.go b/x/observer/keeper/msg_server_add_blame_vote.go index 58b8a373c4..b21bd30c69 100644 --- a/x/observer/keeper/msg_server_add_blame_vote.go +++ b/x/observer/keeper/msg_server_add_blame_vote.go @@ -3,6 +3,7 @@ package keeper import ( "context" "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" crosschainTypes "github.com/zeta-chain/zetacore/x/crosschain/types" diff --git a/x/observer/keeper/observer_mapper_test.go b/x/observer/keeper/observer_mapper_test.go index 95245b2035..eb861934ad 100644 --- a/x/observer/keeper/observer_mapper_test.go +++ b/x/observer/keeper/observer_mapper_test.go @@ -4,11 +4,12 @@ package keeper import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/observer/types" - "testing" ) func TestKeeper_GetObserver(t *testing.T) { diff --git a/x/observer/keeper/params.go b/x/observer/keeper/params.go index db714e9f94..4b60b59a35 100644 --- a/x/observer/keeper/params.go +++ b/x/observer/keeper/params.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/x/observer/keeper/params_test.go b/x/observer/keeper/params_test.go index 35f0d1d2c4..5ec4c260a3 100644 --- a/x/observer/keeper/params_test.go +++ b/x/observer/keeper/params_test.go @@ -2,11 +2,12 @@ package keeper import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto" "strconv" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tendermint/tendermint/crypto" + "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/x/observer/types/ballot.go b/x/observer/types/ballot.go index eefa40d95e..34a9204ff5 100644 --- a/x/observer/types/ballot.go +++ b/x/observer/types/ballot.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/observer/types/ballot.pb.go b/x/observer/types/ballot.pb.go index 6904e7715d..2242eda3a1 100644 --- a/x/observer/types/ballot.pb.go +++ b/x/observer/types/ballot.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/ballot_test.go b/x/observer/types/ballot_test.go index 998f216a53..7556ad290c 100644 --- a/x/observer/types/ballot_test.go +++ b/x/observer/types/ballot_test.go @@ -1,9 +1,10 @@ package types import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "testing" ) func TestVoter_IsBallotFinalized(t *testing.T) { diff --git a/x/observer/types/blame.pb.go b/x/observer/types/blame.pb.go index 6820664173..3968ee3f09 100644 --- a/x/observer/types/blame.pb.go +++ b/x/observer/types/blame.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/core_params_privnet.go b/x/observer/types/core_params_privnet.go index ca2b1012bd..d85ed37ed2 100644 --- a/x/observer/types/core_params_privnet.go +++ b/x/observer/types/core_params_privnet.go @@ -5,6 +5,7 @@ package types import ( "fmt" + "github.com/coinbase/rosetta-sdk-go/types" "github.com/zeta-chain/zetacore/common" ) diff --git a/x/observer/types/core_params_testnet.go b/x/observer/types/core_params_testnet.go index 5aea1e35fb..1505f1ca01 100644 --- a/x/observer/types/core_params_testnet.go +++ b/x/observer/types/core_params_testnet.go @@ -5,6 +5,7 @@ package types import ( "fmt" + "github.com/coinbase/rosetta-sdk-go/types" "github.com/zeta-chain/zetacore/common" ) diff --git a/x/observer/types/events.pb.go b/x/observer/types/events.pb.go index 3001c49774..4e15423611 100644 --- a/x/observer/types/events.pb.go +++ b/x/observer/types/events.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/genesis.go b/x/observer/types/genesis.go index 19756be132..49a557996c 100644 --- a/x/observer/types/genesis.go +++ b/x/observer/types/genesis.go @@ -3,6 +3,7 @@ package types import ( "encoding/json" "fmt" + "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/x/observer/types/genesis.pb.go b/x/observer/types/genesis.pb.go index a2947496b9..8a69f1cd03 100644 --- a/x/observer/types/genesis.pb.go +++ b/x/observer/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/keygen.pb.go b/x/observer/types/keygen.pb.go index e3f9df383a..491e6290f9 100644 --- a/x/observer/types/keygen.pb.go +++ b/x/observer/types/keygen.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/node_account.pb.go b/x/observer/types/node_account.pb.go index c08b1957d2..41e6be9761 100644 --- a/x/observer/types/node_account.pb.go +++ b/x/observer/types/node_account.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + common "github.com/zeta-chain/zetacore/common" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/observer.pb.go b/x/observer/types/observer.pb.go index 068b864487..6fec7d7b3d 100644 --- a/x/observer/types/observer.pb.go +++ b/x/observer/types/observer.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + common "github.com/zeta-chain/zetacore/common" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/params.go b/x/observer/types/params.go index f1515c1bf7..81773bd969 100644 --- a/x/observer/types/params.go +++ b/x/observer/types/params.go @@ -2,6 +2,7 @@ package types import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/zeta-chain/zetacore/common" diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index fd6ea63ac5..e30c5ee165 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" common "github.com/zeta-chain/zetacore/common" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/permission_flags.pb.go b/x/observer/types/permission_flags.pb.go index e5a1f638b6..68c74c4699 100644 --- a/x/observer/types/permission_flags.pb.go +++ b/x/observer/types/permission_flags.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index d761fc2d51..b689e04914 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/observer/types/test_data.go b/x/observer/types/test_data.go index 0cec9174b3..611e9a0127 100644 --- a/x/observer/types/test_data.go +++ b/x/observer/types/test_data.go @@ -1,10 +1,11 @@ package types import ( + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tendermint/tendermint/crypto" "github.com/zeta-chain/zetacore/common" - "strconv" ) func CreateObserverMapperList(items int, chain common.Chain) (list []*ObserverMapper) { diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index 4dd4df203e..31d32eb5f8 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -13,9 +17,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/zetaclient/bitcoin_client_db_test.go b/zetaclient/bitcoin_client_db_test.go index 8a2c318ebb..22690bdac7 100644 --- a/zetaclient/bitcoin_client_db_test.go +++ b/zetaclient/bitcoin_client_db_test.go @@ -1,13 +1,14 @@ package zetaclient import ( + "strconv" + "testing" + "github.com/btcsuite/btcd/btcjson" "github.com/stretchr/testify/suite" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" "gorm.io/driver/sqlite" "gorm.io/gorm" - "strconv" - "testing" ) type BitcoinClientDBTestSuite struct { diff --git a/zetaclient/bitcoin_client_test.go b/zetaclient/bitcoin_client_test.go index 2577c10cac..4779bd9c75 100644 --- a/zetaclient/bitcoin_client_test.go +++ b/zetaclient/bitcoin_client_test.go @@ -5,14 +5,15 @@ package zetaclient import ( "encoding/hex" + "math/big" + "testing" + "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog/log" "github.com/stretchr/testify/suite" "github.com/zeta-chain/zetacore/common" - "math/big" - "testing" ) type BitcoinClientTestSuite struct { diff --git a/zetaclient/block_height.go b/zetaclient/block_height.go index 1c089fce80..7c2d19ee0b 100644 --- a/zetaclient/block_height.go +++ b/zetaclient/block_height.go @@ -3,6 +3,7 @@ package zetaclient import ( "context" "fmt" + //"github.com/Meta-Protocol/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" ) diff --git a/zetaclient/broadcast.go b/zetaclient/broadcast.go index 0fe972f03e..e0b21876f7 100644 --- a/zetaclient/broadcast.go +++ b/zetaclient/broadcast.go @@ -2,6 +2,11 @@ package zetaclient import ( "fmt" + "regexp" + "strconv" + "strings" + "time" + "github.com/cosmos/cosmos-sdk/client" clienttx "github.com/cosmos/cosmos-sdk/client/tx" sdktypes "github.com/cosmos/cosmos-sdk/types" @@ -10,10 +15,6 @@ import ( flag "github.com/spf13/pflag" rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/app" - "regexp" - "strconv" - "strings" - "time" ) // Broadcast Broadcasts tx to metachain. Returns txHash and error diff --git a/zetaclient/broadcast_test.go b/zetaclient/broadcast_test.go index 404338cc5d..981caf9824 100644 --- a/zetaclient/broadcast_test.go +++ b/zetaclient/broadcast_test.go @@ -2,8 +2,9 @@ package zetaclient import ( "fmt" - . "gopkg.in/check.v1" "regexp" + + . "gopkg.in/check.v1" ) type BcastSuite struct { diff --git a/zetaclient/btc_test.go b/zetaclient/btc_test.go index eb32274984..ce1202f48c 100644 --- a/zetaclient/btc_test.go +++ b/zetaclient/btc_test.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/hex" "fmt" - "github.com/zeta-chain/zetacore/common" "math/big" "testing" + "github.com/zeta-chain/zetacore/common" + "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index 55cd4c2cf7..bd0dce248f 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -2,6 +2,7 @@ package config import ( "encoding/json" + "github.com/ethereum/go-ethereum/ethclient" "github.com/rs/zerolog" "github.com/zeta-chain/zetacore/common" diff --git a/zetaclient/evm_client_db_test.go b/zetaclient/evm_client_db_test.go index 2c0dd4a203..10566646cb 100644 --- a/zetaclient/evm_client_db_test.go +++ b/zetaclient/evm_client_db_test.go @@ -1,6 +1,9 @@ package zetaclient import ( + "strconv" + "testing" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -9,8 +12,6 @@ import ( clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" "gorm.io/driver/sqlite" "gorm.io/gorm" - "strconv" - "testing" ) const TempSQLiteDbPath = "file::memory:?cache=shared" diff --git a/zetaclient/evm_signer.go b/zetaclient/evm_signer.go index 7a7028b2fc..a01b9c435f 100644 --- a/zetaclient/evm_signer.go +++ b/zetaclient/evm_signer.go @@ -5,6 +5,12 @@ import ( "encoding/base64" "encoding/hex" "fmt" + "math/big" + "math/rand" + "strconv" + "strings" + "time" + "github.com/ethereum/go-ethereum/accounts/abi" ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -15,11 +21,6 @@ import ( "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverModuleTypes "github.com/zeta-chain/zetacore/x/observer/types" - "math/big" - "math/rand" - "strconv" - "strings" - "time" ) type EVMSigner struct { diff --git a/zetaclient/keys.go b/zetaclient/keys.go index 30175f9327..ecfd3ee171 100644 --- a/zetaclient/keys.go +++ b/zetaclient/keys.go @@ -3,6 +3,9 @@ package zetaclient import ( "bytes" "fmt" + "io" + "os" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto" @@ -13,8 +16,6 @@ import ( "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/common/cosmos" - "io" - "os" ) // Keys manages all the keys used by zeta client diff --git a/zetaclient/keys_test.go b/zetaclient/keys_test.go index 6c8d537b21..77c32c86b3 100644 --- a/zetaclient/keys_test.go +++ b/zetaclient/keys_test.go @@ -2,6 +2,12 @@ package zetaclient import ( "bytes" + "os" + "path/filepath" + "strconv" + "testing" + "time" + "github.com/99designs/keyring" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -11,11 +17,6 @@ import ( "github.com/cosmos/cosmos-sdk/types" "github.com/tendermint/tendermint/crypto" . "gopkg.in/check.v1" - "os" - "path/filepath" - "strconv" - "testing" - "time" "github.com/zeta-chain/zetacore/cmd" "github.com/zeta-chain/zetacore/common/cosmos" diff --git a/zetaclient/klaytn_client.go b/zetaclient/klaytn_client.go index cdd23b0d72..0820f98fd3 100644 --- a/zetaclient/klaytn_client.go +++ b/zetaclient/klaytn_client.go @@ -4,10 +4,11 @@ import ( "context" "encoding/json" "errors" + "math/big" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" - "math/big" ) type KlaytnClient struct { diff --git a/zetaclient/metrics/metrics_test.go b/zetaclient/metrics/metrics_test.go index 1d8fc9f5c0..ef2aaa760c 100644 --- a/zetaclient/metrics/metrics_test.go +++ b/zetaclient/metrics/metrics_test.go @@ -1,10 +1,11 @@ package metrics import ( - . "gopkg.in/check.v1" "net/http" "testing" "time" + + . "gopkg.in/check.v1" ) type MetricsSuite struct { diff --git a/zetaclient/out_tx_processor_manager.go b/zetaclient/out_tx_processor_manager.go index de0d920be6..2d794e0380 100644 --- a/zetaclient/out_tx_processor_manager.go +++ b/zetaclient/out_tx_processor_manager.go @@ -1,9 +1,10 @@ package zetaclient import ( - "github.com/rs/zerolog" "sync" "time" + + "github.com/rs/zerolog" ) type OutTxProcessorManager struct { diff --git a/zetaclient/query.go b/zetaclient/query.go index c0c4745041..30d9c6b722 100644 --- a/zetaclient/query.go +++ b/zetaclient/query.go @@ -3,6 +3,8 @@ package zetaclient import ( "context" "fmt" + "time" + "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/types/query" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" @@ -11,7 +13,6 @@ import ( "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc" - "time" ) func (b *ZetaCoreBridge) GetInboundPermissions() (zetaObserverTypes.PermissionFlags, error) { diff --git a/zetaclient/signer.go b/zetaclient/signer.go index f978f2d37d..2a800f6d67 100644 --- a/zetaclient/signer.go +++ b/zetaclient/signer.go @@ -3,6 +3,7 @@ package zetaclient import ( "crypto/ecdsa" "fmt" + "github.com/zeta-chain/zetacore/common" "github.com/btcsuite/btcd/btcec/v2" diff --git a/zetaclient/tss_signer.go b/zetaclient/tss_signer.go index 4c0cb4e216..704fe9077b 100644 --- a/zetaclient/tss_signer.go +++ b/zetaclient/tss_signer.go @@ -5,15 +5,16 @@ import ( "encoding/base64" "encoding/hex" "fmt" + "path" + "path/filepath" + "sort" + "strings" + "github.com/btcsuite/btcd/chaincfg/chainhash" peer2 "github.com/libp2p/go-libp2p/core/peer" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/zetaclient/config" "gitlab.com/thorchain/tss/go-tss/p2p" - "path" - "path/filepath" - "sort" - "strings" "github.com/binance-chain/tss-lib/ecdsa/keygen" "github.com/btcsuite/btcutil" diff --git a/zetaclient/tx.go b/zetaclient/tx.go index a96204af39..ca9bc14d14 100644 --- a/zetaclient/tx.go +++ b/zetaclient/tx.go @@ -1,14 +1,15 @@ package zetaclient import ( - "cosmossdk.io/math" "fmt" + "math/big" + "time" + + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/authz" "github.com/zeta-chain/zetacore/zetaclient/config" "gitlab.com/thorchain/tss/go-tss/blame" - "math/big" - "time" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" diff --git a/zetaclient/types/sql_evm.go b/zetaclient/types/sql_evm.go index d5fe5bfd3f..a4d25888a9 100644 --- a/zetaclient/types/sql_evm.go +++ b/zetaclient/types/sql_evm.go @@ -2,10 +2,11 @@ package types import ( "encoding/json" + "math/big" + "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "gorm.io/gorm" - "math/big" ) // EVM Chain client types -----------------------------------> diff --git a/zetaclient/voter_test.go b/zetaclient/voter_test.go index 8d03ea6147..5df01de806 100644 --- a/zetaclient/voter_test.go +++ b/zetaclient/voter_test.go @@ -7,11 +7,12 @@ package zetaclient import ( - "github.com/rs/zerolog/log" - . "gopkg.in/check.v1" "os" "path/filepath" "time" + + "github.com/rs/zerolog/log" + . "gopkg.in/check.v1" ) type VoterSuite struct { diff --git a/zetaclient/zetabridge.go b/zetaclient/zetabridge.go index 48b86bf9a9..5650cef694 100644 --- a/zetaclient/zetabridge.go +++ b/zetaclient/zetabridge.go @@ -2,9 +2,10 @@ package zetaclient import ( "fmt" - "github.com/zeta-chain/zetacore/common" "time" + "github.com/zeta-chain/zetacore/common" + "sync" "github.com/hashicorp/go-retryablehttp" diff --git a/zetaclient/zetaclient_test.go b/zetaclient/zetaclient_test.go index 2033f5f555..bed9da67da 100644 --- a/zetaclient/zetaclient_test.go +++ b/zetaclient/zetaclient_test.go @@ -7,10 +7,11 @@ package zetaclient import ( - "github.com/rs/zerolog/log" - . "gopkg.in/check.v1" "os" "path/filepath" + + "github.com/rs/zerolog/log" + . "gopkg.in/check.v1" ) type MySuite struct { diff --git a/zetaclient/zetacore_observer_test.go b/zetaclient/zetacore_observer_test.go index ae0bdf7462..afa8114764 100644 --- a/zetaclient/zetacore_observer_test.go +++ b/zetaclient/zetacore_observer_test.go @@ -4,6 +4,10 @@ package zetaclient import ( + "os" + "path/filepath" + "time" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog/log" @@ -11,9 +15,6 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/types" . "gopkg.in/check.v1" - "os" - "path/filepath" - "time" ) type COSuite struct {