Skip to content

Commit

Permalink
fix: update proto files
Browse files Browse the repository at this point in the history
Signed-off-by: 170210 <[email protected]>
  • Loading branch information
170210 committed Apr 15, 2024
1 parent 0b2cab7 commit 4e0771a
Show file tree
Hide file tree
Showing 9 changed files with 553 additions and 272 deletions.
42 changes: 37 additions & 5 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@
- [lbm/fswap/v1/event.proto](#lbm/fswap/v1/event.proto)
- [EventSwapCoins](#lbm.fswap.v1.EventSwapCoins)

- [lbm/fswap/v1/fswap.proto](#lbm/fswap/v1/fswap.proto)
- [Swapped](#lbm.fswap.v1.Swapped)

- [lbm/fswap/v1/params.proto](#lbm/fswap/v1/params.proto)
- [Params](#lbm.fswap.v1.Params)

Expand Down Expand Up @@ -12731,6 +12734,38 @@ Msg defines the foundation Msg service.



<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="lbm/fswap/v1/fswap.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## lbm/fswap/v1/fswap.proto



<a name="lbm.fswap.v1.Swapped"></a>

### Swapped



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `old_coin_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `new_coin_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |





<!-- end messages -->

<!-- end enums -->
Expand All @@ -12756,9 +12791,6 @@ Params defines the parameters for the module.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `new_coin_swap_total_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | upper limit in new coin that this module can swap |
| `swap_rate` | [uint64](#uint64) | | constant value representing the exchange rate, without decimal (148079656) |
| `swap_rate_decimals` | [int32](#int32) | | The number shows how to get the true exchange rate by dividing swap_rate by 10 to the power |
| `new_coin_denom` | [string](#string) | | new denomination for new coin after swap |


Expand Down Expand Up @@ -12791,6 +12823,7 @@ GenesisState defines the fswap module's genesis state.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#lbm.fswap.v1.Params) | | |
| `swapped` | [Swapped](#lbm.fswap.v1.Swapped) | | |



Expand Down Expand Up @@ -12831,8 +12864,7 @@ GenesisState defines the fswap module's genesis state.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `old_coin_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `new_coin_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
| `swapped` | [Swapped](#lbm.fswap.v1.Swapped) | | |



Expand Down
14 changes: 14 additions & 0 deletions proto/lbm/fswap/v1/fswap.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";
package lbm.fswap.v1;

option go_package = "github.com/Finschia/finschia-sdk/x/fswap/types";

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

message Swapped{
cosmos.base.v1beta1.Coin old_coin_amount = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
cosmos.base.v1beta1.Coin new_coin_amount = 2
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
}
2 changes: 2 additions & 0 deletions proto/lbm/fswap/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ option go_package = "github.com/Finschia/finschia-sdk/x/fswap/types";

import "gogoproto/gogo.proto";
import "lbm/fswap/v1/params.proto";
import "lbm/fswap/v1/fswap.proto";

// GenesisState defines the fswap module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Swapped swapped =2 [(gogoproto.nullable) = false];
}
11 changes: 1 addition & 10 deletions proto/lbm/fswap/v1/params.proto
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@

syntax = "proto3";
package lbm.fswap.v1;

option go_package = "github.com/Finschia/finschia-sdk/x/fswap/types";

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

// Params defines the parameters for the module.
message Params {
option (gogoproto.goproto_stringer) = false;
// upper limit in new coin that this module can swap
cosmos.base.v1beta1.Coin new_coin_swap_total_limit = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
// constant value representing the exchange rate, without decimal (148079656)
uint64 swap_rate = 2;
// The number shows how to get the true exchange rate by dividing swap_rate by 10 to the power
int32 swap_rate_decimals = 3;
// new denomination for new coin after swap
string new_coin_denom = 4;
string new_coin_denom = 1;
}
6 changes: 2 additions & 4 deletions proto/lbm/fswap/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option go_package = "github.com/Finschia/finschia-sdk/x/fswap/types";
import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "lbm/fswap/v1/fswap.proto";

service Query {
rpc Swapped(QuerySwappedRequest) returns (QuerySwappedResponse) {
Expand All @@ -18,10 +19,7 @@ service Query {

message QuerySwappedRequest {}
message QuerySwappedResponse {
cosmos.base.v1beta1.Coin old_coin_amount = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
cosmos.base.v1beta1.Coin new_coin_amount = 2
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
Swapped swapped = 1 [(gogoproto.nullable) = false];
}

message QueryTotalSwappableAmountRequest {}
Expand Down
Loading

0 comments on commit 4e0771a

Please sign in to comment.