diff --git a/Cargo.lock b/Cargo.lock index c068646..6406a7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1128,7 +1128,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#b83c182e8688f826c313cae318ff8ae908b87c81" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#3c831143e4eb7998433322e85f167c88166d087f" dependencies = [ "bech32 0.9.1", "chrono", @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "neutron-std" version = "5.0.0" -source = "git+https://github.com/neutron-org/neutron-std?branch=main#25e0d0c1e7f56d40ba62908d9e2c03b5d3779bd2" +source = "git+https://github.com/neutron-org/neutron-std?branch=main#b17f083c0617dab1daa5c6dfb69bc63255006499" dependencies = [ "bech32 0.9.1", "chrono", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-std?branch=main#25e0d0c1e7f56d40ba62908d9e2c03b5d3779bd2" +source = "git+https://github.com/neutron-org/neutron-std?branch=main#b17f083c0617dab1daa5c6dfb69bc63255006499" dependencies = [ "itertools 0.10.5", "proc-macro2", diff --git a/contracts/dex_grpc/schema/execute_msg.json b/contracts/dex_grpc/schema/execute_msg.json index 415e13e..7480276 100644 --- a/contracts/dex_grpc/schema/execute_msg.json +++ b/contracts/dex_grpc/schema/execute_msg.json @@ -133,7 +133,6 @@ "required": [ "amount_in", "limit_sell_price", - "max_amount_out", "order_type", "receiver", "tick_index_in_to_out", @@ -158,7 +157,10 @@ "type": "string" }, "max_amount_out": { - "type": "string" + "type": [ + "string", + "null" + ] }, "order_type": { "type": "integer", diff --git a/contracts/dex_grpc/schema/query_msg.json b/contracts/dex_grpc/schema/query_msg.json index 7122ae1..b64a27a 100644 --- a/contracts/dex_grpc/schema/query_msg.json +++ b/contracts/dex_grpc/schema/query_msg.json @@ -840,9 +840,6 @@ "required": [ "amount_in", "creator", - "limit_sell_price", - "max_amount_out", - "min_average_sell_price", "order_type", "receiver", "tick_index_in_to_out", @@ -868,14 +865,23 @@ ] }, "limit_sell_price": { - "type": "string" + "type": [ + "string", + "null" + ] }, "max_amount_out": { - "type": "string" + "type": [ + "string", + "null" + ] }, "min_average_sell_price": { "description": "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. If min_average_sell_price is omitted limit_sell_price will be used instead", - "type": "string" + "type": [ + "string", + "null" + ] }, "order_type": { "type": "integer", diff --git a/contracts/dex_grpc/src/contract.rs b/contracts/dex_grpc/src/contract.rs index 00dba8f..df4272e 100644 --- a/contracts/dex_grpc/src/contract.rs +++ b/contracts/dex_grpc/src/contract.rs @@ -88,12 +88,12 @@ pub fn execute( token_in, token_out, tick_index_in_to_out, - limit_sell_price, + limit_sell_price: Some(limit_sell_price), amount_in, order_type, expiration_time, max_amount_out, - min_average_sell_price: "".to_string(), + min_average_sell_price: None, })), ExecuteMsg::WithdrawFilledLimitOrder { tranche_key } => { Ok(Response::new().add_message(MsgWithdrawFilledLimitOrder { diff --git a/contracts/dex_grpc/src/msg.rs b/contracts/dex_grpc/src/msg.rs index 27aafb5..061c43f 100644 --- a/contracts/dex_grpc/src/msg.rs +++ b/contracts/dex_grpc/src/msg.rs @@ -39,7 +39,7 @@ pub enum ExecuteMsg { amount_in: String, order_type: i32, expiration_time: Option, - max_amount_out: String, + max_amount_out: Option, limit_sell_price: String, }, WithdrawFilledLimitOrder {