Skip to content

Commit

Permalink
wip: launchpad collection status handling
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Jul 11, 2024
1 parent 7bf96bc commit 44d8144
Show file tree
Hide file tree
Showing 5 changed files with 906 additions and 299 deletions.
66 changes: 45 additions & 21 deletions api/launchpad/v1/launchpad.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ service LaunchpadService {
rpc CollectionsByCreator(CollectionsByCreatorRequest) returns (CollectionsByCreatorResponse);
rpc LaunchpadProjects(LaunchpadProjectsRequest) returns (LaunchpadProjectsResponse);
rpc LaunchpadProjectById(LaunchpadProjectByIdRequest) returns (LaunchpadProjectByIdResponse);
rpc LaunchpadProjectsCountByStatus(LaunchpadProjectsCountByStatusRequest) returns (LaunchpadProjectsCountByStatusResponse);
}

enum Sort {
Expand All @@ -23,13 +24,22 @@ enum SortDirection {
SORT_DIRECTION_DESCENDING = 2;
}

enum Status {
STATUS_INCOMPLETE = 0;
STATUS_COMPLETE = 1;
STATUS_DEPLOYED = 2;
}

// -------------------------------

message CollectionsByCreatorRequest {
string creator_id = 1;
string network_id = 2;
int32 limit = 3;
int32 offset = 4;
Sort sort = 5;
SortDirection sort_direction = 6;
Status status = 7;
}

message CollectionsByCreatorResponse {
Expand All @@ -44,6 +54,7 @@ message LaunchpadProjectsRequest {
SortDirection sort_direction = 5;
// TODO: user authentication (Member of the admin DAO) using a token
string user_address = 6;
Status status = 7;
}

message LaunchpadProjectsResponse {
Expand Down Expand Up @@ -95,19 +106,52 @@ message TokenMetadataResponse {
repeated string merkle_proof = 3;
}

message LaunchpadProjectsCountByStatusRequest {
// TODO: user authentication (Member of the admin DAO) using a token
string user_address = 1;
Status status = 2;
}

message LaunchpadProjectsCountByStatusResponse {
uint32 count = 1;
}

// -------------------------------

message LaunchpadProject {
string id = 1;
string network_id = 2;
string creator_id = 3;
string collection_data = 4;
optional string merkle_root = 5;
Status status = 6;
}

message Metadata {
optional string image = 1;
optional string image_data = 2;
optional string external_url = 3;
optional string description = 4;
optional string name = 5;
repeated Trait attributes = 6;
optional string background_color = 7;
optional string animation_url = 8;
optional string youtube_url = 9;
optional uint64 royalty_percentage = 10;
optional string royalty_payment_address = 11;
}

message Trait {
optional string display_type = 1;
string trait_type = 2;
string value = 3;
}

// message UpdateCollectionWhitelistsRequest {
// string sender = 1;
// string network_id = 2;
// uint32 project_id = 3;
// repeated WhitelistMintInfo whitelist_mint_infos = 4;
// repeated WhitelistMintInfo whitelist_mint_infos = 4;
// }

// message UpdateCollectionWhitelistsResponse {
Expand All @@ -127,26 +171,6 @@ message LaunchpadProject {
// repeated string merkle_proof = 2;
// }

message Metadata {
optional string image = 1;
optional string image_data = 2;
optional string external_url = 3;
optional string description = 4;
optional string name = 5;
repeated Trait attributes = 6;
optional string background_color = 7;
optional string animation_url = 8;
optional string youtube_url = 9;
optional uint64 royalty_percentage = 10;
optional string royalty_payment_address = 11;
}

message Trait {
optional string display_type = 1;
string trait_type = 2;
string value = 3;
}

// message ProjectInfo {
// // Collection info ----------------------------
// string name = 1;
Expand Down
Loading

0 comments on commit 44d8144

Please sign in to comment.