Skip to content

Commit

Permalink
Add cosmos_dec_bytes amino encoding for PrecDecs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcompagni10 committed Oct 30, 2024
1 parent 511867e commit e264c34
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 125 deletions.
9 changes: 6 additions & 3 deletions proto/neutron/dex/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ message MsgPlaceLimitOrder {
(gogoproto.moretags) = "yaml:\"limit_sell_price\"",
(gogoproto.customtype) = "github.com/neutron-org/neutron/v5/utils/math.PrecDec",
(gogoproto.nullable) = true,
(gogoproto.jsontag) = "limit_sell_price"
(gogoproto.jsontag) = "limit_sell_price",
(amino.encoding) = "cosmos_dec_bytes"
];
// min_average_sell_price is an optional parameter that sets a required minimum average price for the entire trade.
// if the min_average_sell_price is not met the trade will fail.
Expand All @@ -172,7 +173,8 @@ message MsgPlaceLimitOrder {
(gogoproto.moretags) = "yaml:\"min_average_sell_price\"",
(gogoproto.customtype) = "github.com/neutron-org/neutron/v5/utils/math.PrecDec",
(gogoproto.nullable) = true,
(gogoproto.jsontag) = "min_average_sell_price"
(gogoproto.jsontag) = "min_average_sell_price",
(amino.encoding) = "cosmos_dec_bytes"
];
}

Expand Down Expand Up @@ -276,7 +278,8 @@ message MsgMultiHopSwap {
(gogoproto.moretags) = "yaml:\"exit_limit_price\"",
(gogoproto.customtype) = "github.com/neutron-org/neutron/v5/utils/math.PrecDec",
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "exit_limit_price"
(gogoproto.jsontag) = "exit_limit_price",
(amino.encoding) = "cosmos_dec_bytes"
];
// If pickBestRoute == true then all routes are run and the route with the
// best price is chosen otherwise, the first succesful route is used.
Expand Down
Loading

0 comments on commit e264c34

Please sign in to comment.