Skip to content

Commit

Permalink
Merge pull request #169 from comdex-official/testdevproto
Browse files Browse the repository at this point in the history
Testdevproto
  • Loading branch information
dheerajkd30 authored May 31, 2022
2 parents be77525 + 667d0e0 commit 2354f4c
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 195 deletions.
3 changes: 2 additions & 1 deletion proto/comdex/locker/v1beta1/locker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ message LockedDepositedAmountDataMap
{
uint64 asset_id = 1 [ (gogoproto.moretags) = "yaml:\"asset_id\"" ];
string DepositedAmount= 2 [ (gogoproto.moretags) = "yaml:\"DepositedAmount\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false];
}
// message LockerStatistics {

Expand Down
3 changes: 2 additions & 1 deletion proto/comdex/locker/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ message QueryLockerTotalDepositedByAppRequest {
}

message QueryLockerTotalDepositedByAppResponse {
repeated LockedDepositedAmountDataMap lockedDepositedAmountDataMap =1 [ (gogoproto.moretags) = "yaml:\"lockedDepositedAmountDataMap\"" ];
repeated LockedDepositedAmountDataMap lockedDepositedAmountDataMap =1 [ (gogoproto.moretags) = "yaml:\"lockedDepositedAmountDataMap\"",
(gogoproto.nullable) = false ];
}

message QueryStateRequest{
Expand Down
6 changes: 4 additions & 2 deletions proto/comdex/vault/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ message QueryTokenMintedAllProductsByPairRequest {
message QueryTokenMintedAllProductsByPairResponse {
string token_minted = 1 [
(gogoproto.moretags) = "yaml:\"token_minted\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false ];
}

message QueryTokenMintedAllProductsRequest {
Expand All @@ -157,7 +158,8 @@ message QueryTokenMintedAllProductsRequest {
message QueryTokenMintedAllProductsResponse {
string token_minted = 1 [
(gogoproto.moretags) = "yaml:\"token_minted\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false ];
}

message QueryVaultCountByProductRequest {
Expand Down
17 changes: 11 additions & 6 deletions proto/comdex/vault/v1beta1/vault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ message Vault {
google.protobuf.Timestamp created_at = 7 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "yaml:\"created_at\""
(gogoproto.moretags) = "yaml:\"created_at\""
];
string interest_accumulated = 8[
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"interest_accumulated\""
(gogoproto.moretags) = "yaml:\"interest_accumulated\""
(gogoproto.nullable) = false
];
string closing_fee_accumulated = 9 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"closing_fee_accumulated\""
(gogoproto.moretags) = "yaml:\"interest_accumulated\""
(gogoproto.nullable) = false
];
}

Expand Down Expand Up @@ -84,9 +86,11 @@ message ExtendedPairToVaultMapping {
repeated string vault_ids = 2 [ (gogoproto.moretags) = "yaml:\"vault_ids\"" ];
string token_minted_amount =3[
(gogoproto.moretags) = "yaml:\"token_minted_amount\"" ,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false];
string collateral_locked_amount=4[ (gogoproto.moretags) = "yaml:\"collateral_locked_amount\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false];
}


Expand All @@ -95,7 +99,8 @@ message ExtendedPairToVaultMapping {
{
uint64 asset_id = 1 [ (gogoproto.moretags) = "yaml:\"asset_id\"" ];
string collateral_locked_amount= 2 [ (gogoproto.moretags) = "yaml:\"collateral_locked_amount\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false];
}


Expand Down
6 changes: 3 additions & 3 deletions x/locker/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@ func (q *queryServer) QueryLockerTotalDepositedByApp(c context.Context, req *typ
if !found {
return nil, status.Errorf(codes.NotFound, "locker-info does not exist for id %d", req.AppId)
}
var lockedDepositedAmt []*types.LockedDepositedAmountDataMap
var lockedDepositedAmt []types.LockedDepositedAmountDataMap

for _, data := range item.Lockers {
var lockeddata types.LockedDepositedAmountDataMap
lockeddata.AssetId = data.AssetId
lockeddata.DepositedAmount = &data.DepositedAmount
lockedDepositedAmt = append(lockedDepositedAmt, &lockeddata)
lockeddata.DepositedAmount = data.DepositedAmount
lockedDepositedAmt = append(lockedDepositedAmt, lockeddata)

}

Expand Down
138 changes: 66 additions & 72 deletions x/locker/types/locker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2354f4c

Please sign in to comment.