Skip to content

Commit

Permalink
feat(#242): next wave of transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Dec 16, 2024
1 parent 2597210 commit a556ecd
Show file tree
Hide file tree
Showing 65 changed files with 24,914 additions and 2,644 deletions.
15,121 changes: 14,544 additions & 577 deletions api/cardchain/cardchain/tx.pulsar.go

Large diffs are not rendered by default.

542 changes: 530 additions & 12 deletions api/cardchain/cardchain/tx_grpc.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/static/openapi.yml

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,19 @@
#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:int
#ignite scaffold message MatchReport matchId:uint playedCardsA:uints \
# playedCardsB:uints outcome:int
ignite scaffold message CouncilCreate cardId:uint
ignite scaffold message MatchReporterAppoint reporter:string
ignite scaffold message SetCreate name artist storyWriter contributors:strings
ignite scaffold message SetCardAdd setId:uint cardId:uint
ignite scaffold message SetCardRemove setId:uint cardId:uint
ignite scaffold message SetContributorAdd setId:uint user
ignite scaffold message SetContributorRemove setId:uint user
ignite scaffold message SetFinalize setId:uint
ignite scaffold message SetArtworkAdd setId:uint image
ignite scaffold message SetStoryAdd setId:uint story
ignite scaffold message BoosterPackBuy setId:uint --response airdropClaimed:bool
ignite scaffold message SellOfferCreate cardId:uint price:coin
ignite scaffold message SellOfferBuy sellOfferId:uint
ignite scaffold message SellOfferRemove sellOfferId:uint
139 changes: 139 additions & 0 deletions proto/cardchain/cardchain/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ service Msg {
rpc CouncilDeregister(MsgCouncilDeregister)
returns (MsgCouncilDeregisterResponse);
rpc MatchReport(MsgMatchReport) returns (MsgMatchReportResponse);
rpc CouncilCreate(MsgCouncilCreate) returns (MsgCouncilCreateResponse);
rpc MatchReporterAppoint(MsgMatchReporterAppoint)
returns (MsgMatchReporterAppointResponse);
rpc SetCreate(MsgSetCreate) returns (MsgSetCreateResponse);
rpc SetCardAdd(MsgSetCardAdd) returns (MsgSetCardAddResponse);
rpc SetCardRemove(MsgSetCardRemove) returns (MsgSetCardRemoveResponse);
rpc SetContributorAdd(MsgSetContributorAdd)
returns (MsgSetContributorAddResponse);
rpc SetContributorRemove(MsgSetContributorRemove)
returns (MsgSetContributorRemoveResponse);
rpc SetFinalize(MsgSetFinalize) returns (MsgSetFinalizeResponse);
rpc SetArtworkAdd(MsgSetArtworkAdd) returns (MsgSetArtworkAddResponse);
rpc SetStoryAdd(MsgSetStoryAdd) returns (MsgSetStoryAddResponse);
rpc BoosterPackBuy(MsgBoosterPackBuy) returns (MsgBoosterPackBuyResponse);
rpc SellOfferCreate(MsgSellOfferCreate) returns (MsgSellOfferCreateResponse);
rpc SellOfferBuy(MsgSellOfferBuy) returns (MsgSellOfferBuyResponse);
rpc SellOfferRemove(MsgSellOfferRemove) returns (MsgSellOfferRemoveResponse);
}
// MsgUpdateParams is the Msg/UpdateParams request type.
message MsgUpdateParams {
Expand Down Expand Up @@ -152,3 +169,125 @@ message MsgMatchReport {
}

message MsgMatchReportResponse {}

message MsgCouncilCreate {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 cardId = 2;
}

message MsgCouncilCreateResponse {}

message MsgMatchReporterAppoint {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
string reporter = 2;
}

message MsgMatchReporterAppointResponse {}

message MsgSetCreate {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
string name = 2;
string artist = 3;
string storyWriter = 4;
repeated string contributors = 5;
}

message MsgSetCreateResponse {}

message MsgSetCardAdd {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
uint64 cardId = 3;
}

message MsgSetCardAddResponse {}

message MsgSetCardRemove {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
uint64 cardId = 3;
}

message MsgSetCardRemoveResponse {}

message MsgSetContributorAdd {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
string user = 3;
}

message MsgSetContributorAddResponse {}

message MsgSetContributorRemove {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
string user = 3;
}

message MsgSetContributorRemoveResponse {}

message MsgSetFinalize {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
}

message MsgSetFinalizeResponse {}

message MsgSetArtworkAdd {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
bytes image = 3;
}

message MsgSetArtworkAddResponse {}

message MsgSetStoryAdd {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
string story = 3;
}

message MsgSetStoryAddResponse {}

message MsgBoosterPackBuy {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 setId = 2;
}

message MsgBoosterPackBuyResponse { bool airdropClaimed = 1; }

message MsgSellOfferCreate {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 cardId = 2;
cosmos.base.v1beta1.Coin price = 3 [ (gogoproto.nullable) = false ];
}

message MsgSellOfferCreateResponse {}

message MsgSellOfferBuy {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 sellOfferId = 2;
}

message MsgSellOfferBuyResponse {}

message MsgSellOfferRemove {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
uint64 sellOfferId = 2;
}

message MsgSellOfferRemoveResponse {}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_booster_pack_buy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) BoosterPackBuy(goCtx context.Context, msg *types.MsgBoosterPackBuy) (*types.MsgBoosterPackBuyResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgBoosterPackBuyResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_council_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) CouncilCreate(goCtx context.Context, msg *types.MsgCouncilCreate) (*types.MsgCouncilCreateResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgCouncilCreateResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_match_reporter_appoint.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) MatchReporterAppoint(goCtx context.Context, msg *types.MsgMatchReporterAppoint) (*types.MsgMatchReporterAppointResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgMatchReporterAppointResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_sell_offer_buy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SellOfferBuy(goCtx context.Context, msg *types.MsgSellOfferBuy) (*types.MsgSellOfferBuyResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSellOfferBuyResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_sell_offer_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SellOfferCreate(goCtx context.Context, msg *types.MsgSellOfferCreate) (*types.MsgSellOfferCreateResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSellOfferCreateResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_sell_offer_remove.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SellOfferRemove(goCtx context.Context, msg *types.MsgSellOfferRemove) (*types.MsgSellOfferRemoveResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSellOfferRemoveResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_artwork_add.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetArtworkAdd(goCtx context.Context, msg *types.MsgSetArtworkAdd) (*types.MsgSetArtworkAddResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetArtworkAddResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_card_add.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetCardAdd(goCtx context.Context, msg *types.MsgSetCardAdd) (*types.MsgSetCardAddResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetCardAddResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_card_remove.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetCardRemove(goCtx context.Context, msg *types.MsgSetCardRemove) (*types.MsgSetCardRemoveResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetCardRemoveResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_contributor_add.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetContributorAdd(goCtx context.Context, msg *types.MsgSetContributorAdd) (*types.MsgSetContributorAddResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetContributorAddResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_contributor_remove.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetContributorRemove(goCtx context.Context, msg *types.MsgSetContributorRemove) (*types.MsgSetContributorRemoveResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetContributorRemoveResponse{}, nil
}
17 changes: 17 additions & 0 deletions x/cardchain/keeper/msg_server_set_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package keeper

import (
"context"

"github.com/DecentralCardGame/cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func (k msgServer) SetCreate(goCtx context.Context, msg *types.MsgSetCreate) (*types.MsgSetCreateResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO: Handling the message
_ = ctx

return &types.MsgSetCreateResponse{}, nil
}
Loading

0 comments on commit a556ecd

Please sign in to comment.