diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 875e4c67..a847f1c1 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -32948,6 +32948,10 @@ paths: uniqueDropRatio: type: string format: uint64 + councilVotingTimeLimit: + type: string + format: uint64 + title: seconds till the council ends description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -33005,6 +33009,7 @@ paths: - bannedSoon - bannedVerySoon - none + - inCouncil default: scheme votePool: type: string @@ -33289,13 +33294,14 @@ paths: status: type: string enum: + - councilDoesNotExist - councilOpen - councilCreated - councilClosed - commited - revealed - suggestionsMade - default: councilOpen + default: councilDoesNotExist trialStart: type: string format: uint64 @@ -33325,6 +33331,131 @@ paths: format: uint64 tags: - Query + /DecentralCardGame/Cardchain/cardchain/q_councils/{status}: + get: + summary: Queries a list of QCouncils items. + operationId: DecentralCardGameCardchainCardchainQCouncils + responses: + '200': + description: A successful response. + schema: + type: object + properties: + councilssIds: + type: array + items: + type: string + format: uint64 + councils: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voters: + type: array + items: + type: string + hashResponses: + type: array + items: + type: object + properties: + user: + type: string + hash: + type: string + clearResponses: + type: array + items: + type: object + properties: + user: + type: string + response: + type: string + enum: + - 'Yes' + - 'No' + - Suggestion + default: 'Yes' + suggestion: + type: string + treasury: + type: string + status: + type: string + enum: + - councilDoesNotExist + - councilOpen + - councilCreated + - councilClosed + - commited + - revealed + - suggestionsMade + default: councilDoesNotExist + trialStart: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: status + in: path + required: true + type: string + enum: + - councilDoesNotExist + - councilOpen + - councilCreated + - councilClosed + - commited + - revealed + - suggestionsMade + - name: voters + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: card + in: query + required: false + type: string + format: uint64 + - name: creator + in: query + required: false + type: string + - name: ignore.status + in: query + required: false + type: boolean + - name: ignore.card + in: query + required: false + type: boolean + tags: + - Query /DecentralCardGame/Cardchain/cardchain/q_match/{matchId}: get: summary: Queries a list of QMatch items. @@ -33994,14 +34125,20 @@ paths: items: type: string format: uint64 - CouncilStatus: - type: string - enum: - - available - - unavailable - - openCouncil - - startedCouncil - default: available + councilParticipation: + type: object + properties: + status: + type: string + enum: + - available + - unavailable + - openCouncil + - startedCouncil + default: available + council: + type: string + format: uint64 ReportMatches: type: boolean profileCard: @@ -68635,13 +68772,14 @@ definitions: DecentralCardGame.cardchain.cardchain.CouncelingStatus: type: string enum: + - councilDoesNotExist - councilOpen - councilCreated - councilClosed - commited - revealed - suggestionsMade - default: councilOpen + default: councilDoesNotExist DecentralCardGame.cardchain.cardchain.Council: type: object properties: @@ -68682,16 +68820,31 @@ definitions: status: type: string enum: + - councilDoesNotExist - councilOpen - councilCreated - councilClosed - commited - revealed - suggestionsMade - default: councilOpen + default: councilDoesNotExist trialStart: type: string format: uint64 + DecentralCardGame.cardchain.cardchain.CouncilParticipation: + type: object + properties: + status: + type: string + enum: + - available + - unavailable + - openCouncil + - startedCouncil + default: available + council: + type: string + format: uint64 DecentralCardGame.cardchain.cardchain.CouncilStatus: type: string enum: @@ -68700,6 +68853,13 @@ definitions: - openCouncil - startedCouncil default: available + DecentralCardGame.cardchain.cardchain.IgnoreCouncils: + type: object + properties: + status: + type: boolean + card: + type: boolean DecentralCardGame.cardchain.cardchain.IgnoreMatches: type: object properties: @@ -68997,6 +69157,7 @@ definitions: - bannedSoon - bannedVerySoon - none + - inCouncil default: scheme votePool: type: string @@ -69135,6 +69296,10 @@ definitions: uniqueDropRatio: type: string format: uint64 + councilVotingTimeLimit: + type: string + format: uint64 + title: seconds till the council ends description: Params defines the parameters for the module. DecentralCardGame.cardchain.cardchain.QueryParamsResponse: type: object @@ -69208,6 +69373,10 @@ definitions: uniqueDropRatio: type: string format: uint64 + councilVotingTimeLimit: + type: string + format: uint64 + title: seconds till the council ends description: QueryParamsResponse is response type for the Query/Params RPC method. DecentralCardGame.cardchain.cardchain.QueryQCardContentResponse: type: object @@ -69264,6 +69433,67 @@ definitions: items: type: string format: uint64 + DecentralCardGame.cardchain.cardchain.QueryQCouncilsResponse: + type: object + properties: + councilssIds: + type: array + items: + type: string + format: uint64 + councils: + type: array + items: + type: object + properties: + cardId: + type: string + format: uint64 + voters: + type: array + items: + type: string + hashResponses: + type: array + items: + type: object + properties: + user: + type: string + hash: + type: string + clearResponses: + type: array + items: + type: object + properties: + user: + type: string + response: + type: string + enum: + - 'Yes' + - 'No' + - Suggestion + default: 'Yes' + suggestion: + type: string + treasury: + type: string + status: + type: string + enum: + - councilDoesNotExist + - councilOpen + - councilCreated + - councilClosed + - commited + - revealed + - suggestionsMade + default: councilDoesNotExist + trialStart: + type: string + format: uint64 DecentralCardGame.cardchain.cardchain.QueryQMatchesResponse: type: object properties: @@ -69541,6 +69771,7 @@ definitions: - bannedSoon - bannedVerySoon - none + - inCouncil default: scheme DecentralCardGame.cardchain.cardchain.User: type: object @@ -69562,14 +69793,20 @@ definitions: items: type: string format: uint64 - CouncilStatus: - type: string - enum: - - available - - unavailable - - openCouncil - - startedCouncil - default: available + councilParticipation: + type: object + properties: + status: + type: string + enum: + - available + - unavailable + - openCouncil + - startedCouncil + default: available + council: + type: string + format: uint64 ReportMatches: type: boolean profileCard: diff --git a/proto/cardchain/cardchain/card.proto b/proto/cardchain/cardchain/card.proto index e5b3d97c..6f6a6430 100644 --- a/proto/cardchain/cardchain/card.proto +++ b/proto/cardchain/cardchain/card.proto @@ -58,6 +58,7 @@ enum Status { bannedSoon = 6; bannedVerySoon = 7; none = 8; + inCouncil = 9; } enum CardRarity { diff --git a/proto/cardchain/cardchain/council.proto b/proto/cardchain/cardchain/council.proto index 8aa7d2bb..dab6a723 100644 --- a/proto/cardchain/cardchain/council.proto +++ b/proto/cardchain/cardchain/council.proto @@ -33,10 +33,11 @@ enum Response { } enum CouncelingStatus { - councilOpen = 0; - councilCreated = 1; - councilClosed = 2; - commited = 3; - revealed = 4; - suggestionsMade = 5; + councilDoesNotExist = 0; + councilOpen = 1; + councilCreated = 2; + councilClosed = 3; + commited = 4; + revealed = 5; + suggestionsMade = 6; } diff --git a/proto/cardchain/cardchain/params.proto b/proto/cardchain/cardchain/params.proto index 42b30c3f..41690afe 100644 --- a/proto/cardchain/cardchain/params.proto +++ b/proto/cardchain/cardchain/params.proto @@ -32,4 +32,5 @@ message Params { uint64 rareDropRatio = 22; uint64 exceptionalDropRatio = 23; uint64 uniqueDropRatio = 24; + uint64 councilVotingTimeLimit = 25; // seconds till the council ends } diff --git a/proto/cardchain/cardchain/query.proto b/proto/cardchain/cardchain/query.proto index 352340b0..767ef8a5 100644 --- a/proto/cardchain/cardchain/query.proto +++ b/proto/cardchain/cardchain/query.proto @@ -100,6 +100,11 @@ option (google.api.http).get = option (google.api.http).get = "/DecentralCardGame/Cardchain/cardchain/rarity_distribution/{setId}"; } +// Queries a list of QCouncils items. + rpc QCouncils(QueryQCouncilsRequest) returns (QueryQCouncilsResponse) { + option (google.api.http).get = "/DecentralCardGame/Cardchain/cardchain/q_councils/{status}"; + } + // this line is used by starport scaffolding # 2 } @@ -273,4 +278,22 @@ message QueryRarityDistributionResponse { repeated uint32 wanted = 2; } +message QueryQCouncilsRequest { + CouncelingStatus status = 1; + repeated string voters = 3; + uint64 card = 4; + string creator = 5; + IgnoreCouncils ignore = 2; +} + +message IgnoreCouncils { + bool status = 1; + bool card = 2; +} + +message QueryQCouncilsResponse { + repeated uint64 councilssIds = 1; + repeated Council councils = 2; +} + // this line is used by starport scaffolding # 3 diff --git a/proto/cardchain/cardchain/tx.proto b/proto/cardchain/cardchain/tx.proto index e2426e69..7261b35e 100644 --- a/proto/cardchain/cardchain/tx.proto +++ b/proto/cardchain/cardchain/tx.proto @@ -52,7 +52,7 @@ service Msg { rpc SetSetArtist (MsgSetSetArtist ) returns (MsgSetSetArtistResponse ); rpc SetUserWebsite (MsgSetUserWebsite ) returns (MsgSetUserWebsiteResponse ); rpc SetUserBiography (MsgSetUserBiography ) returns (MsgSetUserBiographyResponse ); - + // this line is used by starport scaffolding # proto/tx/rpc rpc MultiVoteCard (MsgMultiVoteCard ) returns (MsgMultiVoteCardResponse ); rpc OpenMatch (MsgOpenMatch ) returns (MsgOpenMatchResponse ); @@ -94,7 +94,6 @@ message MsgSaveCardContent { string creator = 1; uint64 cardId = 2; bytes content = 3; - // bytes image = 4; // string fullArt = 5; string notes = 4; diff --git a/proto/cardchain/cardchain/user.proto b/proto/cardchain/cardchain/user.proto index 71b834a4..8aaed9e9 100644 --- a/proto/cardchain/cardchain/user.proto +++ b/proto/cardchain/cardchain/user.proto @@ -10,7 +10,7 @@ message User { repeated uint64 ownedCardSchemes = 2; repeated uint64 ownedPrototypes = 3; repeated uint64 cards = 4; - CouncilStatus CouncilStatus = 6; + CouncilParticipation councilParticipation = 6; bool ReportMatches = 7; uint64 profileCard = 8; AirDrops airDrops = 9; @@ -28,6 +28,11 @@ enum CouncilStatus { startedCouncil = 3; } +message CouncilParticipation { + CouncilStatus status = 1; + uint64 council = 2; +} + message BoosterPack { uint64 setId = 1; int64 timeStamp = 2; diff --git a/scripts/tests/test_council.sh b/scripts/tests/test_council.sh index a78a1b3e..65fcaf1a 100755 --- a/scripts/tests/test_council.sh +++ b/scripts/tests/test_council.sh @@ -1,13 +1,15 @@ ./test_setup.sh -ARGS="--node tcp://localhost:26659 --gas 8000000" +ARGS="--node tcp://localhost:26657 --chain-id Testnet3 --gas 8000000" for i in {0..5} do ./createUser.sh $i done -Cardchaind tx cardchain create-council 0 --from "Cooler Typ" $ARGS +Cardchaind tx cardchain create-council 1 --from "Cooler Typ" $ARGS + +exit for i in {0..5} do diff --git a/scripts/tests/test_setup.sh b/scripts/tests/test_setup.sh index 8c7ad7e2..382518be 100755 --- a/scripts/tests/test_setup.sh +++ b/scripts/tests/test_setup.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash -ARGS="--node tcp://localhost:26659" +ARGS="--node tcp://localhost:26657 --chain-id Testnet3" Cardchaind keys add "Cooler Typ" @@ -12,6 +12,6 @@ Cardchaind tx cardchain createuser $(Cardchaind keys show "Cooler Artist" --addr Cardchaind tx cardchain buy-card-scheme 8000000000ucredits --from "Cooler Typ" $ARGS -Cardchaind tx cardchain save-card-content 0 '{"Entity":{"CardName":"Yees","CastingCost":13,"Class":{"Nature":false,"Mysticism":false,"Technology":true,"Culture":true},"Abilities":[{"Pay":{"ManaAmount":2,"Effects":[{"Arm":{"Target":"RANDOM","Amount":{"SimpleIntValue":3}}}]}}],"Attack":10,"Health":10,"FlavourText":"-.-","Tags":["SPIRIT"],"Keywords":["[\"Periodic\", \"Ravage\"]"],"RulesTexts":["This could be your RulesText",""]}}' "no notes" "$(Cardchaind keys show "Cooler Artist" --address)" --from "Cooler Typ" --gas 99000000 $ARGS +Cardchaind tx cardchain save-card-content 1 '{"Entity":{"CardName":"Yees","CastingCost":13,"Class":{"Nature":false,"Mysticism":false,"Technology":true,"Culture":true},"Abilities":[{"Pay":{"ManaAmount":2,"Effects":[{"Arm":{"Target":"RANDOM","Amount":{"SimpleIntValue":3}}}]}}],"Attack":10,"Health":10,"FlavourText":"-.-","Tags":["SPIRIT"],"Keywords":["[\"Periodic\", \"Ravage\"]"],"RulesTexts":["This could be your RulesText",""]}}' "no notes" "$(Cardchaind keys show "Cooler Artist" --address)" --from "Cooler Typ" --gas 99000000 $ARGS -Cardchaind tx cardchain add-artwork 0 "data:image/jpeg;base64,$(base64 ./pic.jpg)" true --from "Cooler Artist" --gas 990000000 $ARGS +Cardchaind tx cardchain add-artwork 1 "data:image/jpeg;base64,$(base64 ./pic.jpg)" true --from "Cooler Artist" --gas 990000000 $ARGS diff --git a/x/cardchain/client/cli/query.go b/x/cardchain/client/cli/query.go index 031ef116..b22d2908 100644 --- a/x/cardchain/client/cli/query.go +++ b/x/cardchain/client/cli/query.go @@ -55,6 +55,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdRarityDistribution()) + cmd.AddCommand(CmdQCouncils()) + // this line is used by starport scaffolding # 1 return cmd diff --git a/x/cardchain/client/cli/query_q_councils.go b/x/cardchain/client/cli/query_q_councils.go new file mode 100644 index 00000000..556cf20d --- /dev/null +++ b/x/cardchain/client/cli/query_q_councils.go @@ -0,0 +1,42 @@ +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/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdQCouncils() *cobra.Command { + cmd := &cobra.Command{ + Use: "q-councils", + Short: "Query qCouncils", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) (err error) { + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryQCouncilsRequest{} + + res, err := queryClient.QCouncils(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/cardchain/keeper/council.go b/x/cardchain/keeper/council.go index 4e8f3c86..5788e963 100644 --- a/x/cardchain/keeper/council.go +++ b/x/cardchain/keeper/council.go @@ -66,7 +66,8 @@ func (k Keeper) TryEvaluate(ctx sdk.Context, council *types.Council) error { if err != nil { return err } - user.CouncilStatus = types.CouncilStatus_available + user.CouncilParticipation.Status = types.CouncilStatus_available + user.CouncilParticipation.Council = 0 user.Cards = append(user.Cards, council.CardId) k.SetUserFromUser(ctx, user) } @@ -140,3 +141,47 @@ func (k Keeper) CheckTrial(ctx sdk.Context) error { } return nil } + +func commitCouncilResponse(council *types.Council, user User, hash string, suggestion string) { + resp := types.WrapHashResponse{ + User: user.Addr.String(), + Hash: hash, + } + council.HashResponses = append(council.HashResponses, &resp) + if suggestion != "" { // Direcly reveal when a suggestion is made + clearResp := types.WrapClearResponse{ + User: user.Addr.String(), + Response: types.Response_Suggestion, + Suggestion: suggestion, + } + council.ClearResponses = append(council.ClearResponses, &clearResp) + } + + if len(council.HashResponses) == 5 { + council.Status = types.CouncelingStatus_commited + } +} + +func revealCouncilResponse(council *types.Council, user User, response types.Response, secret string) error { + hashStringResponse := GetResponseHash(response, secret) + var originalHash string + + for _, hash := range council.HashResponses { + if hash.User == user.Addr.String() { + originalHash = hash.Hash + break + } + } + + if originalHash != hashStringResponse { + return types.ErrBadReveal + } + + resp := types.WrapClearResponse{User: user.Addr.String(), Response: response} + council.ClearResponses = append(council.ClearResponses, &resp) + + if len(council.ClearResponses) == 5 { + council.Status = types.CouncelingStatus_revealed + } + return nil +} diff --git a/x/cardchain/keeper/grpc_query_q_councils.go b/x/cardchain/keeper/grpc_query_q_councils.go new file mode 100644 index 00000000..296a424b --- /dev/null +++ b/x/cardchain/keeper/grpc_query_q_councils.go @@ -0,0 +1,73 @@ +package keeper + +import ( + "context" + + "github.com/DecentralCardGame/Cardchain/x/cardchain/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "golang.org/x/exp/slices" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) QCouncils(goCtx context.Context, req *types.QueryQCouncilsRequest) (*types.QueryQCouncilsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + var ( + councilIds []uint64 + councilsList []*types.Council + allUsersInCollection bool + ) + + if req.Ignore == nil { + newIgnore := types.NewIgnoreCouncils() + req.Ignore = &newIgnore + } + + iter := k.Councils.GetItemIterator(ctx) + for ; iter.Valid(); iter.Next() { + idx, council := iter.Value() + allUsersInCollection = true + + // Checks for seller + if req.Creator != "" { + card := k.Cards.Get(ctx, council.CardId) + if req.Creator != card.Owner { + continue + } + } + + // Checks for users contained in the contributors + for _, user := range req.Voters { + if !slices.Contains(council.Voters, user) { + allUsersInCollection = false + } + } + if !allUsersInCollection { + continue + } + + // Checks for Status + if !req.Ignore.Status { + if req.Status != council.Status { + continue + } + } + + // Checks for Card + if !req.Ignore.Card { + if req.Card != council.CardId { + continue + } + } + + councilsList = append(councilsList, council) + councilIds = append(councilIds, idx) + } + + return &types.QueryQCouncilsResponse{councilIds, councilsList}, nil +} diff --git a/x/cardchain/keeper/grpc_query_q_sets.go b/x/cardchain/keeper/grpc_query_q_sets.go index de1b3e53..cb048d35 100644 --- a/x/cardchain/keeper/grpc_query_q_sets.go +++ b/x/cardchain/keeper/grpc_query_q_sets.go @@ -17,8 +17,8 @@ func (k Keeper) QSets(goCtx context.Context, req *types.QueryQSetsRequest) (*typ var ( setIds []uint64 - allUsersInSet bool = true - allCardsInSet bool = true + allUsersInSet bool + allCardsInSet bool ) ctx := sdk.UnwrapSDKContext(goCtx) @@ -27,6 +27,9 @@ func (k Keeper) QSets(goCtx context.Context, req *types.QueryQSetsRequest) (*typ for ; iter.Valid(); iter.Next() { idx, set := iter.Value() + allUsersInSet = true + allCardsInSet = true + // Checks for status if !req.IgnoreStatus { if req.Status != set.Status { diff --git a/x/cardchain/keeper/keeper.go b/x/cardchain/keeper/keeper.go index b3101886..da0ba4cf 100644 --- a/x/cardchain/keeper/keeper.go +++ b/x/cardchain/keeper/keeper.go @@ -3,17 +3,17 @@ package keeper import ( "encoding/json" "fmt" - ffKeeper "github.com/DecentralCardGame/Cardchain/x/featureflag/keeper" - "github.com/cosmos/cosmos-sdk/types/errors" "sort" gtk "github.com/DecentralCardGame/Cardchain/types/generic_type_keeper" "github.com/DecentralCardGame/Cardchain/x/cardchain/types" + ffKeeper "github.com/DecentralCardGame/Cardchain/x/featureflag/keeper" "github.com/DecentralCardGame/cardobject/cardobject" "github.com/DecentralCardGame/cardobject/keywords" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" ) @@ -80,7 +80,7 @@ func NewKeeper( Servers: gtk.NewGTK[*types.Server](serversStoreKey, internalStoreKey, cdc, gtk.GetEmpty[types.Server]), FeatureFlagModuleInstance: featureFlagKeeper.GetModuleInstance(types.ModuleName, []string{string(types.FeatureFlagName_Council), string(types.FeatureFlagName_Matches)}), - BankKeeper: bankKeeper, + BankKeeper: bankKeeper, } } diff --git a/x/cardchain/keeper/msg_server_commit_council_response.go b/x/cardchain/keeper/msg_server_commit_council_response.go index db6cb965..996f13c9 100644 --- a/x/cardchain/keeper/msg_server_commit_council_response.go +++ b/x/cardchain/keeper/msg_server_commit_council_response.go @@ -38,23 +38,7 @@ func (k msgServer) CommitCouncilResponse(goCtx context.Context, msg *types.MsgCo return nil, sdkerrors.Wrap(errors.ErrUnauthorized, "Allready voted") } - resp := types.WrapHashResponse{ - User: msg.Creator, - Hash: msg.Response, - } - council.HashResponses = append(council.HashResponses, &resp) - if msg.Suggestion != "" { // Direcly reveal when a suggestion is made - clearResp := types.WrapClearResponse{ - User: msg.Creator, - Response: types.Response_Suggestion, - Suggestion: msg.Suggestion, - } - council.ClearResponses = append(council.ClearResponses, &clearResp) - } - - if len(council.HashResponses) == 5 { - council.Status = types.CouncelingStatus_commited - } + commitCouncilResponse(council, creator, msg.Response, msg.Suggestion) err = k.BurnCoinsFromAddr(ctx, creator.Addr, sdk.Coins{collateralDeposit}) if err != nil { diff --git a/x/cardchain/keeper/msg_server_create_council.go b/x/cardchain/keeper/msg_server_create_council.go index ec4082ca..ea17c94a 100644 --- a/x/cardchain/keeper/msg_server_create_council.go +++ b/x/cardchain/keeper/msg_server_create_council.go @@ -3,6 +3,7 @@ package keeper import ( "context" "math/rand" + "slices" sdkerrors "cosmossdk.io/errors" "github.com/DecentralCardGame/Cardchain/x/cardchain/types" @@ -19,10 +20,9 @@ func (k msgServer) CreateCouncil(goCtx context.Context, msg *types.MsgCreateCoun } card := k.Cards.Get(ctx, msg.CardId) - //if card.Status != types.Status_prototype { - // return nil, sdkerrors.Wrapf(types.ErrInvalidCardStatus, "%s", card.Status.String()) - //} else - if card.Owner != msg.Creator { + if card.Status != types.Status_prototype { + return nil, sdkerrors.Wrapf(types.ErrInvalidCardStatus, "%s", card.Status.String()) + } else if card.Owner != msg.Creator { return nil, sdkerrors.Wrap(errors.ErrUnauthorized, "Incorrect Creator") } @@ -36,7 +36,7 @@ func (k msgServer) CreateCouncil(goCtx context.Context, msg *types.MsgCreateCoun users, addresses := k.GetAllUsers(ctx) for idx, user := range users { - if user.CouncilStatus == types.CouncilStatus_available { + if user.CouncilParticipation.Status == types.CouncilStatus_available && !slices.Contains(user.OwnedPrototypes, msg.CardId) { possibleVoters = append(possibleVoters, User{*user, addresses[idx]}) } } @@ -59,10 +59,11 @@ func (k msgServer) CreateCouncil(goCtx context.Context, msg *types.MsgCreateCoun } for _, user := range fiveVoters { + user.CouncilParticipation.Council = councilId if status == types.CouncelingStatus_councilOpen { - user.CouncilStatus = types.CouncilStatus_openCouncil + user.CouncilParticipation.Status = types.CouncilStatus_openCouncil } else { - user.CouncilStatus = types.CouncilStatus_startedCouncil + user.CouncilParticipation.Status = types.CouncilStatus_startedCouncil } k.SetUserFromUser(ctx, user) voters = append(voters, user.Addr.String()) @@ -77,5 +78,8 @@ func (k msgServer) CreateCouncil(goCtx context.Context, msg *types.MsgCreateCoun k.Councils.Set(ctx, councilId, &council) + card.Status = types.Status_inCouncil + k.Cards.Set(ctx, msg.CardId, card) + return &types.MsgCreateCouncilResponse{}, nil } diff --git a/x/cardchain/keeper/msg_server_register_for_council.go b/x/cardchain/keeper/msg_server_register_for_council.go index 1e476e36..b2875af4 100644 --- a/x/cardchain/keeper/msg_server_register_for_council.go +++ b/x/cardchain/keeper/msg_server_register_for_council.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "slices" sdkerrors "cosmossdk.io/errors" "github.com/DecentralCardGame/Cardchain/x/cardchain/types" @@ -16,15 +17,19 @@ func (k msgServer) RegisterForCouncil(goCtx context.Context, msg *types.MsgRegis return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) } - if user.CouncilStatus != types.CouncilStatus_unavailable { - return nil, sdkerrors.Wrapf(types.ErrInvalidUserStatus, "%s", user.CouncilStatus.String()) + if user.CouncilParticipation.Status != types.CouncilStatus_unavailable { + return nil, sdkerrors.Wrapf(types.ErrInvalidUserStatus, "%s", user.CouncilParticipation.Status.String()) } iter := k.Councils.GetItemIterator(ctx) for ; iter.Valid(); iter.Next() { idx, council := iter.Value() if council.Status == types.CouncelingStatus_councilOpen { - council.Voters = append(council.Voters, msg.Creator) + if !slices.Contains(user.OwnedPrototypes, council.CardId) { + council.Voters = append(council.Voters, msg.Creator) + } else { + continue + } if len(council.Voters) == 5 { council.Status = types.CouncelingStatus_councilCreated } @@ -33,10 +38,11 @@ func (k msgServer) RegisterForCouncil(goCtx context.Context, msg *types.MsgRegis if err != nil { return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) } + usr.CouncilParticipation.Council = idx if len(council.Voters) == 5 { - usr.CouncilStatus = types.CouncilStatus_startedCouncil + usr.CouncilParticipation.Status = types.CouncilStatus_startedCouncil } else { - usr.CouncilStatus = types.CouncilStatus_openCouncil + usr.CouncilParticipation.Status = types.CouncilStatus_openCouncil } k.SetUserFromUser(ctx, usr) } @@ -49,8 +55,8 @@ func (k msgServer) RegisterForCouncil(goCtx context.Context, msg *types.MsgRegis if err != nil { return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) } - if user.CouncilStatus == types.CouncilStatus_unavailable { - user.CouncilStatus = types.CouncilStatus_available + if user.CouncilParticipation.Status == types.CouncilStatus_unavailable { + user.CouncilParticipation.Status = types.CouncilStatus_available } k.SetUserFromUser(ctx, user) diff --git a/x/cardchain/keeper/msg_server_reveal_council_response.go b/x/cardchain/keeper/msg_server_reveal_council_response.go index 6997cff7..23875941 100644 --- a/x/cardchain/keeper/msg_server_reveal_council_response.go +++ b/x/cardchain/keeper/msg_server_reveal_council_response.go @@ -38,25 +38,9 @@ func (k msgServer) RevealCouncilResponse(goCtx context.Context, msg *types.MsgRe return nil, sdkerrors.Wrap(errors.ErrUnauthorized, "Already voted") } - hashStringResponse := GetResponseHash(msg.Response, msg.Secret) - var originalHash string - - for _, hash := range council.HashResponses { - if hash.User == msg.Creator { - originalHash = hash.Hash - break - } - } - - if originalHash != hashStringResponse { - return nil, types.ErrBadReveal - } - - resp := types.WrapClearResponse{User: msg.Creator, Response: msg.Response} - council.ClearResponses = append(council.ClearResponses, &resp) - - if len(council.ClearResponses) == 5 { - council.Status = types.CouncelingStatus_revealed + err = revealCouncilResponse(council, creator, msg.Response, msg.Secret) + if err != nil { + return nil, err } err = k.BurnCoinsFromAddr(ctx, creator.Addr, sdk.Coins{collateralDeposit}) diff --git a/x/cardchain/keeper/msg_server_rewoke_council_registration.go b/x/cardchain/keeper/msg_server_rewoke_council_registration.go index 913f3323..3f043a1d 100644 --- a/x/cardchain/keeper/msg_server_rewoke_council_registration.go +++ b/x/cardchain/keeper/msg_server_rewoke_council_registration.go @@ -16,11 +16,11 @@ func (k msgServer) RewokeCouncilRegistration(goCtx context.Context, msg *types.M return nil, sdkerrors.Wrap(types.ErrUserDoesNotExist, err.Error()) } - if user.CouncilStatus != types.CouncilStatus_available { - return nil, sdkerrors.Wrapf(types.ErrInvalidUserStatus, "%s", user.CouncilStatus.String()) + if user.CouncilParticipation.Status != types.CouncilStatus_available { + return nil, sdkerrors.Wrapf(types.ErrInvalidUserStatus, "%s", user.CouncilParticipation.Status.String()) } - user.CouncilStatus = types.CouncilStatus_unavailable + user.CouncilParticipation.Status = types.CouncilStatus_unavailable k.SetUserFromUser(ctx, user) diff --git a/x/cardchain/keeper/user.go b/x/cardchain/keeper/user.go index c8c87f12..fae9a104 100644 --- a/x/cardchain/keeper/user.go +++ b/x/cardchain/keeper/user.go @@ -65,6 +65,9 @@ func (k Keeper) GetUser(ctx sdk.Context, address sdk.AccAddress) (types.User, er } k.cdc.MustUnmarshal(bz, &gottenUser) + if gottenUser.CouncilParticipation == nil { + gottenUser.CouncilParticipation = types.NewCouncilParticipation() + } return gottenUser, nil } diff --git a/x/cardchain/types/card.pb.go b/x/cardchain/types/card.pb.go index 7194106e..8656435f 100644 --- a/x/cardchain/types/card.pb.go +++ b/x/cardchain/types/card.pb.go @@ -36,6 +36,7 @@ const ( Status_bannedSoon Status = 6 Status_bannedVerySoon Status = 7 Status_none Status = 8 + Status_inCouncil Status = 9 ) var Status_name = map[int32]string{ @@ -48,6 +49,7 @@ var Status_name = map[int32]string{ 6: "bannedSoon", 7: "bannedVerySoon", 8: "none", + 9: "inCouncil", } var Status_value = map[string]int32{ @@ -60,6 +62,7 @@ var Status_value = map[string]int32{ "bannedSoon": 6, "bannedVerySoon": 7, "none": 8, + "inCouncil": 9, } func (x Status) String() string { @@ -497,51 +500,52 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/card.proto", fileDescriptor_a360ffd2377ddc30) } var fileDescriptor_a360ffd2377ddc30 = []byte{ - // 692 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0x1b, 0xc7, 0xb1, 0xa7, 0x6d, 0xea, 0xae, 0x2a, 0x64, 0x10, 0x4a, 0xad, 0x0a, 0x44, - 0xa8, 0x68, 0x22, 0xe0, 0xc2, 0xb5, 0x2d, 0x15, 0xaa, 0x10, 0x02, 0xb9, 0xa8, 0x07, 0x2e, 0x68, - 0x63, 0x4f, 0x63, 0x0b, 0x7b, 0xd7, 0xec, 0xae, 0xfb, 0xf1, 0x07, 0x38, 0xf3, 0x3b, 0xf8, 0x0f, - 0xdc, 0x7b, 0xec, 0x11, 0x71, 0xa8, 0x50, 0xfb, 0x47, 0xd0, 0xae, 0xd3, 0xa6, 0x1f, 0x08, 0x55, - 0xea, 0x0d, 0x71, 0xca, 0xbc, 0xb7, 0xef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 0xa9, 0xb4, 0x1a, - 0xf6, 0x63, 0x5e, 0x0c, 0x62, 0x2e, 0x0b, 0x2e, 0xc7, 0x3f, 0x2b, 0x32, 0xf9, 0x34, 0x50, 0x07, - 0x25, 0xca, 0xfe, 0x3a, 0xcf, 0x58, 0x74, 0xde, 0x40, 0x5f, 0x88, 0xae, 0x85, 0x0c, 0x3a, 0x61, - 0x53, 0x5f, 0x48, 0x8d, 0x48, 0x0f, 0xe6, 0x76, 0x68, 0x26, 0x36, 0x18, 0xaf, 0x46, 0xe9, 0xb6, - 0x99, 0xc5, 0x33, 0xd3, 0x5f, 0xa5, 0xc9, 0x32, 0xf8, 0x7c, 0x17, 0x45, 0xc9, 0xf7, 0x50, 0x60, - 0x52, 0x4b, 0xc1, 0x48, 0xaf, 0xf1, 0xe4, 0x09, 0xcc, 0x57, 0x2c, 0xb9, 0x22, 0x9e, 0x36, 0xe2, - 0xeb, 0x07, 0xa4, 0x0f, 0x24, 0x63, 0xb4, 0x2c, 0x05, 0x2f, 0x45, 0x46, 0x15, 0xd6, 0xf2, 0x19, - 0x23, 0xff, 0xc3, 0x09, 0xb9, 0x0f, 0x1e, 0x43, 0xb1, 0x93, 0xe3, 0x2e, 0xe6, 0xc1, 0x6c, 0x68, - 0xf5, 0x9a, 0xd1, 0x84, 0x20, 0x0f, 0x60, 0x76, 0x48, 0x73, 0xca, 0x62, 0x5c, 0x65, 0x71, 0xca, - 0x45, 0x30, 0x67, 0x76, 0x76, 0x99, 0x24, 0x21, 0x4c, 0x4b, 0x45, 0x85, 0x42, 0xa1, 0x57, 0x12, - 0xf8, 0x46, 0x73, 0x91, 0x22, 0x9b, 0xe0, 0x08, 0x2a, 0x32, 0x75, 0x10, 0xcc, 0x9b, 0x2d, 0x3e, - 0xbd, 0xe1, 0x16, 0xf5, 0x61, 0x64, 0x8c, 0xd1, 0xb8, 0xc1, 0xd2, 0xf7, 0x16, 0xb8, 0x6f, 0x2b, - 0x55, 0xde, 0x3e, 0xb0, 0xde, 0x24, 0xb0, 0x0b, 0xd0, 0x32, 0x01, 0x35, 0x69, 0xf5, 0xa2, 0x1a, - 0xfc, 0xcf, 0xea, 0x3f, 0x98, 0x55, 0x02, 0x76, 0x4a, 0x65, 0x6a, 0x42, 0xea, 0x45, 0xa6, 0xbe, - 0x9a, 0xdf, 0xf9, 0xbf, 0xe5, 0x97, 0xdc, 0x36, 0xbf, 0x8f, 0xc1, 0x7b, 0x9f, 0x15, 0xb8, 0xa5, - 0x68, 0x51, 0xea, 0x89, 0xd4, 0x19, 0x30, 0x19, 0xb6, 0xa3, 0x09, 0xb1, 0xfc, 0xc5, 0x02, 0xa7, - 0xce, 0x06, 0x01, 0x70, 0x64, 0x9c, 0x62, 0x81, 0x7e, 0x83, 0xcc, 0x82, 0x67, 0xfe, 0xb7, 0xf5, - 0xbe, 0x7d, 0x8b, 0x78, 0xd0, 0x52, 0x22, 0xa3, 0xb9, 0x3f, 0x65, 0x4e, 0x50, 0x14, 0x94, 0x21, - 0x53, 0x7e, 0x53, 0x43, 0x59, 0xc9, 0x12, 0x59, 0x82, 0x89, 0x6f, 0xeb, 0x1e, 0x43, 0xca, 0x18, - 0x26, 0x7e, 0x8b, 0x74, 0x00, 0xea, 0x7a, 0x8b, 0x73, 0xe6, 0x3b, 0x84, 0x40, 0xa7, 0xc6, 0xdb, - 0x28, 0x0e, 0x0c, 0xd7, 0x26, 0x2e, 0xd8, 0x8c, 0x33, 0xf4, 0xdd, 0xe5, 0x37, 0x00, 0x93, 0x49, - 0x74, 0x9f, 0x98, 0x17, 0x05, 0x67, 0x7e, 0x83, 0xcc, 0x80, 0x5b, 0xb1, 0x31, 0xb2, 0xb4, 0x43, - 0x50, 0x81, 0xfe, 0x14, 0x99, 0x83, 0x69, 0xdc, 0x8f, 0xb1, 0x54, 0x19, 0x67, 0x34, 0xf7, 0x9b, - 0xda, 0x54, 0xb1, 0xec, 0x73, 0x85, 0xbe, 0xbd, 0x16, 0x1d, 0x9e, 0x74, 0xad, 0xa3, 0x93, 0xae, - 0xf5, 0xeb, 0xa4, 0x6b, 0x7d, 0x3d, 0xed, 0x36, 0x8e, 0x4e, 0xbb, 0x8d, 0x1f, 0xa7, 0xdd, 0xc6, - 0x87, 0x17, 0x17, 0x02, 0x7e, 0xed, 0x86, 0x07, 0xeb, 0xe7, 0x2f, 0xdf, 0xfe, 0x85, 0x57, 0xd0, - 0xc4, 0x7e, 0xe8, 0x98, 0x2b, 0x79, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xa7, 0xa5, 0x39, - 0x29, 0x07, 0x00, 0x00, + // 707 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0x8e, 0x89, 0xe3, 0xd8, 0x0f, 0x08, 0xc3, 0x08, 0xad, 0xbc, 0xab, 0x55, 0xb0, 0xd0, 0xae, + 0x36, 0x8b, 0x96, 0x44, 0xbb, 0x7b, 0xe9, 0x15, 0x52, 0x54, 0xa1, 0xaa, 0x6a, 0x65, 0x2a, 0x0e, + 0xbd, 0x54, 0x13, 0xfb, 0x91, 0x8c, 0x6a, 0xcf, 0xb8, 0xe3, 0x31, 0x3f, 0xfe, 0x8b, 0x5e, 0xfa, + 0x4f, 0xf4, 0x7f, 0xe8, 0x9d, 0x23, 0xc7, 0xaa, 0x07, 0x54, 0xc1, 0x3f, 0x52, 0xcd, 0x38, 0x10, + 0x7e, 0x54, 0x15, 0x12, 0xb7, 0xaa, 0xa7, 0xbc, 0xef, 0x9b, 0xef, 0x7b, 0xd6, 0x9b, 0xf7, 0xc5, + 0x86, 0x6e, 0xc2, 0x54, 0x9a, 0x4c, 0x18, 0x17, 0x83, 0x9b, 0x55, 0xbf, 0x50, 0x52, 0x4b, 0xfa, + 0xe7, 0x63, 0x4c, 0x50, 0x68, 0xc5, 0xb2, 0x21, 0x53, 0xe9, 0x13, 0x96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0x3b, 0xbf, 0xcb, 0xdf, 0xcb, 0x2f, 0x7d, 0x68, 0x7e, 0xff, + 0x86, 0xe0, 0x25, 0xcf, 0x71, 0x57, 0xb3, 0xbc, 0x30, 0x13, 0xe9, 0x4b, 0x60, 0x33, 0xec, 0xc6, + 0x33, 0x62, 0xfd, 0xbd, 0x03, 0x5e, 0x9d, 0x0d, 0x0a, 0xe0, 0x95, 0xc9, 0x04, 0x73, 0x24, 0x0d, + 0xba, 0x08, 0x81, 0x7d, 0x6f, 0x9b, 0x7d, 0x13, 0x87, 0x06, 0xd0, 0xd2, 0x8a, 0xb3, 0x8c, 0xcc, + 0xd9, 0x13, 0x54, 0x39, 0x13, 0x28, 0x34, 0x69, 0x1a, 0x58, 0x56, 0x65, 0x81, 0x22, 0xc5, 0x94, + 0xb8, 0xa6, 0xc7, 0x88, 0x09, 0x81, 0x29, 0x69, 0xd1, 0x0e, 0x40, 0x5d, 0xef, 0x4a, 0x29, 0x88, + 0x47, 0x29, 0x74, 0x6a, 0xbc, 0x87, 0xea, 0xd8, 0x72, 0x6d, 0xea, 0x83, 0x2b, 0xa4, 0x40, 0xe2, + 0x9b, 0x46, 0x5c, 0x0c, 0x65, 0x25, 0x12, 0x9e, 0x91, 0x60, 0xfd, 0x19, 0xc0, 0x6c, 0x30, 0xd3, + 0x36, 0x91, 0x79, 0x2e, 0x05, 0x69, 0xd0, 0x05, 0xf0, 0x2b, 0x31, 0x45, 0x8e, 0x69, 0xa0, 0x98, + 0x42, 0x32, 0x47, 0x97, 0x60, 0x1e, 0x8f, 0x12, 0x2c, 0x34, 0x97, 0x82, 0x65, 0xa4, 0x69, 0x4c, + 0x95, 0xe0, 0x6f, 0x2b, 0x24, 0xee, 0x56, 0x7c, 0x72, 0xde, 0x75, 0x4e, 0xcf, 0xbb, 0xce, 0x97, + 0xf3, 0xae, 0xf3, 0xee, 0xa2, 0xdb, 0x38, 0xbd, 0xe8, 0x36, 0x3e, 0x5d, 0x74, 0x1b, 0xaf, 0x1e, + 0x5d, 0xcb, 0xfb, 0x9d, 0x0b, 0x1f, 0x0c, 0xaf, 0x3e, 0x84, 0x47, 0xd7, 0x3e, 0x8a, 0xf6, 0x5f, + 0x30, 0xf2, 0xec, 0x0d, 0xfd, 0xff, 0x35, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x15, 0xe1, 0xff, 0x38, + 0x07, 0x00, 0x00, } func (m *Card) Marshal() (dAtA []byte, err error) { diff --git a/x/cardchain/types/council.pb.go b/x/cardchain/types/council.pb.go index 78a4afd0..b0bfaf60 100644 --- a/x/cardchain/types/council.pb.go +++ b/x/cardchain/types/council.pb.go @@ -55,30 +55,33 @@ func (Response) EnumDescriptor() ([]byte, []int) { type CouncelingStatus int32 const ( - CouncelingStatus_councilOpen CouncelingStatus = 0 - CouncelingStatus_councilCreated CouncelingStatus = 1 - CouncelingStatus_councilClosed CouncelingStatus = 2 - CouncelingStatus_commited CouncelingStatus = 3 - CouncelingStatus_revealed CouncelingStatus = 4 - CouncelingStatus_suggestionsMade CouncelingStatus = 5 + CouncelingStatus_councilDoesNotExist CouncelingStatus = 0 + CouncelingStatus_councilOpen CouncelingStatus = 1 + CouncelingStatus_councilCreated CouncelingStatus = 2 + CouncelingStatus_councilClosed CouncelingStatus = 3 + CouncelingStatus_commited CouncelingStatus = 4 + CouncelingStatus_revealed CouncelingStatus = 5 + CouncelingStatus_suggestionsMade CouncelingStatus = 6 ) var CouncelingStatus_name = map[int32]string{ - 0: "councilOpen", - 1: "councilCreated", - 2: "councilClosed", - 3: "commited", - 4: "revealed", - 5: "suggestionsMade", + 0: "councilDoesNotExist", + 1: "councilOpen", + 2: "councilCreated", + 3: "councilClosed", + 4: "commited", + 5: "revealed", + 6: "suggestionsMade", } var CouncelingStatus_value = map[string]int32{ - "councilOpen": 0, - "councilCreated": 1, - "councilClosed": 2, - "commited": 3, - "revealed": 4, - "suggestionsMade": 5, + "councilDoesNotExist": 0, + "councilOpen": 1, + "councilCreated": 2, + "councilClosed": 3, + "commited": 4, + "revealed": 5, + "suggestionsMade": 6, } func (x CouncelingStatus) String() string { @@ -164,7 +167,7 @@ func (m *Council) GetStatus() CouncelingStatus { if m != nil { return m.Status } - return CouncelingStatus_councilOpen + return CouncelingStatus_councilDoesNotExist } func (m *Council) GetTrialStart() uint64 { @@ -297,40 +300,41 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/council.proto", fileDescriptor_fcd39b22a840d084) } var fileDescriptor_fcd39b22a840d084 = []byte{ - // 520 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xed, 0x38, 0xcd, 0xc7, 0x94, 0xa6, 0xdb, 0x05, 0x21, 0x8b, 0x83, 0x1b, 0x22, 0x21, - 0xa2, 0x22, 0x6c, 0x09, 0x0e, 0x54, 0x1c, 0x6b, 0x24, 0x40, 0x08, 0x2a, 0x6d, 0x0e, 0x08, 0x24, - 0x24, 0xb6, 0xf6, 0xc8, 0xb1, 0x70, 0xbc, 0xd1, 0xee, 0xba, 0xa2, 0xe2, 0x25, 0x38, 0xf0, 0x30, - 0x3c, 0x42, 0x8f, 0x3d, 0x22, 0x0e, 0x15, 0x4a, 0x5e, 0x04, 0x79, 0x6b, 0x1c, 0x93, 0x72, 0x08, - 0x27, 0xcf, 0x8e, 0x67, 0x7e, 0xfb, 0x9f, 0x99, 0x1d, 0xb8, 0x1b, 0x71, 0x19, 0x47, 0x53, 0x9e, - 0xe6, 0x41, 0xc3, 0x12, 0x45, 0x1e, 0xa5, 0x99, 0x3f, 0x97, 0x42, 0x0b, 0x7a, 0xef, 0x19, 0x46, - 0x98, 0x6b, 0xc9, 0xb3, 0x90, 0xcb, 0xf8, 0x39, 0x9f, 0xa1, 0x5f, 0x87, 0xae, 0xac, 0x3b, 0xb7, - 0x12, 0x91, 0x08, 0x93, 0x11, 0x94, 0xd6, 0x55,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0x75, 0xd2, 0x31, 0x2b, 0xf9, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x65, 0xe1, 0xac, 0xb6, 0xf4, 0x03, 0x00, 0x00, + // 535 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xb5, 0xe3, 0xd4, 0x4d, 0xa6, 0x34, 0xdd, 0x6e, 0x11, 0x58, 0x1c, 0xdc, 0x10, 0x09, 0x11, + 0x15, 0x61, 0x4b, 0x70, 0xa0, 0xe2, 0x58, 0x17, 0x01, 0x42, 0xb4, 0x92, 0x73, 0x40, 0x20, 0x21, + 0xb1, 0xb5, 0x47, 0x8e, 0x85, 0xe3, 0x8d, 0x76, 0xd7, 0x55, 0xfb, 0x17, 0x1c, 0xfa, 0x31, 0x7c, + 0x42, 0x8f, 0x3d, 0x22, 0x0e, 0x15, 0x4a, 0x7e, 0x04, 0x79, 0x6b, 0x1c, 0x93, 0x72, 0x08, 0xa7, + 0x9d, 0x99, 0x9d, 0x79, 0xfb, 0xe6, 0xcd, 0x0e, 0x3c, 0x8c, 0x98, 0x88, 0xa3, 0x31, 0x4b, 0x73, + 0xbf, 0x61, 0xf1, 0x22, 0x8f, 0xd2, 0xcc, 0x9b, 0x0a, 0xae, 0x38, 0x7d, 0x74, 0x88, 0x11, 0xe6, + 0x4a, 0xb0, 0x2c, 0x60, 0x22, 0x7e, 0xcd, 0x26, 0xe8, 0xd5, 0xa9, 0x0b, 0xeb, 0xc1, 0xdd, 0x84, + 0x27, 0x5c, 0x57, 0xf8, 0xa5, 0x75, 0x53, 0x3c, 0xf8, 0x6e, 0xc1, 0x7a, 0x70, 0x03, 0x47, 0xef, + 0x81, 0x5d, 0xa6, 0xbf, 0x8d, 0x1d, 0xb3, 0x6f, 0x0e, 0xdb, 0x61, 0xe5, 0x95, 0xf1, 0x53, 0x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, 0x00, 0x00, 0xff, 0xff, 0x00, + 0x7d, 0x50, 0x52, 0x0e, 0x04, 0x00, 0x00, } func (m *Council) Marshal() (dAtA []byte, err error) { diff --git a/x/cardchain/types/params.go b/x/cardchain/types/params.go index 99573c54..b5e27362 100644 --- a/x/cardchain/types/params.go +++ b/x/cardchain/types/params.go @@ -46,6 +46,7 @@ func NewParams() Params { RareDropRatio: 150, ExceptionalDropRatio: 50, UniqueDropRatio: 1, + CouncilVotingTimeLimit: 24 * 60 * 60, // One day } } @@ -81,6 +82,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair([]byte("RareDropRatio"), &p.RareDropRatio, validateRareDropRatio), paramtypes.NewParamSetPair([]byte("ExceptionalDropRatio"), &p.ExceptionalDropRatio, validateExceptionalDropRatio), paramtypes.NewParamSetPair([]byte("UniqueDropRatio"), &p.UniqueDropRatio, validateUniqueDropRatio), + paramtypes.NewParamSetPair([]byte("CouncilVotingTimeLimit"), &p.CouncilVotingTimeLimit, validateCouncilVotingTimeLimit), } } @@ -333,3 +335,11 @@ func validateUniqueDropRatio(i interface{}) error { } return nil } + +func validateCouncilVotingTimeLimit(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 27303621..0a7a39ea 100644 --- a/x/cardchain/types/params.pb.go +++ b/x/cardchain/types/params.pb.go @@ -50,6 +50,7 @@ type Params struct { RareDropRatio uint64 `protobuf:"varint,22,opt,name=rareDropRatio,proto3" json:"rareDropRatio,omitempty"` ExceptionalDropRatio uint64 `protobuf:"varint,23,opt,name=exceptionalDropRatio,proto3" json:"exceptionalDropRatio,omitempty"` UniqueDropRatio uint64 `protobuf:"varint,24,opt,name=uniqueDropRatio,proto3" json:"uniqueDropRatio,omitempty"` + CouncilVotingTimeLimit uint64 `protobuf:"varint,25,opt,name=councilVotingTimeLimit,proto3" json:"councilVotingTimeLimit,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -210,6 +211,13 @@ func (m *Params) GetUniqueDropRatio() uint64 { return 0 } +func (m *Params) GetCouncilVotingTimeLimit() uint64 { + if m != nil { + return m.CouncilVotingTimeLimit + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "DecentralCardGame.cardchain.cardchain.Params") } @@ -217,48 +225,50 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/params.proto", fileDescriptor_8843e481ee664a23) } var fileDescriptor_8843e481ee664a23 = []byte{ - // 651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0x13, 0x3d, - 0x10, 0xce, 0xbe, 0xed, 0xdb, 0x0f, 0xf7, 0xdb, 0xb4, 0x60, 0xf5, 0x90, 0x44, 0x15, 0x1f, 0x11, - 0x12, 0x89, 0x04, 0x1c, 0x10, 0x07, 0xa4, 0x36, 0xa1, 0x54, 0x42, 0x48, 0xd1, 0x16, 0xb5, 0x02, - 0x89, 0xc3, 0xd4, 0x19, 0x12, 0x2b, 0xbb, 0xeb, 0xc5, 0xeb, 0x6d, 0x53, 0x7e, 0x05, 0x47, 0x8e, - 0xfc, 0x02, 0x7e, 0x47, 0x8f, 0x3d, 0x22, 0x0e, 0x15, 0x6a, 0xff, 0x08, 0xf2, 0x24, 0xa4, 0xd9, - 0x4d, 0x05, 0x52, 0x4e, 0x6b, 0x3f, 0xfb, 0xcc, 0xe3, 0x67, 0x66, 0xec, 0x61, 0x65, 0x09, 0xa6, - 0x25, 0x3b, 0xa0, 0xa2, 0xda, 0xf5, 0x2a, 0x06, 0x03, 0x61, 0x52, 0x8d, 0x8d, 0xb6, 0x9a, 0xdf, - 0x6b, 0xa0, 0xc4, 0xc8, 0x1a, 0x08, 0xea, 0x60, 0x5a, 0xaf, 0x20, 0xc4, 0xea, 0x90, 0x79, 0xbd, - 0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xc9, 0xeb, 0xb8, - 0x1e, 0x1d, 0x6b, 0x8b, 0x4d, 0xad, 0x83, 0x5d, 0x03, 0x94, 0xbf, 0x58, 0x27, 0x2f, 0x63, 0x38, - 0xaf, 0xb0, 0x95, 0xc1, 0x8c, 0xa0, 0xd8, 0x3a, 0xc4, 0x62, 0x8e, 0xa8, 0x79, 0xd8, 0xa9, 0x86, - 0x60, 0x65, 0xe7, 0x50, 0x9b, 0x2e, 0x9a, 0x06, 0x06, 0x70, 0x2a, 0x36, 0xfa, 0x9d, 0xcf, 0xe3, - 0xae, 0xaf, 0xee, 0x76, 0xb9, 0xb4, 0xfb, 0x7d, 0xbd, 0x4d, 0xc4, 0x2c, 0xc8, 0x1f, 0xb3, 0x75, - 0xec, 0x49, 0x8c, 0x9d, 0x11, 0x08, 0xae, 0xc9, 0x77, 0x88, 0x7c, 0xe3, 0x3f, 0xe7, 0x37, 0x8d, - 0xd4, 0xa7, 0x74, 0x44, 0x5b, 0x10, 0x3d, 0x0f, 0x3f, 0x9f, 0xfe, 0xfa, 0xad, 0x54, 0xd8, 0xf1, - 0xcf, 0x2e, 0x8b, 0xde, 0xf9, 0x65, 0xd1, 0xfb, 0x75, 0x59, 0xf4, 0xbe, 0x5c, 0x15, 0x0b, 0xe7, - 0x57, 0xc5, 0xc2, 0x8f, 0xab, 0x62, 0xe1, 0xfd, 0xb3, 0x91, 0xfa, 0x8e, 0x8d, 0xe4, 0x5a, 0x7d, - 0x38, 0xbc, 0x7b, 0x23, 0x83, 0x9c, 0xaa, 0x7e, 0x34, 0x43, 0xb3, 0xf8, 0xc9, 0xef, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x7c, 0x7a, 0xa5, 0x82, 0xec, 0x05, 0x00, 0x00, + // 675 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x6f, 0x13, 0x3b, + 0x14, 0xcd, 0xbc, 0xf6, 0xf5, 0xc3, 0xfd, 0xf6, 0x6b, 0xfb, 0x4c, 0x17, 0x49, 0x54, 0xf1, 0x11, + 0x21, 0x91, 0x48, 0x80, 0x10, 0x62, 0x81, 0xd4, 0x26, 0x94, 0x4a, 0x80, 0x14, 0x4d, 0x51, 0x2b, + 0x90, 0x58, 0xdc, 0x3a, 0x97, 0x89, 0x95, 0x19, 0x7b, 0xf0, 0x78, 0xda, 0x94, 0x5f, 0xc1, 0x92, + 0x25, 0x3f, 0xa7, 0xcb, 0x2e, 0x11, 0x8b, 0x0a, 0xb5, 0x12, 0xbf, 0x03, 0xd9, 0x09, 0x69, 0x66, + 0x52, 0x40, 0xca, 0x2a, 0xf6, 0xf1, 0xb9, 0xc7, 0xf7, 0xde, 0xe3, 0xb9, 0x21, 0x65, 0x0e, 0xba, + 0xc5, 0xdb, 0x20, 0x64, 0xed, 0x6a, 0x15, 0x83, 0x86, 0x28, 0xa9, 0xc6, 0x5a, 0x19, 0x45, 0x6f, + 0x35, 0x90, 0xa3, 0x34, 0x1a, 0xc2, 0x3a, 0xe8, 0xd6, 0x73, 0x88, 0xb0, 0x3a, 0x60, 0x5e, 0xad, + 0x36, 0x56, 0x03, 0x15, 0x28, 0x17, 0x51, 0xb3, 0xab, 0x5e, 0xf0, 0xe6, 0x0f, 0x42, 0xa6, 0x9a, + 0x4e, 0x8d, 0x3e, 0x25, 0x1b, 0x47, 0xca, 0x08, 0x19, 0xf8, 0x22, 0x68, 0x9b, 0xe4, 0x59, 0x37, + 0x16, 0x1a, 0x8c, 0x50, 0xf2, 0xb5, 0x88, 0x90, 0x79, 0x65, 0xaf, 0x32, 0xe1, 0xff, 0x81, 0x41, + 0x19, 0x99, 0x4e, 0xd0, 0xec, 0x89, 0x8f, 0xc8, 0xfe, 0x29, 0x7b, 0x95, 0x49, 0xff, 0xd7, 0x96, + 0xbe, 0x20, 0x33, 0x09, 0x9a, 0xa6, 0x16, 0x1c, 0xd9, 0x44, 0xd9, 0xab, 0xcc, 0x6e, 0xd7, 0x4e, + 0xcf, 0x4b, 0x85, 0x6f, 0xe7, 0xa5, 0x3b, 0x81, 0x30, 0xed, 0xf4, 0xb0, 0xca, 0x55, 0x54, 0xe3, + 0x2a, 0x89, 0x54, 0xd2, 0xff, 0xb9, 0x97, 0xb4, 0x3a, 0x35, 0x73, 0x12, 0x63, 0x52, 0xad, 0x2b, + 0x21, 0xfd, 0x81, 0x00, 0xbd, 0x4b, 0x96, 0x81, 0x1b, 0x71, 0x84, 0x7b, 0x68, 0x92, 0xad, 0x48, + 0xa5, 0xd2, 0xb0, 0x49, 0x77, 0xdf, 0x08, 0x4e, 0x0f, 0xc8, 0x62, 0x82, 0xa6, 0xae, 0xd1, 0x65, + 0xb9, 0x83, 0xc8, 0xfe, 0x1d, 0xef, 0xfa, 0x9c, 0x0c, 0x7d, 0x47, 0x56, 0xb8, 0x0a, 0x43, 0x30, + 0xa8, 0x21, 0x6c, 0x60, 0xac, 0x12, 0x61, 0xd8, 0xd4, 0x78, 0xda, 0xa3, 0x4a, 0x74, 0x93, 0xcc, + 0x1f, 0x0b, 0x29, 0x51, 0xfb, 0x78, 0x0c, 0xba, 0xc5, 0xa6, 0x5d, 0xf3, 0x33, 0x18, 0xdd, 0x23, + 0xf3, 0x6d, 0x95, 0xea, 0xf0, 0x64, 0x07, 0x52, 0x8e, 0x86, 0xcd, 0x8e, 0x77, 0x7b, 0x46, 0x84, + 0xde, 0x24, 0x0b, 0x42, 0xbe, 0x0f, 0x5d, 0x9d, 0x3e, 0x18, 0x64, 0xc4, 0xaa, 0xfa, 0x59, 0xd0, + 0xa6, 0xa7, 0x41, 0x63, 0xd2, 0x44, 0xdd, 0x04, 0xde, 0x61, 0x73, 0xae, 0xfd, 0x19, 0x8c, 0xde, + 0x26, 0x8b, 0x5c, 0x45, 0x91, 0x92, 0x03, 0xd6, 0xbc, 0x63, 0xe5, 0x50, 0x6b, 0x67, 0x2a, 0xeb, + 0x59, 0xe6, 0x42, 0xcf, 0x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0x47, 0xbe, 0xf6, 0xcc, 0xe6, 0x9b, + 0x4a, 0xf1, 0x21, 0x1d, 0xd2, 0x66, 0x8e, 0x9e, 0x87, 0xe9, 0x23, 0xb2, 0xce, 0x55, 0x2a, 0xb9, + 0xb0, 0xad, 0x11, 0x32, 0xb0, 0x43, 0xef, 0xa5, 0x88, 0x84, 0x61, 0x37, 0x5c, 0xc0, 0x6f, 0x4e, + 0x9f, 0x4c, 0x7e, 0xfe, 0x52, 0x2a, 0x6c, 0xfb, 0xa7, 0x17, 0x45, 0xef, 0xec, 0xa2, 0xe8, 0x7d, + 0xbf, 0x28, 0x7a, 0x9f, 0x2e, 0x8b, 0x85, 0xb3, 0xcb, 0x62, 0xe1, 0xeb, 0x65, 0xb1, 0xf0, 0xf6, + 0xf1, 0x90, 0x2f, 0x23, 0xa3, 0xbc, 0x56, 0x1f, 0x0c, 0xfd, 0xee, 0xd0, 0x1f, 0x80, 0x73, 0xeb, + 0x70, 0xca, 0xcd, 0xf0, 0x07, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xda, 0x78, 0xde, 0x24, + 0x06, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -281,6 +291,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CouncilVotingTimeLimit != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.CouncilVotingTimeLimit)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } if m.UniqueDropRatio != 0 { i = encodeVarintParams(dAtA, i, uint64(m.UniqueDropRatio)) i-- @@ -538,6 +555,9 @@ func (m *Params) Size() (n int) { if m.UniqueDropRatio != 0 { n += 2 + sovParams(uint64(m.UniqueDropRatio)) } + if m.CouncilVotingTimeLimit != 0 { + n += 2 + sovParams(uint64(m.CouncilVotingTimeLimit)) + } return n } @@ -1135,6 +1155,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CouncilVotingTimeLimit", wireType) + } + m.CouncilVotingTimeLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CouncilVotingTimeLimit |= 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 293ea5cd..7f8d4001 100644 --- a/x/cardchain/types/query.pb.go +++ b/x/cardchain/types/query.pb.go @@ -1559,6 +1559,186 @@ func (m *QueryRarityDistributionResponse) GetWanted() []uint32 { return nil } +type QueryQCouncilsRequest struct { + Status CouncelingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=DecentralCardGame.cardchain.cardchain.CouncelingStatus" json:"status,omitempty"` + Voters []string `protobuf:"bytes,3,rep,name=voters,proto3" json:"voters,omitempty"` + Card uint64 `protobuf:"varint,4,opt,name=card,proto3" json:"card,omitempty"` + Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + Ignore *IgnoreCouncils `protobuf:"bytes,2,opt,name=ignore,proto3" json:"ignore,omitempty"` +} + +func (m *QueryQCouncilsRequest) Reset() { *m = QueryQCouncilsRequest{} } +func (m *QueryQCouncilsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryQCouncilsRequest) ProtoMessage() {} +func (*QueryQCouncilsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e1bdbfeb9d7f6cfd, []int{28} +} +func (m *QueryQCouncilsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQCouncilsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQCouncilsRequest.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 *QueryQCouncilsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQCouncilsRequest.Merge(m, src) +} +func (m *QueryQCouncilsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryQCouncilsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQCouncilsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQCouncilsRequest proto.InternalMessageInfo + +func (m *QueryQCouncilsRequest) GetStatus() CouncelingStatus { + if m != nil { + return m.Status + } + return CouncelingStatus_councilDoesNotExist +} + +func (m *QueryQCouncilsRequest) GetVoters() []string { + if m != nil { + return m.Voters + } + return nil +} + +func (m *QueryQCouncilsRequest) GetCard() uint64 { + if m != nil { + return m.Card + } + return 0 +} + +func (m *QueryQCouncilsRequest) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *QueryQCouncilsRequest) GetIgnore() *IgnoreCouncils { + if m != nil { + return m.Ignore + } + return nil +} + +type IgnoreCouncils struct { + Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Card bool `protobuf:"varint,2,opt,name=card,proto3" json:"card,omitempty"` +} + +func (m *IgnoreCouncils) Reset() { *m = IgnoreCouncils{} } +func (m *IgnoreCouncils) String() string { return proto.CompactTextString(m) } +func (*IgnoreCouncils) ProtoMessage() {} +func (*IgnoreCouncils) Descriptor() ([]byte, []int) { + return fileDescriptor_e1bdbfeb9d7f6cfd, []int{29} +} +func (m *IgnoreCouncils) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IgnoreCouncils) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IgnoreCouncils.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 *IgnoreCouncils) XXX_Merge(src proto.Message) { + xxx_messageInfo_IgnoreCouncils.Merge(m, src) +} +func (m *IgnoreCouncils) XXX_Size() int { + return m.Size() +} +func (m *IgnoreCouncils) XXX_DiscardUnknown() { + xxx_messageInfo_IgnoreCouncils.DiscardUnknown(m) +} + +var xxx_messageInfo_IgnoreCouncils proto.InternalMessageInfo + +func (m *IgnoreCouncils) GetStatus() bool { + if m != nil { + return m.Status + } + return false +} + +func (m *IgnoreCouncils) GetCard() bool { + if m != nil { + return m.Card + } + return false +} + +type QueryQCouncilsResponse struct { + CouncilssIds []uint64 `protobuf:"varint,1,rep,packed,name=councilssIds,proto3" json:"councilssIds,omitempty"` + Councils []*Council `protobuf:"bytes,2,rep,name=councils,proto3" json:"councils,omitempty"` +} + +func (m *QueryQCouncilsResponse) Reset() { *m = QueryQCouncilsResponse{} } +func (m *QueryQCouncilsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryQCouncilsResponse) ProtoMessage() {} +func (*QueryQCouncilsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e1bdbfeb9d7f6cfd, []int{30} +} +func (m *QueryQCouncilsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQCouncilsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQCouncilsResponse.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 *QueryQCouncilsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQCouncilsResponse.Merge(m, src) +} +func (m *QueryQCouncilsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryQCouncilsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQCouncilsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQCouncilsResponse proto.InternalMessageInfo + +func (m *QueryQCouncilsResponse) GetCouncilssIds() []uint64 { + if m != nil { + return m.CouncilssIds + } + return nil +} + +func (m *QueryQCouncilsResponse) GetCouncils() []*Council { + if m != nil { + return m.Councils + } + return nil +} + func init() { proto.RegisterEnum("DecentralCardGame.cardchain.cardchain.QueryQCardsRequest_Status", QueryQCardsRequest_Status_name, QueryQCardsRequest_Status_value) proto.RegisterType((*QueryParamsRequest)(nil), "DecentralCardGame.cardchain.cardchain.QueryParamsRequest") @@ -1589,135 +1769,147 @@ func init() { proto.RegisterType((*QueryQSetsResponse)(nil), "DecentralCardGame.cardchain.cardchain.QueryQSetsResponse") proto.RegisterType((*QueryRarityDistributionRequest)(nil), "DecentralCardGame.cardchain.cardchain.QueryRarityDistributionRequest") proto.RegisterType((*QueryRarityDistributionResponse)(nil), "DecentralCardGame.cardchain.cardchain.QueryRarityDistributionResponse") + proto.RegisterType((*QueryQCouncilsRequest)(nil), "DecentralCardGame.cardchain.cardchain.QueryQCouncilsRequest") + proto.RegisterType((*IgnoreCouncils)(nil), "DecentralCardGame.cardchain.cardchain.IgnoreCouncils") + proto.RegisterType((*QueryQCouncilsResponse)(nil), "DecentralCardGame.cardchain.cardchain.QueryQCouncilsResponse") } func init() { proto.RegisterFile("cardchain/cardchain/query.proto", fileDescriptor_e1bdbfeb9d7f6cfd) } var fileDescriptor_e1bdbfeb9d7f6cfd = []byte{ - // 1967 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x19, 0x4d, 0x73, 0x1c, 0x47, - 0x55, 0xb3, 0x5a, 0xad, 0xb4, 0x4f, 0x96, 0xd8, 0x34, 0xc6, 0x2c, 0x8b, 0x91, 0x97, 0x29, 0x07, - 0x44, 0x12, 0xed, 0x24, 0x8a, 0xb1, 0x65, 0xc7, 0x91, 0x6d, 0x49, 0x76, 0x10, 0xc4, 0xb1, 0x33, - 0x4b, 0x52, 0x14, 0x1c, 0x54, 0xb3, 0x3b, 0x6d, 0x69, 0x2a, 0xbb, 0xd3, 0xeb, 0xe9, 0x5e, 0x3b, - 0x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0f, 0x1f, 0x30, 0xe3, 0xdc, 0xa7, 0x25, - 0xf8, 0xe6, 0xd4, 0x63, 0xad, 0xda, 0xcf, 0xa0, 0x26, 0x2d, 0xb8, 0x35, 0xec, 0xca, 0xa4, 0xbf, - 0x1f, 0x05, 0x5d, 0xaa, 0x2e, 0xd8, 0x71, 0xa4, 0x03, 0x3f, 0xff, 0xe2, 0xc2, 0x77, 0x0f, 0x03, - 0x71, 0x34, 0xec, 0xb4, 0xba, 0xac, 0xef, 0xe8, 0xc2, 0x51, 0x7f, 0x36, 0xb8, 0xff, 0x91, 0x23, - 0x46, 0x03, 0xca, 0x5b, 0xbb, 0x2c, 0x08, 0xdd, 0x13, 0x82, 0xc8, 0x1a, 0x80, 0xd7, 0x15, 0xc1, - 0x23, 0xda, 0xa6, 0x82, 0xd7, 0x4b, 0xcd, 0xf9, 0xf5, 0xb2, 0x9b, 0xc2, 0x90, 0x26, 0x2c, 0x4b, - 0x1e, 0xfe, 0xde, 0xb0, 0xdf, 0xa1, 0x51, 0x7d, 0xbe, 0x69, 0xad, 0x97, 0xdd, 0x34, 0x8a, 0x5c, - 0x84, 0x15, 0x4c, 0x74, 0x6a, 0x68, 0xca, 0x48, 0x93, 0x45, 0x92, 0x57, 0xa0, 0x26, 0xd3, 0xf9, - 0x9e, 0xcc, 0x66, 0x43, 0xb8, 0x80, 0x84, 0x27, 0xf0, 0xe4, 0x3b, 0xb0, 0xaa, 0x93, 0xda, 0x50, - 0x56, 0x90, 0x72, 0x02, 0x2b, 0x65, 0xf6, 0x3c, 0x2e, 0xa4, 0xd7, 0xee, 0x32, 0x3f, 0x78, 0x10, - 0x50, 0xbf, 0xbe, 0xa8, 0x64, 0x4e, 0xe2, 0x93, 0x10, 0x7c, 0x88, 0x65, 0xef, 0x52, 0x3e, 0xec, - 0x89, 0x38, 0xbf, 0x7f, 0x6e, 0x99, 0x10, 0x4c, 0x1c, 0xeb, 0x10, 0x74, 0xe0, 0x25, 0x29, 0x31, - 0x73, 0x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0x6a, 0x25, 0x3c, 0xa1, 0x51, 0xdf, 0x0b, - 0x69, 0x28, 0x6a, 0xf3, 0x12, 0xe4, 0x43, 0x3e, 0xa0, 0xa1, 0x4f, 0xfd, 0x5a, 0x59, 0xca, 0xe8, - 0x78, 0x61, 0x48, 0xfd, 0xda, 0x02, 0x59, 0x05, 0x50, 0xdf, 0x6d, 0xc6, 0xc2, 0x5a, 0x85, 0x10, - 0x58, 0x55, 0xf0, 0x87, 0x34, 0x1a, 0x21, 0x6e, 0x91, 0x2c, 0x41, 0x39, 0x64, 0x21, 0xad, 0x2d, - 0x91, 0x33, 0xb0, 0x34, 0xe8, 0x79, 0x23, 0xaf, 0xd3, 0xa3, 0xb5, 0xaa, 0xe4, 0x1d, 0x86, 0x31, - 0x0c, 0xf6, 0x9b, 0xba, 0xff, 0x9a, 0xc8, 0xe9, 0xb4, 0x3c, 0x0f, 0x55, 0xac, 0xc4, 0x77, 0x03, - 0x2e, 0xdb, 0x96, 0xac, 0xdd, 0x04, 0x61, 0xb7, 0x4c, 0x3e, 0xdd, 0x95, 0x95, 0x98, 0xea, 0x52, - 0x58, 0x99, 0xba, 0x3d, 0x96, 0x5d, 0x03, 0xda, 0xeb, 0x50, 0x53, 0xf4, 0x6d, 0x2a, 0x52, 0xd9, - 0xc7, 0xa9, 0x88, 0x69, 0x15, 0x60, 0x5f, 0x83, 0x73, 0x86, 0x52, 0x97, 0xae, 0xa1, 0x6f, 0xc2, - 0x72, 0x5c, 0xce, 0x31, 0x57, 0x1a, 0x65, 0x5f, 0x82, 0xb3, 0xda, 0x14, 0x55, 0xcc, 0x86, 0x53, - 0xda, 0xa2, 0x30, 0x31, 0x5f, 0x82, 0xb0, 0x3f, 0x2f, 0x19, 0xb6, 0xbb, 0xaa, 0xad, 0x18, 0xb6, - 0x8b, 0xb0, 0x22, 0x82, 0x3e, 0xe5, 0xc2, 0xeb, 0x0f, 0xf6, 0xd8, 0xe3, 0x50, 0xb3, 0x66, 0x91, - 0x52, 0x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, 0xa2, 0xd1, 0x7b, 0x64, 0x27, 0xa7, 0xd1, 0x11, 0x8a, 0x3a, 0xf0, 0x53, 0xb2, 0x4c, 0x67, - 0xde, 0x71, 0x9f, 0x3c, 0x5d, 0xb3, 0x3e, 0x7d, 0xba, 0x66, 0xfd, 0xfb, 0xe9, 0x9a, 0xf5, 0xcb, - 0x67, 0x6b, 0x73, 0x9f, 0x3e, 0x5b, 0x9b, 0xfb, 0xec, 0xd9, 0xda, 0xdc, 0x4f, 0xb7, 0x52, 0x3f, - 0xb7, 0x9f, 0x76, 0xcf, 0xc7, 0xe9, 0x7f, 0xb0, 0x8c, 0x06, 0x94, 0x77, 0x2a, 0xf8, 0xab, 0xe2, - 0x9b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x5a, 0xa7, 0xb6, 0x5b, 0x1b, 0x00, 0x00, + // 2097 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x19, 0x4d, 0x6f, 0x1b, 0xc7, + 0xd5, 0x4b, 0x51, 0x94, 0xf8, 0x64, 0xa9, 0xcc, 0xd4, 0x75, 0x59, 0xd6, 0x95, 0xd5, 0x85, 0xd3, + 0xaa, 0x49, 0xc4, 0x4d, 0x14, 0xc7, 0x96, 0x15, 0x59, 0xb6, 0x25, 0xd9, 0xa9, 0xd2, 0x28, 0x76, + 0x56, 0x4d, 0x50, 0xb4, 0x07, 0x61, 0xc9, 0x1d, 0x4b, 0x8b, 0x90, 0x3b, 0xf4, 0xce, 0x50, 0x0e, + 0x21, 0xf0, 0xd0, 0x9e, 0x7a, 0x2c, 0xda, 0x53, 0xef, 0xbd, 0x16, 0x05, 0xd2, 0xa2, 0xb7, 0xa2, + 0x3d, 0x1a, 0x48, 0x0f, 0x01, 0x8a, 0x02, 0x69, 0x0e, 0x69, 0x61, 0xf7, 0xde, 0x5f, 0x50, 0xa0, + 0x98, 0x37, 0x33,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0x82, 0x0a, 0x17, 0x9e, 0xe8, 0x73, 0x4c, 0xcb, 0x85, 0xd5, 0xdb, 0x39, 0xb5, + 0x38, 0xfd, 0x82, 0xe6, 0x3e, 0xca, 0x71, 0xb5, 0x3c, 0xd2, 0x80, 0x59, 0x49, 0xfe, 0xc3, 0x41, + 0x8f, 0x62, 0xb4, 0xab, 0x6e, 0x0c, 0x63, 0x91, 0x74, 0x3c, 0xce, 0x29, 0xc7, 0x20, 0xcb, 0x22, + 0x51, 0xa0, 0xac, 0x39, 0xce, 0x22, 0xb1, 0x35, 0xc0, 0xa0, 0x56, 0x5d, 0x0d, 0x11, 0x1b, 0xce, + 0x87, 0x5e, 0x97, 0xca, 0x6a, 0xf3, 0x82, 0x90, 0x63, 0x20, 0xab, 0x6e, 0x06, 0x27, 0xc3, 0xf8, + 0x21, 0x1d, 0x3c, 0x66, 0x91, 0xcf, 0x63, 0xba, 0x19, 0xa4, 0x3b, 0x85, 0x97, 0xc9, 0x16, 0x32, + 0x41, 0x13, 0xc2, 0x59, 0x24, 0xcc, 0x22, 0xc9, 0x32, 0x7c, 0x85, 0x85, 0x9d, 0xc1, 0xbe, 0xf0, + 0x22, 0x41, 0x23, 0x69, 0x6d, 0xbd, 0xba, 0x64, 0x2d, 0xcf, 0xba, 0xa3, 0x68, 0xfb, 0x37, 0x16, + 0x54, 0x94, 0x03, 0x08, 0x40, 0x85, 0xb7, 0x8f, 0x68, 0x97, 0xd6, 0xce, 0x91, 0x79, 0xa8, 0x62, + 0x3b, 0x94, 0xa5, 0x53, 0xb3, 0x48, 0x15, 0xa6, 0x45, 0x14, 0x78, 0x9d, 0x5a, 0x09, 0x4f, 0x68, + 0xd4, 0xf5, 0x42, 0x1a, 0x8a, 0xda, 0x94, 0x04, 0x79, 0x9f, 0xf7, 0x68, 0xe8, 0x53, 0xbf, 0x56, + 0x96, 0x32, 0x5a, 0x5e, 0x18, 0x52, 0xbf, 0x36, 0x4d, 0x16, 0x00, 0xd4, 0xf3, 0x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ors if they are not otherwise used. @@ -1764,6 +1956,8 @@ type QueryClient interface { QSets(ctx context.Context, in *QueryQSetsRequest, opts ...grpc.CallOption) (*QueryQSetsResponse, error) // Queries a list of RarityDistribution items. RarityDistribution(ctx context.Context, in *QueryRarityDistributionRequest, opts ...grpc.CallOption) (*QueryRarityDistributionResponse, error) + // Queries a list of QCouncils items. + QCouncils(ctx context.Context, in *QueryQCouncilsRequest, opts ...grpc.CallOption) (*QueryQCouncilsResponse, error) } type queryClient struct { @@ -1918,6 +2112,15 @@ func (c *queryClient) RarityDistribution(ctx context.Context, in *QueryRarityDis return out, nil } +func (c *queryClient) QCouncils(ctx context.Context, in *QueryQCouncilsRequest, opts ...grpc.CallOption) (*QueryQCouncilsResponse, error) { + out := new(QueryQCouncilsResponse) + err := c.cc.Invoke(ctx, "/DecentralCardGame.cardchain.cardchain.Query/QCouncils", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1952,6 +2155,8 @@ type QueryServer interface { QSets(context.Context, *QueryQSetsRequest) (*QueryQSetsResponse, error) // Queries a list of RarityDistribution items. RarityDistribution(context.Context, *QueryRarityDistributionRequest) (*QueryRarityDistributionResponse, error) + // Queries a list of QCouncils items. + QCouncils(context.Context, *QueryQCouncilsRequest) (*QueryQCouncilsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -2006,6 +2211,9 @@ func (*UnimplementedQueryServer) QSets(ctx context.Context, req *QueryQSetsReque func (*UnimplementedQueryServer) RarityDistribution(ctx context.Context, req *QueryRarityDistributionRequest) (*QueryRarityDistributionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RarityDistribution not implemented") } +func (*UnimplementedQueryServer) QCouncils(ctx context.Context, req *QueryQCouncilsRequest) (*QueryQCouncilsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QCouncils not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2299,6 +2507,24 @@ func _Query_RarityDistribution_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_QCouncils_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryQCouncilsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QCouncils(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/DecentralCardGame.cardchain.cardchain.Query/QCouncils", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QCouncils(ctx, req.(*QueryQCouncilsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "DecentralCardGame.cardchain.cardchain.Query", HandlerType: (*QueryServer)(nil), @@ -2367,6 +2593,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "RarityDistribution", Handler: _Query_RarityDistribution_Handler, }, + { + MethodName: "QCouncils", + Handler: _Query_QCouncils_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cardchain/cardchain/query.proto", @@ -3546,100 +3776,259 @@ func (m *QueryRarityDistributionResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryQCouncilsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryQCouncilsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryQCardRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryQCouncilsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.CardId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryQCardContentRequest) Size() (n int) { - if m == nil { - return 0 + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x2a } - var l int - _ = l - l = len(m.CardId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Card != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Card)) + i-- + dAtA[i] = 0x20 } - return n -} - -func (m *QueryQCardContentResponse) Size() (n int) { - if m == nil { - return 0 + if len(m.Voters) > 0 { + for iNdEx := len(m.Voters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Voters[iNdEx]) + copy(dAtA[i:], m.Voters[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Voters[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } - var l int - _ = l - l = len(m.Content) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Ignore != nil { + { + size, err := m.Ignore.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryQUserRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *IgnoreCouncils) 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 n + return dAtA[:n], nil } -func (m *QueryQCardchainInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *IgnoreCouncils) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IgnoreCouncils) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Card { + i-- + if m.Card { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Status { + i-- + if m.Status { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryQCouncilsResponse) 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 *QueryQCouncilsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQCouncilsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Councils) > 0 { + for iNdEx := len(m.Councils) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Councils[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.CouncilssIds) > 0 { + dAtA25 := make([]byte, len(m.CouncilssIds)*10) + var j24 int + for _, num := range m.CouncilssIds { + for num >= 1<<7 { + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j24++ + } + dAtA25[j24] = uint8(num) + j24++ + } + i -= j24 + copy(dAtA[i:], dAtA25[:j24]) + i = encodeVarintQuery(dAtA, i, uint64(j24)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryQCardRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CardId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryQCardContentRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CardId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryQCardContentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Content) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryQUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryQCardchainInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n } func (m *QueryQCardchainInfoResponse) Size() (n int) { @@ -4053,6 +4442,72 @@ func (m *QueryRarityDistributionResponse) Size() (n int) { return n } +func (m *QueryQCouncilsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + if m.Ignore != nil { + l = m.Ignore.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Voters) > 0 { + for _, s := range m.Voters { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Card != 0 { + n += 1 + sovQuery(uint64(m.Card)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *IgnoreCouncils) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status { + n += 2 + } + if m.Card { + n += 2 + } + return n +} + +func (m *QueryQCouncilsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CouncilssIds) > 0 { + l = 0 + for _, e := range m.CouncilssIds { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + if len(m.Councils) > 0 { + for _, e := range m.Councils { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7468,6 +7923,444 @@ func (m *QueryRarityDistributionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryQCouncilsRequest) 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 ErrIntOverflowQuery + } + 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: QueryQCouncilsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQCouncilsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= CouncelingStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ignore", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ignore == nil { + m.Ignore = &IgnoreCouncils{} + } + if err := m.Ignore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voters", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voters = append(m.Voters, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Card", wireType) + } + m.Card = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Card |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IgnoreCouncils) 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 ErrIntOverflowQuery + } + 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: IgnoreCouncils: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IgnoreCouncils: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Card", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Card = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQCouncilsResponse) 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 ErrIntOverflowQuery + } + 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: QueryQCouncilsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQCouncilsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CouncilssIds = append(m.CouncilssIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + 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.CouncilssIds) == 0 { + m.CouncilssIds = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CouncilssIds = append(m.CouncilssIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field CouncilssIds", wireType) + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Councils", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Councils = append(m.Councils, &Council{}) + if err := m.Councils[len(m.Councils)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/cardchain/types/query.pb.gw.go b/x/cardchain/types/query.pb.gw.go index a3ee2c23..b8eb8750 100644 --- a/x/cardchain/types/query.pb.gw.go +++ b/x/cardchain/types/query.pb.gw.go @@ -865,6 +865,84 @@ func local_request_Query_RarityDistribution_0(ctx context.Context, marshaler run } +var ( + filter_Query_QCouncils_0 = &utilities.DoubleArray{Encoding: map[string]int{"status": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_QCouncils_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQCouncilsRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, CouncelingStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = CouncelingStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QCouncils_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QCouncils(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QCouncils_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQCouncilsRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, CouncelingStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = CouncelingStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QCouncils_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QCouncils(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1239,6 +1317,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QCouncils_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QCouncils_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QCouncils_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1600,6 +1701,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QCouncils_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QCouncils_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QCouncils_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1635,6 +1756,8 @@ var ( pattern_Query_QSets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"DecentralCardGame", "Cardchain", "cardchain", "q_sets", "status", "ignoreStatus"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_RarityDistribution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"DecentralCardGame", "Cardchain", "cardchain", "rarity_distribution", "setId"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_QCouncils_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"DecentralCardGame", "Cardchain", "cardchain", "q_councils", "status"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1669,4 +1792,6 @@ var ( forward_Query_QSets_0 = runtime.ForwardResponseMessage forward_Query_RarityDistribution_0 = runtime.ForwardResponseMessage + + forward_Query_QCouncils_0 = runtime.ForwardResponseMessage ) diff --git a/x/cardchain/types/types.go b/x/cardchain/types/types.go index f72d76c8..9bd4c062 100644 --- a/x/cardchain/types/types.go +++ b/x/cardchain/types/types.go @@ -36,16 +36,30 @@ func NewIgnoreSellOffers() IgnoreSellOffers { } } +func NewIgnoreCouncils() IgnoreCouncils { + return IgnoreCouncils{ + false, + false, + } +} + // NewUser Constructor for User func NewUser() User { return User{ - Alias: "newPlayer", - Cards: []uint64{}, - OwnedCardSchemes: []uint64{}, - OwnedPrototypes: []uint64{}, - CouncilStatus: CouncilStatus_unavailable, - ReportMatches: false, - AirDrops: &AirDrops{}, + Alias: "newPlayer", + Cards: []uint64{}, + OwnedCardSchemes: []uint64{}, + OwnedPrototypes: []uint64{}, + CouncilParticipation: NewCouncilParticipation(), + ReportMatches: false, + AirDrops: &AirDrops{}, + } +} + +func NewCouncilParticipation() *CouncilParticipation { + return &CouncilParticipation{ + Status: CouncilStatus_unavailable, + Council: 0, } } diff --git a/x/cardchain/types/user.pb.go b/x/cardchain/types/user.pb.go index 510eba04..b66c77b3 100644 --- a/x/cardchain/types/user.pb.go +++ b/x/cardchain/types/user.pb.go @@ -88,19 +88,19 @@ func (AirDrop) EnumDescriptor() ([]byte, []int) { } type User struct { - Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` - OwnedCardSchemes []uint64 `protobuf:"varint,2,rep,packed,name=ownedCardSchemes,proto3" json:"ownedCardSchemes,omitempty"` - OwnedPrototypes []uint64 `protobuf:"varint,3,rep,packed,name=ownedPrototypes,proto3" json:"ownedPrototypes,omitempty"` - Cards []uint64 `protobuf:"varint,4,rep,packed,name=cards,proto3" json:"cards,omitempty"` - CouncilStatus CouncilStatus `protobuf:"varint,6,opt,name=CouncilStatus,proto3,enum=DecentralCardGame.cardchain.cardchain.CouncilStatus" json:"CouncilStatus,omitempty"` - ReportMatches bool `protobuf:"varint,7,opt,name=ReportMatches,proto3" json:"ReportMatches,omitempty"` - ProfileCard uint64 `protobuf:"varint,8,opt,name=profileCard,proto3" json:"profileCard,omitempty"` - AirDrops *AirDrops `protobuf:"bytes,9,opt,name=airDrops,proto3" json:"airDrops,omitempty"` - BoosterPacks []*BoosterPack `protobuf:"bytes,10,rep,name=boosterPacks,proto3" json:"boosterPacks,omitempty"` - Website string `protobuf:"bytes,11,opt,name=website,proto3" json:"website,omitempty"` - Biography string `protobuf:"bytes,12,opt,name=biography,proto3" json:"biography,omitempty"` - VotableCards []uint64 `protobuf:"varint,13,rep,packed,name=votableCards,proto3" json:"votableCards,omitempty"` - VotedCards []uint64 `protobuf:"varint,14,rep,packed,name=votedCards,proto3" json:"votedCards,omitempty"` + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` + OwnedCardSchemes []uint64 `protobuf:"varint,2,rep,packed,name=ownedCardSchemes,proto3" json:"ownedCardSchemes,omitempty"` + OwnedPrototypes []uint64 `protobuf:"varint,3,rep,packed,name=ownedPrototypes,proto3" json:"ownedPrototypes,omitempty"` + Cards []uint64 `protobuf:"varint,4,rep,packed,name=cards,proto3" json:"cards,omitempty"` + CouncilParticipation *CouncilParticipation `protobuf:"bytes,6,opt,name=councilParticipation,proto3" json:"councilParticipation,omitempty"` + ReportMatches bool `protobuf:"varint,7,opt,name=ReportMatches,proto3" json:"ReportMatches,omitempty"` + ProfileCard uint64 `protobuf:"varint,8,opt,name=profileCard,proto3" json:"profileCard,omitempty"` + AirDrops *AirDrops `protobuf:"bytes,9,opt,name=airDrops,proto3" json:"airDrops,omitempty"` + BoosterPacks []*BoosterPack `protobuf:"bytes,10,rep,name=boosterPacks,proto3" json:"boosterPacks,omitempty"` + Website string `protobuf:"bytes,11,opt,name=website,proto3" json:"website,omitempty"` + Biography string `protobuf:"bytes,12,opt,name=biography,proto3" json:"biography,omitempty"` + VotableCards []uint64 `protobuf:"varint,13,rep,packed,name=votableCards,proto3" json:"votableCards,omitempty"` + VotedCards []uint64 `protobuf:"varint,14,rep,packed,name=votedCards,proto3" json:"votedCards,omitempty"` } func (m *User) Reset() { *m = User{} } @@ -164,11 +164,11 @@ func (m *User) GetCards() []uint64 { return nil } -func (m *User) GetCouncilStatus() CouncilStatus { +func (m *User) GetCouncilParticipation() *CouncilParticipation { if m != nil { - return m.CouncilStatus + return m.CouncilParticipation } - return CouncilStatus_available + return nil } func (m *User) GetReportMatches() bool { @@ -227,6 +227,58 @@ func (m *User) GetVotedCards() []uint64 { return nil } +type CouncilParticipation struct { + Status CouncilStatus `protobuf:"varint,1,opt,name=status,proto3,enum=DecentralCardGame.cardchain.cardchain.CouncilStatus" json:"status,omitempty"` + Council uint64 `protobuf:"varint,2,opt,name=council,proto3" json:"council,omitempty"` +} + +func (m *CouncilParticipation) Reset() { *m = CouncilParticipation{} } +func (m *CouncilParticipation) String() string { return proto.CompactTextString(m) } +func (*CouncilParticipation) ProtoMessage() {} +func (*CouncilParticipation) Descriptor() ([]byte, []int) { + return fileDescriptor_eb1a13ac65ffc756, []int{1} +} +func (m *CouncilParticipation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CouncilParticipation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CouncilParticipation.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 *CouncilParticipation) XXX_Merge(src proto.Message) { + xxx_messageInfo_CouncilParticipation.Merge(m, src) +} +func (m *CouncilParticipation) XXX_Size() int { + return m.Size() +} +func (m *CouncilParticipation) XXX_DiscardUnknown() { + xxx_messageInfo_CouncilParticipation.DiscardUnknown(m) +} + +var xxx_messageInfo_CouncilParticipation proto.InternalMessageInfo + +func (m *CouncilParticipation) GetStatus() CouncilStatus { + if m != nil { + return m.Status + } + return CouncilStatus_available +} + +func (m *CouncilParticipation) GetCouncil() uint64 { + if m != nil { + return m.Council + } + return 0 +} + type BoosterPack struct { SetId uint64 `protobuf:"varint,1,opt,name=setId,proto3" json:"setId,omitempty"` TimeStamp int64 `protobuf:"varint,2,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` @@ -240,7 +292,7 @@ func (m *BoosterPack) Reset() { *m = BoosterPack{} } func (m *BoosterPack) String() string { return proto.CompactTextString(m) } func (*BoosterPack) ProtoMessage() {} func (*BoosterPack) Descriptor() ([]byte, []int) { - return fileDescriptor_eb1a13ac65ffc756, []int{1} + return fileDescriptor_eb1a13ac65ffc756, []int{2} } func (m *BoosterPack) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -309,7 +361,7 @@ func (m *AirDrops) Reset() { *m = AirDrops{} } func (m *AirDrops) String() string { return proto.CompactTextString(m) } func (*AirDrops) ProtoMessage() {} func (*AirDrops) Descriptor() ([]byte, []int) { - return fileDescriptor_eb1a13ac65ffc756, []int{2} + return fileDescriptor_eb1a13ac65ffc756, []int{3} } func (m *AirDrops) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -377,6 +429,7 @@ func init() { proto.RegisterEnum("DecentralCardGame.cardchain.cardchain.CouncilStatus", CouncilStatus_name, CouncilStatus_value) proto.RegisterEnum("DecentralCardGame.cardchain.cardchain.AirDrop", AirDrop_name, AirDrop_value) proto.RegisterType((*User)(nil), "DecentralCardGame.cardchain.cardchain.User") + proto.RegisterType((*CouncilParticipation)(nil), "DecentralCardGame.cardchain.cardchain.CouncilParticipation") proto.RegisterType((*BoosterPack)(nil), "DecentralCardGame.cardchain.cardchain.BoosterPack") proto.RegisterType((*AirDrops)(nil), "DecentralCardGame.cardchain.cardchain.AirDrops") } @@ -384,46 +437,48 @@ func init() { func init() { proto.RegisterFile("cardchain/cardchain/user.proto", fileDescriptor_eb1a13ac65ffc756) } var fileDescriptor_eb1a13ac65ffc756 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x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d, 0xd2, 0xb8, 0xb9, 0x4b, 0x1a, 0x3f, 0xef, 0x92, 0xc6, 0xe5, 0x8b, 0x2b, 0x69, 0xc7, 0xb3, - 0xbc, 0x5f, 0xa8, 0xe9, 0xe0, 0xc1, 0x0e, 0x0e, 0x4e, 0xd7, 0x0f, 0xc8, 0x97, 0xad, 0xc7, 0xc4, - 0xff, 0xd0, 0xf9, 0xbe, 0x7f, 0x4c, 0x9e, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x68, 0xbb, - 0xa7, 0xb7, 0x04, 0x00, 0x00, + // 651 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xc1, 0x6e, 0x13, 0x3d, + 0x10, 0xc7, 0xb3, 0xd9, 0x6d, 0xb2, 0x99, 0x34, 0xed, 0x7e, 0x56, 0xf5, 0xc9, 0x42, 0x68, 0xb5, + 0x8a, 0x40, 0x5a, 0x55, 0x28, 0x91, 0x02, 0x07, 0x24, 0xb8, 0xd0, 0x56, 0x42, 0x08, 0x90, 0x22, + 0x17, 0x38, 0x70, 0xf3, 0x6e, 0x4c, 0x63, 0x91, 0xac, 0x57, 0xb6, 0x93, 0x92, 0x0b, 0xcf, 0xc0, + 0x95, 0x37, 0xe2, 0xd8, 0x23, 0x47, 0x94, 0xbe, 0x08, 0xb2, 0x77, 0x93, 0x4d, 0xda, 0x1c, 0xc2, + 0x6d, 0xe6, 0x67, 0xcf, 0xdf, 0x33, 0x9e, 0xd1, 0x40, 0x98, 0x52, 0x39, 0x4a, 0xc7, 0x94, 0x67, + 0xfd, 0xca, 0x9a, 0x29, 0x26, 0x7b, 0xb9, 0x14, 0x5a, 0xa0, 0xc7, 0x17, 0x2c, 0x65, 0x99, 0x96, + 0x74, 0x72, 0x4e, 0xe5, 0xe8, 0x35, 0x9d, 0xb2, 0xde, 0xfa, 0x5e, 0x65, 0x3d, 0x88, 0x76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, 0x05, 0xe0, 0x26, 0xb3, 0x05, 0x76, 0x2d, + 0x34, 0xa6, 0x89, 0xce, 0x27, 0x74, 0x81, 0xbd, 0x22, 0xda, 0xd8, 0x86, 0x99, 0xad, 0x81, 0x0f, + 0x0a, 0x66, 0xec, 0xd3, 0x0f, 0xd0, 0xd9, 0xfa, 0x40, 0xd4, 0x81, 0x16, 0x9d, 0x53, 0x3e, 0x31, + 0x0d, 0x0d, 0x6a, 0xe8, 0x18, 0xda, 0xb3, 0xac, 0x02, 0x8e, 0x01, 0x22, 0x67, 0x59, 0x19, 0x14, + 0xd4, 0x11, 0x82, 0x23, 0xa5, 0xa9, 0x34, 0xfd, 0x2d, 0x99, 0x7b, 0xfa, 0x12, 0x9a, 0x65, 0x1d, + 0xc8, 0x2f, 0x12, 0x09, 0x6a, 0xc6, 0x32, 0x45, 0x04, 0x0e, 0x82, 0x55, 0x19, 0x41, 0x1d, 0x35, + 0x6d, 0xea, 0x81, 0x6b, 0x8e, 0x4d, 0x46, 0x81, 0x77, 0x46, 0x7e, 0x2d, 0x43, 0xe7, 0x66, 0x19, + 0x3a, 0x7f, 0x96, 0xa1, 0xf3, 0xe3, 0x36, 0xac, 0xdd, 0xdc, 0x86, 0xb5, 0xdf, 0xb7, 0x61, 0xed, + 0xf3, 0xf3, 0x2b, 0xae, 0xc7, 0xb3, 0xa4, 0x97, 0x8a, 0x69, 0xff, 0xde, 0x74, 0xf4, 0xcf, 0xd7, + 0x5b, 0xed, 0xdb, 0xc6, 0x86, 0xb3, 0x5b, 0x26, 0x69, 0xd8, 0x0d, 0xf7, 0xf4, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x87, 0xe9, 0xb2, 0x75, 0x4c, 0x05, 0x00, 0x00, } func (m *User) Marshal() (dAtA []byte, err error) { @@ -537,62 +592,69 @@ func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if m.CouncilStatus != 0 { - i = encodeVarintUser(dAtA, i, uint64(m.CouncilStatus)) + if m.CouncilParticipation != nil { + { + size, err := m.CouncilParticipation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUser(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x32 } if len(m.Cards) > 0 { - dAtA7 := make([]byte, len(m.Cards)*10) - var j6 int + dAtA8 := make([]byte, len(m.Cards)*10) + var j7 int for _, num := range m.Cards { for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j6++ + j7++ } - dAtA7[j6] = uint8(num) - j6++ + dAtA8[j7] = uint8(num) + j7++ } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintUser(dAtA, i, uint64(j6)) + i -= j7 + copy(dAtA[i:], dAtA8[:j7]) + i = encodeVarintUser(dAtA, i, uint64(j7)) i-- dAtA[i] = 0x22 } if len(m.OwnedPrototypes) > 0 { - dAtA9 := make([]byte, len(m.OwnedPrototypes)*10) - var j8 int + dAtA10 := make([]byte, len(m.OwnedPrototypes)*10) + var j9 int for _, num := range m.OwnedPrototypes { for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j8++ + j9++ } - dAtA9[j8] = uint8(num) - j8++ + dAtA10[j9] = uint8(num) + j9++ } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintUser(dAtA, i, uint64(j8)) + i -= j9 + copy(dAtA[i:], dAtA10[:j9]) + i = encodeVarintUser(dAtA, i, uint64(j9)) i-- dAtA[i] = 0x1a } if len(m.OwnedCardSchemes) > 0 { - dAtA11 := make([]byte, len(m.OwnedCardSchemes)*10) - var j10 int + dAtA12 := make([]byte, len(m.OwnedCardSchemes)*10) + var j11 int for _, num := range m.OwnedCardSchemes { for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j10++ + j11++ } - dAtA11[j10] = uint8(num) - j10++ + dAtA12[j11] = uint8(num) + j11++ } - i -= j10 - copy(dAtA[i:], dAtA11[:j10]) - i = encodeVarintUser(dAtA, i, uint64(j10)) + i -= j11 + copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintUser(dAtA, i, uint64(j11)) i-- dAtA[i] = 0x12 } @@ -606,6 +668,39 @@ func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *CouncilParticipation) 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 *CouncilParticipation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CouncilParticipation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Council != 0 { + i = encodeVarintUser(dAtA, i, uint64(m.Council)) + i-- + dAtA[i] = 0x10 + } + if m.Status != 0 { + i = encodeVarintUser(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *BoosterPack) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -627,38 +722,38 @@ func (m *BoosterPack) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.DropRatiosPerPack) > 0 { - dAtA13 := make([]byte, len(m.DropRatiosPerPack)*10) - var j12 int + dAtA14 := make([]byte, len(m.DropRatiosPerPack)*10) + var j13 int for _, num := range m.DropRatiosPerPack { for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j12++ + j13++ } - dAtA13[j12] = uint8(num) - j12++ + dAtA14[j13] = uint8(num) + j13++ } - i -= j12 - copy(dAtA[i:], dAtA13[:j12]) - i = encodeVarintUser(dAtA, i, uint64(j12)) + i -= j13 + copy(dAtA[i:], dAtA14[:j13]) + i = encodeVarintUser(dAtA, i, uint64(j13)) i-- dAtA[i] = 0x22 } if len(m.RaritiesPerPack) > 0 { - dAtA15 := make([]byte, len(m.RaritiesPerPack)*10) - var j14 int + dAtA16 := make([]byte, len(m.RaritiesPerPack)*10) + var j15 int for _, num := range m.RaritiesPerPack { for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j14++ + j15++ } - dAtA15[j14] = uint8(num) - j14++ + dAtA16[j15] = uint8(num) + j15++ } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintUser(dAtA, i, uint64(j14)) + i -= j15 + copy(dAtA[i:], dAtA16[:j15]) + i = encodeVarintUser(dAtA, i, uint64(j15)) i-- dAtA[i] = 0x1a } @@ -790,8 +885,9 @@ func (m *User) Size() (n int) { } n += 1 + sovUser(uint64(l)) + l } - if m.CouncilStatus != 0 { - n += 1 + sovUser(uint64(m.CouncilStatus)) + if m.CouncilParticipation != nil { + l = m.CouncilParticipation.Size() + n += 1 + l + sovUser(uint64(l)) } if m.ReportMatches { n += 2 @@ -834,6 +930,21 @@ func (m *User) Size() (n int) { return n } +func (m *CouncilParticipation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovUser(uint64(m.Status)) + } + if m.Council != 0 { + n += 1 + sovUser(uint64(m.Council)) + } + return n +} + func (m *BoosterPack) Size() (n int) { if m == nil { return 0 @@ -1183,10 +1294,10 @@ func (m *User) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: wrong wireType = %d for field Cards", wireType) } case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CouncilStatus", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CouncilParticipation", wireType) } - m.CouncilStatus = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUser @@ -1196,11 +1307,28 @@ func (m *User) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CouncilStatus |= CouncilStatus(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthUser + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthUser + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CouncilParticipation == nil { + m.CouncilParticipation = &CouncilParticipation{} + } + if err := m.CouncilParticipation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ReportMatches", wireType) @@ -1547,6 +1675,94 @@ func (m *User) Unmarshal(dAtA []byte) error { } return nil } +func (m *CouncilParticipation) 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 ErrIntOverflowUser + } + 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: CouncilParticipation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CouncilParticipation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= CouncilStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Council", wireType) + } + m.Council = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Council |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipUser(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUser + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *BoosterPack) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0