Lorenz Herzberger 7a3ccccc7a
119 create dao msg to mint plmnt on demand (#122)
* add mint address to config file
* ignite scaffold type mint-request beneficiary amount liquid-tx-hash --module dao
* add mintrequest stores
* rename mint_request.go
* add unit tests for mint request store
* ignite scaffold message mint-token mint-request:MintRequest --module dao
* add ante handler for mint address
* add msg validation for mint request
* fix staticcheck error
* ignite scaffold query get-mint-requests-by-hash hash --response mint-request:MintRequest --module dao
* add a query for mint request and additional validation for msg server
* add mock for mint unit testing
* add unit test for mint token msg server
* add unit tests for query mint requests by hash
* ignite scaffold query mint-requests-by-address address --response mint-requests:MintRequests --module dao
* implement query mint requests by address and unit tests
* add e2e test for token mint

---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-10-05 15:38:53 +02:00

61 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package planetmintgo.dao;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "planetmintgo/dao/params.proto";
import "planetmintgo/dao/mint_request.proto";
import "planetmintgo/dao/mint_requests.proto";
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
// Query defines the gRPC querier service.
service Query {
// Parameters queries the parameters of the module.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/github.com/planetmint/planetmint-go/dao/params";
}
// Queries a list of GetMintRequestsByHash items.
rpc GetMintRequestsByHash (QueryGetMintRequestsByHashRequest) returns (QueryGetMintRequestsByHashResponse) {
option (google.api.http).get = "/planetmint/planetmint-go/dao/get_mint_requests_by_hash/{hash}";
}
// Queries a list of MintRequestsByAddress items.
rpc MintRequestsByAddress (QueryMintRequestsByAddressRequest) returns (QueryMintRequestsByAddressResponse) {
option (google.api.http).get = "/planetmint/planetmint-go/dao/mint_requests_by_address/{address}";
}
}
// QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
}
message QueryGetMintRequestsByHashRequest {
string hash = 1;
}
message QueryGetMintRequestsByHashResponse {
MintRequest mintRequest = 1;
}
message QueryMintRequestsByAddressRequest {
string address = 1;
}
message QueryMintRequestsByAddressResponse {
MintRequests mintRequests = 1;
}