Skip to content

Commit

Permalink
refactor: run gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Nov 27, 2023
1 parent 49c0f93 commit 7f79d37
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
6 changes: 2 additions & 4 deletions x/randomness/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ const (
RouterKey = ModuleName
)

var (
// KeyPrefixSeed defines prefix to store the current block's seed.
KeyPrefixSeed = []byte{0x00}
)
// KeyPrefixSeed defines prefix to store the current block's seed.
var KeyPrefixSeed = []byte{0x00}
11 changes: 6 additions & 5 deletions x/wasm-storage/client/cli/gov_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import (
"fmt"
"strconv"

"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"github.com/spf13/viper"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -13,10 +18,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/address"
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"github.com/spf13/viper"

"github.com/sedaprotocol/seda-chain/x/wasm-storage/types"
)
Expand Down Expand Up @@ -144,7 +145,7 @@ func ProposalInstantiateAndRegisterProxyContract() *cobra.Command {
return cmd
}

func parseStoreOverlayArgs(file string, sender string, flags *flag.FlagSet) (*types.MsgStoreOverlayWasm, error) {
func parseStoreOverlayArgs(file, sender string, flags *flag.FlagSet) (*types.MsgStoreOverlayWasm, error) {
zipped, err := gzipWasmFile(file)
if err != nil {
return nil, err
Expand Down
9 changes: 6 additions & 3 deletions x/wasm-storage/keeper/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ import (
"testing"
"time"

"github.com/stretchr/testify/suite"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/stretchr/testify/suite"

wasmstorage "github.com/sedaprotocol/seda-chain/x/wasm-storage"
"github.com/sedaprotocol/seda-chain/x/wasm-storage/keeper"
wasmstoragetypes "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"
)

var mockedByteArray = []byte("82a9dda829eb7f8ffe9fbe49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e5082")
var mockedByteArray2 = []byte("a9dda829eb7f8ffe9fbesfa49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e50829a")
var (
mockedByteArray = []byte("82a9dda829eb7f8ffe9fbe49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e5082")
mockedByteArray2 = []byte("a9dda829eb7f8ffe9fbesfa49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e50829a")
)

type KeeperTestSuite struct {
suite.Suite
Expand Down
2 changes: 1 addition & 1 deletion x/wasm-storage/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/hex"
"fmt"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cometbft/cometbft/libs/log"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
3 changes: 2 additions & 1 deletion x/wasm-storage/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/hex"
"os"

"github.com/CosmWasm/wasmd/x/wasm/ioutils"
"github.com/hyperledger/burrow/crypto"

"github.com/CosmWasm/wasmd/x/wasm/ioutils"

wasmstoragetypes "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"
)

Expand Down
3 changes: 2 additions & 1 deletion x/wasm-storage/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/hex"
"os"

"github.com/CosmWasm/wasmd/x/wasm/ioutils"
"github.com/hyperledger/burrow/crypto"

"github.com/CosmWasm/wasmd/x/wasm/ioutils"

"github.com/sedaprotocol/seda-chain/x/wasm-storage/types"
)

Expand Down
1 change: 1 addition & 0 deletions x/wasm-storage/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (s *KeeperTestSuite) TestDataRequestWasms() {
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm.Hash, "WASM_TYPE_DATA_REQUEST"), res.HashTypePairs[0])
s.Require().Equal(fmt.Sprintf("%s,%s", storedWasm2.Hash, "WASM_TYPE_DATA_REQUEST"), res.HashTypePairs[1])
}

func (s *KeeperTestSuite) TestOverlayWasms() {
s.SetupTest()
wasm, err := os.ReadFile("test_utils/hello-world.wasm")
Expand Down

0 comments on commit 7f79d37

Please sign in to comment.