-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added nft module and denom feature (#672)
- Loading branch information
Showing
33 changed files
with
7,914 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
syntax = "proto3"; | ||
package panacea.pnft.v2; | ||
|
||
option go_package = "github.com/medibloc/panacea-core/x/pnft/types"; | ||
option java_multiple_files = true; | ||
|
||
message EventSaveDenom { | ||
string id = 1; | ||
string creator = 2; | ||
} | ||
|
||
message EventUpdateDenom { | ||
string id = 1; | ||
string updater = 2; | ||
} | ||
|
||
message EventDeleteDenom { | ||
string id = 1; | ||
string remover = 2; | ||
} | ||
|
||
message EventTransferDenom { | ||
string id = 1; | ||
string sender = 2; | ||
string receiver = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
syntax = "proto3"; | ||
package panacea.pnft.v2; | ||
|
||
import "panacea/pnft/v2/pnft.proto"; | ||
|
||
option go_package = "github.com/medibloc/panacea-core/x/pnft/types"; | ||
option java_multiple_files = true; | ||
|
||
// GenesisState defines the nft module's genesis state. | ||
message GenesisState { | ||
repeated panacea.pnft.v2.Denom denoms = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
package panacea.pnft.v2; | ||
|
||
option go_package = "github.com/medibloc/panacea-core/x/pnft/types"; | ||
option java_multiple_files = true; | ||
|
||
message Denom { | ||
string id = 1; | ||
string name = 2; | ||
string symbol = 3; | ||
string description = 4; | ||
string uri = 5; | ||
string uri_hash = 6; | ||
string owner = 7; | ||
string data = 8; | ||
} | ||
|
||
message DenomMeta { | ||
string owner = 1; | ||
string data = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
syntax = "proto3"; | ||
package panacea.pnft.v2; | ||
|
||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "panacea/pnft/v2/pnft.proto"; | ||
|
||
option java_multiple_files = true; | ||
option go_package = "github.com/medibloc/panacea-core/x/pnft/types"; | ||
|
||
// QueryService defines the gRPC querier service. | ||
service QueryService { | ||
// Denoms returns denom list. | ||
rpc Denoms(QueryServiceDenomsRequest) returns (QueryServiceDenomsResponse) { | ||
option (google.api.http).get = | ||
"/panacea/pnft/v2/denoms"; | ||
} | ||
|
||
rpc DenomsByCreator(QueryServiceDenomsByCreatorRequest) returns (QueryServiceDenomsByCreatorResponse) { | ||
option (google.api.http).get = | ||
"/panacea/pnft/v2/denoms/creators/{creator}"; | ||
} | ||
|
||
// Denom returns denom detail. | ||
rpc Denom(QueryServiceDenomRequest) returns (QueryServiceDenomResponse) { | ||
option (google.api.http).get = | ||
"/panacea/pnft/v2/denoms/{id}"; | ||
} | ||
} | ||
|
||
// QueryServiceDenomsRequest is the response type for the Query RPC method. | ||
message QueryServiceDenomsRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} | ||
|
||
// QueryServiceDenomsResponse is the response type for the Query RPC method. | ||
message QueryServiceDenomsResponse { | ||
repeated panacea.pnft.v2.Denom denoms = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// QueryServiceDenomsByCreatorRequest is the response type for the Query RPC method. | ||
message QueryServiceDenomsByCreatorRequest { | ||
string creator = 1; | ||
} | ||
|
||
// QueryServiceDenomsByCreatorResponse is the response type for the Query RPC method. | ||
message QueryServiceDenomsByCreatorResponse { | ||
repeated panacea.pnft.v2.Denom denoms = 1; | ||
} | ||
|
||
// QueryServiceDenomRequest is the response type for the Query RPC method. | ||
message QueryServiceDenomRequest { | ||
string id = 1; | ||
} | ||
|
||
// QueryServiceDenomResponse is the response type for the Query RPC method. | ||
message QueryServiceDenomResponse { | ||
panacea.pnft.v2.Denom denom = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
syntax = "proto3"; | ||
package panacea.pnft.v2; | ||
|
||
import "panacea/pnft/v2/pnft.proto"; | ||
|
||
option go_package = "github.com/medibloc/panacea-core/x/pnft/types"; | ||
option java_multiple_files = true; | ||
|
||
service MsgService { | ||
rpc CreateDenom(MsgServiceCreateDenomRequest) returns (MsgServiceCreateDenomResponse); | ||
|
||
rpc UpdateDenom(MsgServiceUpdateDenomRequest) returns (MsgServiceUpdateDenomResponse); | ||
|
||
rpc DeleteDenom(MsgServiceDeleteDenomRequest) returns (MsgServiceDeleteDenomResponse); | ||
|
||
rpc TransferDenom(MsgServiceTransferDenomRequest) returns (MsgServiceTransferDenomResponse); | ||
} | ||
|
||
message MsgServiceCreateDenomRequest { | ||
string id = 1; | ||
string name = 2; | ||
string symbol = 3; | ||
string description = 4; | ||
string uri = 5; | ||
string uri_hash = 6; | ||
string data = 7; | ||
string creator = 8; | ||
} | ||
|
||
message MsgServiceCreateDenomResponse {} | ||
|
||
message MsgServiceUpdateDenomRequest { | ||
string id = 1; | ||
string name = 2; | ||
string symbol = 3; | ||
string description = 4; | ||
string uri = 5; | ||
string uri_hash = 6; | ||
string data = 7; | ||
string updater = 8; | ||
} | ||
|
||
message MsgServiceUpdateDenomResponse {} | ||
|
||
message MsgServiceDeleteDenomRequest { | ||
string id = 1; | ||
string remover = 2; | ||
} | ||
|
||
message MsgServiceDeleteDenomResponse {} | ||
|
||
message MsgServiceTransferDenomRequest { | ||
string id = 1; | ||
string sender = 2; | ||
string receiver = 3; | ||
} | ||
|
||
message MsgServiceTransferDenomResponse {} |
Oops, something went wrong.