diff --git a/CHANGELOG.md b/CHANGELOG.md index 76f027e15a..f6507d6e61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Implemented Enhancements:** - Remove unused flags from command prompt for storing contract [\#647](https://github.com/CosmWasm/wasmd/issues/647) +- Ran `make format` [\#649](https://github.com/CosmWasm/wasmd/issues/649) [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.20.0...HEAD) diff --git a/app/ante.go b/app/ante.go index dd07aefd22..2a9cc78bcc 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,13 +1,14 @@ package app import ( - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/types" channelkeeper "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/keeper" ibcante "github.com/cosmos/cosmos-sdk/x/ibc/core/ante" + + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" ) // NewAnteHandler returns an AnteHandler that checks and increments sequence diff --git a/app/app.go b/app/app.go index 118294886d..46307b2140 100644 --- a/app/app.go +++ b/app/app.go @@ -18,8 +18,6 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/CosmWasm/wasmd/x/wasm" - wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/rpc" @@ -88,6 +86,9 @@ import ( upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/CosmWasm/wasmd/x/wasm" + wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" + // unnamed import of statik for swagger UI support _ "github.com/cosmos/cosmos-sdk/client/docs/statik" ) diff --git a/app/app_test.go b/app/app_test.go index f3251080bd..495be6982b 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -10,8 +10,9 @@ import ( "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" - "github.com/CosmWasm/wasmd/x/wasm" abci "github.com/tendermint/tendermint/abci/types" + + "github.com/CosmWasm/wasmd/x/wasm" ) var emptyWasmOpts []wasm.Option = nil diff --git a/app/sim_test.go b/app/sim_test.go index adf408e7b9..fd8f410023 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -3,7 +3,10 @@ package app import ( "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm" + "os" + "path/filepath" + "testing" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" @@ -26,9 +29,8 @@ import ( "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "os" - "path/filepath" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm" ) // Get flags every time the simulator is run diff --git a/app/test_access.go b/app/test_access.go index 3332dcb5fb..ff3578f10f 100644 --- a/app/test_access.go +++ b/app/test_access.go @@ -3,13 +3,14 @@ package app import ( "testing" - "github.com/CosmWasm/wasmd/x/wasm" "github.com/cosmos/cosmos-sdk/codec" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" ibctransferkeeper "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper" ibckeeper "github.com/cosmos/cosmos-sdk/x/ibc/core/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + "github.com/CosmWasm/wasmd/x/wasm" ) type TestSupport struct { diff --git a/app/test_helpers.go b/app/test_helpers.go index 3fafc811aa..d4b349def6 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -5,11 +5,12 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm" "strconv" "testing" "time" + "github.com/CosmWasm/wasmd/x/wasm" + "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" diff --git a/benchmarks/app_test.go b/benchmarks/app_test.go index eb90a089b1..93892f57e1 100644 --- a/benchmarks/app_test.go +++ b/benchmarks/app_test.go @@ -140,13 +140,13 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { } initialBalances[i] = balance{ Address: acct, - Amount: 1000000000, + Amount: 1000000000, } } init := cw20InitMsg{ - Name: "Cash Money", - Symbol: "CASH", - Decimals: 2, + Name: "Cash Money", + Symbol: "CASH", + Decimals: 2, InitialBalances: initialBalances, } initBz, err := json.Marshal(init) diff --git a/benchmarks/bench_test.go b/benchmarks/bench_test.go index ecbab75c99..fceb53eae5 100644 --- a/benchmarks/bench_test.go +++ b/benchmarks/bench_test.go @@ -70,27 +70,27 @@ func BenchmarkTxSending(b *testing.B) { numAccounts int }{ "basic send - memdb": { - db: buildMemDB, - blockSize: 20, - txBuilder: buildTxFromMsg(bankSendMsg), + db: buildMemDB, + blockSize: 20, + txBuilder: buildTxFromMsg(bankSendMsg), numAccounts: 50, }, "cw20 transfer - memdb": { - db: buildMemDB, - blockSize: 20, - txBuilder: buildTxFromMsg(cw20TransferMsg), + db: buildMemDB, + blockSize: 20, + txBuilder: buildTxFromMsg(cw20TransferMsg), numAccounts: 50, }, "basic send - leveldb": { - db: buildLevelDB, - blockSize: 20, - txBuilder: buildTxFromMsg(bankSendMsg), + db: buildLevelDB, + blockSize: 20, + txBuilder: buildTxFromMsg(bankSendMsg), numAccounts: 50, }, "cw20 transfer - leveldb": { - db: buildLevelDB, - blockSize: 20, - txBuilder: buildTxFromMsg(cw20TransferMsg), + db: buildLevelDB, + blockSize: 20, + txBuilder: buildTxFromMsg(cw20TransferMsg), numAccounts: 50, }, "basic send - leveldb - 8k accounts": { diff --git a/cmd/wasmd/genwasm.go b/cmd/wasmd/genwasm.go index 3b3a6acd2c..9321a32319 100644 --- a/cmd/wasmd/genwasm.go +++ b/cmd/wasmd/genwasm.go @@ -1,9 +1,10 @@ package main import ( - wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" + + wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" ) func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command { diff --git a/cmd/wasmd/main.go b/cmd/wasmd/main.go index 2d3f871a21..a267cf49bd 100644 --- a/cmd/wasmd/main.go +++ b/cmd/wasmd/main.go @@ -3,8 +3,9 @@ package main import ( "os" - "github.com/CosmWasm/wasmd/app" "github.com/cosmos/cosmos-sdk/server" + + "github.com/CosmWasm/wasmd/app" ) func main() { diff --git a/cmd/wasmd/root.go b/cmd/wasmd/root.go index 485ac51825..969d9ed572 100644 --- a/cmd/wasmd/root.go +++ b/cmd/wasmd/root.go @@ -6,11 +6,10 @@ import ( "os" "path/filepath" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/prometheus/client_golang/prometheus" - "github.com/CosmWasm/wasmd/x/wasm" - clientcodec "github.com/CosmWasm/wasmd/x/wasm/client/codec" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" bankcmd "github.com/cosmos/cosmos-sdk/x/bank/client/cli" @@ -20,7 +19,9 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/CosmWasm/wasmd/app" + "github.com/CosmWasm/wasmd/x/wasm" + clientcodec "github.com/CosmWasm/wasmd/x/wasm/client/codec" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" @@ -38,6 +39,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + + "github.com/CosmWasm/wasmd/app" ) // NewRootCmd creates a new root command for wasmd. It is called once in the diff --git a/x/wasm/client/cli/genesis_msg.go b/x/wasm/client/cli/genesis_msg.go index 12d89c432d..a3291699bf 100644 --- a/x/wasm/client/cli/genesis_msg.go +++ b/x/wasm/client/cli/genesis_msg.go @@ -8,9 +8,9 @@ import ( "encoding/json" "errors" "fmt" + "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -23,6 +23,8 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/tendermint/crypto" tmtypes "github.com/tendermint/tendermint/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // GenesisReader reads genesis data. Extension point for custom genesis state readers. diff --git a/x/wasm/client/cli/genesis_msg_test.go b/x/wasm/client/cli/genesis_msg_test.go index ea1a7987a4..57be9a3063 100644 --- a/x/wasm/client/cli/genesis_msg_test.go +++ b/x/wasm/client/cli/genesis_msg_test.go @@ -8,8 +8,6 @@ import ( "path" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -28,6 +26,9 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" + + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/types" ) var wasmIdent = []byte("\x00\x61\x73\x6D") diff --git a/x/wasm/client/cli/gov_tx.go b/x/wasm/client/cli/gov_tx.go index 70301d75e0..1f9ba80c82 100644 --- a/x/wasm/client/cli/gov_tx.go +++ b/x/wasm/client/cli/gov_tx.go @@ -3,7 +3,6 @@ package cli import ( "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,6 +10,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/pkg/errors" "github.com/spf13/cobra" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func ProposalStoreCodeCmd() *cobra.Command { diff --git a/x/wasm/client/cli/new_tx.go b/x/wasm/client/cli/new_tx.go index a2e276fb46..0ff1086cdc 100644 --- a/x/wasm/client/cli/new_tx.go +++ b/x/wasm/client/cli/new_tx.go @@ -3,12 +3,13 @@ package cli import ( "strconv" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/spf13/cobra" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // MigrateContractCmd will migrate a contract to a new code version diff --git a/x/wasm/client/cli/query.go b/x/wasm/client/cli/query.go index f62e75fb05..7e77ffbb24 100644 --- a/x/wasm/client/cli/query.go +++ b/x/wasm/client/cli/query.go @@ -10,12 +10,13 @@ import ( "io/ioutil" "strconv" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" flag "github.com/spf13/pflag" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func GetQueryCmd() *cobra.Command { diff --git a/x/wasm/client/cli/tx.go b/x/wasm/client/cli/tx.go index 3cd0a14d57..e93e31ccba 100644 --- a/x/wasm/client/cli/tx.go +++ b/x/wasm/client/cli/tx.go @@ -6,8 +6,6 @@ import ( "io/ioutil" "strconv" - wasmUtils "github.com/CosmWasm/wasmd/x/wasm/client/utils" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -15,6 +13,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/spf13/cobra" flag "github.com/spf13/pflag" + + wasmUtils "github.com/CosmWasm/wasmd/x/wasm/client/utils" + "github.com/CosmWasm/wasmd/x/wasm/types" ) const ( diff --git a/x/wasm/client/codec/marshaller.go b/x/wasm/client/codec/marshaller.go index ba5cc4d631..f76bcbcd31 100644 --- a/x/wasm/client/codec/marshaller.go +++ b/x/wasm/client/codec/marshaller.go @@ -3,6 +3,7 @@ package codec import ( "bytes" "fmt" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/gogo/protobuf/jsonpb" diff --git a/x/wasm/client/proposal_handler.go b/x/wasm/client/proposal_handler.go index f6925d9084..8e01d75266 100644 --- a/x/wasm/client/proposal_handler.go +++ b/x/wasm/client/proposal_handler.go @@ -1,9 +1,10 @@ package client import ( + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + "github.com/CosmWasm/wasmd/x/wasm/client/cli" "github.com/CosmWasm/wasmd/x/wasm/client/rest" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" ) // ProposalHandlers define the wasm cli proposal types and rest handler. diff --git a/x/wasm/client/proposal_handler_test.go b/x/wasm/client/proposal_handler_test.go index 735dbd73e2..4376bfbe77 100644 --- a/x/wasm/client/proposal_handler_test.go +++ b/x/wasm/client/proposal_handler_test.go @@ -9,12 +9,13 @@ import ( "os" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/gorilla/mux" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/keeper" ) func TestGovRestHandlers(t *testing.T) { diff --git a/x/wasm/client/rest/gov.go b/x/wasm/client/rest/gov.go index 8e4e9cc640..8ad6830b94 100644 --- a/x/wasm/client/rest/gov.go +++ b/x/wasm/client/rest/gov.go @@ -4,13 +4,14 @@ import ( "encoding/json" "net/http" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) type StoreCodeProposalJsonReq struct { diff --git a/x/wasm/client/rest/new_tx.go b/x/wasm/client/rest/new_tx.go index 29591c85ad..b261fd7fb7 100644 --- a/x/wasm/client/rest/new_tx.go +++ b/x/wasm/client/rest/new_tx.go @@ -3,11 +3,12 @@ package rest import ( "net/http" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func registerNewTxRoutes(cliCtx client.Context, r *mux.Router) { diff --git a/x/wasm/client/rest/query.go b/x/wasm/client/rest/query.go index 60e849ec98..d497d23900 100644 --- a/x/wasm/client/rest/query.go +++ b/x/wasm/client/rest/query.go @@ -8,12 +8,13 @@ import ( "net/http" "strconv" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" + + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { diff --git a/x/wasm/client/rest/tx.go b/x/wasm/client/rest/tx.go index 3509169a4d..1a3bcb6c5e 100644 --- a/x/wasm/client/rest/tx.go +++ b/x/wasm/client/rest/tx.go @@ -4,13 +4,14 @@ import ( "net/http" "strconv" - wasmUtils "github.com/CosmWasm/wasmd/x/wasm/client/utils" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" + + wasmUtils "github.com/CosmWasm/wasmd/x/wasm/client/utils" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func registerTxRoutes(cliCtx client.Context, r *mux.Router) { diff --git a/x/wasm/client/utils/utils_test.go b/x/wasm/client/utils/utils_test.go index 87a859911e..5dd212ca4a 100644 --- a/x/wasm/client/utils/utils_test.go +++ b/x/wasm/client/utils/utils_test.go @@ -1,9 +1,10 @@ package utils import ( - "github.com/stretchr/testify/require" "io/ioutil" "testing" + + "github.com/stretchr/testify/require" ) func GetTestData() ([]byte, []byte, []byte, error) { diff --git a/x/wasm/common_test.go b/x/wasm/common_test.go index 2b2d499ff8..ce232a5efa 100644 --- a/x/wasm/common_test.go +++ b/x/wasm/common_test.go @@ -1,9 +1,10 @@ package wasm import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "testing" ) // ensure store code returns the expected response diff --git a/x/wasm/handler.go b/x/wasm/handler.go index 30139fa3be..dc5656ab16 100644 --- a/x/wasm/handler.go +++ b/x/wasm/handler.go @@ -2,11 +2,13 @@ package wasm import ( "fmt" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/wasm/ibc.go b/x/wasm/ibc.go index 2d00e7ee06..184dfa2c6e 100644 --- a/x/wasm/ibc.go +++ b/x/wasm/ibc.go @@ -1,7 +1,8 @@ package wasm import ( - types "github.com/CosmWasm/wasmd/x/wasm/types" + "math" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -9,7 +10,8 @@ import ( channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" - "math" + + types "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ porttypes.IBCModule = IBCHandler{} diff --git a/x/wasm/ibc_reflect_test.go b/x/wasm/ibc_reflect_test.go index fb5e04ec84..e3b8e424d9 100644 --- a/x/wasm/ibc_reflect_test.go +++ b/x/wasm/ibc_reflect_test.go @@ -1,14 +1,16 @@ package wasm_test import ( - "github.com/CosmWasm/wasmd/x/wasm/ibctesting" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm/ibctesting" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" ) func TestIBCReflectContract(t *testing.T) { @@ -56,7 +58,7 @@ func TestIBCReflectContract(t *testing.T) { // Given the source (portID, channelID), we should be able to count how many packets are pending, query the data // and submit them to the other side (same with acks). This is what the real relayer does. I guess the test framework doesn't? - // Update: I dug through the code, expecially channel.Keeper.SendPacket, and it only writes a commitment + // Update: I dug through the code, especially channel.Keeper.SendPacket, and it only writes a commitment // only writes I see: https://github.com/cosmos/cosmos-sdk/blob/31fdee0228bd6f3e787489c8e4434aabc8facb7d/x/ibc/core/04-channel/keeper/packet.go#L115-L116 // commitment is hashed packet: https://github.com/cosmos/cosmos-sdk/blob/31fdee0228bd6f3e787489c8e4434aabc8facb7d/x/ibc/core/04-channel/types/packet.go#L14-L34 // how is the relayer supposed to get the original packet data?? diff --git a/x/wasm/ibc_test.go b/x/wasm/ibc_test.go index 25106d42ee..ca66992e47 100644 --- a/x/wasm/ibc_test.go +++ b/x/wasm/ibc_test.go @@ -1,11 +1,12 @@ package wasm import ( + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" "github.com/stretchr/testify/assert" - "testing" ) func TestMapToWasmVMIBCPacket(t *testing.T) { diff --git a/x/wasm/ibctesting/chain.go b/x/wasm/ibctesting/chain.go index 7c7729f340..2a02260d6d 100644 --- a/x/wasm/ibctesting/chain.go +++ b/x/wasm/ibctesting/chain.go @@ -3,9 +3,6 @@ package ibctesting import ( "bytes" "fmt" - wasmd "github.com/CosmWasm/wasmd/app" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" "io/ioutil" "os" "strconv" @@ -13,6 +10,11 @@ import ( "testing" "time" + ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + + wasmd "github.com/CosmWasm/wasmd/app" + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/x/wasm/ibctesting/coordinator.go b/x/wasm/ibctesting/coordinator.go index ab0c22b257..2b0cf70640 100644 --- a/x/wasm/ibctesting/coordinator.go +++ b/x/wasm/ibctesting/coordinator.go @@ -2,12 +2,14 @@ package ibctesting import ( "fmt" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" "strconv" "testing" "time" + ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + + "github.com/CosmWasm/wasmd/x/wasm/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" diff --git a/x/wasm/ibctesting/wasm.go b/x/wasm/ibctesting/wasm.go index 19010a88c4..89fad09457 100644 --- a/x/wasm/ibctesting/wasm.go +++ b/x/wasm/ibctesting/wasm.go @@ -5,15 +5,17 @@ import ( "compress/gzip" "encoding/json" "fmt" - wasmd "github.com/CosmWasm/wasmd/app" - "github.com/CosmWasm/wasmd/x/wasm/types" + "io/ioutil" + "strings" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/rand" - "io/ioutil" - "strings" + + wasmd "github.com/CosmWasm/wasmd/app" + "github.com/CosmWasm/wasmd/x/wasm/types" ) var wasmIdent = []byte("\x00\x61\x73\x6D") diff --git a/x/wasm/keeper/ante.go b/x/wasm/keeper/ante.go index 276a87a9f2..29cb282037 100644 --- a/x/wasm/keeper/ante.go +++ b/x/wasm/keeper/ante.go @@ -2,8 +2,10 @@ package keeper import ( "encoding/binary" - "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // CountTXDecorator ante handler to count the tx position in a block. diff --git a/x/wasm/keeper/ante_test.go b/x/wasm/keeper/ante_test.go index d542a8c2f3..d1cffcf15b 100644 --- a/x/wasm/keeper/ante_test.go +++ b/x/wasm/keeper/ante_test.go @@ -1,7 +1,9 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + "time" + "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" @@ -9,8 +11,8 @@ import ( "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "testing" - "time" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestCountTxDecorator(t *testing.T) { diff --git a/x/wasm/keeper/authz_policy.go b/x/wasm/keeper/authz_policy.go index 6a8c34676d..dd4fffc4f1 100644 --- a/x/wasm/keeper/authz_policy.go +++ b/x/wasm/keeper/authz_policy.go @@ -1,8 +1,9 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) type AuthorizationPolicy interface { diff --git a/x/wasm/keeper/contract_keeper.go b/x/wasm/keeper/contract_keeper.go index 007202f635..cd84c97da2 100644 --- a/x/wasm/keeper/contract_keeper.go +++ b/x/wasm/keeper/contract_keeper.go @@ -1,8 +1,9 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ types.ContractOpsKeeper = PermissionedKeeper{} diff --git a/x/wasm/keeper/events.go b/x/wasm/keeper/events.go index a42726fb88..03cb7ea778 100644 --- a/x/wasm/keeper/events.go +++ b/x/wasm/keeper/events.go @@ -2,11 +2,13 @@ package keeper import ( "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" + "strings" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "strings" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // newWasmModuleEvent creates with wasm module event for interacting with the given contract. Adds custom attributes diff --git a/x/wasm/keeper/events_test.go b/x/wasm/keeper/events_test.go index 0a4bef8e21..8c59516343 100644 --- a/x/wasm/keeper/events_test.go +++ b/x/wasm/keeper/events_test.go @@ -2,11 +2,13 @@ package keeper import ( "context" - "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestHasWasmModuleEvent(t *testing.T) { diff --git a/x/wasm/keeper/gas_register.go b/x/wasm/keeper/gas_register.go index 27e93977f9..f11782aa01 100644 --- a/x/wasm/keeper/gas_register.go +++ b/x/wasm/keeper/gas_register.go @@ -1,11 +1,12 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvmtypes "github.com/CosmWasm/wasmvm/types" 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/CosmWasm/wasmd/x/wasm/types" ) const ( diff --git a/x/wasm/keeper/gas_register_test.go b/x/wasm/keeper/gas_register_test.go index 540a0986c1..1ecabc5fba 100644 --- a/x/wasm/keeper/gas_register_test.go +++ b/x/wasm/keeper/gas_register_test.go @@ -1,13 +1,14 @@ package keeper import ( + "math" + "strings" + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "math" - "strings" - "testing" ) func TestCompileCosts(t *testing.T) { diff --git a/x/wasm/keeper/genesis.go b/x/wasm/keeper/genesis.go index adf362fe52..c5a214cd00 100644 --- a/x/wasm/keeper/genesis.go +++ b/x/wasm/keeper/genesis.go @@ -1,10 +1,11 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" abci "github.com/tendermint/tendermint/abci/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // ValidatorSetSource is a subset of the staking keeper diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 89bb4221c4..70184fc7ad 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -6,8 +6,12 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" - wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" + "io/ioutil" + "math/rand" + "os" + "testing" + "time" + "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -25,11 +29,9 @@ import ( "github.com/tendermint/tendermint/proto/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "io/ioutil" - "math/rand" - "os" - "testing" - "time" + + "github.com/CosmWasm/wasmd/x/wasm/types" + wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" ) const firstCodeID = 1 diff --git a/x/wasm/keeper/handler_plugin.go b/x/wasm/keeper/handler_plugin.go index de4520b2b1..6798d3cb31 100644 --- a/x/wasm/keeper/handler_plugin.go +++ b/x/wasm/keeper/handler_plugin.go @@ -4,13 +4,14 @@ import ( "errors" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvmtypes "github.com/CosmWasm/wasmvm/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // msgEncoder is an extension point to customize encodings diff --git a/x/wasm/keeper/handler_plugin_encoders.go b/x/wasm/keeper/handler_plugin_encoders.go index 37412b58f0..69bb5959ba 100644 --- a/x/wasm/keeper/handler_plugin_encoders.go +++ b/x/wasm/keeper/handler_plugin_encoders.go @@ -3,7 +3,7 @@ package keeper import ( "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,6 +15,8 @@ import ( ibcclienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) type BankEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.BankMsg) ([]sdk.Msg, error) diff --git a/x/wasm/keeper/handler_plugin_encoders_test.go b/x/wasm/keeper/handler_plugin_encoders_test.go index f8cdb0aa51..90b4c04ff1 100644 --- a/x/wasm/keeper/handler_plugin_encoders_test.go +++ b/x/wasm/keeper/handler_plugin_encoders_test.go @@ -4,7 +4,6 @@ import ( "encoding/json" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" codectypes "github.com/cosmos/cosmos-sdk/codec/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ibctransfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" @@ -13,13 +12,16 @@ import ( "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" - "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestEncoding(t *testing.T) { diff --git a/x/wasm/keeper/handler_plugin_test.go b/x/wasm/keeper/handler_plugin_test.go index 1e677288d5..e54517f673 100644 --- a/x/wasm/keeper/handler_plugin_test.go +++ b/x/wasm/keeper/handler_plugin_test.go @@ -4,8 +4,6 @@ import ( "encoding/json" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -18,6 +16,9 @@ import ( ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestMessageHandlerChainDispatch(t *testing.T) { diff --git a/x/wasm/keeper/ibc.go b/x/wasm/keeper/ibc.go index 6e9cac7b0f..02529abb1d 100644 --- a/x/wasm/keeper/ibc.go +++ b/x/wasm/keeper/ibc.go @@ -3,11 +3,12 @@ package keeper import ( "strings" - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // bindIbcPort will reserve the port. diff --git a/x/wasm/keeper/ibc_test.go b/x/wasm/keeper/ibc_test.go index 71899b3287..7bfa95e370 100644 --- a/x/wasm/keeper/ibc_test.go +++ b/x/wasm/keeper/ibc_test.go @@ -2,9 +2,10 @@ package keeper import ( "fmt" + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "testing" "github.com/stretchr/testify/require" ) diff --git a/x/wasm/keeper/ioutil_test.go b/x/wasm/keeper/ioutil_test.go index b126e87fde..287e59cb9e 100644 --- a/x/wasm/keeper/ioutil_test.go +++ b/x/wasm/keeper/ioutil_test.go @@ -9,9 +9,10 @@ import ( "strings" "testing" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestUncompress(t *testing.T) { diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index bd7bfdf03e..28729f3b82 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -11,7 +11,6 @@ import ( "strings" "time" - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" @@ -22,6 +21,8 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // contractMemoryLimit is the memory limit of each contract execution (in MiB) diff --git a/x/wasm/keeper/keeper_test.go b/x/wasm/keeper/keeper_test.go index 2473b1f697..116334c746 100644 --- a/x/wasm/keeper/keeper_test.go +++ b/x/wasm/keeper/keeper_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + stypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -22,6 +22,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // When migrated to go 1.16, embed package should be used instead. diff --git a/x/wasm/keeper/legacy_querier.go b/x/wasm/keeper/legacy_querier.go index 1b07cdd2f5..af2d25ea2b 100644 --- a/x/wasm/keeper/legacy_querier.go +++ b/x/wasm/keeper/legacy_querier.go @@ -2,12 +2,14 @@ package keeper import ( "encoding/json" - "github.com/CosmWasm/wasmd/x/wasm/types" + "reflect" + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" abci "github.com/tendermint/tendermint/abci/types" - "reflect" - "strconv" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) const ( diff --git a/x/wasm/keeper/legacy_querier_test.go b/x/wasm/keeper/legacy_querier_test.go index 256c04602c..6638817b7c 100644 --- a/x/wasm/keeper/legacy_querier_test.go +++ b/x/wasm/keeper/legacy_querier_test.go @@ -7,12 +7,13 @@ import ( "io/ioutil" "testing" - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestLegacyQueryContractState(t *testing.T) { diff --git a/x/wasm/keeper/msg_dispatcher.go b/x/wasm/keeper/msg_dispatcher.go index 7ed63b1729..b2ffbb4ca6 100644 --- a/x/wasm/keeper/msg_dispatcher.go +++ b/x/wasm/keeper/msg_dispatcher.go @@ -1,11 +1,12 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" abci "github.com/tendermint/tendermint/abci/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // Messenger is an extension point for custom wasmd message handling diff --git a/x/wasm/keeper/msg_dispatcher_test.go b/x/wasm/keeper/msg_dispatcher_test.go index 42f9eab0c4..b1a806a6c3 100644 --- a/x/wasm/keeper/msg_dispatcher_test.go +++ b/x/wasm/keeper/msg_dispatcher_test.go @@ -3,13 +3,15 @@ package keeper import ( "errors" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" ) func TestDispatchSubmessages(t *testing.T) { diff --git a/x/wasm/keeper/msg_server.go b/x/wasm/keeper/msg_server.go index 324b99dc28..1c45ff52ec 100644 --- a/x/wasm/keeper/msg_server.go +++ b/x/wasm/keeper/msg_server.go @@ -2,9 +2,11 @@ package keeper import ( "context" - "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/wasm/keeper/options.go b/x/wasm/keeper/options.go index 54bb51baea..b028a2745b 100644 --- a/x/wasm/keeper/options.go +++ b/x/wasm/keeper/options.go @@ -2,8 +2,10 @@ package keeper import ( "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/prometheus/client_golang/prometheus" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) type optsFn func(*Keeper) @@ -99,7 +101,7 @@ func WithVMCacheMetrics(r prometheus.Registerer) Option { } // WithGasRegister set a new gas register to implement custom gas costs. -// When the "gas multiplier" for wasmvm gas convertion is modified inside the new register, +// When the "gas multiplier" for wasmvm gas conversion is modified inside the new register, // make sure to also use `WithApiCosts` option for non default values func WithGasRegister(x GasRegister) Option { return optsFn(func(k *Keeper) { diff --git a/x/wasm/keeper/options_test.go b/x/wasm/keeper/options_test.go index 944fa50e8e..40f3fd9c89 100644 --- a/x/wasm/keeper/options_test.go +++ b/x/wasm/keeper/options_test.go @@ -1,15 +1,17 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestConstructorOptions(t *testing.T) { diff --git a/x/wasm/keeper/proposal_handler.go b/x/wasm/keeper/proposal_handler.go index ee3b6e18ca..816036cb91 100644 --- a/x/wasm/keeper/proposal_handler.go +++ b/x/wasm/keeper/proposal_handler.go @@ -2,10 +2,12 @@ package keeper import ( "encoding/hex" - "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // NewWasmProposalHandler creates a new governance Handler for wasm proposals diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index ea83e69fc0..d4d513ec2a 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -5,17 +5,20 @@ import ( "encoding/hex" "encoding/json" "errors" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - wasmvm "github.com/CosmWasm/wasmvm" "io/ioutil" "testing" - "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvm "github.com/CosmWasm/wasmvm" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestStoreCodeProposal(t *testing.T) { diff --git a/x/wasm/keeper/querier.go b/x/wasm/keeper/querier.go index 2640c34884..40faa7ae16 100644 --- a/x/wasm/keeper/querier.go +++ b/x/wasm/keeper/querier.go @@ -3,16 +3,18 @@ package keeper import ( "context" "encoding/binary" + "runtime/debug" + "github.com/cosmos/cosmos-sdk/codec" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "runtime/debug" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ types.QueryServer = &grpcQuerier{} diff --git a/x/wasm/keeper/querier_test.go b/x/wasm/keeper/querier_test.go index eaebd1a9f2..b415f1b4ab 100644 --- a/x/wasm/keeper/querier_test.go +++ b/x/wasm/keeper/querier_test.go @@ -4,9 +4,11 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/CosmWasm/wasmvm" + "io/ioutil" + "testing" + "time" + + cosmwasm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -15,9 +17,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" - "io/ioutil" - "testing" - "time" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestQueryAllContractState(t *testing.T) { diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 323f76347b..10600ae2ab 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -4,9 +4,10 @@ import ( "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" + "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index f3e6364179..410631314d 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -2,15 +2,17 @@ package keeper import ( "encoding/json" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestIBCQuerier(t *testing.T) { diff --git a/x/wasm/keeper/recurse_test.go b/x/wasm/keeper/recurse_test.go index 81acbdd41e..b2e6a68e8e 100644 --- a/x/wasm/keeper/recurse_test.go +++ b/x/wasm/keeper/recurse_test.go @@ -2,9 +2,10 @@ package keeper import ( "encoding/json" - "github.com/CosmWasm/wasmd/x/wasm/types" "testing" + "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/x/wasm/keeper/reflect_test.go b/x/wasm/keeper/reflect_test.go index c2b1296c69..1e23e9c878 100644 --- a/x/wasm/keeper/reflect_test.go +++ b/x/wasm/keeper/reflect_test.go @@ -2,12 +2,12 @@ package keeper import ( "encoding/json" - "github.com/golang/protobuf/proto" "io/ioutil" "strings" "testing" - "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/golang/protobuf/proto" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -18,6 +18,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // ReflectInitMsg is {} diff --git a/x/wasm/keeper/relay.go b/x/wasm/keeper/relay.go index 8d7f72c9f3..345f2304ef 100644 --- a/x/wasm/keeper/relay.go +++ b/x/wasm/keeper/relay.go @@ -1,12 +1,14 @@ package keeper import ( - "github.com/CosmWasm/wasmd/x/wasm/types" + "time" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "time" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ types.IBCContractKeeper = (*Keeper)(nil) diff --git a/x/wasm/keeper/relay_test.go b/x/wasm/keeper/relay_test.go index c5570553be..e6ac96dcf7 100644 --- a/x/wasm/keeper/relay_test.go +++ b/x/wasm/keeper/relay_test.go @@ -6,13 +6,14 @@ import ( "math" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestOnOpenChannel(t *testing.T) { diff --git a/x/wasm/keeper/staking_test.go b/x/wasm/keeper/staking_test.go index 4ff74e5844..e8740104c5 100644 --- a/x/wasm/keeper/staking_test.go +++ b/x/wasm/keeper/staking_test.go @@ -2,10 +2,11 @@ package keeper import ( "encoding/json" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "io/ioutil" "testing" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -87,7 +88,7 @@ type InvestmentResponse struct { Validator sdk.ValAddress `json:"validator"` ExitTax sdk.Dec `json:"exit_tax"` // MinWithdrawl is uint128 encoded as a string (use sdk.Int?) - MinWithdrawl string `json:"min_withdrawl"` + MinWithdrawl string `json:"min_withdrawal"` } func TestInitializeStaking(t *testing.T) { diff --git a/x/wasm/keeper/test_common.go b/x/wasm/keeper/test_common.go index e38cad1757..28a7f0d6e9 100644 --- a/x/wasm/keeper/test_common.go +++ b/x/wasm/keeper/test_common.go @@ -4,8 +4,9 @@ import ( "encoding/binary" "encoding/json" "fmt" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" + "io/ioutil" + "time" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -62,8 +63,9 @@ import ( "github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "io/ioutil" - "time" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) type TestingT interface { diff --git a/x/wasm/keeper/test_fuzz.go b/x/wasm/keeper/test_fuzz.go index 74d6032ce9..653ab6e94f 100644 --- a/x/wasm/keeper/test_fuzz.go +++ b/x/wasm/keeper/test_fuzz.go @@ -3,10 +3,11 @@ package keeper import ( "encoding/json" - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" fuzz "github.com/google/gofuzz" tmBytes "github.com/tendermint/tendermint/libs/bytes" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var ModelFuzzers = []interface{}{FuzzAddr, FuzzAddrString, FuzzAbsoluteTxPosition, FuzzContractInfo, FuzzStateModel, FuzzAccessType, FuzzAccessConfig, FuzzContractCodeHistory} diff --git a/x/wasm/keeper/wasmtesting/mock_engine.go b/x/wasm/keeper/wasmtesting/mock_engine.go index fd8326a370..41394119b2 100644 --- a/x/wasm/keeper/wasmtesting/mock_engine.go +++ b/x/wasm/keeper/wasmtesting/mock_engine.go @@ -3,11 +3,13 @@ package wasmtesting import ( "bytes" "crypto/sha256" - "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/tendermint/tendermint/libs/rand" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) var _ types.WasmerEngine = &MockWasmer{} diff --git a/x/wasm/keeper/wasmtesting/mock_keepers.go b/x/wasm/keeper/wasmtesting/mock_keepers.go index 5d9f16cd84..e8570aed94 100644 --- a/x/wasm/keeper/wasmtesting/mock_keepers.go +++ b/x/wasm/keeper/wasmtesting/mock_keepers.go @@ -1,11 +1,12 @@ package wasmtesting import ( - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) type MockChannelKeeper struct { diff --git a/x/wasm/module.go b/x/wasm/module.go index aa794d2013..5f1b1c1bec 100644 --- a/x/wasm/module.go +++ b/x/wasm/module.go @@ -5,11 +5,6 @@ import ( "encoding/json" "math/rand" - "github.com/CosmWasm/wasmd/x/wasm/client/cli" - "github.com/CosmWasm/wasmd/x/wasm/client/rest" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/simulation" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -23,6 +18,12 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" + + "github.com/CosmWasm/wasmd/x/wasm/client/cli" + "github.com/CosmWasm/wasmd/x/wasm/client/rest" + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/simulation" + "github.com/CosmWasm/wasmd/x/wasm/types" ) var ( diff --git a/x/wasm/module_test.go b/x/wasm/module_test.go index 9a6341e135..6433d9f129 100644 --- a/x/wasm/module_test.go +++ b/x/wasm/module_test.go @@ -6,8 +6,6 @@ import ( "io/ioutil" "testing" - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" @@ -19,6 +17,9 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" + + "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/types" ) type testData struct { diff --git a/x/wasm/relay_pingpong_test.go b/x/wasm/relay_pingpong_test.go index 305c951859..a592815236 100644 --- a/x/wasm/relay_pingpong_test.go +++ b/x/wasm/relay_pingpong_test.go @@ -3,11 +3,8 @@ package wasm_test import ( "encoding/json" "fmt" - wasmd "github.com/CosmWasm/wasmd/app" - wasmibctesting "github.com/CosmWasm/wasmd/x/wasm/ibctesting" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -17,7 +14,12 @@ import ( ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" + + wasmd "github.com/CosmWasm/wasmd/app" + wasmibctesting "github.com/CosmWasm/wasmd/x/wasm/ibctesting" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ) const ( diff --git a/x/wasm/relay_test.go b/x/wasm/relay_test.go index e08c78da9b..ecbdd6c260 100644 --- a/x/wasm/relay_test.go +++ b/x/wasm/relay_test.go @@ -2,11 +2,9 @@ package wasm_test import ( "encoding/json" - wasmd "github.com/CosmWasm/wasmd/app" - "github.com/CosmWasm/wasmd/x/wasm/ibctesting" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtesting "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" - "github.com/CosmWasm/wasmd/x/wasm/types" + "testing" + "time" + wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,8 +15,12 @@ import ( ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" - "time" + + wasmd "github.com/CosmWasm/wasmd/app" + "github.com/CosmWasm/wasmd/x/wasm/ibctesting" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtesting "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" + "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestFromIBCTransferToContract(t *testing.T) { @@ -221,7 +223,7 @@ func TestContractCanEmulateIBCTransferMessageWithTimeout(t *testing.T) { coinToSendToB := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) timeout := uint64(chainB.LastHeader.Header.Time.Add(time.Nanosecond).UnixNano()) // not enough time - // custom payload data to be transfered into a proper ICS20 ibc packet + // custom payload data to be transferred into a proper ICS20 ibc packet startMsg := &types.MsgExecuteContract{ Sender: chainA.SenderAccount.GetAddress().String(), Contract: myContractAddr.String(), diff --git a/x/wasm/simulation/genesis.go b/x/wasm/simulation/genesis.go index a5eb597fe4..4ac69fb1f1 100644 --- a/x/wasm/simulation/genesis.go +++ b/x/wasm/simulation/genesis.go @@ -1,8 +1,9 @@ package simulation import ( - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) // RandomizeGenState generates a random GenesisState for wasm diff --git a/x/wasm/simulation/params.go b/x/wasm/simulation/params.go index aac662f572..bb2e4fc9ff 100644 --- a/x/wasm/simulation/params.go +++ b/x/wasm/simulation/params.go @@ -4,10 +4,11 @@ import ( "fmt" "math/rand" - "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/codec" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/CosmWasm/wasmd/x/wasm/types" ) func ParamChanges(r *rand.Rand, cdc codec.Marshaler) []simtypes.ParamChange { diff --git a/x/wasm/types/expected_keepers.go b/x/wasm/types/expected_keepers.go index ed357f7690..bf3efc6467 100644 --- a/x/wasm/types/expected_keepers.go +++ b/x/wasm/types/expected_keepers.go @@ -2,6 +2,7 @@ package types import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index 0c5096e421..14fb3e7fd0 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/wasm/types/iavl_range_test.go b/x/wasm/types/iavl_range_test.go index bc852a6b54..aedfaea4f3 100644 --- a/x/wasm/types/iavl_range_test.go +++ b/x/wasm/types/iavl_range_test.go @@ -1,12 +1,13 @@ package types import ( + "testing" + "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/iavl" iavl2 "github.com/cosmos/iavl" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" - "testing" ) // This is modeled close to diff --git a/x/wasm/types/ibc.pb.go b/x/wasm/types/ibc.pb.go index 1cbc5d8315..f9cf2f1bec 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -6,11 +6,12 @@ package types import ( encoding_json "encoding/json" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/wasm/types/proposal.pb.go b/x/wasm/types/proposal.pb.go index 7754c43474..f1cbbd2b1e 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -6,13 +6,14 @@ package types import ( bytes "bytes" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index 7809974a26..80f95cda8c 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -8,6 +8,10 @@ import ( context "context" encoding_json "encoding/json" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -17,9 +21,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/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go index 261db54537..a3d5d127cd 100644 --- a/x/wasm/types/tx.pb.go +++ b/x/wasm/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" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" @@ -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/wasm/types/types.go b/x/wasm/types/types.go index 1a2e046ebc..075cfe1317 100644 --- a/x/wasm/types/types.go +++ b/x/wasm/types/types.go @@ -2,12 +2,13 @@ package types import ( "fmt" + "reflect" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/gogo/protobuf/proto" - "reflect" ) const ( diff --git a/x/wasm/types/types.pb.go b/x/wasm/types/types.pb.go index e70892ed58..94bc80d613 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -7,14 +7,15 @@ import ( bytes "bytes" encoding_json "encoding/json" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "github.com/regen-network/cosmos-proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/wasm/types/types_test.go b/x/wasm/types/types_test.go index e90081c64a..8d5d3196a3 100644 --- a/x/wasm/types/types_test.go +++ b/x/wasm/types/types_test.go @@ -2,6 +2,10 @@ package types import ( "context" + "strings" + "testing" + "time" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -11,9 +15,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/rand" - "strings" - "testing" - "time" ) func TestContractInfoValidateBasic(t *testing.T) { diff --git a/x/wasm/types/wasmer_engine.go b/x/wasm/types/wasmer_engine.go index 974b909f00..b73ef2c7f3 100644 --- a/x/wasm/types/wasmer_engine.go +++ b/x/wasm/types/wasmer_engine.go @@ -48,7 +48,7 @@ type WasmerEngine interface { // (That is a detail for the external, sdk-facing, side). // // The caller is responsible for passing the correct `store` (which must have been initialized exactly once), - // and setting the env with relevent info on this instance (address, balance, etc) + // and setting the env with relevant info on this instance (address, balance, etc) Execute( code wasmvm.Checksum, env wasmvmtypes.Env,