Skip to content

Commit

Permalink
Merge branch 'cosmos_upgrade' into 129-shore-remove-warnings-in-cosmo…
Browse files Browse the repository at this point in the history
…s_upgrade-code
  • Loading branch information
lxgr-linux committed Aug 21, 2023
2 parents 5068353 + 464ba00 commit 5f143d6
Show file tree
Hide file tree
Showing 45 changed files with 3,449 additions and 2,289 deletions.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,8 @@ func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo
}
}

app.CardchainKeeper.MatchWorker(ctx)

return app.mm.EndBlock(ctx, req)
}

Expand Down
158 changes: 158 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33050,6 +33050,9 @@ paths:
votingRewardCap:
type: string
format: int64
matchWorkerDelay:
type: string
format: uint64
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
Expand Down Expand Up @@ -33513,6 +33516,21 @@ paths:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
playerB:
type: object
properties:
Expand All @@ -33533,6 +33551,21 @@ paths:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
outcome:
type: string
enum:
Expand All @@ -33543,6 +33576,8 @@ paths:
default: AWon
coinsDistributed:
type: boolean
serverConfirmed:
type: boolean
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -33614,6 +33649,21 @@ paths:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
playerB:
type: object
properties:
Expand All @@ -33634,6 +33684,21 @@ paths:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
outcome:
type: string
enum:
Expand All @@ -33644,6 +33709,8 @@ paths:
default: AWon
coinsDistributed:
type: boolean
serverConfirmed:
type: boolean
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -68522,6 +68589,21 @@ definitions:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
playerB:
type: object
properties:
Expand All @@ -68542,6 +68624,21 @@ definitions:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
outcome:
type: string
enum:
Expand All @@ -68552,6 +68649,8 @@ definitions:
default: AWon
coinsDistributed:
type: boolean
serverConfirmed:
type: boolean
DecentralCardGame.cardchain.cardchain.MatchPlayer:
type: object
properties:
Expand All @@ -68572,6 +68671,21 @@ definitions:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
DecentralCardGame.cardchain.cardchain.MsgAddArtworkResponse:
type: object
DecentralCardGame.cardchain.cardchain.MsgAddArtworkToCollectionResponse:
Expand Down Expand Up @@ -68615,6 +68729,12 @@ definitions:
type: object
DecentralCardGame.cardchain.cardchain.MsgFinalizeCollectionResponse:
type: object
DecentralCardGame.cardchain.cardchain.MsgMsgOpenMatchResponse:
type: object
properties:
matchId:
type: string
format: uint64
DecentralCardGame.cardchain.cardchain.MsgMultiVoteCardResponse:
type: object
DecentralCardGame.cardchain.cardchain.MsgOpenBoosterPackResponse:
Expand Down Expand Up @@ -68827,6 +68947,9 @@ definitions:
votingRewardCap:
type: string
format: int64
matchWorkerDelay:
type: string
format: uint64
description: Params defines the parameters for the module.
DecentralCardGame.cardchain.cardchain.QueryParamsResponse:
type: object
Expand Down Expand Up @@ -68888,6 +69011,9 @@ definitions:
votingRewardCap:
type: string
format: int64
matchWorkerDelay:
type: string
format: uint64
description: QueryParamsResponse is response type for the Query/Params RPC method.
DecentralCardGame.cardchain.cardchain.QueryQCardContentResponse:
type: object
Expand Down Expand Up @@ -68990,6 +69116,21 @@ definitions:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
playerB:
type: object
properties:
Expand All @@ -69010,6 +69151,21 @@ definitions:
- Draw
- Aborted
default: AWon
deck:
type: array
items:
type: string
format: uint64
votedCards:
type: array
items:
type: object
properties:
cardId:
type: string
format: uint64
voteType:
type: string
outcome:
type: string
enum:
Expand All @@ -69020,6 +69176,8 @@ definitions:
default: AWon
coinsDistributed:
type: boolean
serverConfirmed:
type: boolean
DecentralCardGame.cardchain.cardchain.QueryQSellOffersResponse:
type: object
properties:
Expand Down
12 changes: 11 additions & 1 deletion proto/cardchain/cardchain/match.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";
package DecentralCardGame.cardchain.cardchain;

option go_package = "github.com/DecentralCardGame/Cardchain/x/cardchain/types";
import "cardchain/cardchain/tx.proto";
import "cardchain/cardchain/voteing.proto";

message Match {

Expand All @@ -12,11 +12,21 @@ message Match {
MatchPlayer playerB = 4;
Outcome outcome = 7;
bool coinsDistributed = 10;
bool serverConfirmed = 8;
}

message MatchPlayer {
string addr = 1;
repeated uint64 playedCards = 2;
bool confirmed = 3;
Outcome outcome = 4;
repeated uint64 deck = 5;
repeated SingleVote votedCards = 6;
}

enum Outcome {
AWon = 0;
BWon = 1;
Draw = 2;
Aborted = 3;
}
1 change: 1 addition & 0 deletions proto/cardchain/cardchain/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ message Params {
string trialVoteReward = 19 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin"];;
int64 votePoolFraction = 20;
int64 votingRewardCap = 8;
uint64 matchWorkerDelay = 21;
}
3 changes: 1 addition & 2 deletions proto/cardchain/cardchain/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "cardchain/cardchain/params.proto";
import "cardchain/cardchain/vote_right.proto";
import "cardchain/cardchain/voting_results.proto";
import "cardchain/cardchain/voteing.proto";
import "cardchain/cardchain/card.proto";
import "cardchain/cardchain/user.proto";
import "cardchain/cardchain/match.proto";
Expand Down
Loading

0 comments on commit 5f143d6

Please sign in to comment.