cosmostest -> colinear in dir structure

This commit is contained in:
2022-09-05 23:03:12 +00:00
parent 002adee31e
commit 3fdcaf9a90
86 changed files with 308 additions and 288 deletions

View File

@@ -10,12 +10,12 @@ import (
// "github.com/cosmos/cosmos-sdk/client/flags"
// sdk "github.com/cosmos/cosmos-sdk/types"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
)
// GetQueryCmd returns the cli query commands for this module
func GetQueryCmd(queryRoute string) *cobra.Command {
// Group cosmostest queries under a subcommand
// Group colinear queries under a subcommand
cmd := &cobra.Command{
Use: types.ModuleName,
Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName),

View File

@@ -3,7 +3,8 @@ package cli
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

View File

@@ -3,7 +3,8 @@ package cli
import (
"strconv"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

View File

@@ -12,10 +12,10 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"cosmos-test/testutil/network"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/client/cli"
"cosmos-test/x/cosmostest/types"
"colinear/testutil/network"
"colinear/testutil/nullify"
"colinear/x/colinear-core/client/cli"
"colinear/x/colinear-core/types"
)
// Prevent strconv unused error

View File

@@ -3,7 +3,8 @@ package cli
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

View File

@@ -9,10 +9,10 @@ import (
tmcli "github.com/tendermint/tendermint/libs/cli"
"google.golang.org/grpc/status"
"cosmos-test/testutil/network"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/client/cli"
"cosmos-test/x/cosmostest/types"
"colinear/testutil/network"
"colinear/testutil/nullify"
"colinear/x/colinear-core/client/cli"
"colinear/x/colinear-core/types"
)
func networkWithNextAuctionObjects(t *testing.T) (*network.Network, types.NextAuction) {

View File

@@ -3,7 +3,8 @@ package cli
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

View File

@@ -8,7 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
// "github.com/cosmos/cosmos-sdk/client/flags"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
)
var (

View File

@@ -3,7 +3,7 @@ package cli
import (
"strconv"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"

View File

@@ -3,7 +3,7 @@ package cli
import (
"strconv"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"

View File

@@ -1,8 +1,9 @@
package cosmostest
package colinearcore
import (
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

View File

@@ -1,12 +1,12 @@
package cosmostest_test
package colinearcore_test
import (
"testing"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/testutil/nullify"
colinear "colinear/x/colinear-core"
"colinear/x/colinear-core/types"
"github.com/stretchr/testify/require"
)
@@ -29,9 +29,9 @@ func TestGenesis(t *testing.T) {
// this line is used by starport scaffolding # genesis/test/state
}
k, ctx := keepertest.CosmostestKeeper(t)
cosmostest.InitGenesis(ctx, *k, genesisState)
got := cosmostest.ExportGenesis(ctx, *k)
k, ctx := keepertest.ColinearcoreKeeper(t)
colinear.InitGenesis(ctx, *k, genesisState)
got := colinear.ExportGenesis(ctx, *k)
require.NotNil(t, got)
nullify.Fill(&genesisState)

View File

@@ -1,10 +1,11 @@
package cosmostest
package colinearcore
import (
"fmt"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

View File

@@ -1,7 +1,7 @@
package keeper
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"

View File

@@ -1,9 +1,9 @@
package keeper
import (
"cosmos-test/x/cosmostest/math"
"cosmos-test/x/cosmostest/memdb"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/math"
"colinear/x/colinear-core/memdb"
"colinear/x/colinear-core/types"
"log"
"math/big"
"time"
@@ -107,7 +107,7 @@ func (k *Keeper) PayAuctionAmountDue(ctx sdk.Context, auctionId string) error {
return err
}
coins := sdk.NewCoins(sdk.NewCoin(auction.Denom, sdk.NewIntFromBigInt(amt)))
err = k.bank.SendCoinsFromModuleToAccount(ctx, "cosmostest", sdk.AccAddress(auction.Best.Owner), coins)
err = k.bank.SendCoinsFromModuleToAccount(ctx, "colinear", sdk.AccAddress(auction.Best.Owner), coins)
return err
}
}

View File

@@ -4,10 +4,11 @@ import (
"strconv"
"testing"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/testutil/nullify"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
)
@@ -26,7 +27,7 @@ func createNAuction(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Aucti
}
func TestAuctionGet(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
items := createNAuction(keeper, ctx, 10)
for _, item := range items {
rst, found := keeper.GetAuction(ctx,
@@ -40,7 +41,7 @@ func TestAuctionGet(t *testing.T) {
}
}
func TestAuctionRemove(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
items := createNAuction(keeper, ctx, 10)
for _, item := range items {
keeper.RemoveAuction(ctx,
@@ -54,7 +55,7 @@ func TestAuctionRemove(t *testing.T) {
}
func TestAuctionGetAll(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
items := createNAuction(keeper, ctx, 10)
require.ElementsMatch(t,
nullify.Fill(items),

View File

@@ -1,7 +1,7 @@
package keeper
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
)
var _ types.QueryServer = Keeper{}

View File

@@ -3,7 +3,8 @@ package keeper
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"

View File

@@ -4,8 +4,8 @@ import (
"context"
"fmt"
"cosmos-test/x/cosmostest/memdb"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/memdb"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"

View File

@@ -10,16 +10,16 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/testutil/nullify"
"colinear/x/colinear-core/types"
)
// Prevent strconv unused error
var _ = strconv.IntSize
func TestAuctionQuerySingle(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNAuction(keeper, ctx, 2)
for _, tc := range []struct {
@@ -70,7 +70,7 @@ func TestAuctionQuerySingle(t *testing.T) {
}
func TestAuctionQueryPaginated(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNAuction(keeper, ctx, 5)

View File

@@ -3,7 +3,8 @@ package keeper
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

View File

@@ -8,13 +8,13 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/testutil/nullify"
"colinear/x/colinear-core/types"
)
func TestNextAuctionQuery(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
item := createTestNextAuction(keeper, ctx)
for _, tc := range []struct {

View File

@@ -3,7 +3,7 @@ package keeper
import (
"context"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"

View File

@@ -3,14 +3,15 @@ package keeper_test
import (
"testing"
testkeeper "cosmos-test/testutil/keeper"
"cosmos-test/x/cosmostest/types"
testkeeper "colinear/testutil/keeper"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
)
func TestParamsQuery(t *testing.T) {
keeper, ctx := testkeeper.CosmostestKeeper(t)
keeper, ctx := testkeeper.ColinearcoreKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
params := types.DefaultParams()
keeper.SetParams(ctx, params)

View File

@@ -5,7 +5,7 @@ import (
"github.com/tendermint/tendermint/libs/log"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"

View File

@@ -3,8 +3,8 @@
package keeper
import (
"cosmos-test/x/cosmostest"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core"
"colinear/x/colinear-core/types"
"testing"
"time"
@@ -26,14 +26,14 @@ import (
type IntegrationTestSuite struct {
suite.Suite
app cosmostest.AppModule
app colinear.AppModule
msgServer types.MsgServer
ctx sdk.Context
queryClient types.QueryClient
}
func (suite *IntegrationTestSuite) SetupTest() {
suite.app = cosmostest.AppModule{
suite.app = colinear.AppModule{
Keeper: NewKeeper(cdc)
}
suite.ctx = suite.app.NewContext(false, tendermintTypes.Header{Time: time.Now()})

View File

@@ -1,7 +1,7 @@
package keeper
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
)
type msgServer struct {

View File

@@ -7,8 +7,8 @@ import (
"math/big"
"strconv"
"cosmos-test/x/cosmostest/auctionconfig"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/auctionconfig"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

View File

@@ -6,8 +6,8 @@ import (
"math/big"
"reflect"
"cosmos-test/x/cosmostest/memdb"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/memdb"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

View File

@@ -4,13 +4,14 @@ import (
"context"
"testing"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
func setupMsgServer(t testing.TB) (types.MsgServer, context.Context) {
k, ctx := keepertest.CosmostestKeeper(t)
k, ctx := keepertest.ColinearcoreKeeper(t)
return keeper.NewMsgServerImpl(*k), sdk.WrapSDKContext(ctx)
}

View File

@@ -1,7 +1,8 @@
package keeper
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
)

View File

@@ -6,10 +6,10 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
keepertest "cosmos-test/testutil/keeper"
"cosmos-test/testutil/nullify"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
keepertest "colinear/testutil/keeper"
"colinear/testutil/nullify"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
)
func createTestNextAuction(keeper *keeper.Keeper, ctx sdk.Context) types.NextAuction {
@@ -19,7 +19,7 @@ func createTestNextAuction(keeper *keeper.Keeper, ctx sdk.Context) types.NextAuc
}
func TestNextAuctionGet(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
item := createTestNextAuction(keeper, ctx)
rst, found := keeper.GetNextAuction(ctx)
require.True(t, found)
@@ -30,7 +30,7 @@ func TestNextAuctionGet(t *testing.T) {
}
func TestNextAuctionRemove(t *testing.T) {
keeper, ctx := keepertest.CosmostestKeeper(t)
keeper, ctx := keepertest.ColinearcoreKeeper(t)
createTestNextAuction(keeper, ctx)
keeper.RemoveNextAuction(ctx)
_, found := keeper.GetNextAuction(ctx)

View File

@@ -1,7 +1,8 @@
package keeper
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

View File

@@ -3,13 +3,14 @@ package keeper_test
import (
"testing"
testkeeper "cosmos-test/testutil/keeper"
"cosmos-test/x/cosmostest/types"
testkeeper "colinear/testutil/keeper"
"colinear/x/colinear-core/types"
"github.com/stretchr/testify/require"
)
func TestGetParams(t *testing.T) {
k, ctx := testkeeper.CosmostestKeeper(t)
k, ctx := testkeeper.ColinearcoreKeeper(t)
params := types.DefaultParams()
k.SetParams(ctx, params)

View File

@@ -2,13 +2,13 @@ package memdb
import (
"bytes"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"encoding/gob"
"errors"
"log"
"math/big"
"github.com/dgraph-io/badger/v3"
badger "github.com/dgraph-io/badger/v3"
)
type bidDB struct {

View File

@@ -1,7 +1,7 @@
package memdb
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"fmt"
"testing"

View File

@@ -1,4 +1,4 @@
package cosmostest
package colinearcore
import (
"context"
@@ -11,10 +11,10 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
"cosmos-test/x/cosmostest/client/cli"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/memdb"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/client/cli"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/memdb"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"

View File

@@ -1,11 +1,12 @@
package cosmostest
package colinearcore
import (
"math/rand"
"cosmos-test/testutil/sample"
cosmostestsimulation "cosmos-test/x/cosmostest/simulation"
"cosmos-test/x/cosmostest/types"
"colinear/testutil/sample"
colinearsimulation "colinear/x/colinear-core/simulation"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/baseapp"
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -17,7 +18,7 @@ import (
// avoid unused import issue
var (
_ = sample.AccAddress
_ = cosmostestsimulation.FindAccount
_ = colinearsimulation.FindAccount
_ = simappparams.StakePerAccount
_ = simulation.MsgEntryKind
_ = baseapp.Paramspace
@@ -41,11 +42,11 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
for i, acc := range simState.Accounts {
accs[i] = acc.Address.String()
}
cosmostestGenesis := types.GenesisState{
colinearGenesis := types.GenesisState{
Params: types.DefaultParams(),
// this line is used by starport scaffolding # simapp/module/genesisState
}
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&cosmostestGenesis)
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&colinearGenesis)
}
// ProposalContents doesn't return any content functions for governance proposals
@@ -74,7 +75,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
)
operations = append(operations, simulation.NewWeightedOperation(
weightMsgNewAuction,
cosmostestsimulation.SimulateMsgNewAuction(am.accountKeeper, am.bankKeeper, am.keeper),
colinearsimulation.SimulateMsgNewAuction(am.accountKeeper, am.bankKeeper, am.keeper),
))
var weightMsgNewBid int
@@ -85,7 +86,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
)
operations = append(operations, simulation.NewWeightedOperation(
weightMsgNewBid,
cosmostestsimulation.SimulateMsgNewBid(am.accountKeeper, am.bankKeeper, am.keeper),
colinearsimulation.SimulateMsgNewBid(am.accountKeeper, am.bankKeeper, am.keeper),
))
// this line is used by starport scaffolding # simapp/module/operation

View File

@@ -1,7 +1,7 @@
package cosmostest
package colinearcore
import (
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"testing"
"time"

View File

@@ -3,8 +3,9 @@ package simulation
import (
"math/rand"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

View File

@@ -3,8 +3,9 @@ package simulation
import (
"math/rand"
"cosmos-test/x/cosmostest/keeper"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/keeper"
"colinear/x/colinear-core/types"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/auction.proto
// source: colinear/auction.proto
package types
@@ -147,10 +147,10 @@ func (m *Auction) GetRemaining() string {
}
func init() {
proto.RegisterType((*Auction)(nil), "cosmostest.cosmostest.Auction")
proto.RegisterType((*Auction)(nil), "colinear.colinear.Auction")
}
func init() { proto.RegisterFile("cosmostest/auction.proto", fileDescriptor_631f6f59914101d9) }
func init() { proto.RegisterFile("colinear/auction.proto", fileDescriptor_631f6f59914101d9) }
var fileDescriptor_631f6f59914101d9 = []byte{
// 298 bytes of a gzipped FileDescriptorProto

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/bid.proto
// source: colinear/bid.proto
package types
@@ -75,10 +75,10 @@ func (m *Bid) GetAmount() string {
}
func init() {
proto.RegisterType((*Bid)(nil), "cosmostest.cosmostest.Bid")
proto.RegisterType((*Bid)(nil), "colinear.colinear.Bid")
}
func init() { proto.RegisterFile("cosmostest/bid.proto", fileDescriptor_74e391fc4965aac8) }
func init() { proto.RegisterFile("colinear/bid.proto", fileDescriptor_74e391fc4965aac8) }
var fileDescriptor_74e391fc4965aac8 = []byte{
// 142 bytes of a gzipped FileDescriptorProto

View File

@@ -8,8 +8,8 @@ import (
)
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgNewAuction{}, "cosmostest/NewAuction", nil)
cdc.RegisterConcrete(&MsgNewBid{}, "cosmostest/NewBid", nil)
cdc.RegisterConcrete(&MsgNewAuction{}, "colinear/NewAuction", nil)
cdc.RegisterConcrete(&MsgNewBid{}, "colinear/NewBid", nil)
// this line is used by starport scaffolding # 2
}

View File

@@ -6,7 +6,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
// x/cosmostest module sentinel errors
// x/colinear-core module sentinel errors
var (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/genesis.proto
// source: colinear/genesis.proto
package types
@@ -23,7 +23,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// GenesisState defines the cosmostest module's genesis state.
// GenesisState defines the colinear module's genesis state.
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
NextAuction *NextAuction `protobuf:"bytes,2,opt,name=nextAuction,proto3" json:"nextAuction,omitempty"`
@@ -85,10 +85,10 @@ func (m *GenesisState) GetAuctionList() []Auction {
}
func init() {
proto.RegisterType((*GenesisState)(nil), "cosmostest.cosmostest.GenesisState")
proto.RegisterType((*GenesisState)(nil), "colinear.colinear.GenesisState")
}
func init() { proto.RegisterFile("cosmostest/genesis.proto", fileDescriptor_78c0d8c25fe3d9a9) }
func init() { proto.RegisterFile("colinear/genesis.proto", fileDescriptor_78c0d8c25fe3d9a9) }
var fileDescriptor_78c0d8c25fe3d9a9 = []byte{
// 247 bytes of a gzipped FileDescriptorProto

View File

@@ -3,7 +3,8 @@ package types_test
import (
"testing"
"cosmos-test/x/cosmostest/types"
"colinear/x/colinear-core/types"
"github.com/stretchr/testify/require"
)

View File

@@ -2,7 +2,7 @@ package types
const (
// ModuleName defines the module name
ModuleName = "cosmostest"
ModuleName = "colinear"
// StoreKey defines the primary module store key
StoreKey = ModuleName
@@ -14,7 +14,7 @@ const (
QuerierRoute = ModuleName
// MemStoreKey defines the in-memory store key
MemStoreKey = "mem_cosmostest"
MemStoreKey = "mem_colinear"
)
func KeyPrefix(p string) []byte {

View File

@@ -3,7 +3,8 @@ package types
import (
"testing"
"cosmos-test/testutil/sample"
"colinear/testutil/sample"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/stretchr/testify/require"
)

View File

@@ -3,7 +3,8 @@ package types
import (
"testing"
"cosmos-test/testutil/sample"
"colinear/testutil/sample"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/stretchr/testify/require"
)

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/next_auction.proto
// source: colinear/next_auction.proto
package types
@@ -67,10 +67,10 @@ func (m *NextAuction) GetAuctionId() uint64 {
}
func init() {
proto.RegisterType((*NextAuction)(nil), "cosmostest.cosmostest.NextAuction")
proto.RegisterType((*NextAuction)(nil), "colinear.colinear.NextAuction")
}
func init() { proto.RegisterFile("cosmostest/next_auction.proto", fileDescriptor_403ab8ae798c785d) }
func init() { proto.RegisterFile("colinear/next_auction.proto", fileDescriptor_403ab8ae798c785d) }
var fileDescriptor_403ab8ae798c785d = []byte{
// 139 bytes of a gzipped FileDescriptorProto

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/params.proto
// source: colinear/params.proto
package types
@@ -60,10 +60,10 @@ func (m *Params) XXX_DiscardUnknown() {
var xxx_messageInfo_Params proto.InternalMessageInfo
func init() {
proto.RegisterType((*Params)(nil), "cosmostest.cosmostest.Params")
proto.RegisterType((*Params)(nil), "colinear.colinear.Params")
}
func init() { proto.RegisterFile("cosmostest/params.proto", fileDescriptor_dec10d5375a626c5) }
func init() { proto.RegisterFile("colinear/params.proto", fileDescriptor_dec10d5375a626c5) }
var fileDescriptor_dec10d5375a626c5 = []byte{
// 131 bytes of a gzipped FileDescriptorProto

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/query.proto
// source: colinear/query.proto
package types
@@ -466,19 +466,19 @@ func (m *QueryAuctionBidsResponse) GetBids() []*Bid {
}
func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "cosmostest.cosmostest.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "cosmostest.cosmostest.QueryParamsResponse")
proto.RegisterType((*QueryGetNextAuctionRequest)(nil), "cosmostest.cosmostest.QueryGetNextAuctionRequest")
proto.RegisterType((*QueryGetNextAuctionResponse)(nil), "cosmostest.cosmostest.QueryGetNextAuctionResponse")
proto.RegisterType((*QueryGetAuctionRequest)(nil), "cosmostest.cosmostest.QueryGetAuctionRequest")
proto.RegisterType((*QueryGetAuctionResponse)(nil), "cosmostest.cosmostest.QueryGetAuctionResponse")
proto.RegisterType((*QueryAllAuctionRequest)(nil), "cosmostest.cosmostest.QueryAllAuctionRequest")
proto.RegisterType((*QueryAllAuctionResponse)(nil), "cosmostest.cosmostest.QueryAllAuctionResponse")
proto.RegisterType((*QueryAuctionBidsRequest)(nil), "cosmostest.cosmostest.QueryAuctionBidsRequest")
proto.RegisterType((*QueryAuctionBidsResponse)(nil), "cosmostest.cosmostest.QueryAuctionBidsResponse")
proto.RegisterType((*QueryParamsRequest)(nil), "colinear.colinear.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "colinear.colinear.QueryParamsResponse")
proto.RegisterType((*QueryGetNextAuctionRequest)(nil), "colinear.colinear.QueryGetNextAuctionRequest")
proto.RegisterType((*QueryGetNextAuctionResponse)(nil), "colinear.colinear.QueryGetNextAuctionResponse")
proto.RegisterType((*QueryGetAuctionRequest)(nil), "colinear.colinear.QueryGetAuctionRequest")
proto.RegisterType((*QueryGetAuctionResponse)(nil), "colinear.colinear.QueryGetAuctionResponse")
proto.RegisterType((*QueryAllAuctionRequest)(nil), "colinear.colinear.QueryAllAuctionRequest")
proto.RegisterType((*QueryAllAuctionResponse)(nil), "colinear.colinear.QueryAllAuctionResponse")
proto.RegisterType((*QueryAuctionBidsRequest)(nil), "colinear.colinear.QueryAuctionBidsRequest")
proto.RegisterType((*QueryAuctionBidsResponse)(nil), "colinear.colinear.QueryAuctionBidsResponse")
}
func init() { proto.RegisterFile("cosmostest/query.proto", fileDescriptor_540d26b2788a5d10) }
func init() { proto.RegisterFile("colinear/query.proto", fileDescriptor_540d26b2788a5d10) }
var fileDescriptor_540d26b2788a5d10 = []byte{
// 605 bytes of a gzipped FileDescriptorProto
@@ -556,7 +556,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient {
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/Params", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Query/Params", in, out, opts...)
if err != nil {
return nil, err
}
@@ -565,7 +565,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
func (c *queryClient) NextAuction(ctx context.Context, in *QueryGetNextAuctionRequest, opts ...grpc.CallOption) (*QueryGetNextAuctionResponse, error) {
out := new(QueryGetNextAuctionResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/NextAuction", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Query/NextAuction", in, out, opts...)
if err != nil {
return nil, err
}
@@ -574,7 +574,7 @@ func (c *queryClient) NextAuction(ctx context.Context, in *QueryGetNextAuctionRe
func (c *queryClient) Auction(ctx context.Context, in *QueryGetAuctionRequest, opts ...grpc.CallOption) (*QueryGetAuctionResponse, error) {
out := new(QueryGetAuctionResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/Auction", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Query/Auction", in, out, opts...)
if err != nil {
return nil, err
}
@@ -583,7 +583,7 @@ func (c *queryClient) Auction(ctx context.Context, in *QueryGetAuctionRequest, o
func (c *queryClient) AuctionAll(ctx context.Context, in *QueryAllAuctionRequest, opts ...grpc.CallOption) (*QueryAllAuctionResponse, error) {
out := new(QueryAllAuctionResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/AuctionAll", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Query/AuctionAll", in, out, opts...)
if err != nil {
return nil, err
}
@@ -592,7 +592,7 @@ func (c *queryClient) AuctionAll(ctx context.Context, in *QueryAllAuctionRequest
func (c *queryClient) AuctionBids(ctx context.Context, in *QueryAuctionBidsRequest, opts ...grpc.CallOption) (*QueryAuctionBidsResponse, error) {
out := new(QueryAuctionBidsResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Query/AuctionBids", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Query/AuctionBids", in, out, opts...)
if err != nil {
return nil, err
}
@@ -647,7 +647,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Query/Params",
FullMethod: "/colinear.colinear.Query/Params",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
@@ -665,7 +665,7 @@ func _Query_NextAuction_Handler(srv interface{}, ctx context.Context, dec func(i
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Query/NextAuction",
FullMethod: "/colinear.colinear.Query/NextAuction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).NextAuction(ctx, req.(*QueryGetNextAuctionRequest))
@@ -683,7 +683,7 @@ func _Query_Auction_Handler(srv interface{}, ctx context.Context, dec func(inter
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Query/Auction",
FullMethod: "/colinear.colinear.Query/Auction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Auction(ctx, req.(*QueryGetAuctionRequest))
@@ -701,7 +701,7 @@ func _Query_AuctionAll_Handler(srv interface{}, ctx context.Context, dec func(in
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Query/AuctionAll",
FullMethod: "/colinear.colinear.Query/AuctionAll",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).AuctionAll(ctx, req.(*QueryAllAuctionRequest))
@@ -719,7 +719,7 @@ func _Query_AuctionBids_Handler(srv interface{}, ctx context.Context, dec func(i
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Query/AuctionBids",
FullMethod: "/colinear.colinear.Query/AuctionBids",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).AuctionBids(ctx, req.(*QueryAuctionBidsRequest))
@@ -728,7 +728,7 @@ func _Query_AuctionBids_Handler(srv interface{}, ctx context.Context, dec func(i
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmostest.cosmostest.Query",
ServiceName: "colinear.colinear.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
@@ -753,7 +753,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmostest/query.proto",
Metadata: "colinear/query.proto",
}
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) {

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: cosmostest/query.proto
// source: colinear/query.proto
/*
Package types is a reverse proxy.
@@ -479,15 +479,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}
var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cosmos-test", "cosmostest", "params"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinear", "params"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_NextAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cosmos-test", "cosmostest", "next_auction"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_NextAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinear", "next_auction"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Auction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"cosmos-test", "cosmostest", "auction", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_Auction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinear", "auction", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_AuctionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cosmos-test", "cosmostest", "auction"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_AuctionAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinear", "auction"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_AuctionBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"cosmos-test", "cosmostest", "auction_bids", "index"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_AuctionBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinear", "auction_bids", "index"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmostest/tx.proto
// source: colinear/tx.proto
package types
@@ -252,13 +252,13 @@ func (m *MsgNewBidResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgNewBidResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*MsgNewAuction)(nil), "cosmostest.cosmostest.MsgNewAuction")
proto.RegisterType((*MsgNewAuctionResponse)(nil), "cosmostest.cosmostest.MsgNewAuctionResponse")
proto.RegisterType((*MsgNewBid)(nil), "cosmostest.cosmostest.MsgNewBid")
proto.RegisterType((*MsgNewBidResponse)(nil), "cosmostest.cosmostest.MsgNewBidResponse")
proto.RegisterType((*MsgNewAuction)(nil), "colinear.colinear.MsgNewAuction")
proto.RegisterType((*MsgNewAuctionResponse)(nil), "colinear.colinear.MsgNewAuctionResponse")
proto.RegisterType((*MsgNewBid)(nil), "colinear.colinear.MsgNewBid")
proto.RegisterType((*MsgNewBidResponse)(nil), "colinear.colinear.MsgNewBidResponse")
}
func init() { proto.RegisterFile("cosmostest/tx.proto", fileDescriptor_2fcd5aa4ac15d93c) }
func init() { proto.RegisterFile("colinear/tx.proto", fileDescriptor_2fcd5aa4ac15d93c) }
var fileDescriptor_2fcd5aa4ac15d93c = []byte{
// 338 bytes of a gzipped FileDescriptorProto
@@ -312,7 +312,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient {
func (c *msgClient) NewAuction(ctx context.Context, in *MsgNewAuction, opts ...grpc.CallOption) (*MsgNewAuctionResponse, error) {
out := new(MsgNewAuctionResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Msg/NewAuction", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Msg/NewAuction", in, out, opts...)
if err != nil {
return nil, err
}
@@ -321,7 +321,7 @@ func (c *msgClient) NewAuction(ctx context.Context, in *MsgNewAuction, opts ...g
func (c *msgClient) NewBid(ctx context.Context, in *MsgNewBid, opts ...grpc.CallOption) (*MsgNewBidResponse, error) {
out := new(MsgNewBidResponse)
err := c.cc.Invoke(ctx, "/cosmostest.cosmostest.Msg/NewBid", in, out, opts...)
err := c.cc.Invoke(ctx, "/colinear.colinear.Msg/NewBid", in, out, opts...)
if err != nil {
return nil, err
}
@@ -359,7 +359,7 @@ func _Msg_NewAuction_Handler(srv interface{}, ctx context.Context, dec func(inte
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Msg/NewAuction",
FullMethod: "/colinear.colinear.Msg/NewAuction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).NewAuction(ctx, req.(*MsgNewAuction))
@@ -377,7 +377,7 @@ func _Msg_NewBid_Handler(srv interface{}, ctx context.Context, dec func(interfac
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmostest.cosmostest.Msg/NewBid",
FullMethod: "/colinear.colinear.Msg/NewBid",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).NewBid(ctx, req.(*MsgNewBid))
@@ -386,7 +386,7 @@ func _Msg_NewBid_Handler(srv interface{}, ctx context.Context, dec func(interfac
}
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmostest.cosmostest.Msg",
ServiceName: "colinear.colinear.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
@@ -399,7 +399,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmostest/tx.proto",
Metadata: "colinear/tx.proto",
}
func (m *MsgNewAuction) Marshal() (dAtA []byte, err error) {