Skip to content

Commit

Permalink
feat(#242): Added base
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Dec 16, 2024
1 parent 6d279e2 commit 589d6a9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/sh

#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 cardId:uint voteType:VoteType --response airdropClaimed:bool
37 changes: 37 additions & 0 deletions proto/cardchain/cardchain/voting.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
syntax = "proto3";
package decentralCardGame.cardchain.cardchain;

option go_package = "github.com/DecentralCardGame/cardchain/x/cardchain/types";

message VotingResults {

uint64 totalVotes = 1;
uint64 totalFairEnoughVotes = 2;
uint64 totalOverpoweredVotes = 3;
uint64 totalUnderpoweredVotes = 4;
uint64 totalInappropriateVotes = 5;
repeated VotingResult cardResults = 6;
string notes = 7;
}

message VotingResult {

uint64 cardId = 1;
uint64 fairEnoughVotes = 2;
uint64 overpoweredVotes = 3;
uint64 underpoweredVotes = 4;
uint64 inappropriateVotes = 5;
string result = 6;
}

message SingleVote {
uint64 cardId = 1;
VoteType voteType = 2;
}

enum VoteType {
fairEnough = 0;
inappropriate = 1;
overpowered = 2;
underpowered = 3;
}

0 comments on commit 589d6a9

Please sign in to comment.