diff --git a/gen.sh b/gen.sh index 8826f038..a6ddaa01 100755 --- a/gen.sh +++ b/gen.sh @@ -3,4 +3,12 @@ #ignite scaffold message UserCreate newUser:string alias:string #ignite scaffold message CardSchemeBuy bid:coin --response cardId:uint #ignite scaffold message CardSaveContent cardId:uint content:string notes:string artist:string balanceAnchor:bool --response airdropClaimed:bool -#ignite scaffold message CardVote vote:SingleVote --response airdropClaimed:bool +ignite scaffold message CardVote vote:SingleVote --response airdropClaimed:bool +ignite scaffold message CardTransfer cardId:uint receiver:string +ignite scaffold message CardDonate cardId:uint amount:coin +ignite scaffold message CardArtworkAdd cardId:uint image:string fullArt:bool +ignite scaffold message CardArtistChange cardId:uint artist:string +ignite scaffold message CouncilRegister +ignite scaffold message CouncilDeregister +ignite scaffold message MatchReport matchId:uint playedCardsA:uints \ + playedCardsB:uints outcome:Outcome diff --git a/proto/cardchain/cardchain/match.proto b/proto/cardchain/cardchain/match.proto new file mode 100644 index 00000000..0046ef6d --- /dev/null +++ b/proto/cardchain/cardchain/match.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package cardchain.cardchain; + +option go_package = "github.com/DecentralCardGame/cardchain/x/cardchain/types"; +import "cardchain/cardchain/voting.proto"; + +message Match { + + uint64 timestamp = 1; + string reporter = 2; + MatchPlayer playerA = 3; + 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; +}