Skip to content

Commit

Permalink
fix proto psm
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Nov 15, 2024
1 parent 5e22183 commit 72bd744
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 207 deletions.
4 changes: 2 additions & 2 deletions proto/reserve/psm/v1/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ option go_package = "github.com/onomyprotocol/reserve/x/psm/types";

message Params {
// total $nomX can mint
bytes limit_total = 1 [
string limit_total = 1 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// The price cannot be exactly 1, an acceptable such as 0.9999 (AcceptablePriceRatio = 0.0001)
bytes acceptable_price_ratio = 2 [
string acceptable_price_ratio = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
Expand Down
10 changes: 5 additions & 5 deletions proto/reserve/psm/v1/psm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,33 @@ message StablecoinInfo {
// stablecoin name
string denom = 1;
// limit total stablecoin
bytes limit_total = 2 [
string limit_total = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// stablecoin to nom exchange fee, fee_in when 1 stablecoin = 1nomUSD
bytes fee_in = 3 [
string fee_in = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
// nom to stablecoin exchange fee, fee_out when 1 stablecoin = 1nomUSD
bytes fee_out = 4 [
string fee_out = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
// amount of stablecoins locked in exchange for nomUSD
bytes total_stablecoin_lock = 5 [
string total_stablecoin_lock = 5 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// maximum fee for when either fee = 0
bytes fee_max_stablecoin = 6 [
string fee_max_stablecoin = 6 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
Expand Down
4 changes: 2 additions & 2 deletions proto/reserve/psm/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ message QueryStablecoinRequest {
message QueryStablecoinResponse {
StablecoinInfo stablecoin = 1 [(gogoproto.nullable) = false];

bytes swapable_quantity = 3 [
string swapable_quantity = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
Expand All @@ -64,7 +64,7 @@ message QueryAllStablecoinResponse {

message StablecoinResponse {
StablecoinInfo stablecoin = 1 [(gogoproto.nullable) = false];
bytes swapable_quantity = 3 [
string swapable_quantity = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
Expand Down
12 changes: 6 additions & 6 deletions proto/reserve/psm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ message MsgAddStableCoin {

string denom = 2;

bytes limit_total = 3 [
string limit_total = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];

bytes fee_in = 4 [
string fee_in = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
bytes fee_out = 5 [
string fee_out = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
Expand All @@ -83,19 +83,19 @@ message MsgUpdatesStableCoin {

string denom = 2;

bytes limit_total = 3 [
string limit_total = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];

bytes fee_in = 4 [
string fee_in = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
bytes fee_out = 5 [
string fee_out = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
Expand Down
58 changes: 30 additions & 28 deletions x/psm/types/params.pb.go

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

Loading

0 comments on commit 72bd744

Please sign in to comment.