Skip to content

Commit

Permalink
Go Formatting update (cosmos#648)
Browse files Browse the repository at this point in the history
* make fmt

* changelog update
  • Loading branch information
fkneeland-figure authored Oct 21, 2021
1 parent 2abbc00 commit dd390d7
Show file tree
Hide file tree
Showing 89 changed files with 298 additions and 175 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion app/ante.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
)
Expand Down
3 changes: 2 additions & 1 deletion app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion app/test_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/wasmd/genwasm.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/wasmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
11 changes: 7 additions & 4 deletions cmd/wasmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion x/wasm/client/cli/genesis_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions x/wasm/client/cli/genesis_msg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/cli/gov_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ 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"
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
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 {
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/cli/new_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions x/wasm/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ 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"
sdk "github.com/cosmos/cosmos-sdk/types"
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 (
Expand Down
1 change: 1 addition & 0 deletions x/wasm/client/codec/marshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/proposal_handler.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/proposal_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/rest/gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/rest/new_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions x/wasm/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions x/wasm/client/rest/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/client/utils/utils_test.go
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/common_test.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions x/wasm/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Loading

0 comments on commit dd390d7

Please sign in to comment.