diff --git a/app/app.go b/app/app.go index 6535f3d6..391f45c3 100644 --- a/app/app.go +++ b/app/app.go @@ -810,6 +810,8 @@ func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo } } + app.CardchainKeeper.MatchWorker(ctx) + return app.mm.EndBlock(ctx, req) } diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 81a2f4e3..20fe92d5 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -33050,6 +33050,9 @@ paths: votingRewardCap: type: string format: int64 + matchWorkerDelay: + type: string + format: uint64 description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -33513,6 +33516,21 @@ paths: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string playerB: type: object properties: @@ -33533,6 +33551,21 @@ paths: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string outcome: type: string enum: @@ -33543,6 +33576,8 @@ paths: default: AWon coinsDistributed: type: boolean + serverConfirmed: + type: boolean default: description: An unexpected error response. schema: @@ -33614,6 +33649,21 @@ paths: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string playerB: type: object properties: @@ -33634,6 +33684,21 @@ paths: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string outcome: type: string enum: @@ -33644,6 +33709,8 @@ paths: default: AWon coinsDistributed: type: boolean + serverConfirmed: + type: boolean default: description: An unexpected error response. schema: @@ -68522,6 +68589,21 @@ definitions: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string playerB: type: object properties: @@ -68542,6 +68624,21 @@ definitions: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string outcome: type: string enum: @@ -68552,6 +68649,8 @@ definitions: default: AWon coinsDistributed: type: boolean + serverConfirmed: + type: boolean DecentralCardGame.cardchain.cardchain.MatchPlayer: type: object properties: @@ -68572,6 +68671,21 @@ definitions: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string DecentralCardGame.cardchain.cardchain.MsgAddArtworkResponse: type: object DecentralCardGame.cardchain.cardchain.MsgAddArtworkToCollectionResponse: @@ -68615,6 +68729,12 @@ definitions: type: object DecentralCardGame.cardchain.cardchain.MsgFinalizeCollectionResponse: type: object + DecentralCardGame.cardchain.cardchain.MsgMsgOpenMatchResponse: + type: object + properties: + matchId: + type: string + format: uint64 DecentralCardGame.cardchain.cardchain.MsgMultiVoteCardResponse: type: object DecentralCardGame.cardchain.cardchain.MsgOpenBoosterPackResponse: @@ -68827,6 +68947,9 @@ definitions: votingRewardCap: type: string format: int64 + matchWorkerDelay: + type: string + format: uint64 description: Params defines the parameters for the module. DecentralCardGame.cardchain.cardchain.QueryParamsResponse: type: object @@ -68888,6 +69011,9 @@ definitions: votingRewardCap: type: string format: int64 + matchWorkerDelay: + type: string + format: uint64 description: QueryParamsResponse is response type for the Query/Params RPC method. DecentralCardGame.cardchain.cardchain.QueryQCardContentResponse: type: object @@ -68990,6 +69116,21 @@ definitions: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string playerB: type: object properties: @@ -69010,6 +69151,21 @@ definitions: - Draw - Aborted default: AWon + deck: + type: array + items: + type: string + format: uint64 + votedCards: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voteType: + type: string outcome: type: string enum: @@ -69020,6 +69176,8 @@ definitions: default: AWon coinsDistributed: type: boolean + serverConfirmed: + type: boolean DecentralCardGame.cardchain.cardchain.QueryQSellOffersResponse: type: object properties: diff --git a/proto/cardchain/cardchain/match.proto b/proto/cardchain/cardchain/match.proto index be90154b..52b2f906 100644 --- a/proto/cardchain/cardchain/match.proto +++ b/proto/cardchain/cardchain/match.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package DecentralCardGame.cardchain.cardchain; option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types"; -import "cardchain/cardchain/tx.proto"; +import "cardchain/cardchain/voteing.proto"; message Match { @@ -12,6 +12,7 @@ message Match { MatchPlayer playerB = 4; Outcome outcome = 7; bool coinsDistributed = 10; + bool serverConfirmed = 8; } message MatchPlayer { @@ -19,4 +20,13 @@ message MatchPlayer { repeated uint64 playedCards = 2; bool confirmed = 3; Outcome outcome = 4; + repeated uint64 deck = 5; + repeated SingleVote votedCards = 6; } + +enum Outcome { + AWon = 0; + BWon = 1; + Draw = 2; + Aborted = 3; +} \ No newline at end of file diff --git a/proto/cardchain/cardchain/params.proto b/proto/cardchain/cardchain/params.proto index bcca740e..0e47ffe3 100644 --- a/proto/cardchain/cardchain/params.proto +++ b/proto/cardchain/cardchain/params.proto @@ -28,4 +28,5 @@ message Params { string trialVoteReward = 19 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin"];; int64 votePoolFraction = 20; int64 votingRewardCap = 8; + uint64 matchWorkerDelay = 21; } diff --git a/proto/cardchain/cardchain/query.proto b/proto/cardchain/cardchain/query.proto index a47bb281..11806ace 100644 --- a/proto/cardchain/cardchain/query.proto +++ b/proto/cardchain/cardchain/query.proto @@ -5,8 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "cardchain/cardchain/params.proto"; -import "cardchain/cardchain/vote_right.proto"; -import "cardchain/cardchain/voting_results.proto"; +import "cardchain/cardchain/voteing.proto"; import "cardchain/cardchain/card.proto"; import "cardchain/cardchain/user.proto"; import "cardchain/cardchain/match.proto"; diff --git a/proto/cardchain/cardchain/tx.proto b/proto/cardchain/cardchain/tx.proto index 27e1614e..a50f58a1 100644 --- a/proto/cardchain/cardchain/tx.proto +++ b/proto/cardchain/cardchain/tx.proto @@ -4,6 +4,8 @@ package DecentralCardGame.cardchain.cardchain; import "gogoproto/gogo.proto"; import "cardchain/cardchain/council.proto"; +import "cardchain/cardchain/match.proto"; +import "cardchain/cardchain/voteing.proto"; import "cosmos/base/v1beta1/coin.proto"; // this line is used by starport scaffolding # proto/tx/import @@ -55,6 +57,7 @@ service Msg { // this line is used by starport scaffolding # proto/tx/rpc rpc MultiVoteCard (MsgMultiVoteCard) returns (MsgMultiVoteCardResponse); + rpc MsgOpenMatch (MsgMsgOpenMatch ) returns (MsgMsgOpenMatchResponse ); } message MsgCreateuser { string creator = 1; @@ -71,11 +74,11 @@ message MsgBuyCardScheme { cosmos.base.v1beta1.Coin bid = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; /* - string bid = 2; + string bid = 2; */} message MsgBuyCardSchemeResponse { - uint64 cardId = 1; + uint64 cardId = 1; } message MsgVoteCard { @@ -95,9 +98,9 @@ message MsgSaveCardContent { // bytes image = 4; // string fullArt = 5; - string notes = 4; - string artist = 5; - bool balanceAnchor = 6; + string notes = 4; + string artist = 5; + bool balanceAnchor = 6; } message MsgSaveCardContentResponse { @@ -153,20 +156,13 @@ message MsgRegisterForCouncil { message MsgRegisterForCouncilResponse {} message MsgReportMatch { - string creator = 1; - string playerA = 2; - string playerB = 3; - repeated uint64 cardsA = 5; - repeated uint64 cardsB = 6; - Outcome outcome = 7; + string creator = 1; + uint64 matchId = 2; + repeated uint64 playedCardsA = 3; + repeated uint64 playedCardsB = 4; + Outcome outcome = 5; } -enum Outcome { - AWon = 0; - BWon = 1; - Draw = 2; - Aborted = 3; -} message MsgReportMatchResponse { uint64 matchId = 1; } @@ -339,9 +335,10 @@ message MsgRewokeCouncilRegistration { message MsgRewokeCouncilRegistrationResponse {} message MsgConfirmMatch { - string creator = 1; - uint64 matchId = 2; - Outcome outcome = 3; + string creator = 1; + uint64 matchId = 2; + Outcome outcome = 3; + repeated SingleVote votedCards = 4; } message MsgConfirmMatchResponse {} @@ -400,17 +397,23 @@ message MsgSetUserBiography { message MsgSetUserBiographyResponse {} - -message SingleVote { - uint64 cardId = 1; - string voteType = 2; -} - // this line is used by starport scaffolding # proto/tx/message message MsgMultiVoteCard { - string creator = 1; - repeated SingleVote votes = 2; + string creator = 1; + repeated SingleVote votes = 2; } message MsgMultiVoteCardResponse {} +message MsgMsgOpenMatch { + string creator = 1; + string playerA = 2; + string playerB = 3; + repeated uint64 playerADeck = 4; + repeated uint64 playerBDeck = 5; +} + +message MsgMsgOpenMatchResponse { + uint64 matchId = 1; +} + diff --git a/proto/cardchain/cardchain/user.proto b/proto/cardchain/cardchain/user.proto index 813b9c66..158ee9b8 100644 --- a/proto/cardchain/cardchain/user.proto +++ b/proto/cardchain/cardchain/user.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package DecentralCardGame.cardchain.cardchain; option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types"; -import "cardchain/cardchain/vote_right.proto"; +import "cardchain/cardchain/voteing.proto"; message User { diff --git a/proto/cardchain/cardchain/vote_right.proto b/proto/cardchain/cardchain/vote_right.proto deleted file mode 100644 index 86c13be2..00000000 --- a/proto/cardchain/cardchain/vote_right.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package DecentralCardGame.cardchain.cardchain; - -option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types"; - -message VoteRight { - - uint64 cardId = 1; - int64 expireBlock = 2; -} diff --git a/proto/cardchain/cardchain/voting_results.proto b/proto/cardchain/cardchain/voteing.proto similarity index 54% rename from proto/cardchain/cardchain/voting_results.proto rename to proto/cardchain/cardchain/voteing.proto index 0f0bba13..5d39cc53 100644 --- a/proto/cardchain/cardchain/voting_results.proto +++ b/proto/cardchain/cardchain/voteing.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package DecentralCardGame.cardchain.cardchain; option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types"; -import "cardchain/cardchain/voting_result.proto"; message VotingResults { @@ -14,3 +13,24 @@ message VotingResults { repeated VotingResult cardResults = 6; string notes = 7; } + +message VotingResult { + + uint64 cardId = 1; + uint64 fairEnoughVotes = 2; + uint64 overpoweredVotes = 3; + uint64 underpoweredVotes = 4; + uint64 inappropriateVotes = 5; + string result = 6; +} + +message SingleVote { + uint64 cardId = 1; + string voteType = 2; +} + +message VoteRight { + + uint64 cardId = 1; + int64 expireBlock = 2; +} \ No newline at end of file diff --git a/proto/cardchain/cardchain/voting_result.proto b/proto/cardchain/cardchain/voting_result.proto deleted file mode 100644 index 4915f32a..00000000 --- a/proto/cardchain/cardchain/voting_result.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package DecentralCardGame.cardchain.cardchain; - -option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types"; - -message VotingResult { - - uint64 cardId = 1; - uint64 fairEnoughVotes = 2; - uint64 overpoweredVotes = 3; - uint64 underpoweredVotes = 4; - uint64 inappropriateVotes = 5; - string result = 6; -} diff --git a/x/cardchain/client/cli/tx.go b/x/cardchain/client/cli/tx.go index 63665004..7e9ec4c3 100644 --- a/x/cardchain/client/cli/tx.go +++ b/x/cardchain/client/cli/tx.go @@ -70,6 +70,7 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdSetUserWebsite()) cmd.AddCommand(CmdSetUserBiography()) cmd.AddCommand(CmdMultiVoteCard()) + cmd.AddCommand(CmdMsgOpenMatch()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/cardchain/client/cli/tx_msg_open_match.go b/x/cardchain/client/cli/tx_msg_open_match.go new file mode 100644 index 00000000..73da4182 --- /dev/null +++ b/x/cardchain/client/cli/tx_msg_open_match.go @@ -0,0 +1,40 @@ +package cli + +import ( + "strconv" + + "github.com/DecentralCardGame/Cardchain/x/cardchain/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdMsgOpenMatch() *cobra.Command { + cmd := &cobra.Command{ + Use: "msg-open-match", + Short: "Broadcast message MsgOpenMatch", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) (err error) { + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgMsgOpenMatch( + clientCtx.GetFromAddress().String(), + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/cardchain/client/cli/tx_report_match.go b/x/cardchain/client/cli/tx_report_match.go index 4bf7b047..69599a29 100644 --- a/x/cardchain/client/cli/tx_report_match.go +++ b/x/cardchain/client/cli/tx_report_match.go @@ -15,20 +15,23 @@ var _ = strconv.Itoa(0) func CmdReportMatch() *cobra.Command { cmd := &cobra.Command{ - Use: "report-match [player-a] [player-b] [cards-a] [cards-b] [outcome]", + Use: "report-match [match-id] [cards-a] [cards-b] [outcome]", Short: "Broadcast message ReportMatch", - Args: cobra.ExactArgs(5), + Args: cobra.ExactArgs(4), RunE: func(cmd *cobra.Command, args []string) (err error) { - argPlayerA := args[0] - argPlayerB := args[1] + argMatchId, err := strconv.Atoi(args[0]) + if err != nil { + return err + } + var argCardsA []uint64 var argCardsB []uint64 - err = json.Unmarshal([]byte(args[2]), &argCardsA) + err = json.Unmarshal([]byte(args[1]), &argCardsA) if err != nil { return err } - err = json.Unmarshal([]byte(args[3]), &argCardsB) + err = json.Unmarshal([]byte(args[2]), &argCardsB) if err != nil { return err } @@ -42,8 +45,7 @@ func CmdReportMatch() *cobra.Command { msg := types.NewMsgReportMatch( clientCtx.GetFromAddress().String(), - argPlayerA, - argPlayerB, + uint64(argMatchId), argCardsA, argCardsB, argOutcome, diff --git a/x/cardchain/genesis.go b/x/cardchain/genesis.go index d8afb8f6..7b2719cf 100644 --- a/x/cardchain/genesis.go +++ b/x/cardchain/genesis.go @@ -44,9 +44,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) if genState.CardAuctionPrice.Denom != "" { k.SetCardAuctionPrice(ctx, genState.CardAuctionPrice) } - if genState.LastCardModified != nil { - k.SetLastCardModified(ctx, *genState.LastCardModified) - } + if genState.LastCardModified != nil { + k.SetLastCardModified(ctx, *genState.LastCardModified) + } k.Logger(ctx).Info("reading cards with id:") for currId, record := range genState.CardRecords { _, err := keywords.Unmarshal(record.Content) @@ -62,6 +62,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) genState.Params.AirDropValue = defaultParams.AirDropValue genState.Params.AirDropMaxBlockHeight = defaultParams.AirDropMaxBlockHeight } + if genState.Params.MatchWorkerDelay == 0 { + genState.Params.MatchWorkerDelay = types.DefaultMatchWorkerDelay + } k.SetParams(ctx, genState.Params) } @@ -71,7 +74,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { params := k.GetParams(ctx) // params := types.DefaultParams() cardAuctionPrice := k.GetCardAuctionPrice(ctx) - lastCardModified := k.GetLastCardModified(ctx) + lastCardModified := k.GetLastCardModified(ctx) sellOffers := k.SellOffers.GetAll(ctx) pools := k.Pools.GetAll(ctx) records := k.Cards.GetAll(ctx) @@ -100,6 +103,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { Images: images, RunningAverages: runningAverages, Servers: servers, - LastCardModified: &lastCardModified, + LastCardModified: &lastCardModified, } } diff --git a/x/cardchain/keeper/card.go b/x/cardchain/keeper/card.go index d30a23d7..8d8d730f 100644 --- a/x/cardchain/keeper/card.go +++ b/x/cardchain/keeper/card.go @@ -21,22 +21,22 @@ func (k Keeper) SetCardAuctionPrice(ctx sdk.Context, price sdk.Coin) { // GetLastCardModified Returns the block height the last card was modified at func (k Keeper) GetLastCardModified(ctx sdk.Context) (timeStamp types.TimeStamp) { - store := ctx.KVStore(k.InternalStoreKey) - bz := store.Get([]byte("lastCardModified")) - k.cdc.MustUnmarshal(bz, &timeStamp) - return + store := ctx.KVStore(k.InternalStoreKey) + bz := store.Get([]byte("lastCardModified")) + k.cdc.MustUnmarshal(bz, &timeStamp) + return } // SetLastCardModified Sets the block height the last card was modified at func (k Keeper) SetLastCardModified(ctx sdk.Context, timeStamp types.TimeStamp) { - store := ctx.KVStore(k.InternalStoreKey) - store.Set([]byte("lastCardModified"), k.cdc.MustMarshal(&timeStamp)) + store := ctx.KVStore(k.InternalStoreKey) + store.Set([]byte("lastCardModified"), k.cdc.MustMarshal(&timeStamp)) } // SetLastCardModifiedNow Sets the block height the last card was modified at, to now func (k Keeper) SetLastCardModifiedNow(ctx sdk.Context) { - timeStamp := types.TimeStamp{TimeStamp: uint64(ctx.BlockHeight())} - k.SetLastCardModified(ctx, timeStamp) + timeStamp := types.TimeStamp{TimeStamp: uint64(ctx.BlockHeight())} + k.SetLastCardModified(ctx, timeStamp) } // AddOwnedCardScheme Adds a cardscheme to a user @@ -53,5 +53,5 @@ func (k Keeper) SetCardToTrial(ctx sdk.Context, cardId uint64, votePool sdk.Coin card.VotePool = card.VotePool.Add(votePool) card.Status = types.Status_trial k.Cards.Set(ctx, cardId, card) - k.SetLastCardModifiedNow(ctx) + k.SetLastCardModifiedNow(ctx) } diff --git a/x/cardchain/keeper/council.go b/x/cardchain/keeper/council.go index 61a9960b..4e8f3c86 100644 --- a/x/cardchain/keeper/council.go +++ b/x/cardchain/keeper/council.go @@ -104,7 +104,7 @@ func (k Keeper) CheckTrial(ctx sdk.Context) error { card.Status = types.Status_permanent group = approvers amt = 2 - k.SetLastCardModifiedNow(ctx) + k.SetLastCardModifiedNow(ctx) } else { card.Status = types.Status_prototype group = deniers diff --git a/x/cardchain/keeper/grpc_query_q_card.go b/x/cardchain/keeper/grpc_query_q_card.go index ebe6e7d2..cd13afae 100644 --- a/x/cardchain/keeper/grpc_query_q_card.go +++ b/x/cardchain/keeper/grpc_query_q_card.go @@ -50,7 +50,7 @@ func (k Keeper) QCard(goCtx context.Context, req *types.QueryQCardRequest) (*typ UnderpoweredVotes: card.UnderpoweredVotes, InappropriateVotes: card.InappropriateVotes, Nerflevel: card.Nerflevel, - BalanceAnchor: card.BalanceAnchor, + BalanceAnchor: card.BalanceAnchor, Hash: hash, } diff --git a/x/cardchain/keeper/grpc_query_q_cardchain_info.go b/x/cardchain/keeper/grpc_query_q_cardchain_info.go index 91b1a5a9..b344e2cc 100644 --- a/x/cardchain/keeper/grpc_query_q_cardchain_info.go +++ b/x/cardchain/keeper/grpc_query_q_cardchain_info.go @@ -25,6 +25,6 @@ func (k Keeper) QCardchainInfo(goCtx context.Context, req *types.QueryQCardchain MatchesNumber: k.Matches.GetNum(ctx), SellOffersNumber: k.SellOffers.GetNum(ctx), CouncilsNumber: k.Councils.GetNum(ctx), - LastCardModified: k.GetLastCardModified(ctx).TimeStamp, + LastCardModified: k.GetLastCardModified(ctx).TimeStamp, }, nil } diff --git a/x/cardchain/keeper/grpc_query_q_cards.go b/x/cardchain/keeper/grpc_query_q_cards.go index 0c5f09f8..f72afb6e 100644 --- a/x/cardchain/keeper/grpc_query_q_cards.go +++ b/x/cardchain/keeper/grpc_query_q_cards.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" "sort" - "strings" "strconv" + "strings" "github.com/DecentralCardGame/Cardchain/x/cardchain/types" "github.com/DecentralCardGame/cardobject/cardobject" diff --git a/x/cardchain/keeper/keeper.go b/x/cardchain/keeper/keeper.go index 27b91510..0c444457 100644 --- a/x/cardchain/keeper/keeper.go +++ b/x/cardchain/keeper/keeper.go @@ -118,10 +118,10 @@ func (k Keeper) GetLastVotingResults(ctx sdk.Context) (results types.VotingResul // NerfBuffCards Nerfes or buffs certain cards // TODO maybe the whole auto balancing stuff should be moved into its own file func (k Keeper) NerfBuffCards(ctx sdk.Context, cardIds []uint64, buff bool) { - if len(cardIds) > 0 { - k.SetLastCardModifiedNow(ctx) + if len(cardIds) > 0 { + k.SetLastCardModifiedNow(ctx) } - + for _, val := range cardIds { buffCard := k.Cards.Get(ctx, val) @@ -221,8 +221,8 @@ func (k Keeper) UpdateBanStatus(ctx sdk.Context, newBannedIds []uint64) { k.Cards.Set(ctx, id, banCard) } - if len(newBannedIds) > 0 { - k.SetLastCardModifiedNow(ctx) + if len(newBannedIds) > 0 { + k.SetLastCardModifiedNow(ctx) } } diff --git a/x/cardchain/keeper/match.go b/x/cardchain/keeper/match.go index 9ec6f987..336c115d 100644 --- a/x/cardchain/keeper/match.go +++ b/x/cardchain/keeper/match.go @@ -2,6 +2,8 @@ package keeper import ( "fmt" + "time" + "github.com/DecentralCardGame/Cardchain/x/cardchain/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -20,9 +22,9 @@ func (k Keeper) SetMatchReporter(ctx sdk.Context, address string) error { return nil } -// CalculateMatchReward Calculates the match winning rewards -func (k Keeper) CalculateMatchReward(ctx sdk.Context, outcome types.Outcome) (amountA sdk.Coin, amountB sdk.Coin) { - reward := k.GetMatchReward(ctx) +// calculateMatchReward Calculates the match winning rewards +func (k Keeper) calculateMatchReward(ctx sdk.Context, outcome types.Outcome) (amountA sdk.Coin, amountB sdk.Coin) { + reward := k.getMatchReward(ctx) amountA = sdk.NewInt64Coin("ucredits", 0) amountB = sdk.NewInt64Coin("ucredits", 0) @@ -40,8 +42,8 @@ func (k Keeper) CalculateMatchReward(ctx sdk.Context, outcome types.Outcome) (am return } -// GetMatchReward Calculates winner rewards -func (k Keeper) GetMatchReward(ctx sdk.Context) sdk.Coin { +// getMatchReward Calculates winner rewards +func (k Keeper) getMatchReward(ctx sdk.Context) sdk.Coin { pool := k.Pools.Get(ctx, WinnersPoolKey) reward := QuoCoin(*pool, k.GetParams(ctx).WinnerReward) if reward.Amount.Int64() > 1000000 { @@ -50,8 +52,8 @@ func (k Keeper) GetMatchReward(ctx sdk.Context) sdk.Coin { return reward } -// GetMatchAddresses Get's and verifies the players of a match -func (k Keeper) GetMatchAddresses(ctx sdk.Context, match types.Match) (addresses []sdk.AccAddress, err error) { +// getMatchAddresses Get's and verifies the players of a match +func (k Keeper) getMatchAddresses(ctx sdk.Context, match types.Match) (addresses []sdk.AccAddress, err error) { for _, player := range []string{match.PlayerA.Addr, match.PlayerB.Addr} { var address sdk.AccAddress address, err = sdk.AccAddressFromBech32(player) @@ -65,14 +67,26 @@ func (k Keeper) GetMatchAddresses(ctx sdk.Context, match types.Match) (addresses return } -// DistributeCoins to players of a match -func (k Keeper) DistributeCoins(ctx sdk.Context, match *types.Match, outcome types.Outcome) error { - addresses, err := k.GetMatchAddresses(ctx, *match) +func (k Keeper) getMatchUsers(ctx sdk.Context, match types.Match) (users []*User, err error) { + for _, address := range []string{match.PlayerA.Addr, match.PlayerB.Addr} { + user, err := k.GetUserFromString(ctx, address) + if err != nil { + return []*User{}, err + } + users = append(users, &user) + } + + return +} + +// distributeCoins to players of a match +func (k Keeper) distributeCoins(ctx sdk.Context, match *types.Match, outcome types.Outcome) error { + addresses, err := k.getMatchAddresses(ctx, *match) if err != nil { return err } - amountA, amountB := k.CalculateMatchReward(ctx, outcome) + amountA, amountB := k.calculateMatchReward(ctx, outcome) amounts := []sdk.Coin{amountA, amountB} for idx, address := range addresses { if !amounts[idx].IsZero() { @@ -129,3 +143,86 @@ func (k Keeper) GetOutcome(ctx sdk.Context, match types.Match) (outcome types.Ou } return } + +func (k Keeper) TryHandleMatchOutcome(ctx sdk.Context, match *types.Match) error { + if match.PlayerA.Confirmed && match.PlayerB.Confirmed && match.ServerConfirmed { + return k.HandleMatchOutcome(ctx, match) + } + return nil +} + +func (k Keeper) HandleMatchOutcome(ctx sdk.Context, match *types.Match) error { + // Evaluate Outcome + outcomes := []types.Outcome{match.Outcome, match.PlayerA.Outcome, match.PlayerB.Outcome} + slices.Sort(outcomes) + outcomes = slices.Compact(outcomes) + switch i := uint64(len(outcomes)); i { + case 1: + k.ReportServerMatch(ctx, match.Reporter, 1, true) + default: + k.ReportServerMatch(ctx, match.Reporter, i-1, false) + } + + outcome, err := k.GetOutcome(ctx, *match) + match.Outcome = outcome + + err = k.distributeCoins(ctx, match, outcome) + if err != nil { + return err + } + + err = k.voteMatchCards(ctx, match) + if err != nil { + return err + } + + // TODO: Votes + return nil +} + +func (k Keeper) voteMatchCards(ctx sdk.Context, match *types.Match) error { + users, err := k.getMatchUsers(ctx, *match) + if err != nil { + return err + } + players := []*types.MatchPlayer{match.PlayerA, match.PlayerB} + for idx, player := range players { + // filter voted cards cards + otherPlayer := players[(idx+1)%2] + var otherPlayerCards []uint64 + var cleanedVotes []*types.SingleVote + if match.ServerConfirmed { + otherPlayerCards = otherPlayer.PlayedCards + } else { + otherPlayerCards = otherPlayer.Deck + } + for _, vote := range player.VotedCards { + if slices.Contains(otherPlayerCards, vote.CardId) { + cleanedVotes = append(cleanedVotes, vote) + } + } + err = k.multiVote(ctx, users[idx], cleanedVotes, true) + if err != nil { + return err + } + k.SetUserFromUser(ctx, *users[idx]) + } + return nil +} + +func (k Keeper) MatchWorker(ctx sdk.Context) { + now := uint64(time.Now().Unix()) + if ctx.BlockHeight()%20 == 0 { + matchIter := k.Matches.GetItemIterator(ctx) + for ; matchIter.Valid(); matchIter.Next() { + id, match := matchIter.Value() + if !match.CoinsDistributed && match.Timestamp != 0 && match.Timestamp+k.GetParams(ctx).MatchWorkerDelay < now { + err := k.HandleMatchOutcome(ctx, match) + if err != nil { + k.Logger(ctx).Error(fmt.Sprintf(":: Error with matchWorker: %s", err)) + } + k.Matches.Set(ctx, id, match) + } + } + } +} diff --git a/x/cardchain/keeper/match_test.go b/x/cardchain/keeper/match_test.go index 2f130871..7640b02c 100644 --- a/x/cardchain/keeper/match_test.go +++ b/x/cardchain/keeper/match_test.go @@ -28,34 +28,34 @@ func TestMatches(t *testing.T) { require.EqualValues(t, match, *k.Matches.Get(ctx, 0)) require.EqualValues(t, []*types.Match{&match, &match}, k.Matches.GetAll(ctx)) require.EqualValues(t, 2, k.Matches.GetNumber(ctx)) - require.EqualValues(t, sdk.NewInt64Coin("ucredits", 2), k.GetMatchReward(ctx), k.GetMatchReward(ctx).Amount.Int64()) + require.EqualValues(t, sdk.NewInt64Coin("ucredits", 2), k.getMatchReward(ctx), k.getMatchReward(ctx).Amount.Int64()) - amountA, amountB := k.CalculateMatchReward(ctx, types.Outcome_AWon) + amountA, amountB := k.calculateMatchReward(ctx, types.Outcome_AWon) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 2), amountA) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 0), amountB) SetUpPools(ctx, *k) - amountA, amountB = k.CalculateMatchReward(ctx, types.Outcome_BWon) + amountA, amountB = k.calculateMatchReward(ctx, types.Outcome_BWon) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 0), amountA) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 2), amountB) SetUpPools(ctx, *k) - amountA, amountB = k.CalculateMatchReward(ctx, types.Outcome_Draw) + amountA, amountB = k.calculateMatchReward(ctx, types.Outcome_Draw) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 1), amountA) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 1), amountB) SetUpPools(ctx, *k) - amountA, amountB = k.CalculateMatchReward(ctx, types.Outcome_Aborted) + amountA, amountB = k.calculateMatchReward(ctx, types.Outcome_Aborted) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 0), amountA) require.EqualValues(t, sdk.NewInt64Coin("ucredits", 0), amountB) - addrs, err := k.GetMatchAddresses(ctx, match) + addrs, err := k.getMatchAddresses(ctx, match) require.EqualValues(t, nil, err) require.EqualValues(t, addrs[0], addrs[1]) require.EqualValues(t, 2, len(addrs)) match.PlayerA.Addr = "abc" - addrs, err = k.GetMatchAddresses(ctx, match) + addrs, err = k.getMatchAddresses(ctx, match) require.NotEqualValues(t, nil, err) outcome, err := k.GetOutcome(ctx, match) diff --git a/x/cardchain/keeper/msg_server_confirm_match.go b/x/cardchain/keeper/msg_server_confirm_match.go index 51f0c662..7988377b 100644 --- a/x/cardchain/keeper/msg_server_confirm_match.go +++ b/x/cardchain/keeper/msg_server_confirm_match.go @@ -2,11 +2,11 @@ package keeper import ( "context" + "time" "github.com/DecentralCardGame/Cardchain/x/cardchain/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "golang.org/x/exp/slices" ) func (k msgServer) ConfirmMatch(goCtx context.Context, msg *types.MsgConfirmMatch) (*types.MsgConfirmMatchResponse, error) { @@ -35,30 +35,11 @@ func (k msgServer) ConfirmMatch(goCtx context.Context, msg *types.MsgConfirmMatc } player.Outcome = msg.Outcome + player.VotedCards = msg.VotedCards player.Confirmed = true - k.Matches.Set(ctx, msg.MatchId, match) - - // Report bulshit servers - if match.PlayerA.Confirmed && match.PlayerB.Confirmed { - outcomes := []types.Outcome{match.Outcome, match.PlayerA.Outcome, match.PlayerB.Outcome} - slices.Sort(outcomes) - outcomes = slices.Compact(outcomes) - switch i := uint64(len(outcomes)); i { - case 1: - k.ReportServerMatch(ctx, match.Reporter, 1, true) - default: - k.ReportServerMatch(ctx, match.Reporter, i-1, false) - } - } - - outcome, err := k.GetOutcome(ctx, *match) - - // Distribute coins - if match.CoinsDistributed || err != nil { // Ensures that money isn't dropped twice - return &types.MsgConfirmMatchResponse{}, nil - } + match.Timestamp = uint64(time.Now().Unix()) - err = k.DistributeCoins(ctx, match, outcome) + err := k.TryHandleMatchOutcome(ctx, match) if err != nil { return nil, err } diff --git a/x/cardchain/keeper/msg_server_msg_open_match.go b/x/cardchain/keeper/msg_server_msg_open_match.go new file mode 100644 index 00000000..5c71431b --- /dev/null +++ b/x/cardchain/keeper/msg_server_msg_open_match.go @@ -0,0 +1,35 @@ +package keeper + +import ( + "context" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/DecentralCardGame/Cardchain/x/cardchain/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) MsgOpenMatch(goCtx context.Context, msg *types.MsgMsgOpenMatch) (*types.MsgMsgOpenMatchResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + creator, err := k.GetUserFromString(ctx, msg.Creator) + if err != nil { + return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) + } + if creator.ReportMatches == false { + return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Incorrect Reporter") + } + + matchId := k.Matches.GetNum(ctx) + + match := types.Match{ + Reporter: msg.Creator, + PlayerA: types.NewMatchPlayer(msg.PlayerA, []uint64{}, msg.PlayerADeck), + PlayerB: types.NewMatchPlayer(msg.PlayerB, []uint64{}, msg.PlayerBDeck), + CoinsDistributed: false, + } + + k.Matches.Set(ctx, matchId, &match) + + return &types.MsgMsgOpenMatchResponse{MatchId: matchId}, nil +} diff --git a/x/cardchain/keeper/msg_server_multi_vote_card.go b/x/cardchain/keeper/msg_server_multi_vote_card.go index 3e578df3..788643c4 100644 --- a/x/cardchain/keeper/msg_server_multi_vote_card.go +++ b/x/cardchain/keeper/msg_server_multi_vote_card.go @@ -11,23 +11,16 @@ import ( func (k msgServer) MultiVoteCard(goCtx context.Context, msg *types.MsgMultiVoteCard) (*types.MsgMultiVoteCardResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var n = 0 voter, err := k.GetUserFromString(ctx, msg.Creator) if err != nil { return nil, sdkerrors.Wrap(types.ErrInvalidAccAddress, "Unable to convert to AccAddress") } - for i, vote := range msg.Votes { - err := k.voteCard(ctx, &voter, vote.CardId, vote.VoteType) - if err != nil { - return nil, err - } - n = i + err = k.multiVote(ctx, &voter, msg.Votes, false) + if err != nil { + return nil, err } - - k.incVotesAverageBy(ctx, int64(n+1)) - k.ClaimAirDrop(ctx, &voter, types.AirDrop_vote) k.SetUserFromUser(ctx, voter) diff --git a/x/cardchain/keeper/msg_server_report_match.go b/x/cardchain/keeper/msg_server_report_match.go index fce997ed..b4367153 100644 --- a/x/cardchain/keeper/msg_server_report_match.go +++ b/x/cardchain/keeper/msg_server_report_match.go @@ -12,6 +12,8 @@ import ( func (k msgServer) ReportMatch(goCtx context.Context, msg *types.MsgReportMatch) (*types.MsgReportMatchResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) + match := k.Matches.Get(ctx, msg.MatchId) + creator, err := k.GetUserFromString(ctx, msg.Creator) if err != nil { return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) @@ -19,32 +21,25 @@ func (k msgServer) ReportMatch(goCtx context.Context, msg *types.MsgReportMatch) if creator.ReportMatches == false { return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Incorrect Reporter") } - - matchId := k.Matches.GetNum(ctx) - - match := types.Match{ - Timestamp: uint64(time.Now().Unix()), - Reporter: msg.Creator, - PlayerA: types.NewMatchPlayer(msg.PlayerA, msg.CardsA), - PlayerB: types.NewMatchPlayer(msg.PlayerB, msg.CardsB), - Outcome: msg.Outcome, - CoinsDistributed: false, + if msg.Creator != match.Reporter { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "Wrong Reporter, reporter is %s", match.Reporter) + } + if !match.PlayerA.Confirmed && !match.PlayerB.Confirmed { + return nil, sdkerrors.Wrapf(types.ErrWaitingForPlayers, "Waiting for players to report") } + if !match.CoinsDistributed { + return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Match already reported") + } + + match.Outcome = msg.Outcome + match.Timestamp = uint64(time.Now().Unix()) - _, err = k.GetMatchAddresses(ctx, match) + err = k.TryHandleMatchOutcome(ctx, match) if err != nil { return nil, err } - if msg.Outcome == types.Outcome_Aborted { - err = k.DistributeCoins(ctx, &match, msg.Outcome) - if err != nil { - return nil, err - } - k.ReportServerMatch(ctx, msg.Creator, 1, true) - } - - k.Matches.Set(ctx, matchId, &match) + k.Matches.Set(ctx, msg.MatchId, match) return &types.MsgReportMatchResponse{}, nil } diff --git a/x/cardchain/keeper/msg_server_vote_card.go b/x/cardchain/keeper/msg_server_vote_card.go index 4355e813..31d83d1e 100644 --- a/x/cardchain/keeper/msg_server_vote_card.go +++ b/x/cardchain/keeper/msg_server_vote_card.go @@ -16,7 +16,7 @@ func (k msgServer) VoteCard(goCtx context.Context, msg *types.MsgVoteCard) (*typ return nil, sdkerrors.Wrap(types.ErrInvalidAccAddress, "Unable to convert to AccAddress") } - k.voteCard(ctx, &voter, msg.CardId, msg.VoteType) + k.voteCard(ctx, &voter, msg.CardId, msg.VoteType, false) k.incVotesAverageBy(ctx, 1) diff --git a/x/cardchain/keeper/voting.go b/x/cardchain/keeper/voting.go index 1a3acfef..e16ac2dc 100644 --- a/x/cardchain/keeper/voting.go +++ b/x/cardchain/keeper/voting.go @@ -9,23 +9,27 @@ import ( "golang.org/x/exp/slices" ) -func (k msgServer) voteCard( +func (k Keeper) voteCard( ctx sdk.Context, voter *User, cardId uint64, voteType string, + ignoreVoteRights bool, ) error { - rightsIndex := slices.IndexFunc(voter.VoteRights, func(s *types.VoteRight) bool { return s.CardId == cardId }) + var rightsIndex int + if !ignoreVoteRights { + rightsIndex = slices.IndexFunc(voter.VoteRights, func(s *types.VoteRight) bool { return s.CardId == cardId }) - // check if voting rights are true - if rightsIndex < 0 { - return sdkerrors.Wrap(types.ErrVoterHasNoVotingRights, "No Voting Rights") - } + // check if voting rights are true + if rightsIndex < 0 { + return sdkerrors.Wrap(types.ErrVoterHasNoVotingRights, "No Voting Rights") + } - //check if voting rights are timed out - if ctx.BlockHeight() > (voter.VoteRights)[rightsIndex].ExpireBlock { - k.RemoveVoteRight(ctx, voter, rightsIndex) - return sdkerrors.Wrap(types.ErrVoteRightIsExpired, "Voting Right has expired") + //check if voting rights are timed out + if ctx.BlockHeight() > (voter.VoteRights)[rightsIndex].ExpireBlock { + k.RemoveVoteRight(ctx, voter, rightsIndex) + return sdkerrors.Wrap(types.ErrVoteRightIsExpired, "Voting Right has expired") + } } // if the vote right is valid, get the Card @@ -64,15 +68,33 @@ func (k msgServer) voteCard( amount := k.GetVoteReward(ctx) k.MintCoinsToAddr(ctx, voter.Addr, sdk.Coins{amount}) k.SubPoolCredits(ctx, BalancersPoolKey, amount) - k.RemoveVoteRight(ctx, voter, rightsIndex) - + if !ignoreVoteRights { + k.RemoveVoteRight(ctx, voter, rightsIndex) + } + k.Cards.Set(ctx, cardId, card) return nil } -func (k msgServer) incVotesAverageBy(ctx sdk.Context, n int64) { +func (k Keeper) incVotesAverageBy(ctx sdk.Context, n int64) { votes := k.RunningAverages.Get(ctx, Votes24ValueKey) votes.Arr[len(votes.Arr)-1] += n k.RunningAverages.Set(ctx, Votes24ValueKey, votes) } + +func (k Keeper) multiVote(ctx sdk.Context, voter *User, votes []*types.SingleVote, ignoreVotingRights bool) error { + var n = 0 + + for i, vote := range votes { + err := k.voteCard(ctx, voter, vote.CardId, vote.VoteType, ignoreVotingRights) + if err != nil { + return err + } + n = i + } + + k.incVotesAverageBy(ctx, int64(n+1)) + + return nil +} diff --git a/x/cardchain/module_simulation.go b/x/cardchain/module_simulation.go index 1bd2b4e8..6d1222c6 100644 --- a/x/cardchain/module_simulation.go +++ b/x/cardchain/module_simulation.go @@ -188,6 +188,10 @@ const ( // TODO: Determine the simulation weight value defaultWeightMsgMultiVoteCard int = 100 + opWeightMsgMsgOpenMatch = "op_weight_msg_msg_open_match" + // TODO: Determine the simulation weight value + defaultWeightMsgMsgOpenMatch int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -672,6 +676,17 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp cardchainsimulation.SimulateMsgMultiVoteCard(am.accountKeeper, am.bankKeeper, am.keeper), )) + var weightMsgMsgOpenMatch int + simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgMsgOpenMatch, &weightMsgMsgOpenMatch, nil, + func(_ *rand.Rand) { + weightMsgMsgOpenMatch = defaultWeightMsgMsgOpenMatch + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgMsgOpenMatch, + cardchainsimulation.SimulateMsgMsgOpenMatch(am.accountKeeper, am.bankKeeper, am.keeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations diff --git a/x/cardchain/simulation/msg_open_match.go b/x/cardchain/simulation/msg_open_match.go new file mode 100644 index 00000000..41870fbe --- /dev/null +++ b/x/cardchain/simulation/msg_open_match.go @@ -0,0 +1,29 @@ +package simulation + +import ( + "math/rand" + + "github.com/DecentralCardGame/Cardchain/x/cardchain/keeper" + "github.com/DecentralCardGame/Cardchain/x/cardchain/types" + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func SimulateMsgMsgOpenMatch( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgMsgOpenMatch{ + Creator: simAccount.Address.String(), + } + + // TODO: Handling the MsgOpenMatch simulation + + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "MsgOpenMatch simulation not implemented"), nil, nil + } +} diff --git a/x/cardchain/types/codec.go b/x/cardchain/types/codec.go index 7bbddfba..e156875d 100644 --- a/x/cardchain/types/codec.go +++ b/x/cardchain/types/codec.go @@ -53,6 +53,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgSetUserWebsite{}, "cardchain/SetUserWebsite", nil) cdc.RegisterConcrete(&MsgSetUserBiography{}, "cardchain/SetUserBiography", nil) cdc.RegisterConcrete(&MsgMultiVoteCard{}, "cardchain/MultiVoteCard", nil) + cdc.RegisterConcrete(&MsgMsgOpenMatch{}, "cardchain/MsgOpenMatch", nil) // this line is used by starport scaffolding # 2 } @@ -189,6 +190,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgMultiVoteCard{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgMsgOpenMatch{}, + ) // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/cardchain/types/errors.go b/x/cardchain/types/errors.go index 709793db..96829a2a 100644 --- a/x/cardchain/types/errors.go +++ b/x/cardchain/types/errors.go @@ -30,4 +30,5 @@ var ( ErrBoosterPack = sdkerrors.Register(ModuleName, 20, "Unable to open Boosterpack") ErrStringLength = sdkerrors.Register(ModuleName, 21, "String literal too long") ErrUserAlreadyExists = sdkerrors.Register(ModuleName, 22, "User already exists") + ErrWaitingForPlayers = sdkerrors.Register(ModuleName, 23, "Waiting for players") ) diff --git a/x/cardchain/types/match.pb.go b/x/cardchain/types/match.pb.go index c66361b5..7e0ec77b 100644 --- a/x/cardchain/types/match.pb.go +++ b/x/cardchain/types/match.pb.go @@ -22,6 +22,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type Outcome int32 + +const ( + Outcome_AWon Outcome = 0 + Outcome_BWon Outcome = 1 + Outcome_Draw Outcome = 2 + Outcome_Aborted Outcome = 3 +) + +var Outcome_name = map[int32]string{ + 0: "AWon", + 1: "BWon", + 2: "Draw", + 3: "Aborted", +} + +var Outcome_value = map[string]int32{ + "AWon": 0, + "BWon": 1, + "Draw": 2, + "Aborted": 3, +} + +func (x Outcome) String() string { + return proto.EnumName(Outcome_name, int32(x)) +} + +func (Outcome) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f49b609716516c9f, []int{0} +} + type Match struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Reporter string `protobuf:"bytes,2,opt,name=reporter,proto3" json:"reporter,omitempty"` @@ -29,6 +60,7 @@ type Match struct { PlayerB *MatchPlayer `protobuf:"bytes,4,opt,name=playerB,proto3" json:"playerB,omitempty"` Outcome Outcome `protobuf:"varint,7,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` CoinsDistributed bool `protobuf:"varint,10,opt,name=coinsDistributed,proto3" json:"coinsDistributed,omitempty"` + ServerConfirmed bool `protobuf:"varint,8,opt,name=serverConfirmed,proto3" json:"serverConfirmed,omitempty"` } func (m *Match) Reset() { *m = Match{} } @@ -106,11 +138,20 @@ func (m *Match) GetCoinsDistributed() bool { return false } +func (m *Match) GetServerConfirmed() bool { + if m != nil { + return m.ServerConfirmed + } + return false +} + type MatchPlayer struct { - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - PlayedCards []uint64 `protobuf:"varint,2,rep,packed,name=playedCards,proto3" json:"playedCards,omitempty"` - Confirmed bool `protobuf:"varint,3,opt,name=confirmed,proto3" json:"confirmed,omitempty"` - Outcome Outcome `protobuf:"varint,4,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` + Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + PlayedCards []uint64 `protobuf:"varint,2,rep,packed,name=playedCards,proto3" json:"playedCards,omitempty"` + Confirmed bool `protobuf:"varint,3,opt,name=confirmed,proto3" json:"confirmed,omitempty"` + Outcome Outcome `protobuf:"varint,4,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` + Deck []uint64 `protobuf:"varint,5,rep,packed,name=deck,proto3" json:"deck,omitempty"` + VotedCards []*SingleVote `protobuf:"bytes,6,rep,name=votedCards,proto3" json:"votedCards,omitempty"` } func (m *MatchPlayer) Reset() { *m = MatchPlayer{} } @@ -174,7 +215,22 @@ func (m *MatchPlayer) GetOutcome() Outcome { return Outcome_AWon } +func (m *MatchPlayer) GetDeck() []uint64 { + if m != nil { + return m.Deck + } + return nil +} + +func (m *MatchPlayer) GetVotedCards() []*SingleVote { + if m != nil { + return m.VotedCards + } + return nil +} + func init() { + proto.RegisterEnum("DecentralCardGame.cardchain.cardchain.Outcome", Outcome_name, Outcome_value) proto.RegisterType((*Match)(nil), "DecentralCardGame.cardchain.cardchain.Match") proto.RegisterType((*MatchPlayer)(nil), "DecentralCardGame.cardchain.cardchain.MatchPlayer") } @@ -182,29 +238,35 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/match.proto", fileDescriptor_f49b609716516c9f) } var fileDescriptor_f49b609716516c9f = []byte{ - // 344 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xc1, 0x6a, 0x32, 0x31, - 0x14, 0x85, 0x8d, 0xce, 0xff, 0xab, 0x11, 0x4a, 0xc9, 0x2a, 0x88, 0x4c, 0x83, 0x50, 0x18, 0xba, - 0x88, 0x60, 0x37, 0xdd, 0x56, 0x85, 0x76, 0xd1, 0xd2, 0x92, 0x65, 0x77, 0x31, 0x49, 0x6b, 0xc0, - 0x4c, 0x86, 0x4c, 0x04, 0x7d, 0x8b, 0xbe, 0x47, 0x5f, 0xa4, 0x4b, 0xa1, 0x9b, 0x2e, 0x8b, 0xbe, - 0x48, 0x31, 0xa2, 0x33, 0x60, 0x17, 0x82, 0xbb, 0x9b, 0x43, 0xee, 0x97, 0x73, 0x6f, 0x0e, 0xbc, - 0x10, 0xdc, 0x49, 0x31, 0xe1, 0x3a, 0xed, 0x15, 0x95, 0xe1, 0x5e, 0x4c, 0x68, 0xe6, 0xac, 0xb7, - 0xe8, 0x72, 0xa4, 0x84, 0x4a, 0xbd, 0xe3, 0xd3, 0x21, 0x77, 0xf2, 0x8e, 0x1b, 0x45, 0xf7, 0x17, - 0x8b, 0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0xeb, 0xb8, 0xf2, 0xbd, 0x8e, 0x2b, 0x2f, - 0x37, 0x6f, 0xda, 0x4f, 0x66, 0x63, 0x2a, 0xac, 0xe9, 0x1d, 0xc0, 0x7b, 0xc3, 0x7d, 0x9c, 0xe6, - 0xe5, 0x68, 0x2d, 0x32, 0x95, 0x8f, 0xff, 0x87, 0x78, 0x5d, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, - 0xb4, 0x35, 0xe3, 0xdb, 0xc6, 0x02, 0x00, 0x00, + // 439 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x8b, 0xd3, 0x40, + 0x18, 0xed, 0x24, 0xd9, 0x4d, 0xfb, 0x05, 0xb4, 0xcc, 0x29, 0x2c, 0x12, 0xe3, 0x82, 0x10, 0xf6, + 0x90, 0x62, 0xf5, 0xe0, 0xb5, 0x3f, 0x40, 0x0f, 0x8a, 0x3a, 0x82, 0x82, 0xb7, 0xe9, 0xcc, 0x67, + 0x3b, 0xd8, 0x64, 0xc2, 0x64, 0xba, 0xba, 0xff, 0x85, 0xf8, 0x57, 0x79, 0xdc, 0xa3, 0x47, 0x69, + 0xff, 0x0e, 0x41, 0x32, 0xbb, 0xdb, 0x04, 0xd7, 0x43, 0x61, 0x6f, 0x2f, 0x8f, 0xf9, 0xde, 0x7b, + 0xf9, 0x7e, 0xc0, 0x43, 0xc1, 0x8d, 0x14, 0x2b, 0xae, 0xca, 0x51, 0x8b, 0x0a, 0x6e, 0xc5, 0x2a, + 0xaf, 0x8c, 0xb6, 0x9a, 0x3e, 0x9e, 0xa3, 0xc0, 0xd2, 0x1a, 0xbe, 0x9e, 0x71, 0x23, 0x5f, 0xf0, + 0x02, 0xf3, 0xfd, 0xc3, 0x16, 0x9d, 0x3c, 0xfa, 0x9f, 0xce, 0xb9, 0xb6, 0xa8, 0xca, 0xe5, 0x95, + 0xd2, 0xe9, 0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x2e, 0x82, 0xc3, 0xf4, 0x1d, 0x40, 0xb3, 0x52, + 0xd7, 0xe1, 0x8e, 0x53, 0x3f, 0x8b, 0xc6, 0x4f, 0x0e, 0x34, 0x78, 0xaf, 0xca, 0xe5, 0x1a, 0x3f, + 0x68, 0x8b, 0xac, 0x23, 0x72, 0xf6, 0x0c, 0xc2, 0x6b, 0x6b, 0xda, 0x87, 0x60, 0xf2, 0x51, 0x97, + 0xc3, 0x5e, 0x83, 0xa6, 0x0d, 0x22, 0x0d, 0x9a, 0x1b, 0xfe, 0x75, 0xe8, 0xd1, 0x08, 0xc2, 0xc9, + 0xa2, 0x59, 0x42, 0x39, 0xf4, 0xa7, 0xec, 0xe7, 0x36, 0x21, 0x97, 0xdb, 0x84, 0xfc, 0xde, 0x26, + 0xe4, 0xfb, 0x2e, 0xe9, 0x5d, 0xee, 0x92, 0xde, 0xaf, 0x5d, 0xd2, 0xfb, 0xf4, 0x7c, 0xa9, 0xec, + 0x6a, 0xb3, 0xc8, 0x85, 0x2e, 0x46, 0xb7, 0x82, 0x8d, 0x66, 0xfb, 0xd3, 0xf8, 0xd6, 0x39, 0x13, + 0x7b, 0x51, 0x61, 0xbd, 0x38, 0x76, 0x57, 0xf2, 0xf4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, + 0xf7, 0x67, 0x02, 0x92, 0x03, 0x00, 0x00, } func (m *Match) Marshal() (dAtA []byte, err error) { @@ -237,6 +299,16 @@ func (m *Match) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x50 } + if m.ServerConfirmed { + i-- + if m.ServerConfirmed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } if m.Outcome != 0 { i = encodeVarintMatch(dAtA, i, uint64(m.Outcome)) i-- @@ -301,6 +373,38 @@ func (m *MatchPlayer) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VotedCards) > 0 { + for iNdEx := len(m.VotedCards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VotedCards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMatch(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Deck) > 0 { + dAtA4 := make([]byte, len(m.Deck)*10) + var j3 int + for _, num := range m.Deck { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintMatch(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x2a + } if m.Outcome != 0 { i = encodeVarintMatch(dAtA, i, uint64(m.Outcome)) i-- @@ -317,20 +421,20 @@ func (m *MatchPlayer) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x18 } if len(m.PlayedCards) > 0 { - dAtA4 := make([]byte, len(m.PlayedCards)*10) - var j3 int + dAtA6 := make([]byte, len(m.PlayedCards)*10) + var j5 int for _, num := range m.PlayedCards { for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j5++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA6[j5] = uint8(num) + j5++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintMatch(dAtA, i, uint64(j3)) + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintMatch(dAtA, i, uint64(j5)) i-- dAtA[i] = 0x12 } @@ -379,6 +483,9 @@ func (m *Match) Size() (n int) { if m.Outcome != 0 { n += 1 + sovMatch(uint64(m.Outcome)) } + if m.ServerConfirmed { + n += 2 + } if m.CoinsDistributed { n += 2 } @@ -408,6 +515,19 @@ func (m *MatchPlayer) Size() (n int) { if m.Outcome != 0 { n += 1 + sovMatch(uint64(m.Outcome)) } + if len(m.Deck) > 0 { + l = 0 + for _, e := range m.Deck { + l += sovMatch(uint64(e)) + } + n += 1 + sovMatch(uint64(l)) + l + } + if len(m.VotedCards) > 0 { + for _, e := range m.VotedCards { + l = e.Size() + n += 1 + l + sovMatch(uint64(l)) + } + } return n } @@ -588,6 +708,26 @@ func (m *Match) Unmarshal(dAtA []byte) error { break } } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerConfirmed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ServerConfirmed = bool(v != 0) case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CoinsDistributed", wireType) @@ -805,6 +945,116 @@ func (m *MatchPlayer) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Deck = append(m.Deck, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMatch + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Deck) == 0 { + m.Deck = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Deck = append(m.Deck, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Deck", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotedCards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatch + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMatch + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMatch + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VotedCards = append(m.VotedCards, &SingleVote{}) + if err := m.VotedCards[len(m.VotedCards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMatch(dAtA[iNdEx:]) diff --git a/x/cardchain/types/message_msg_open_match.go b/x/cardchain/types/message_msg_open_match.go new file mode 100644 index 00000000..3fa52797 --- /dev/null +++ b/x/cardchain/types/message_msg_open_match.go @@ -0,0 +1,45 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgMsgOpenMatch = "msg_open_match" + +var _ sdk.Msg = &MsgMsgOpenMatch{} + +func NewMsgMsgOpenMatch(creator string) *MsgMsgOpenMatch { + return &MsgMsgOpenMatch{ + Creator: creator, + } +} + +func (msg *MsgMsgOpenMatch) Route() string { + return RouterKey +} + +func (msg *MsgMsgOpenMatch) Type() string { + return TypeMsgMsgOpenMatch +} + +func (msg *MsgMsgOpenMatch) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgMsgOpenMatch) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgMsgOpenMatch) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/cardchain/types/message_msg_open_match_test.go b/x/cardchain/types/message_msg_open_match_test.go new file mode 100644 index 00000000..3cb57694 --- /dev/null +++ b/x/cardchain/types/message_msg_open_match_test.go @@ -0,0 +1,40 @@ +package types + +import ( + "testing" + + "github.com/DecentralCardGame/Cardchain/testutil/sample" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgMsgOpenMatch_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgMsgOpenMatch + err error + }{ + { + name: "invalid address", + msg: MsgMsgOpenMatch{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgMsgOpenMatch{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/cardchain/types/message_report_match.go b/x/cardchain/types/message_report_match.go index 75d88028..ecf42e32 100644 --- a/x/cardchain/types/message_report_match.go +++ b/x/cardchain/types/message_report_match.go @@ -9,14 +9,13 @@ const TypeMsgReportMatch = "report_match" var _ sdk.Msg = &MsgReportMatch{} -func NewMsgReportMatch(creator string, playerA string, playerB string, cardsA []uint64, cardsB []uint64, outcome Outcome) *MsgReportMatch { +func NewMsgReportMatch(creator string, matchId uint64, cardsA []uint64, cardsB []uint64, outcome Outcome) *MsgReportMatch { return &MsgReportMatch{ - Creator: creator, - PlayerA: playerA, - PlayerB: playerB, - CardsA: cardsA, - CardsB: cardsB, - Outcome: outcome, + Creator: creator, + MatchId: matchId, + PlayedCardsA: cardsA, + PlayedCardsB: cardsB, + Outcome: outcome, } } diff --git a/x/cardchain/types/params.go b/x/cardchain/types/params.go index 2de707dc..1a2ffc20 100644 --- a/x/cardchain/types/params.go +++ b/x/cardchain/types/params.go @@ -12,6 +12,8 @@ import ( var _ paramtypes.ParamSet = (*Params)(nil) +const DefaultMatchWorkerDelay = 20 * 60 + // ParamKeyTable the param key table for launch module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) @@ -40,6 +42,7 @@ func NewParams() Params { CardAuctionPriceReductionPeriod: 20, AirDropValue: sdk.NewInt64Coin("ubpf", int64(5*math.Pow(10, 6))), AirDropMaxBlockHeight: 5000000, + MatchWorkerDelay: DefaultMatchWorkerDelay, } } @@ -71,6 +74,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair([]byte("CardAuctionPriceReductionPeriod"), &p.CardAuctionPriceReductionPeriod, validateCardAuctionPriceReductionPeriod), paramtypes.NewParamSetPair([]byte("AirDropValue"), &p.AirDropValue, validateAirDropValue), paramtypes.NewParamSetPair([]byte("AirDropMaxBlockHeight"), &p.AirDropMaxBlockHeight, validateAirDropMaxBlockHeight), + paramtypes.NewParamSetPair([]byte("MatchWorkerDelay"), &p.MatchWorkerDelay, validateMatchWorkerDelay), } } @@ -291,3 +295,11 @@ func validateInflationRate(i interface{}) error { } return nil } + +func validateMatchWorkerDelay(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} diff --git a/x/cardchain/types/params.pb.go b/x/cardchain/types/params.pb.go index dee58010..c0a665ed 100644 --- a/x/cardchain/types/params.pb.go +++ b/x/cardchain/types/params.pb.go @@ -46,6 +46,7 @@ type Params struct { TrialVoteReward github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,19,opt,name=trialVoteReward,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"trialVoteReward"` VotePoolFraction int64 `protobuf:"varint,20,opt,name=votePoolFraction,proto3" json:"votePoolFraction,omitempty"` VotingRewardCap int64 `protobuf:"varint,8,opt,name=votingRewardCap,proto3" json:"votingRewardCap,omitempty"` + MatchWorkerDelay uint64 `protobuf:"varint,21,opt,name=matchWorkerDelay,proto3" json:"matchWorkerDelay,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -178,6 +179,13 @@ func (m *Params) GetVotingRewardCap() int64 { return 0 } +func (m *Params) GetMatchWorkerDelay() uint64 { + if m != nil { + return m.MatchWorkerDelay + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "DecentralCardGame.cardchain.cardchain.Params") } @@ -185,44 +193,45 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/params.proto", fileDescriptor_8843e481ee664a23) } var fileDescriptor_8843e481ee664a23 = []byte{ - // 590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0xbf, 0xf6, 0x2b, 0x64, 0x9a, 0x36, 0xed, 0xd0, 0x8a, 0x51, 0x17, 0x4e, 0x54, 0xf1, - 0x13, 0x21, 0x11, 0x2f, 0x60, 0x51, 0xb1, 0x40, 0x6a, 0x1c, 0x42, 0x37, 0x48, 0x96, 0x8b, 0x2a, - 0x81, 0xc4, 0x62, 0x3a, 0xbe, 0x38, 0xa3, 0xd8, 0x1e, 0x6b, 0x3c, 0x4e, 0x53, 0x9e, 0x82, 0x25, - 0x4b, 0x9e, 0x82, 0x67, 0xe8, 0xb2, 0x4b, 0xc4, 0xa2, 0x42, 0xc9, 0x8b, 0xa0, 0x99, 0x84, 0x24, - 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0xb2, - 0x2d, 0x45, 0x7a, 0x46, 0xa3, 0x1c, 0xc8, 0xee, 0x8a, 0x45, 0x98, 0x17, 0xc1, 0xcf, 0xd1, 0xfe, - 0xe4, 0xfd, 0x0d, 0x1d, 0xb4, 0x22, 0xc1, 0x7a, 0x27, 0xa0, 0x07, 0x95, 0x60, 0x63, 0xea, 0xf6, - 0x4b, 0x3d, 0x8e, 0xe6, 0x4f, 0x98, 0x34, 0xc7, 0x6d, 0x73, 0x6f, 0xc5, 0x71, 0x5c, 0xd0, 0xd1, - 0x35, 0xea, 0x0b, 0x05, 0x9e, 0x10, 0x51, 0x47, 0x52, 0x93, 0x3f, 0xd9, 0x33, 0x5e, 0x96, 0x70, - 0xdc, 0x40, 0xd5, 0xc9, 0x6e, 0x31, 0xb1, 0x2e, 0x4d, 0xc9, 0x5d, 0x43, 0x5d, 0x84, 0x5f, 0xac, - 0x7f, 0xf9, 0x5a, 0x2b, 0xb5, 0xfc, 0xab, 0xa1, 0x6d, 0x5d, 0x0f, 0x6d, 0xeb, 0xe7, 0xd0, 0xb6, - 0x3e, 0x8f, 0xec, 0xd2, 0xf5, 0xc8, 0x2e, 0x7d, 0x1f, 0xd9, 0xa5, 0xf7, 0x47, 0x73, 0x7e, 0x97, - 0x56, 0xa3, 0xe3, 0x4e, 0x97, 0xe8, 0x60, 0x6e, 0xa1, 0x9a, 0x2c, 0xce, 0x37, 0xcc, 0x4e, 0x7c, - 0xf6, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xe5, 0x71, 0xe5, 0x74, 0x05, 0x00, 0x00, + // 606 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0x8e, 0xdf, 0xf6, 0x2d, 0x74, 0xfb, 0xbd, 0xb4, 0x62, 0xd5, 0x83, 0x13, 0x55, 0x7c, 0x44, + 0x48, 0x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74, 0xa7, 0x3c, 0x69, 0x71, 0x99, 0x7a, 0x5c, + 0x16, 0xa9, 0x2c, 0x06, 0x9f, 0xa7, 0x45, 0xd4, 0xf5, 0xf4, 0x45, 0x8e, 0x45, 0xcb, 0x97, 0x22, + 0x0b, 0x27, 0x75, 0xe8, 0x2e, 0xb9, 0x0f, 0x5c, 0x8b, 0x53, 0xf4, 0x87, 0x86, 0x62, 0x2f, 0x95, + 0x65, 0xa6, 0xd9, 0xbc, 0x8d, 0xe5, 0x4f, 0x66, 0x8a, 0x64, 0x6b, 0x24, 0xe6, 0x2b, 0xb4, 0x69, + 0x1d, 0x20, 0xb2, 0xff, 0x67, 0x0b, 0xed, 0x76, 0x35, 0xfa, 0x91, 0x6c, 0x18, 0x03, 0x68, 0x54, + 0x90, 0xb4, 0x31, 0x97, 0x85, 0xd0, 0x6c, 0x61, 0xb6, 0x2b, 0xa6, 0x95, 0xe8, 0x0e, 0x59, 0x3e, + 0x13, 0x59, 0x86, 0x2a, 0xc4, 0x33, 0x50, 0x11, 0xbb, 0x63, 0x8b, 0x56, 0xc1, 0xe8, 0x11, 0x59, + 0xee, 0xc8, 0x52, 0x25, 0x17, 0x07, 0x50, 0x72, 0xd4, 0x6c, 0x71, 0xb6, 0xdb, 0x2b, 0x22, 0xf4, + 0x01, 0x59, 0x11, 0xd9, 0xa7, 0xc4, 0xe6, 0x19, 0x82, 0x46, 0x46, 0x8c, 0x6a, 0x58, 0x05, 0x4d, + 0x78, 0x0a, 0x14, 0x16, 0x01, 0xaa, 0x00, 0x78, 0x97, 0x2d, 0xd9, 0x9a, 0x54, 0xb0, 0x7e, 0x17, + 0xa5, 0xa9, 0xcc, 0x86, 0xac, 0xe5, 0xdf, 0x5d, 0x34, 0x8e, 0xd2, 0x27, 0x64, 0xbd, 0xcc, 0xfc, + 0x2a, 0x73, 0xc5, 0x32, 0xa7, 0x70, 0xda, 0x20, 0x4b, 0x5a, 0x09, 0x48, 0x02, 0x54, 0x42, 0x46, + 0x6c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0x8f, 0x2d, 0x5f, 0x9b, 0xf1, 0xc9, 0x82, 0xdd, 0x9f, 0xcf, + 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xbd, 0x26, 0x57, 0xa0, 0x05, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -245,6 +254,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MatchWorkerDelay != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MatchWorkerDelay)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } if m.VotePoolFraction != 0 { i = encodeVarintParams(dAtA, i, uint64(m.VotePoolFraction)) i-- @@ -462,6 +478,9 @@ func (m *Params) Size() (n int) { if m.VotePoolFraction != 0 { n += 2 + sovParams(uint64(m.VotePoolFraction)) } + if m.MatchWorkerDelay != 0 { + n += 2 + sovParams(uint64(m.MatchWorkerDelay)) + } return n } @@ -983,6 +1002,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchWorkerDelay", wireType) + } + m.MatchWorkerDelay = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MatchWorkerDelay |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/cardchain/types/query.pb.go b/x/cardchain/types/query.pb.go index 3bb6a2c0..89854075 100644 --- a/x/cardchain/types/query.pb.go +++ b/x/cardchain/types/query.pb.go @@ -1692,137 +1692,136 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/query.proto", fileDescriptor_e1bdbfeb9d7f6cfd) } var fileDescriptor_e1bdbfeb9d7f6cfd = []byte{ - // 2072 bytes of a gzipped FileDescriptorProto + // 2063 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0x14, 0x45, 0x8e, 0x3e, 0x40, 0x4f, 0x5d, 0x97, 0x65, 0x0c, 0x59, 0x5d, 0x38, - 0xad, 0x9a, 0x44, 0x5c, 0x47, 0xb1, 0x1d, 0xc5, 0xb1, 0xf5, 0x1d, 0x37, 0x6a, 0xfc, 0xa5, 0x55, - 0x62, 0x14, 0xed, 0x41, 0x58, 0x72, 0xc7, 0xd4, 0x22, 0xe4, 0x0e, 0xbd, 0xb3, 0x2b, 0x87, 0x10, + 0x15, 0xd7, 0x52, 0x14, 0x45, 0x8e, 0x3e, 0x40, 0x4f, 0x5d, 0x97, 0x65, 0x0c, 0x59, 0x19, 0x38, + 0xad, 0x9b, 0x44, 0x5c, 0x47, 0xb1, 0x1d, 0xc5, 0xb1, 0xf5, 0x1d, 0x37, 0x6a, 0xfc, 0xa5, 0x55, + 0x62, 0x14, 0xed, 0x41, 0x58, 0x72, 0xc7, 0xd4, 0x22, 0xe4, 0x0e, 0xbd, 0x33, 0x2b, 0x85, 0x10, 0x78, 0x68, 0xff, 0x82, 0xa2, 0xfd, 0x13, 0xda, 0x7b, 0x81, 0xb4, 0xc8, 0xad, 0x68, 0x8f, 0x3e, - 0x1a, 0x28, 0x0a, 0xa4, 0x39, 0x18, 0x85, 0x5d, 0xb4, 0xc7, 0xf6, 0xd4, 0x73, 0x30, 0x6f, 0x66, - 0x76, 0x67, 0x49, 0xda, 0xde, 0xa5, 0x4f, 0xda, 0x79, 0xf3, 0xde, 0x9b, 0xf7, 0x9b, 0xf7, 0xe6, - 0x37, 0xf3, 0x28, 0x74, 0xa1, 0xe5, 0x04, 0x6e, 0xeb, 0xd8, 0xf1, 0x7c, 0x2b, 0xf9, 0x7a, 0x18, - 0x91, 0xa0, 0xdf, 0xe8, 0x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f9, + 0x92, 0x46, 0xb4, 0x87, 0x03, 0x0f, 0x7b, 0xd5, 0x22, 0xd7, 0xd1, 0x74, 0x83, 0x00, 0x7b, 0xd5, + 0x19, 0xb8, 0x08, 0x80, 0xfc, 0x3e, 0x20, 0x24, 0xa8, 0x96, 0x20, 0x04, 0x8b, 0x72, 0xfd, 0x00, + 0x87, 0x7d, 0x41, 0x9b, 0x85, 0x65, 0x50, 0x0c, 0x48, 0x80, 0xab, 0x65, 0x38, 0x0f, 0xca, 0xbd, + 0x8e, 0xdb, 0xe7, 0x61, 0x58, 0xad, 0x70, 0xd9, 0x28, 0x88, 0xd7, 0x00, 0xbd, 0xaf, 0x6a, 0xca, + 0x7e, 0x3a, 0x44, 0xcf, 0x83, 0x8a, 0xc8, 0x27, 0xb7, 0x7d, 0xca, 0x53, 0x31, 0x4f, 0x44, 0x09, + 0x01, 0x35, 0x74, 0x94, 0xdc, 0xe1, 0xf9, 0xc4, 0x78, 0x0f, 0x22, 0xbf, 0xa8, 0x94, 0x5f, 0x74, + 0xf4, 0x12, 0xdd, 0x04, 0xdf, 0x53, 0x87, 0xc4, 0x59, 0x4c, 0x0b, 0x21, 0x30, 0x9f, 0x94, 0xe1, + 0x58, 0x32, 0x45, 0x43, 0xd7, 0xc1, 0x39, 0x29, 0x7e, 0xa0, 0xb3, 0x92, 0x96, 0x5e, 0x06, 0x73, + 0x71, 0xa6, 0x8a, 0x85, 0x4d, 0x12, 0xba, 0x02, 0xce, 0xea, 0xa3, 0x45, 0x9e, 0xd2, 0x92, 0x1c, + 0xa0, 0xa4, 0xc4, 0x72, 0x09, 0x01, 0x7d, 0x5b, 0xd0, 0x62, 0x77, 0x64, 0xc6, 0xd4, 0x62, 0x17, + 0xc1, 0x02, 0xf3, 0xbb, 0x98, 0x32, 0xb7, 0xdb, 0xdb, 0x25, 0x27, 0x81, 0x12, 0x4d, 0x13, 0xb9, + 0x59, 0x31, 0xe1, 0xf3, 0x9e, 0x78, 0x1e, 0x45, 0xc7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, 0xa9, 0x39, 0xe9, 0x0d, 0xe0, 0xff, 0x2c, 0x00, 0x47, + 0xa7, 0x1f, 0xf8, 0x71, 0x1e, 0x73, 0x5f, 0x38, 0x83, 0xd5, 0x6f, 0xbd, 0xae, 0x1a, 0x85, 0x7d, + 0x5f, 0x60, 0xff, 0x14, 0xee, 0x65, 0xc4, 0x1e, 0x0a, 0x55, 0x87, 0x9e, 0xa1, 0x6b, 0x28, 0x79, + 0x6f, 0x3b, 0x8f, 0x9f, 0x2d, 0x59, 0x4f, 0x9e, 0x2d, 0x59, 0xff, 0x78, 0xb6, 0x64, 0xfd, 0xea, + 0xf9, 0xd2, 0xd4, 0x93, 0xe7, 0x4b, 0x53, 0xdf, 0x3c, 0x5f, 0x9a, 0xfa, 0xd9, 0x9a, 0xf1, 0x8f, + 0x9a, 0x97, 0x1d, 0xf7, 0xa5, 0xf9, 0xaf, 0xb9, 0x7e, 0x0f, 0xd3, 0x66, 0x49, 0xfc, 0x76, 0xfb, + 0xfe, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x89, 0xad, 0x33, 0xb7, 0x9d, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cardchain/types/tx.pb.go b/x/cardchain/types/tx.pb.go index 35891b12..b3edc621 100644 --- a/x/cardchain/types/tx.pb.go +++ b/x/cardchain/types/tx.pb.go @@ -30,37 +30,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Outcome int32 - -const ( - Outcome_AWon Outcome = 0 - Outcome_BWon Outcome = 1 - Outcome_Draw Outcome = 2 - Outcome_Aborted Outcome = 3 -) - -var Outcome_name = map[int32]string{ - 0: "AWon", - 1: "BWon", - 2: "Draw", - 3: "Aborted", -} - -var Outcome_value = map[string]int32{ - "AWon": 0, - "BWon": 1, - "Draw": 2, - "Aborted": 3, -} - -func (x Outcome) String() string { - return proto.EnumName(Outcome_name, int32(x)) -} - -func (Outcome) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3b4a3aba0ac94bc8, []int{0} -} - type MsgCreateuser struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` NewUser string `protobuf:"bytes,2,opt,name=newUser,proto3" json:"newUser,omitempty"` @@ -1043,12 +1012,11 @@ func (m *MsgRegisterForCouncilResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterForCouncilResponse proto.InternalMessageInfo type MsgReportMatch struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - PlayerA string `protobuf:"bytes,2,opt,name=playerA,proto3" json:"playerA,omitempty"` - PlayerB string `protobuf:"bytes,3,opt,name=playerB,proto3" json:"playerB,omitempty"` - CardsA []uint64 `protobuf:"varint,5,rep,packed,name=cardsA,proto3" json:"cardsA,omitempty"` - CardsB []uint64 `protobuf:"varint,6,rep,packed,name=cardsB,proto3" json:"cardsB,omitempty"` - Outcome Outcome `protobuf:"varint,7,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + MatchId uint64 `protobuf:"varint,2,opt,name=matchId,proto3" json:"matchId,omitempty"` + PlayedCardsA []uint64 `protobuf:"varint,3,rep,packed,name=playedCardsA,proto3" json:"playedCardsA,omitempty"` + PlayedCardsB []uint64 `protobuf:"varint,4,rep,packed,name=playedCardsB,proto3" json:"playedCardsB,omitempty"` + Outcome Outcome `protobuf:"varint,5,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` } func (m *MsgReportMatch) Reset() { *m = MsgReportMatch{} } @@ -1091,30 +1059,23 @@ func (m *MsgReportMatch) GetCreator() string { return "" } -func (m *MsgReportMatch) GetPlayerA() string { - if m != nil { - return m.PlayerA - } - return "" -} - -func (m *MsgReportMatch) GetPlayerB() string { +func (m *MsgReportMatch) GetMatchId() uint64 { if m != nil { - return m.PlayerB + return m.MatchId } - return "" + return 0 } -func (m *MsgReportMatch) GetCardsA() []uint64 { +func (m *MsgReportMatch) GetPlayedCardsA() []uint64 { if m != nil { - return m.CardsA + return m.PlayedCardsA } return nil } -func (m *MsgReportMatch) GetCardsB() []uint64 { +func (m *MsgReportMatch) GetPlayedCardsB() []uint64 { if m != nil { - return m.CardsB + return m.PlayedCardsB } return nil } @@ -3163,9 +3124,10 @@ func (m *MsgRewokeCouncilRegistrationResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRewokeCouncilRegistrationResponse proto.InternalMessageInfo type MsgConfirmMatch struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - MatchId uint64 `protobuf:"varint,2,opt,name=matchId,proto3" json:"matchId,omitempty"` - Outcome Outcome `protobuf:"varint,3,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + MatchId uint64 `protobuf:"varint,2,opt,name=matchId,proto3" json:"matchId,omitempty"` + Outcome Outcome `protobuf:"varint,3,opt,name=outcome,proto3,enum=DecentralCardGame.cardchain.cardchain.Outcome" json:"outcome,omitempty"` + VotedCards []*SingleVote `protobuf:"bytes,4,rep,name=votedCards,proto3" json:"votedCards,omitempty"` } func (m *MsgConfirmMatch) Reset() { *m = MsgConfirmMatch{} } @@ -3222,6 +3184,13 @@ func (m *MsgConfirmMatch) GetOutcome() Outcome { return Outcome_AWon } +func (m *MsgConfirmMatch) GetVotedCards() []*SingleVote { + if m != nil { + return m.VotedCards + } + return nil +} + type MsgConfirmMatchResponse struct { } @@ -3906,58 +3875,6 @@ func (m *MsgSetUserBiographyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetUserBiographyResponse proto.InternalMessageInfo -type SingleVote struct { - CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` - VoteType string `protobuf:"bytes,2,opt,name=voteType,proto3" json:"voteType,omitempty"` -} - -func (m *SingleVote) Reset() { *m = SingleVote{} } -func (m *SingleVote) String() string { return proto.CompactTextString(m) } -func (*SingleVote) ProtoMessage() {} -func (*SingleVote) Descriptor() ([]byte, []int) { - return fileDescriptor_3b4a3aba0ac94bc8, []int{80} -} -func (m *SingleVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SingleVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SingleVote.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SingleVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_SingleVote.Merge(m, src) -} -func (m *SingleVote) XXX_Size() int { - return m.Size() -} -func (m *SingleVote) XXX_DiscardUnknown() { - xxx_messageInfo_SingleVote.DiscardUnknown(m) -} - -var xxx_messageInfo_SingleVote proto.InternalMessageInfo - -func (m *SingleVote) GetCardId() uint64 { - if m != nil { - return m.CardId - } - return 0 -} - -func (m *SingleVote) GetVoteType() string { - if m != nil { - return m.VoteType - } - return "" -} - // this line is used by starport scaffolding # proto/tx/message type MsgMultiVoteCard struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` @@ -3968,7 +3885,7 @@ func (m *MsgMultiVoteCard) Reset() { *m = MsgMultiVoteCard{} } func (m *MsgMultiVoteCard) String() string { return proto.CompactTextString(m) } func (*MsgMultiVoteCard) ProtoMessage() {} func (*MsgMultiVoteCard) Descriptor() ([]byte, []int) { - return fileDescriptor_3b4a3aba0ac94bc8, []int{81} + return fileDescriptor_3b4a3aba0ac94bc8, []int{80} } func (m *MsgMultiVoteCard) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4018,7 +3935,7 @@ func (m *MsgMultiVoteCardResponse) Reset() { *m = MsgMultiVoteCardRespon func (m *MsgMultiVoteCardResponse) String() string { return proto.CompactTextString(m) } func (*MsgMultiVoteCardResponse) ProtoMessage() {} func (*MsgMultiVoteCardResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3b4a3aba0ac94bc8, []int{82} + return fileDescriptor_3b4a3aba0ac94bc8, []int{81} } func (m *MsgMultiVoteCardResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4047,8 +3964,127 @@ func (m *MsgMultiVoteCardResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMultiVoteCardResponse proto.InternalMessageInfo +type MsgMsgOpenMatch struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PlayerA string `protobuf:"bytes,2,opt,name=playerA,proto3" json:"playerA,omitempty"` + PlayerB string `protobuf:"bytes,3,opt,name=playerB,proto3" json:"playerB,omitempty"` + PlayerADeck []uint64 `protobuf:"varint,4,rep,packed,name=playerADeck,proto3" json:"playerADeck,omitempty"` + PlayerBDeck []uint64 `protobuf:"varint,5,rep,packed,name=playerBDeck,proto3" json:"playerBDeck,omitempty"` +} + +func (m *MsgMsgOpenMatch) Reset() { *m = MsgMsgOpenMatch{} } +func (m *MsgMsgOpenMatch) String() string { return proto.CompactTextString(m) } +func (*MsgMsgOpenMatch) ProtoMessage() {} +func (*MsgMsgOpenMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_3b4a3aba0ac94bc8, []int{82} +} +func (m *MsgMsgOpenMatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMsgOpenMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMsgOpenMatch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgMsgOpenMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMsgOpenMatch.Merge(m, src) +} +func (m *MsgMsgOpenMatch) XXX_Size() int { + return m.Size() +} +func (m *MsgMsgOpenMatch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMsgOpenMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMsgOpenMatch proto.InternalMessageInfo + +func (m *MsgMsgOpenMatch) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgMsgOpenMatch) GetPlayerA() string { + if m != nil { + return m.PlayerA + } + return "" +} + +func (m *MsgMsgOpenMatch) GetPlayerB() string { + if m != nil { + return m.PlayerB + } + return "" +} + +func (m *MsgMsgOpenMatch) GetPlayerADeck() []uint64 { + if m != nil { + return m.PlayerADeck + } + return nil +} + +func (m *MsgMsgOpenMatch) GetPlayerBDeck() []uint64 { + if m != nil { + return m.PlayerBDeck + } + return nil +} + +type MsgMsgOpenMatchResponse struct { + MatchId uint64 `protobuf:"varint,1,opt,name=matchId,proto3" json:"matchId,omitempty"` +} + +func (m *MsgMsgOpenMatchResponse) Reset() { *m = MsgMsgOpenMatchResponse{} } +func (m *MsgMsgOpenMatchResponse) String() string { return proto.CompactTextString(m) } +func (*MsgMsgOpenMatchResponse) ProtoMessage() {} +func (*MsgMsgOpenMatchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3b4a3aba0ac94bc8, []int{83} +} +func (m *MsgMsgOpenMatchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMsgOpenMatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMsgOpenMatchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgMsgOpenMatchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMsgOpenMatchResponse.Merge(m, src) +} +func (m *MsgMsgOpenMatchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgMsgOpenMatchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMsgOpenMatchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMsgOpenMatchResponse proto.InternalMessageInfo + +func (m *MsgMsgOpenMatchResponse) GetMatchId() uint64 { + if m != nil { + return m.MatchId + } + return 0 +} + func init() { - proto.RegisterEnum("DecentralCardGame.cardchain.cardchain.Outcome", Outcome_name, Outcome_value) proto.RegisterType((*MsgCreateuser)(nil), "DecentralCardGame.cardchain.cardchain.MsgCreateuser") proto.RegisterType((*MsgCreateuserResponse)(nil), "DecentralCardGame.cardchain.cardchain.MsgCreateuserResponse") proto.RegisterType((*MsgBuyCardScheme)(nil), "DecentralCardGame.cardchain.cardchain.MsgBuyCardScheme") @@ -4129,168 +4165,171 @@ func init() { proto.RegisterType((*MsgSetUserWebsiteResponse)(nil), "DecentralCardGame.cardchain.cardchain.MsgSetUserWebsiteResponse") proto.RegisterType((*MsgSetUserBiography)(nil), "DecentralCardGame.cardchain.cardchain.MsgSetUserBiography") proto.RegisterType((*MsgSetUserBiographyResponse)(nil), "DecentralCardGame.cardchain.cardchain.MsgSetUserBiographyResponse") - proto.RegisterType((*SingleVote)(nil), "DecentralCardGame.cardchain.cardchain.SingleVote") proto.RegisterType((*MsgMultiVoteCard)(nil), "DecentralCardGame.cardchain.cardchain.MsgMultiVoteCard") proto.RegisterType((*MsgMultiVoteCardResponse)(nil), "DecentralCardGame.cardchain.cardchain.MsgMultiVoteCardResponse") + proto.RegisterType((*MsgMsgOpenMatch)(nil), "DecentralCardGame.cardchain.cardchain.MsgMsgOpenMatch") + proto.RegisterType((*MsgMsgOpenMatchResponse)(nil), "DecentralCardGame.cardchain.cardchain.MsgMsgOpenMatchResponse") } func init() { proto.RegisterFile("cardchain/cardchain/tx.proto", fileDescriptor_3b4a3aba0ac94bc8) } var fileDescriptor_3b4a3aba0ac94bc8 = []byte{ - // 2445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5b, 0xcf, 0x8f, 0x1c, 0x47, - 0x15, 0xde, 0xde, 0xd9, 0x5f, 0x7e, 0x6b, 0x1b, 0xd3, 0x71, 0xec, 0x71, 0xdb, 0xde, 0x5d, 0x77, - 0x6c, 0xc7, 0x8a, 0x60, 0x86, 0x5d, 0x42, 0x62, 0x5b, 0x6c, 0xec, 0x99, 0xd9, 0xf5, 0xda, 0x98, - 0xc1, 0x66, 0x76, 0x1d, 0x0b, 0x82, 0x84, 0x7a, 0x7a, 0x6a, 0x67, 0x5b, 0xee, 0xe9, 0x1a, 0xaa, - 0x7b, 0x76, 0xb3, 0x91, 0x90, 0x22, 0x81, 0x10, 0x91, 0x22, 0x40, 0x11, 0x07, 0x24, 0x24, 0x94, - 0x48, 0x48, 0x48, 0x91, 0x90, 0x90, 0x40, 0xe2, 0xc8, 0x35, 0x37, 0x72, 0x8c, 0x38, 0x04, 0x64, - 0x5f, 0xf8, 0x33, 0x50, 0x57, 0x57, 0x57, 0x77, 0xf5, 0x74, 0xcf, 0x74, 0xf5, 0x0c, 0x27, 0x77, - 0xd5, 0xd4, 0xf7, 0xde, 0x57, 0x55, 0xaf, 0xea, 0xbd, 0x7a, 0xcf, 0x0b, 0x97, 0x4c, 0x83, 0x74, - 0xcc, 0x03, 0xc3, 0x72, 0xaa, 0xd1, 0x97, 0xf7, 0x6e, 0xa5, 0x4f, 0xb0, 0x87, 0xd5, 0x6b, 0x5b, - 0xc8, 0x44, 0x8e, 0x47, 0x0c, 0xbb, 0x61, 0x90, 0xce, 0x8e, 0xd1, 0x43, 0x15, 0x3e, 0x2a, 0xfa, - 0xd2, 0xce, 0x76, 0x71, 0x17, 0x53, 0x44, 0xd5, 0xff, 0x0a, 0xc0, 0xda, 0x95, 0x34, 0xd1, 0x26, - 0x1e, 0x38, 0xa6, 0x65, 0xb3, 0x21, 0x2b, 0x26, 0x76, 0x7b, 0xd8, 0xad, 0xb6, 0x0d, 0x17, 0x55, - 0x0f, 0x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x8e, 0xe0, 0x51, 0x1f, 0x39, 0x75, 0x8c, 0xfd, 0xb7, - 0xe3, 0x63, 0xc3, 0x1c, 0x95, 0x21, 0xb8, 0x0a, 0xa7, 0xda, 0xd1, 0x40, 0xae, 0x4b, 0xec, 0xd4, - 0xdf, 0xa0, 0xce, 0x20, 0x21, 0x55, 0x38, 0x11, 0x94, 0x9a, 0x5b, 0x56, 0xe8, 0x9b, 0x30, 0x6c, - 0xea, 0x1e, 0x0d, 0xd1, 0xc3, 0x7c, 0xcb, 0x14, 0x19, 0x09, 0x59, 0x9e, 0x52, 0x22, 0xcb, 0x13, - 0x04, 0xea, 0x29, 0x5a, 0xf9, 0x2a, 0xfd, 0x34, 0x08, 0x5e, 0x50, 0x2c, 0xb8, 0xd8, 0x8d, 0x3d, - 0x4e, 0x26, 0x73, 0x16, 0x89, 0xc7, 0x4f, 0x69, 0xe8, 0xf1, 0x13, 0x86, 0x37, 0x19, 0xea, 0x13, - 0x0f, 0x1c, 0x61, 0xd8, 0xd8, 0xb4, 0x45, 0xce, 0xd8, 0x39, 0x35, 0x85, 0x11, 0xac, 0x5b, 0x8a, - 0x3e, 0xce, 0x68, 0x27, 0xb4, 0xe0, 0x27, 0x2e, 0x22, 0x4f, 0x51, 0xdb, 0xb5, 0x3c, 0x34, 0xfa, - 0xbc, 0x1d, 0x05, 0x83, 0xc2, 0xbc, 0x03, 0x6b, 0x46, 0x36, 0x1c, 0x13, 0xc4, 0xb5, 0x34, 0xe9, - 0xd3, 0x94, 0xfd, 0x58, 0xb7, 0x70, 0x97, 0x18, 0xfd, 0x83, 0xe3, 0xd1, 0x57, 0x54, 0x3b, 0x1c, - 0xc6, 0x34, 0x45, 0x1d, 0xec, 0x19, 0x99, 0x14, 0xc7, 0xb5, 0xdd, 0x05, 0xd8, 0xb5, 0x9c, 0xae, - 0x8d, 0xde, 0xc6, 0x5e, 0x66, 0xce, 0x58, 0x48, 0xf9, 0xce, 0x26, 0x52, 0xbe, 0x03, 0xea, 0x45, - 0x9b, 0x03, 0xdb, 0xb3, 0x72, 0x24, 0x95, 0x77, 0x60, 0xfe, 0x90, 0xa6, 0x5f, 0x67, 0xd7, 0x4a, - 0x37, 0x96, 0x37, 0xd6, 0x73, 0x5e, 0x34, 0x11, 0xc7, 0x56, 0x80, 0x67, 0x6e, 0x57, 0x50, 0x1b, - 0x4e, 0xea, 0xb5, 0xd7, 0x61, 0x91, 0xdd, 0x4c, 0xea, 0x12, 0xcc, 0xd5, 0x9e, 0x62, 0xe7, 0xcc, - 0x8c, 0xff, 0x55, 0xf7, 0xbf, 0x14, 0xff, 0x6b, 0x8b, 0x18, 0x47, 0x67, 0x66, 0xd5, 0x65, 0x58, - 0xac, 0xb5, 0x31, 0xf1, 0x50, 0xe7, 0x4c, 0x69, 0xe3, 0x9f, 0xdf, 0x80, 0x52, 0xd3, 0xed, 0xaa, - 0xef, 0x2b, 0x00, 0xb1, 0xea, 0xc2, 0xeb, 0x39, 0x29, 0x0a, 0x85, 0x03, 0xed, 0xdb, 0x45, 0x50, - 0xfc, 0x4e, 0xf9, 0x40, 0x81, 0x53, 0x62, 0xad, 0xe1, 0xcd, 0xfc, 0xf2, 0x04, 0xa0, 0x76, 0xa7, - 0x20, 0x90, 0x73, 0x79, 0x0f, 0x96, 0xf8, 0xbe, 0x6e, 0xe4, 0x17, 0x16, 0x62, 0xb4, 0xdb, 0xf2, - 0x18, 0xae, 0xdb, 0x77, 0x70, 0xc9, 0x62, 0xc0, 0xad, 0xfc, 0xf2, 0x12, 0x50, 0xad, 0x56, 0x18, - 0xca, 0x19, 0xfd, 0x42, 0x81, 0x93, 0x42, 0x8a, 0xfe, 0x8d, 0xfc, 0x32, 0xe3, 0x38, 0xed, 0xad, - 0x62, 0x38, 0x81, 0x88, 0x90, 0xae, 0x97, 0x20, 0x12, 0xc7, 0xc9, 0x10, 0x49, 0x4b, 0xc8, 0xd3, - 0xe3, 0x12, 0x4b, 0xc7, 0x4b, 0x1c, 0x97, 0x08, 0x25, 0x73, 0x5c, 0x86, 0xf3, 0xf0, 0xea, 0x9f, - 0x14, 0x38, 0x9f, 0x95, 0x84, 0x97, 0xd9, 0xf3, 0x74, 0x11, 0xda, 0x83, 0x89, 0x45, 0x08, 0xbb, - 0x26, 0xa4, 0xe0, 0x25, 0x76, 0x2d, 0x8e, 0x93, 0xd9, 0xb5, 0xb4, 0xac, 0xbc, 0xfa, 0x3b, 0x05, - 0xd4, 0x94, 0x9c, 0xbc, 0xc4, 0x3e, 0x0c, 0xa3, 0xb5, 0xad, 0x49, 0xd0, 0x9c, 0xda, 0xcf, 0x14, - 0x58, 0x8e, 0x67, 0xf6, 0xbf, 0x25, 0x23, 0x95, 0xc3, 0xb4, 0xcd, 0x42, 0x30, 0xce, 0xe2, 0xaf, - 0x0a, 0x5c, 0x1c, 0x95, 0x50, 0xdf, 0x96, 0x35, 0x8a, 0x54, 0x31, 0x5a, 0x73, 0x2a, 0x62, 0x38, - 0xeb, 0xdf, 0x2b, 0xf0, 0x52, 0x5a, 0x22, 0x5d, 0x62, 0x31, 0x52, 0xe0, 0xda, 0xf6, 0x44, 0x70, - 0xce, 0xee, 0x23, 0x05, 0xce, 0x0c, 0xe5, 0xdc, 0x6f, 0xcb, 0x7a, 0xca, 0x08, 0xab, 0xd5, 0x8b, - 0x63, 0xc5, 0x25, 0x4b, 0x49, 0xa3, 0x6f, 0x4a, 0x5d, 0x49, 0x49, 0xb8, 0xd4, 0x92, 0x65, 0x27, - 0xd5, 0xe9, 0x39, 0x4d, 0x49, 0xa9, 0x4b, 0x9c, 0xd3, 0x61, 0xb4, 0xcc, 0x39, 0xcd, 0xce, 0xbb, - 0xf3, 0x20, 0x25, 0x62, 0x25, 0x19, 0xa4, 0x44, 0x84, 0xee, 0x14, 0x04, 0x72, 0x2e, 0x9f, 0x2a, - 0x50, 0xce, 0xcc, 0xb5, 0xd7, 0x65, 0x6e, 0x82, 0x74, 0x19, 0xda, 0x77, 0x26, 0x97, 0xc1, 0xc9, - 0xfe, 0x43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, 0x04, 0xc8, 0x70, 0x1c, 0x99, 0xe9, 0x57, - 0x3f, 0x54, 0xe0, 0x74, 0x22, 0xcf, 0x7f, 0x53, 0x46, 0x76, 0x1c, 0xa9, 0xdd, 0x2d, 0x8a, 0xe4, - 0x74, 0xfe, 0xac, 0xc0, 0x85, 0xec, 0x62, 0x40, 0x43, 0x46, 0x7e, 0x86, 0x10, 0xed, 0xe1, 0x14, - 0x84, 0x88, 0x4f, 0xd5, 0x78, 0x65, 0x41, 0xe6, 0xa9, 0x1a, 0xc3, 0x49, 0x3d, 0x55, 0x53, 0x0a, - 0x07, 0x74, 0x1f, 0x13, 0x65, 0x83, 0x9b, 0x52, 0xe7, 0x3d, 0x86, 0x94, 0xd9, 0xc7, 0xf4, 0x1a, - 0x03, 0x75, 0x48, 0xc9, 0x0a, 0x83, 0x84, 0x43, 0x4a, 0x40, 0x65, 0x1c, 0x52, 0x56, 0x05, 0xc2, - 0x7f, 0xc1, 0xa4, 0x55, 0x19, 0x36, 0xe5, 0x53, 0x4c, 0x71, 0x66, 0xdb, 0x13, 0xc1, 0xc5, 0xc0, - 0x2b, 0xab, 0xd6, 0x50, 0x97, 0xbb, 0xb8, 0xd3, 0x64, 0x48, 0x05, 0x5e, 0x63, 0x8a, 0x0e, 0x74, - 0x29, 0xd3, 0x4a, 0x0e, 0x9b, 0x05, 0x75, 0xb0, 0x6c, 0xcd, 0xf6, 0x44, 0xf0, 0xe4, 0x49, 0x88, - 0x97, 0x1f, 0xe4, 0x4e, 0x42, 0x0c, 0x29, 0x79, 0x12, 0x52, 0x2a, 0x15, 0xf4, 0x39, 0x3f, 0x54, - 0xa7, 0xb8, 0x2d, 0x2d, 0x96, 0x63, 0xb5, 0x7a, 0x71, 0xac, 0xe0, 0xc9, 0xc5, 0x62, 0x84, 0x84, - 0x27, 0x17, 0x80, 0x32, 0x9e, 0x3c, 0xb5, 0x0e, 0x51, 0x6f, 0x7d, 0xf6, 0x7c, 0x45, 0xf9, 0xfc, - 0xf9, 0x8a, 0xf2, 0x9f, 0xe7, 0x2b, 0xca, 0x6f, 0x5e, 0xac, 0xcc, 0x7c, 0xfe, 0x62, 0x65, 0xe6, - 0x8b, 0x17, 0x2b, 0x33, 0x3f, 0xbc, 0x19, 0xfb, 0xff, 0x35, 0x43, 0x4a, 0xaa, 0x0d, 0xfe, 0x97, - 0x11, 0xef, 0xc6, 0xff, 0x00, 0xe3, 0xb8, 0x8f, 0xdc, 0xf6, 0x02, 0xfd, 0x23, 0x88, 0x6f, 0xfe, - 0x2f, 0x00, 0x00, 0xff, 0xff, 0x79, 0xb6, 0x91, 0xb4, 0xa4, 0x31, 0x00, 0x00, + // 2477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5b, 0xdf, 0x8b, 0x1b, 0xc7, + 0x1d, 0xbf, 0xb5, 0x74, 0xfe, 0xf1, 0x3d, 0xfb, 0x92, 0x6e, 0x2e, 0xb6, 0xbc, 0xb6, 0xef, 0xce, + 0x1b, 0xdb, 0x31, 0xa5, 0x95, 0xb8, 0x4b, 0x9b, 0xd8, 0xa6, 0x17, 0x47, 0xd2, 0x9d, 0xcf, 0xae, + 0xab, 0xda, 0xd1, 0x9d, 0x13, 0xda, 0x14, 0xca, 0x6a, 0x35, 0xa7, 0x5b, 0x4e, 0xda, 0x51, 0x67, + 0x57, 0x77, 0xb9, 0x40, 0x21, 0xd0, 0x52, 0x1a, 0x08, 0x6d, 0x09, 0x7d, 0x28, 0x14, 0x4a, 0x42, + 0x0b, 0x85, 0x40, 0xa1, 0xd0, 0x42, 0x1f, 0xfb, 0x9a, 0xc7, 0x3c, 0x95, 0xd0, 0x87, 0xb4, 0xd8, + 0x2f, 0xfd, 0x33, 0xca, 0xce, 0xce, 0xce, 0xce, 0xac, 0x76, 0x25, 0xcd, 0x4a, 0x79, 0xb2, 0x66, + 0x76, 0x3e, 0xdf, 0xef, 0x67, 0x7e, 0x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, 0x88, 0x34, 0x14, 0x49, 0x3d, 0xe2, 0xb6, 0xea, 0x8a, 0xce, 0x35, + 0x14, 0x19, 0x9a, 0x85, 0xfe, 0x27, 0x0d, 0xce, 0x67, 0x28, 0x16, 0x6f, 0xe4, 0x49, 0x63, 0xa5, + 0x45, 0x7f, 0x7f, 0x5a, 0x0b, 0x9c, 0xe6, 0x1f, 0x34, 0x58, 0x4a, 0x95, 0x30, 0x5e, 0x57, 0x72, + 0x31, 0x84, 0x37, 0xee, 0x4d, 0x87, 0x97, 0xe2, 0x87, 0x2c, 0x68, 0x28, 0xc4, 0x0f, 0x09, 0xa8, + 0x12, 0x3f, 0x52, 0x05, 0x0c, 0xca, 0x45, 0x96, 0x2f, 0x5e, 0x53, 0x4f, 0x2d, 0xc2, 0x24, 0xf8, + 0x6e, 0x4e, 0x20, 0xe7, 0xf2, 0x89, 0x06, 0x2f, 0xa6, 0xeb, 0x1c, 0x2a, 0xa6, 0xd3, 0x0c, 0x18, + 0xdb, 0x53, 0x1a, 0x90, 0x38, 0xa6, 0xcb, 0x1a, 0x77, 0x55, 0x36, 0x58, 0x8a, 0x01, 0x15, 0x8e, + 0x23, 0xf5, 0x09, 0xfd, 0x43, 0x0d, 0x16, 0x13, 0xea, 0xc4, 0x2d, 0x15, 0xdb, 0x22, 0xd2, 0x78, + 0x23, 0x2f, 0x92, 0xd3, 0xf9, 0x8b, 0x06, 0x17, 0xb3, 0x25, 0x8c, 0xba, 0x8a, 0xfd, 0x0c, 0x23, + 0xc6, 0xc3, 0x19, 0x18, 0x91, 0xaf, 0xaa, 0xa2, 0x1e, 0xa2, 0x72, 0x55, 0x15, 0x70, 0x4a, 0x57, + 0xd5, 0x14, 0x6d, 0x82, 0xce, 0x63, 0x42, 0x99, 0xb8, 0xa5, 0xb4, 0xdf, 0x05, 0xa4, 0xca, 0x3c, + 0xa6, 0xcb, 0x18, 0x34, 0x20, 0x25, 0x45, 0x0c, 0x85, 0x80, 0x94, 0x80, 0xaa, 0x04, 0xa4, 0x2c, + 0x91, 0x23, 0xb8, 0xc1, 0xa4, 0x09, 0x19, 0x1b, 0xea, 0x4f, 0x4c, 0x22, 0xb3, 0xad, 0xa9, 0xe0, + 0x72, 0xe2, 0x95, 0x25, 0x67, 0xd4, 0xd4, 0x0e, 0xee, 0x34, 0x1b, 0x4a, 0x89, 0xd7, 0x18, 0x5d, + 0x83, 0x0e, 0x65, 0x9a, 0xaa, 0xb1, 0x91, 0xd3, 0x07, 0x7b, 0xad, 0xd9, 0x9a, 0x0a, 0x9e, 0xdc, + 0x09, 0xa2, 0xc2, 0xa1, 0xb6, 0x13, 0x04, 0xa4, 0xe2, 0x4e, 0x48, 0x11, 0x43, 0xe8, 0x75, 0x7e, + 0x48, 0x0a, 0xb9, 0xa3, 0x6c, 0x96, 0x63, 0x8d, 0x5a, 0x7e, 0xac, 0x14, 0xc9, 0x65, 0xc5, 0x44, + 0x21, 0x92, 0x4b, 0x40, 0x95, 0x48, 0x9e, 0x2a, 0x96, 0xd0, 0x23, 0x54, 0x52, 0x4a, 0x14, 0x8e, + 0x50, 0x11, 0xa7, 0x72, 0x84, 0xa6, 0x89, 0x1e, 0xb5, 0xe6, 0x67, 0x4f, 0x97, 0xb5, 0xcf, 0x9f, + 0x2e, 0x6b, 0xff, 0x7d, 0xba, 0xac, 0xfd, 0xe6, 0xd9, 0xf2, 0xdc, 0xe7, 0xcf, 0x96, 0xe7, 0xbe, + 0x78, 0xb6, 0x3c, 0xf7, 0xc3, 0x5b, 0xc2, 0x7f, 0x4f, 0x1a, 0xf2, 0x51, 0xa9, 0xf3, 0x3f, 0x2b, + 0x79, 0x57, 0xfc, 0x0b, 0x98, 0xe3, 0x3e, 0xf2, 0x5a, 0x27, 0xe9, 0x5f, 0x90, 0xbc, 0xf2, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x1a, 0x54, 0xf7, 0x25, 0x33, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4347,6 +4386,7 @@ type MsgClient interface { SetUserBiography(ctx context.Context, in *MsgSetUserBiography, opts ...grpc.CallOption) (*MsgSetUserBiographyResponse, error) // this line is used by starport scaffolding # proto/tx/rpc MultiVoteCard(ctx context.Context, in *MsgMultiVoteCard, opts ...grpc.CallOption) (*MsgMultiVoteCardResponse, error) + MsgOpenMatch(ctx context.Context, in *MsgMsgOpenMatch, opts ...grpc.CallOption) (*MsgMsgOpenMatchResponse, error) } type msgClient struct { @@ -4726,6 +4766,15 @@ func (c *msgClient) MultiVoteCard(ctx context.Context, in *MsgMultiVoteCard, opt return out, nil } +func (c *msgClient) MsgOpenMatch(ctx context.Context, in *MsgMsgOpenMatch, opts ...grpc.CallOption) (*MsgMsgOpenMatchResponse, error) { + out := new(MsgMsgOpenMatchResponse) + err := c.cc.Invoke(ctx, "/DecentralCardGame.cardchain.cardchain.Msg/MsgOpenMatch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { Createuser(context.Context, *MsgCreateuser) (*MsgCreateuserResponse, error) @@ -4770,6 +4819,7 @@ type MsgServer interface { SetUserBiography(context.Context, *MsgSetUserBiography) (*MsgSetUserBiographyResponse, error) // this line is used by starport scaffolding # proto/tx/rpc MultiVoteCard(context.Context, *MsgMultiVoteCard) (*MsgMultiVoteCardResponse, error) + MsgOpenMatch(context.Context, *MsgMsgOpenMatch) (*MsgMsgOpenMatchResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -4899,6 +4949,9 @@ func (*UnimplementedMsgServer) SetUserBiography(ctx context.Context, req *MsgSet func (*UnimplementedMsgServer) MultiVoteCard(ctx context.Context, req *MsgMultiVoteCard) (*MsgMultiVoteCardResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MultiVoteCard not implemented") } +func (*UnimplementedMsgServer) MsgOpenMatch(ctx context.Context, req *MsgMsgOpenMatch) (*MsgMsgOpenMatchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgOpenMatch not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -5642,6 +5695,24 @@ func _Msg_MultiVoteCard_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Msg_MsgOpenMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgMsgOpenMatch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).MsgOpenMatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/DecentralCardGame.cardchain.cardchain.Msg/MsgOpenMatch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).MsgOpenMatch(ctx, req.(*MsgMsgOpenMatch)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "DecentralCardGame.cardchain.cardchain.Msg", HandlerType: (*MsgServer)(nil), @@ -5810,6 +5881,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "MultiVoteCard", Handler: _Msg_MultiVoteCard_Handler, }, + { + MethodName: "MsgOpenMatch", + Handler: _Msg_MsgOpenMatch_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cardchain/cardchain/tx.proto", @@ -6545,12 +6620,12 @@ func (m *MsgReportMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Outcome != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Outcome)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x28 } - if len(m.CardsB) > 0 { - dAtA3 := make([]byte, len(m.CardsB)*10) + if len(m.PlayedCardsB) > 0 { + dAtA3 := make([]byte, len(m.PlayedCardsB)*10) var j2 int - for _, num := range m.CardsB { + for _, num := range m.PlayedCardsB { for num >= 1<<7 { dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -6563,12 +6638,12 @@ func (m *MsgReportMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], dAtA3[:j2]) i = encodeVarintTx(dAtA, i, uint64(j2)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x22 } - if len(m.CardsA) > 0 { - dAtA5 := make([]byte, len(m.CardsA)*10) + if len(m.PlayedCardsA) > 0 { + dAtA5 := make([]byte, len(m.PlayedCardsA)*10) var j4 int - for _, num := range m.CardsA { + for _, num := range m.PlayedCardsA { for num >= 1<<7 { dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -6581,21 +6656,12 @@ func (m *MsgReportMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], dAtA5[:j4]) i = encodeVarintTx(dAtA, i, uint64(j4)) i-- - dAtA[i] = 0x2a - } - if len(m.PlayerB) > 0 { - i -= len(m.PlayerB) - copy(dAtA[i:], m.PlayerB) - i = encodeVarintTx(dAtA, i, uint64(len(m.PlayerB))) - i-- dAtA[i] = 0x1a } - if len(m.PlayerA) > 0 { - i -= len(m.PlayerA) - copy(dAtA[i:], m.PlayerA) - i = encodeVarintTx(dAtA, i, uint64(len(m.PlayerA))) + if m.MatchId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.MatchId)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if len(m.Creator) > 0 { i -= len(m.Creator) @@ -8007,6 +8073,20 @@ func (m *MsgConfirmMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VotedCards) > 0 { + for iNdEx := len(m.VotedCards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VotedCards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if m.Outcome != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Outcome)) i-- @@ -8499,41 +8579,6 @@ func (m *MsgSetUserBiographyResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *SingleVote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SingleVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SingleVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VoteType) > 0 { - i -= len(m.VoteType) - copy(dAtA[i:], m.VoteType) - i = encodeVarintTx(dAtA, i, uint64(len(m.VoteType))) - i-- - dAtA[i] = 0x12 - } - if m.CardId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.CardId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *MsgMultiVoteCard) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -8601,29 +8646,137 @@ func (m *MsgMultiVoteCardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgMsgOpenMatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgCreateuser) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgMsgOpenMatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMsgOpenMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.NewUser) - if l > 0 { + if len(m.PlayerBDeck) > 0 { + dAtA9 := make([]byte, len(m.PlayerBDeck)*10) + var j8 int + for _, num := range m.PlayerBDeck { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintTx(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x2a + } + if len(m.PlayerADeck) > 0 { + dAtA11 := make([]byte, len(m.PlayerADeck)*10) + var j10 int + for _, num := range m.PlayerADeck { + for num >= 1<<7 { + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j10++ + } + dAtA11[j10] = uint8(num) + j10++ + } + i -= j10 + copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintTx(dAtA, i, uint64(j10)) + i-- + dAtA[i] = 0x22 + } + if len(m.PlayerB) > 0 { + i -= len(m.PlayerB) + copy(dAtA[i:], m.PlayerB) + i = encodeVarintTx(dAtA, i, uint64(len(m.PlayerB))) + i-- + dAtA[i] = 0x1a + } + if len(m.PlayerA) > 0 { + i -= len(m.PlayerA) + copy(dAtA[i:], m.PlayerA) + i = encodeVarintTx(dAtA, i, uint64(len(m.PlayerA))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgMsgOpenMatchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgMsgOpenMatchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMsgOpenMatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MatchId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.MatchId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateuser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewUser) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = len(m.Alias) @@ -8926,24 +9079,19 @@ func (m *MsgReportMatch) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.PlayerA) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PlayerB) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.MatchId != 0 { + n += 1 + sovTx(uint64(m.MatchId)) } - if len(m.CardsA) > 0 { + if len(m.PlayedCardsA) > 0 { l = 0 - for _, e := range m.CardsA { + for _, e := range m.PlayedCardsA { l += sovTx(uint64(e)) } n += 1 + sovTx(uint64(l)) + l } - if len(m.CardsB) > 0 { + if len(m.PlayedCardsB) > 0 { l = 0 - for _, e := range m.CardsB { + for _, e := range m.PlayedCardsB { l += sovTx(uint64(e)) } n += 1 + sovTx(uint64(l)) + l @@ -9578,6 +9726,12 @@ func (m *MsgConfirmMatch) Size() (n int) { if m.Outcome != 0 { n += 1 + sovTx(uint64(m.Outcome)) } + if len(m.VotedCards) > 0 { + for _, e := range m.VotedCards { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -9786,23 +9940,35 @@ func (m *MsgSetUserBiographyResponse) Size() (n int) { return n } -func (m *SingleVote) Size() (n int) { +func (m *MsgMultiVoteCard) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.CardId != 0 { - n += 1 + sovTx(uint64(m.CardId)) - } - l = len(m.VoteType) + l = len(m.Creator) if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } -func (m *MsgMultiVoteCard) Size() (n int) { +func (m *MsgMultiVoteCardResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgMsgOpenMatch) Size() (n int) { if m == nil { return 0 } @@ -9812,21 +9978,40 @@ func (m *MsgMultiVoteCard) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Votes) > 0 { - for _, e := range m.Votes { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) + l = len(m.PlayerA) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PlayerB) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.PlayerADeck) > 0 { + l = 0 + for _, e := range m.PlayerADeck { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + if len(m.PlayerBDeck) > 0 { + l = 0 + for _, e := range m.PlayerBDeck { + l += sovTx(uint64(e)) } + n += 1 + sovTx(uint64(l)) + l } return n } -func (m *MsgMultiVoteCardResponse) Size() (n int) { +func (m *MsgMsgOpenMatchResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if m.MatchId != 0 { + n += 1 + sovTx(uint64(m.MatchId)) + } return n } @@ -11873,10 +12058,10 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PlayerA", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchId", wireType) } - var stringLen uint64 + m.MatchId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -11886,57 +12071,12 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.MatchId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PlayerA = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PlayerB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PlayerB = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { @@ -11953,7 +12093,7 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { break } } - m.CardsA = append(m.CardsA, v) + m.PlayedCardsA = append(m.PlayedCardsA, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -11988,8 +12128,8 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.CardsA) == 0 { - m.CardsA = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.PlayedCardsA) == 0 { + m.PlayedCardsA = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 @@ -12007,12 +12147,12 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { break } } - m.CardsA = append(m.CardsA, v) + m.PlayedCardsA = append(m.PlayedCardsA, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field CardsA", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PlayedCardsA", wireType) } - case 6: + case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { @@ -12029,7 +12169,7 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { break } } - m.CardsB = append(m.CardsB, v) + m.PlayedCardsB = append(m.PlayedCardsB, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -12064,8 +12204,8 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.CardsB) == 0 { - m.CardsB = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.PlayedCardsB) == 0 { + m.PlayedCardsB = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 @@ -12083,12 +12223,12 @@ func (m *MsgReportMatch) Unmarshal(dAtA []byte) error { break } } - m.CardsB = append(m.CardsB, v) + m.PlayedCardsB = append(m.PlayedCardsB, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field CardsB", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PlayedCardsB", wireType) } - case 7: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Outcome", wireType) } @@ -16035,6 +16175,40 @@ func (m *MsgConfirmMatch) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotedCards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VotedCards = append(m.VotedCards, &SingleVote{}) + if err := m.VotedCards[len(m.VotedCards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -17361,7 +17535,7 @@ func (m *MsgSetUserBiographyResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SingleVote) Unmarshal(dAtA []byte) error { +func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17384,34 +17558,15 @@ func (m *SingleVote) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SingleVote: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMultiVoteCard: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SingleVote: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMultiVoteCard: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) - } - m.CardId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CardId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -17439,7 +17594,41 @@ func (m *SingleVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VoteType = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, &SingleVote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -17462,7 +17651,7 @@ func (m *SingleVote) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { +func (m *MsgMultiVoteCardResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17485,10 +17674,60 @@ func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMultiVoteCard: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMultiVoteCardResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMultiVoteCard: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMultiVoteCardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMsgOpenMatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMsgOpenMatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMsgOpenMatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -17525,9 +17764,9 @@ func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PlayerA", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -17537,26 +17776,208 @@ func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Votes = append(m.Votes, &SingleVote{}) - if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.PlayerA = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PlayerB", wireType) } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PlayerB = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PlayerADeck = append(m.PlayerADeck, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.PlayerADeck) == 0 { + m.PlayerADeck = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PlayerADeck = append(m.PlayerADeck, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PlayerADeck", wireType) + } + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PlayerBDeck = append(m.PlayerBDeck, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.PlayerBDeck) == 0 { + m.PlayerBDeck = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PlayerBDeck = append(m.PlayerBDeck, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PlayerBDeck", wireType) + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -17578,7 +17999,7 @@ func (m *MsgMultiVoteCard) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMultiVoteCardResponse) Unmarshal(dAtA []byte) error { +func (m *MsgMsgOpenMatchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17601,12 +18022,31 @@ func (m *MsgMultiVoteCardResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMultiVoteCardResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMsgOpenMatchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMultiVoteCardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMsgOpenMatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchId", wireType) + } + m.MatchId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MatchId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/cardchain/types/types.go b/x/cardchain/types/types.go index 9946f2b5..e8336e46 100644 --- a/x/cardchain/types/types.go +++ b/x/cardchain/types/types.go @@ -4,10 +4,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -func NewMatchPlayer(addr string, cards []uint64) *MatchPlayer { +func NewMatchPlayer(addr string, cards []uint64, deck []uint64) *MatchPlayer { return &MatchPlayer{ Addr: addr, PlayedCards: cards, + Deck: deck, Confirmed: false, Outcome: Outcome_Aborted, } diff --git a/x/cardchain/types/user.pb.go b/x/cardchain/types/user.pb.go index 23d20993..78a34177 100644 --- a/x/cardchain/types/user.pb.go +++ b/x/cardchain/types/user.pb.go @@ -366,45 +366,45 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/user.proto", fileDescriptor_eb1a13ac65ffc756) } var fileDescriptor_eb1a13ac65ffc756 = []byte{ - // 597 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcd, 0x6a, 0xdb, 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xac, 0x97, 0xcb, 0x49, 0xff, 0x91, 0x3d, 0xfa, 0xa7, 0x0f, 0x2f, 0xc6, 0x8f, 0x95, 0xd7, 0xc3, - 0xdd, 0xde, 0x6c, 0xd7, 0xbd, 0x1c, 0xaf, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x9f, 0x52, - 0x11, 0xa8, 0x04, 0x00, 0x00, + // 596 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6b, 0xdb, 0x4c, + 0x10, 0xc7, 0x2d, 0x4b, 0x89, 0xe5, 0x71, 0x5e, 0xc4, 0xf2, 0xf0, 0xb0, 0x94, 0x22, 0x54, 0xd3, + 0x82, 0xc8, 0xc1, 0x2e, 0x6e, 0x0f, 0x3d, 0xf4, 0xd2, 0x24, 0x50, 0x4a, 0x29, 0x98, 0x4d, 0x9b, + 0x43, 0x6e, 0x2b, 0x79, 0x6a, 0x2f, 0x95, 0xb5, 0x62, 0x77, 0x9d, 0xd4, 0xdf, 0xa2, 0x1f, 0xab, + 0xc7, 0x1c, 0x0b, 0xbd, 0x94, 0xe4, 0x8b, 0x94, 0x5d, 0xd9, 0xf1, 0x4b, 0x7a, 0xf0, 0x6d, 0xe6, + 0xb7, 0x9a, 0xff, 0xcc, 0x88, 0xff, 0x2e, 0xc4, 0x39, 0x57, 0xa3, 0x7c, 0xc2, 0x45, 0xd9, 0x5f, + 0x45, 0x33, 0x8d, 0xaa, 0x57, 0x29, 0x69, 0x24, 0x79, 0x71, 0x8e, 0x39, 0x96, 0x46, 0xf1, 0xe2, + 0x8c, 0xab, 0xd1, 0x7b, 0x3e, 0xc5, 0xde, 0xc3, 0x77, 0xab, 0xe8, 0xc9, 0xb3, 0x7f, 0xc9, 0x5c, + 0x4b, 0x83, 0xa2, 0x1c, 0xd7, 0x4a, 0xdd, 0xdf, 0x01, 0x04, 0x5f, 0x34,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 0x90, 0xb0, 0x1e, 0x24, 0x6a, 0xd8, 0xc8, + 0x2e, 0x11, 0x79, 0x04, 0x96, 0x6b, 0x44, 0x4d, 0xd2, 0x72, 0xa3, 0x47, 0xbe, 0x3d, 0xb6, 0x13, + 0x45, 0xc1, 0x29, 0xfb, 0x79, 0x17, 0x7b, 0xb7, 0x77, 0xb1, 0xf7, 0xe7, 0x2e, 0xf6, 0x7e, 0xdc, + 0xc7, 0x8d, 0xdb, 0xfb, 0xb8, 0xf1, 0xeb, 0x3e, 0x6e, 0x5c, 0xbd, 0x19, 0x0b, 0x33, 0x99, 0x65, + 0xbd, 0x5c, 0x4e, 0xfb, 0x8f, 0xec, 0xd1, 0x3f, 0x7b, 0x78, 0x2e, 0xbe, 0xaf, 0x3d, 0x1d, 0xee, + 0xf6, 0x66, 0xfb, 0xee, 0xe5, 0x78, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0x71, 0xa0, 0xd3, 0xa3, + 0xa5, 0x04, 0x00, 0x00, } func (m *User) Marshal() (dAtA []byte, err error) { diff --git a/x/cardchain/types/vote_right.pb.go b/x/cardchain/types/vote_right.pb.go deleted file mode 100644 index f0c841af..00000000 --- a/x/cardchain/types/vote_right.pb.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cardchain/cardchain/vote_right.proto - -package types - -import ( - fmt "fmt" - 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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type VoteRight struct { - CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` - ExpireBlock int64 `protobuf:"varint,2,opt,name=expireBlock,proto3" json:"expireBlock,omitempty"` -} - -func (m *VoteRight) Reset() { *m = VoteRight{} } -func (m *VoteRight) String() string { return proto.CompactTextString(m) } -func (*VoteRight) ProtoMessage() {} -func (*VoteRight) Descriptor() ([]byte, []int) { - return fileDescriptor_054a517c3cbfc900, []int{0} -} -func (m *VoteRight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VoteRight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VoteRight.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VoteRight) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteRight.Merge(m, src) -} -func (m *VoteRight) XXX_Size() int { - return m.Size() -} -func (m *VoteRight) XXX_DiscardUnknown() { - xxx_messageInfo_VoteRight.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteRight proto.InternalMessageInfo - -func (m *VoteRight) GetCardId() uint64 { - if m != nil { - return m.CardId - } - return 0 -} - -func (m *VoteRight) GetExpireBlock() int64 { - if m != nil { - return m.ExpireBlock - } - return 0 -} - -func init() { - proto.RegisterType((*VoteRight)(nil), "DecentralCardGame.cardchain.cardchain.VoteRight") -} - -func init() { - proto.RegisterFile("cardchain/cardchain/vote_right.proto", fileDescriptor_054a517c3cbfc900) -} - -var fileDescriptor_054a517c3cbfc900 = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4e, 0x2c, 0x4a, - 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x47, 0xb0, 0xca, 0xf2, 0x4b, 0x52, 0xe3, 0x8b, 0x32, 0xd3, - 0x33, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x54, 0x5d, 0x52, 0x93, 0x53, 0xf3, 0x4a, - 0x8a, 0x12, 0x73, 0x9c, 0x13, 0x8b, 0x52, 0xdc, 0x13, 0x73, 0x53, 0xf5, 0xe0, 0xaa, 0x11, 0x2c, - 0x25, 0x57, 0x2e, 0xce, 0xb0, 0xfc, 0x92, 0xd4, 0x20, 0x90, 0x4e, 0x21, 0x31, 0x2e, 0x36, 0x90, - 0x8c, 0x67, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4b, 0x10, 0x94, 0x27, 0xa4, 0xc0, 0xc5, 0x9d, - 0x5a, 0x51, 0x90, 0x59, 0x94, 0xea, 0x94, 0x93, 0x9f, 0x9c, 0x2d, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, - 0x1c, 0x84, 0x2c, 0xe4, 0x14, 0x74, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, - 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, - 0x16, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x18, 0x4e, 0xd2, 0x77, - 0x86, 0x7b, 0xa0, 0x02, 0xc9, 0x33, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x8f, 0x18, - 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xa7, 0x6f, 0xfd, 0xf0, 0x00, 0x00, 0x00, -} - -func (m *VoteRight) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VoteRight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VoteRight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ExpireBlock != 0 { - i = encodeVarintVoteRight(dAtA, i, uint64(m.ExpireBlock)) - i-- - dAtA[i] = 0x10 - } - if m.CardId != 0 { - i = encodeVarintVoteRight(dAtA, i, uint64(m.CardId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintVoteRight(dAtA []byte, offset int, v uint64) int { - offset -= sovVoteRight(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VoteRight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CardId != 0 { - n += 1 + sovVoteRight(uint64(m.CardId)) - } - if m.ExpireBlock != 0 { - n += 1 + sovVoteRight(uint64(m.ExpireBlock)) - } - return n -} - -func sovVoteRight(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozVoteRight(x uint64) (n int) { - return sovVoteRight(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VoteRight) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVoteRight - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VoteRight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VoteRight: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) - } - m.CardId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVoteRight - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CardId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireBlock", wireType) - } - m.ExpireBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVoteRight - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpireBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipVoteRight(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthVoteRight - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVoteRight(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVoteRight - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVoteRight - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVoteRight - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthVoteRight - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupVoteRight - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthVoteRight - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthVoteRight = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVoteRight = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupVoteRight = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/cardchain/types/voteing.pb.go b/x/cardchain/types/voteing.pb.go new file mode 100644 index 00000000..78a65724 --- /dev/null +++ b/x/cardchain/types/voteing.pb.go @@ -0,0 +1,1307 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/cardchain/voteing.proto + +package types + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type VotingResults struct { + TotalVotes uint64 `protobuf:"varint,1,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"` + TotalFairEnoughVotes uint64 `protobuf:"varint,2,opt,name=totalFairEnoughVotes,proto3" json:"totalFairEnoughVotes,omitempty"` + TotalOverpoweredVotes uint64 `protobuf:"varint,3,opt,name=totalOverpoweredVotes,proto3" json:"totalOverpoweredVotes,omitempty"` + TotalUnderpoweredVotes uint64 `protobuf:"varint,4,opt,name=totalUnderpoweredVotes,proto3" json:"totalUnderpoweredVotes,omitempty"` + TotalInappropriateVotes uint64 `protobuf:"varint,5,opt,name=totalInappropriateVotes,proto3" json:"totalInappropriateVotes,omitempty"` + CardResults []*VotingResult `protobuf:"bytes,6,rep,name=cardResults,proto3" json:"cardResults,omitempty"` + Notes string `protobuf:"bytes,7,opt,name=notes,proto3" json:"notes,omitempty"` +} + +func (m *VotingResults) Reset() { *m = VotingResults{} } +func (m *VotingResults) String() string { return proto.CompactTextString(m) } +func (*VotingResults) ProtoMessage() {} +func (*VotingResults) Descriptor() ([]byte, []int) { + return fileDescriptor_663e098aec843cdc, []int{0} +} +func (m *VotingResults) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VotingResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VotingResults.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VotingResults) XXX_Merge(src proto.Message) { + xxx_messageInfo_VotingResults.Merge(m, src) +} +func (m *VotingResults) XXX_Size() int { + return m.Size() +} +func (m *VotingResults) XXX_DiscardUnknown() { + xxx_messageInfo_VotingResults.DiscardUnknown(m) +} + +var xxx_messageInfo_VotingResults proto.InternalMessageInfo + +func (m *VotingResults) GetTotalVotes() uint64 { + if m != nil { + return m.TotalVotes + } + return 0 +} + +func (m *VotingResults) GetTotalFairEnoughVotes() uint64 { + if m != nil { + return m.TotalFairEnoughVotes + } + return 0 +} + +func (m *VotingResults) GetTotalOverpoweredVotes() uint64 { + if m != nil { + return m.TotalOverpoweredVotes + } + return 0 +} + +func (m *VotingResults) GetTotalUnderpoweredVotes() uint64 { + if m != nil { + return m.TotalUnderpoweredVotes + } + return 0 +} + +func (m *VotingResults) GetTotalInappropriateVotes() uint64 { + if m != nil { + return m.TotalInappropriateVotes + } + return 0 +} + +func (m *VotingResults) GetCardResults() []*VotingResult { + if m != nil { + return m.CardResults + } + return nil +} + +func (m *VotingResults) GetNotes() string { + if m != nil { + return m.Notes + } + return "" +} + +type VotingResult struct { + CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` + FairEnoughVotes uint64 `protobuf:"varint,2,opt,name=fairEnoughVotes,proto3" json:"fairEnoughVotes,omitempty"` + OverpoweredVotes uint64 `protobuf:"varint,3,opt,name=overpoweredVotes,proto3" json:"overpoweredVotes,omitempty"` + UnderpoweredVotes uint64 `protobuf:"varint,4,opt,name=underpoweredVotes,proto3" json:"underpoweredVotes,omitempty"` + InappropriateVotes uint64 `protobuf:"varint,5,opt,name=inappropriateVotes,proto3" json:"inappropriateVotes,omitempty"` + Result string `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"` +} + +func (m *VotingResult) Reset() { *m = VotingResult{} } +func (m *VotingResult) String() string { return proto.CompactTextString(m) } +func (*VotingResult) ProtoMessage() {} +func (*VotingResult) Descriptor() ([]byte, []int) { + return fileDescriptor_663e098aec843cdc, []int{1} +} +func (m *VotingResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VotingResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VotingResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VotingResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_VotingResult.Merge(m, src) +} +func (m *VotingResult) XXX_Size() int { + return m.Size() +} +func (m *VotingResult) XXX_DiscardUnknown() { + xxx_messageInfo_VotingResult.DiscardUnknown(m) +} + +var xxx_messageInfo_VotingResult proto.InternalMessageInfo + +func (m *VotingResult) GetCardId() uint64 { + if m != nil { + return m.CardId + } + return 0 +} + +func (m *VotingResult) GetFairEnoughVotes() uint64 { + if m != nil { + return m.FairEnoughVotes + } + return 0 +} + +func (m *VotingResult) GetOverpoweredVotes() uint64 { + if m != nil { + return m.OverpoweredVotes + } + return 0 +} + +func (m *VotingResult) GetUnderpoweredVotes() uint64 { + if m != nil { + return m.UnderpoweredVotes + } + return 0 +} + +func (m *VotingResult) GetInappropriateVotes() uint64 { + if m != nil { + return m.InappropriateVotes + } + return 0 +} + +func (m *VotingResult) GetResult() string { + if m != nil { + return m.Result + } + return "" +} + +type SingleVote struct { + CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` + VoteType string `protobuf:"bytes,2,opt,name=voteType,proto3" json:"voteType,omitempty"` +} + +func (m *SingleVote) Reset() { *m = SingleVote{} } +func (m *SingleVote) String() string { return proto.CompactTextString(m) } +func (*SingleVote) ProtoMessage() {} +func (*SingleVote) Descriptor() ([]byte, []int) { + return fileDescriptor_663e098aec843cdc, []int{2} +} +func (m *SingleVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SingleVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SingleVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SingleVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_SingleVote.Merge(m, src) +} +func (m *SingleVote) XXX_Size() int { + return m.Size() +} +func (m *SingleVote) XXX_DiscardUnknown() { + xxx_messageInfo_SingleVote.DiscardUnknown(m) +} + +var xxx_messageInfo_SingleVote proto.InternalMessageInfo + +func (m *SingleVote) GetCardId() uint64 { + if m != nil { + return m.CardId + } + return 0 +} + +func (m *SingleVote) GetVoteType() string { + if m != nil { + return m.VoteType + } + return "" +} + +type VoteRight struct { + CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` + ExpireBlock int64 `protobuf:"varint,2,opt,name=expireBlock,proto3" json:"expireBlock,omitempty"` +} + +func (m *VoteRight) Reset() { *m = VoteRight{} } +func (m *VoteRight) String() string { return proto.CompactTextString(m) } +func (*VoteRight) ProtoMessage() {} +func (*VoteRight) Descriptor() ([]byte, []int) { + return fileDescriptor_663e098aec843cdc, []int{3} +} +func (m *VoteRight) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VoteRight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VoteRight.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VoteRight) XXX_Merge(src proto.Message) { + xxx_messageInfo_VoteRight.Merge(m, src) +} +func (m *VoteRight) XXX_Size() int { + return m.Size() +} +func (m *VoteRight) XXX_DiscardUnknown() { + xxx_messageInfo_VoteRight.DiscardUnknown(m) +} + +var xxx_messageInfo_VoteRight proto.InternalMessageInfo + +func (m *VoteRight) GetCardId() uint64 { + if m != nil { + return m.CardId + } + return 0 +} + +func (m *VoteRight) GetExpireBlock() int64 { + if m != nil { + return m.ExpireBlock + } + return 0 +} + +func init() { + proto.RegisterType((*VotingResults)(nil), "DecentralCardGame.cardchain.cardchain.VotingResults") + proto.RegisterType((*VotingResult)(nil), "DecentralCardGame.cardchain.cardchain.VotingResult") + proto.RegisterType((*SingleVote)(nil), "DecentralCardGame.cardchain.cardchain.SingleVote") + proto.RegisterType((*VoteRight)(nil), "DecentralCardGame.cardchain.cardchain.VoteRight") +} + +func init() { proto.RegisterFile("cardchain/cardchain/voteing.proto", fileDescriptor_663e098aec843cdc) } + +var fileDescriptor_663e098aec843cdc = []byte{ + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x9b, 0xed, 0x6e, 0xb4, 0xaf, 0x8a, 0x3a, 0xac, 0x6b, 0xf1, 0x10, 0x62, 0x40, 0x08, + 0x22, 0x29, 0xec, 0x8a, 0xec, 0x51, 0x76, 0xad, 0xd2, 0x93, 0x30, 0xda, 0x1e, 0xbc, 0x4d, 0x93, + 0x31, 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0f, 0x00, 0x00, 0xff, 0xff, + 0xb0, 0xb9, 0xee, 0xd5, 0x9f, 0x03, 0x00, 0x00, +} + +func (m *VotingResults) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VotingResults) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VotingResults) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Notes) > 0 { + i -= len(m.Notes) + copy(dAtA[i:], m.Notes) + i = encodeVarintVoteing(dAtA, i, uint64(len(m.Notes))) + i-- + dAtA[i] = 0x3a + } + if len(m.CardResults) > 0 { + for iNdEx := len(m.CardResults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CardResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVoteing(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.TotalInappropriateVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.TotalInappropriateVotes)) + i-- + dAtA[i] = 0x28 + } + if m.TotalUnderpoweredVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.TotalUnderpoweredVotes)) + i-- + dAtA[i] = 0x20 + } + if m.TotalOverpoweredVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.TotalOverpoweredVotes)) + i-- + dAtA[i] = 0x18 + } + if m.TotalFairEnoughVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.TotalFairEnoughVotes)) + i-- + dAtA[i] = 0x10 + } + if m.TotalVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.TotalVotes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VotingResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VotingResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VotingResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Result) > 0 { + i -= len(m.Result) + copy(dAtA[i:], m.Result) + i = encodeVarintVoteing(dAtA, i, uint64(len(m.Result))) + i-- + dAtA[i] = 0x32 + } + if m.InappropriateVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.InappropriateVotes)) + i-- + dAtA[i] = 0x28 + } + if m.UnderpoweredVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.UnderpoweredVotes)) + i-- + dAtA[i] = 0x20 + } + if m.OverpoweredVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.OverpoweredVotes)) + i-- + dAtA[i] = 0x18 + } + if m.FairEnoughVotes != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.FairEnoughVotes)) + i-- + dAtA[i] = 0x10 + } + if m.CardId != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.CardId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SingleVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SingleVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SingleVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VoteType) > 0 { + i -= len(m.VoteType) + copy(dAtA[i:], m.VoteType) + i = encodeVarintVoteing(dAtA, i, uint64(len(m.VoteType))) + i-- + dAtA[i] = 0x12 + } + if m.CardId != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.CardId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VoteRight) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VoteRight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VoteRight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpireBlock != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.ExpireBlock)) + i-- + dAtA[i] = 0x10 + } + if m.CardId != 0 { + i = encodeVarintVoteing(dAtA, i, uint64(m.CardId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintVoteing(dAtA []byte, offset int, v uint64) int { + offset -= sovVoteing(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *VotingResults) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TotalVotes != 0 { + n += 1 + sovVoteing(uint64(m.TotalVotes)) + } + if m.TotalFairEnoughVotes != 0 { + n += 1 + sovVoteing(uint64(m.TotalFairEnoughVotes)) + } + if m.TotalOverpoweredVotes != 0 { + n += 1 + sovVoteing(uint64(m.TotalOverpoweredVotes)) + } + if m.TotalUnderpoweredVotes != 0 { + n += 1 + sovVoteing(uint64(m.TotalUnderpoweredVotes)) + } + if m.TotalInappropriateVotes != 0 { + n += 1 + sovVoteing(uint64(m.TotalInappropriateVotes)) + } + if len(m.CardResults) > 0 { + for _, e := range m.CardResults { + l = e.Size() + n += 1 + l + sovVoteing(uint64(l)) + } + } + l = len(m.Notes) + if l > 0 { + n += 1 + l + sovVoteing(uint64(l)) + } + return n +} + +func (m *VotingResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CardId != 0 { + n += 1 + sovVoteing(uint64(m.CardId)) + } + if m.FairEnoughVotes != 0 { + n += 1 + sovVoteing(uint64(m.FairEnoughVotes)) + } + if m.OverpoweredVotes != 0 { + n += 1 + sovVoteing(uint64(m.OverpoweredVotes)) + } + if m.UnderpoweredVotes != 0 { + n += 1 + sovVoteing(uint64(m.UnderpoweredVotes)) + } + if m.InappropriateVotes != 0 { + n += 1 + sovVoteing(uint64(m.InappropriateVotes)) + } + l = len(m.Result) + if l > 0 { + n += 1 + l + sovVoteing(uint64(l)) + } + return n +} + +func (m *SingleVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CardId != 0 { + n += 1 + sovVoteing(uint64(m.CardId)) + } + l = len(m.VoteType) + if l > 0 { + n += 1 + l + sovVoteing(uint64(l)) + } + return n +} + +func (m *VoteRight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CardId != 0 { + n += 1 + sovVoteing(uint64(m.CardId)) + } + if m.ExpireBlock != 0 { + n += 1 + sovVoteing(uint64(m.ExpireBlock)) + } + return n +} + +func sovVoteing(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozVoteing(x uint64) (n int) { + return sovVoteing(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *VotingResults) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VotingResults: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VotingResults: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalVotes", wireType) + } + m.TotalVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalFairEnoughVotes", wireType) + } + m.TotalFairEnoughVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalFairEnoughVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalOverpoweredVotes", wireType) + } + m.TotalOverpoweredVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalOverpoweredVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnderpoweredVotes", wireType) + } + m.TotalUnderpoweredVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalUnderpoweredVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalInappropriateVotes", wireType) + } + m.TotalInappropriateVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalInappropriateVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CardResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVoteing + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVoteing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CardResults = append(m.CardResults, &VotingResult{}) + if err := m.CardResults[len(m.CardResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVoteing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVoteing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Notes = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVoteing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVoteing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VotingResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VotingResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VotingResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) + } + m.CardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CardId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FairEnoughVotes", wireType) + } + m.FairEnoughVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FairEnoughVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OverpoweredVotes", wireType) + } + m.OverpoweredVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OverpoweredVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnderpoweredVotes", wireType) + } + m.UnderpoweredVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnderpoweredVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InappropriateVotes", wireType) + } + m.InappropriateVotes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InappropriateVotes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVoteing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVoteing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Result = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVoteing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVoteing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SingleVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SingleVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SingleVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) + } + m.CardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CardId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVoteing + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVoteing + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VoteType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVoteing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVoteing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VoteRight) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VoteRight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VoteRight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) + } + m.CardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CardId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpireBlock", wireType) + } + m.ExpireBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVoteing + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpireBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVoteing(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVoteing + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVoteing(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVoteing + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVoteing + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVoteing + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthVoteing + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupVoteing + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthVoteing + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthVoteing = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVoteing = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupVoteing = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cardchain/types/voting_result.pb.go b/x/cardchain/types/voting_result.pb.go deleted file mode 100644 index 5b1f364c..00000000 --- a/x/cardchain/types/voting_result.pb.go +++ /dev/null @@ -1,498 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cardchain/cardchain/voting_result.proto - -package types - -import ( - fmt "fmt" - 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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type VotingResult struct { - CardId uint64 `protobuf:"varint,1,opt,name=cardId,proto3" json:"cardId,omitempty"` - FairEnoughVotes uint64 `protobuf:"varint,2,opt,name=fairEnoughVotes,proto3" json:"fairEnoughVotes,omitempty"` - OverpoweredVotes uint64 `protobuf:"varint,3,opt,name=overpoweredVotes,proto3" json:"overpoweredVotes,omitempty"` - UnderpoweredVotes uint64 `protobuf:"varint,4,opt,name=underpoweredVotes,proto3" json:"underpoweredVotes,omitempty"` - InappropriateVotes uint64 `protobuf:"varint,5,opt,name=inappropriateVotes,proto3" json:"inappropriateVotes,omitempty"` - Result string `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"` -} - -func (m *VotingResult) Reset() { *m = VotingResult{} } -func (m *VotingResult) String() string { return proto.CompactTextString(m) } -func (*VotingResult) ProtoMessage() {} -func (*VotingResult) Descriptor() ([]byte, []int) { - return fileDescriptor_2189b4591619582a, []int{0} -} -func (m *VotingResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VotingResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VotingResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VotingResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_VotingResult.Merge(m, src) -} -func (m *VotingResult) XXX_Size() int { - return m.Size() -} -func (m *VotingResult) XXX_DiscardUnknown() { - xxx_messageInfo_VotingResult.DiscardUnknown(m) -} - -var xxx_messageInfo_VotingResult proto.InternalMessageInfo - -func (m *VotingResult) GetCardId() uint64 { - if m != nil { - return m.CardId - } - return 0 -} - -func (m *VotingResult) GetFairEnoughVotes() uint64 { - if m != nil { - return m.FairEnoughVotes - } - return 0 -} - -func (m *VotingResult) GetOverpoweredVotes() uint64 { - if m != nil { - return m.OverpoweredVotes - } - return 0 -} - -func (m *VotingResult) GetUnderpoweredVotes() uint64 { - if m != nil { - return m.UnderpoweredVotes - } - return 0 -} - -func (m *VotingResult) GetInappropriateVotes() uint64 { - if m != nil { - return m.InappropriateVotes - } - return 0 -} - -func (m *VotingResult) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func init() { - proto.RegisterType((*VotingResult)(nil), "DecentralCardGame.cardchain.cardchain.VotingResult") -} - -func init() { - proto.RegisterFile("cardchain/cardchain/voting_result.proto", fileDescriptor_2189b4591619582a) -} - -var fileDescriptor_2189b4591619582a = []byte{ - // 268 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0x4e, 0x2c, 0x4a, - 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x47, 0xb0, 0xca, 0xf2, 0x4b, 0x32, 0xf3, 0xd2, 0xe3, 0x8b, - 0x52, 0x8b, 0x4b, 0x73, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x54, 0x5d, 0x52, 0x93, - 0x53, 0xf3, 0x4a, 0x8a, 0x12, 0x73, 0x9c, 0x13, 0x8b, 0x52, 0xdc, 0x13, 0x73, 0x53, 0xf5, 0xe0, - 0x1a, 0x10, 0x2c, 0xa5, 0x4f, 0x8c, 0x5c, 0x3c, 0x61, 0x60, 0xed, 0x41, 0x60, 0xdd, 0x42, 0x62, - 0x5c, 0x6c, 0x20, 0x59, 0xcf, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x28, 0x4f, 0x48, - 0x83, 0x8b, 0x3f, 0x2d, 0x31, 0xb3, 0xc8, 0x35, 0x2f, 0xbf, 0x34, 0x3d, 0x23, 0x2c, 0xbf, 0x24, - 0xb5, 0x58, 0x82, 0x09, 0xac, 0x00, 0x5d, 0x58, 0x48, 0x8b, 0x4b, 0x20, 0xbf, 0x2c, 0xb5, 0xa8, - 0x20, 0xbf, 0x3c, 0xb5, 0x28, 0x35, 0x05, 0xa2, 0x94, 0x19, 0xac, 0x14, 0x43, 0x5c, 0x48, 0x87, - 0x4b, 0xb0, 0x34, 0x2f, 0x05, 0x4d, 0x31, 0x0b, 0x58, 0x31, 0xa6, 0x84, 0x90, 0x1e, 0x97, 0x50, - 0x66, 0x5e, 0x62, 0x41, 0x41, 0x51, 0x7e, 0x41, 0x51, 0x66, 0x62, 0x49, 0x2a, 0x44, 0x39, 0x2b, - 0x58, 0x39, 0x16, 0x19, 0x90, 0x5f, 0x20, 0x61, 0x22, 0xc1, 0xa6, 0xc0, 0xa8, 0xc1, 0x19, 0x04, - 0xe5, 0x39, 0x05, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x45, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x46, 0x00, 0xea, 0x3b, 0xc3, 0x43, - 0xbc, 0x02, 0x29, 0xf4, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xc1, 0x6e, 0x0c, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x27, 0xe3, 0xee, 0xf1, 0xa1, 0x01, 0x00, 0x00, -} - -func (m *VotingResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VotingResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VotingResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Result) > 0 { - i -= len(m.Result) - copy(dAtA[i:], m.Result) - i = encodeVarintVotingResult(dAtA, i, uint64(len(m.Result))) - i-- - dAtA[i] = 0x32 - } - if m.InappropriateVotes != 0 { - i = encodeVarintVotingResult(dAtA, i, uint64(m.InappropriateVotes)) - i-- - dAtA[i] = 0x28 - } - if m.UnderpoweredVotes != 0 { - i = encodeVarintVotingResult(dAtA, i, uint64(m.UnderpoweredVotes)) - i-- - dAtA[i] = 0x20 - } - if m.OverpoweredVotes != 0 { - i = encodeVarintVotingResult(dAtA, i, uint64(m.OverpoweredVotes)) - i-- - dAtA[i] = 0x18 - } - if m.FairEnoughVotes != 0 { - i = encodeVarintVotingResult(dAtA, i, uint64(m.FairEnoughVotes)) - i-- - dAtA[i] = 0x10 - } - if m.CardId != 0 { - i = encodeVarintVotingResult(dAtA, i, uint64(m.CardId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintVotingResult(dAtA []byte, offset int, v uint64) int { - offset -= sovVotingResult(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VotingResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CardId != 0 { - n += 1 + sovVotingResult(uint64(m.CardId)) - } - if m.FairEnoughVotes != 0 { - n += 1 + sovVotingResult(uint64(m.FairEnoughVotes)) - } - if m.OverpoweredVotes != 0 { - n += 1 + sovVotingResult(uint64(m.OverpoweredVotes)) - } - if m.UnderpoweredVotes != 0 { - n += 1 + sovVotingResult(uint64(m.UnderpoweredVotes)) - } - if m.InappropriateVotes != 0 { - n += 1 + sovVotingResult(uint64(m.InappropriateVotes)) - } - l = len(m.Result) - if l > 0 { - n += 1 + l + sovVotingResult(uint64(l)) - } - return n -} - -func sovVotingResult(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozVotingResult(x uint64) (n int) { - return sovVotingResult(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VotingResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VotingResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VotingResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CardId", wireType) - } - m.CardId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CardId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FairEnoughVotes", wireType) - } - m.FairEnoughVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FairEnoughVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OverpoweredVotes", wireType) - } - m.OverpoweredVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OverpoweredVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnderpoweredVotes", wireType) - } - m.UnderpoweredVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnderpoweredVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InappropriateVotes", wireType) - } - m.InappropriateVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InappropriateVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResult - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVotingResult - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVotingResult - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Result = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVotingResult(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthVotingResult - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVotingResult(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResult - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResult - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResult - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthVotingResult - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupVotingResult - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthVotingResult - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthVotingResult = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVotingResult = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupVotingResult = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/cardchain/types/voting_results.pb.go b/x/cardchain/types/voting_results.pb.go deleted file mode 100644 index 27f50f80..00000000 --- a/x/cardchain/types/voting_results.pb.go +++ /dev/null @@ -1,563 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cardchain/cardchain/voting_results.proto - -package types - -import ( - fmt "fmt" - 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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type VotingResults struct { - TotalVotes uint64 `protobuf:"varint,1,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"` - TotalFairEnoughVotes uint64 `protobuf:"varint,2,opt,name=totalFairEnoughVotes,proto3" json:"totalFairEnoughVotes,omitempty"` - TotalOverpoweredVotes uint64 `protobuf:"varint,3,opt,name=totalOverpoweredVotes,proto3" json:"totalOverpoweredVotes,omitempty"` - TotalUnderpoweredVotes uint64 `protobuf:"varint,4,opt,name=totalUnderpoweredVotes,proto3" json:"totalUnderpoweredVotes,omitempty"` - TotalInappropriateVotes uint64 `protobuf:"varint,5,opt,name=totalInappropriateVotes,proto3" json:"totalInappropriateVotes,omitempty"` - CardResults []*VotingResult `protobuf:"bytes,6,rep,name=cardResults,proto3" json:"cardResults,omitempty"` - Notes string `protobuf:"bytes,7,opt,name=notes,proto3" json:"notes,omitempty"` -} - -func (m *VotingResults) Reset() { *m = VotingResults{} } -func (m *VotingResults) String() string { return proto.CompactTextString(m) } -func (*VotingResults) ProtoMessage() {} -func (*VotingResults) Descriptor() ([]byte, []int) { - return fileDescriptor_a233499ddc8264f3, []int{0} -} -func (m *VotingResults) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VotingResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VotingResults.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VotingResults) XXX_Merge(src proto.Message) { - xxx_messageInfo_VotingResults.Merge(m, src) -} -func (m *VotingResults) XXX_Size() int { - return m.Size() -} -func (m *VotingResults) XXX_DiscardUnknown() { - xxx_messageInfo_VotingResults.DiscardUnknown(m) -} - -var xxx_messageInfo_VotingResults proto.InternalMessageInfo - -func (m *VotingResults) GetTotalVotes() uint64 { - if m != nil { - return m.TotalVotes - } - return 0 -} - -func (m *VotingResults) GetTotalFairEnoughVotes() uint64 { - if m != nil { - return m.TotalFairEnoughVotes - } - return 0 -} - -func (m *VotingResults) GetTotalOverpoweredVotes() uint64 { - if m != nil { - return m.TotalOverpoweredVotes - } - return 0 -} - -func (m *VotingResults) GetTotalUnderpoweredVotes() uint64 { - if m != nil { - return m.TotalUnderpoweredVotes - } - return 0 -} - -func (m *VotingResults) GetTotalInappropriateVotes() uint64 { - if m != nil { - return m.TotalInappropriateVotes - } - return 0 -} - -func (m *VotingResults) GetCardResults() []*VotingResult { - if m != nil { - return m.CardResults - } - return nil -} - -func (m *VotingResults) GetNotes() string { - if m != nil { - return m.Notes - } - return "" -} - -func init() { - proto.RegisterType((*VotingResults)(nil), "DecentralCardGame.cardchain.cardchain.VotingResults") -} - -func init() { - proto.RegisterFile("cardchain/cardchain/voting_results.proto", fileDescriptor_a233499ddc8264f3) -} - -var fileDescriptor_a233499ddc8264f3 = []byte{ - // 313 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0xc3, 0x40, - 0x10, 0xc6, 0xbb, 0xfd, 0x27, 0x6e, 0xf1, 0xb2, 0x54, 0x2d, 0x1e, 0x96, 0x22, 0x88, 0x39, 0x25, - 0xd0, 0x8a, 0xf4, 0x6c, 0xfd, 0x83, 0x27, 0x21, 0xd0, 0x1e, 0xbc, 0xc8, 0x36, 0x59, 0x92, 0x40, - 0xba, 0xbb, 0x6c, 0x36, 0x55, 0xdf, 0xc2, 0xc7, 0xf2, 0xd8, 0xa3, 0x47, 0x49, 0x5e, 0xc2, 0xa3, - 0x38, 0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e, 0x1f, 0x39, 0xbb, 0xbe, 0x6d, 0x2e, 0xfc, 0xd7, 0x82, - 0xa2, 0x65, 0x41, 0xd1, 0x7b, 0x41, 0xd1, 0x4b, 0x49, 0x6b, 0xcb, 0x92, 0xd6, 0xde, 0x4a, 0x5a, - 0xbb, 0x1f, 0x45, 0x89, 0x89, 0xf3, 0x99, 0x1b, 0xc8, 0xb9, 0xf7, 0xeb, 0xb7, 0x37, 0x5e, 0x05, - 0xfa, 0x54, 0x09, 0xd7, 0x3c, 0x2b, 0x9e, 0xcd, 0xda, 0x90, 0xea, 0xf0, 0x33, 0x00, 0x00, 0xff, - 0xff, 0xdd, 0x96, 0x11, 0x73, 0x51, 0x02, 0x00, 0x00, -} - -func (m *VotingResults) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VotingResults) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VotingResults) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Notes) > 0 { - i -= len(m.Notes) - copy(dAtA[i:], m.Notes) - i = encodeVarintVotingResults(dAtA, i, uint64(len(m.Notes))) - i-- - dAtA[i] = 0x3a - } - if len(m.CardResults) > 0 { - for iNdEx := len(m.CardResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CardResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVotingResults(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.TotalInappropriateVotes != 0 { - i = encodeVarintVotingResults(dAtA, i, uint64(m.TotalInappropriateVotes)) - i-- - dAtA[i] = 0x28 - } - if m.TotalUnderpoweredVotes != 0 { - i = encodeVarintVotingResults(dAtA, i, uint64(m.TotalUnderpoweredVotes)) - i-- - dAtA[i] = 0x20 - } - if m.TotalOverpoweredVotes != 0 { - i = encodeVarintVotingResults(dAtA, i, uint64(m.TotalOverpoweredVotes)) - i-- - dAtA[i] = 0x18 - } - if m.TotalFairEnoughVotes != 0 { - i = encodeVarintVotingResults(dAtA, i, uint64(m.TotalFairEnoughVotes)) - i-- - dAtA[i] = 0x10 - } - if m.TotalVotes != 0 { - i = encodeVarintVotingResults(dAtA, i, uint64(m.TotalVotes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintVotingResults(dAtA []byte, offset int, v uint64) int { - offset -= sovVotingResults(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VotingResults) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TotalVotes != 0 { - n += 1 + sovVotingResults(uint64(m.TotalVotes)) - } - if m.TotalFairEnoughVotes != 0 { - n += 1 + sovVotingResults(uint64(m.TotalFairEnoughVotes)) - } - if m.TotalOverpoweredVotes != 0 { - n += 1 + sovVotingResults(uint64(m.TotalOverpoweredVotes)) - } - if m.TotalUnderpoweredVotes != 0 { - n += 1 + sovVotingResults(uint64(m.TotalUnderpoweredVotes)) - } - if m.TotalInappropriateVotes != 0 { - n += 1 + sovVotingResults(uint64(m.TotalInappropriateVotes)) - } - if len(m.CardResults) > 0 { - for _, e := range m.CardResults { - l = e.Size() - n += 1 + l + sovVotingResults(uint64(l)) - } - } - l = len(m.Notes) - if l > 0 { - n += 1 + l + sovVotingResults(uint64(l)) - } - return n -} - -func sovVotingResults(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozVotingResults(x uint64) (n int) { - return sovVotingResults(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VotingResults) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VotingResults: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VotingResults: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalVotes", wireType) - } - m.TotalVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalFairEnoughVotes", wireType) - } - m.TotalFairEnoughVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalFairEnoughVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalOverpoweredVotes", wireType) - } - m.TotalOverpoweredVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalOverpoweredVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnderpoweredVotes", wireType) - } - m.TotalUnderpoweredVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalUnderpoweredVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalInappropriateVotes", wireType) - } - m.TotalInappropriateVotes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalInappropriateVotes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CardResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVotingResults - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVotingResults - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CardResults = append(m.CardResults, &VotingResult{}) - if err := m.CardResults[len(m.CardResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVotingResults - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVotingResults - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVotingResults - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Notes = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVotingResults(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthVotingResults - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVotingResults(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResults - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResults - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVotingResults - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthVotingResults - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupVotingResults - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthVotingResults - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthVotingResults = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVotingResults = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupVotingResults = fmt.Errorf("proto: unexpected end of group") -)