From 31e8753ea09f8d9afbf6c028db750f2225335454 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 28 Aug 2024 02:48:56 -0400 Subject: [PATCH 01/12] Add SimulateXX queries --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- contracts/dex/src/contract.rs | 27 ++++++++++++++++++++++++++- contracts/dex_grpc/src/contract.rs | 26 ++++++++++++++++++++++++++ contracts/dex_grpc/src/msg.rs | 23 ++++++++++++++++++++++- 5 files changed, 78 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f705c14..0ec7858 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#240ab2cce961e67b3dfa90c137eb64a6d15c1824" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#aacd22a3b77c7ab27b69815e18fe69149e727368" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#240ab2cce961e67b3dfa90c137eb64a6d15c1824" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#aacd22a3b77c7ab27b69815e18fe69149e727368" dependencies = [ "itertools 0.10.5", "proc-macro2", @@ -1380,7 +1380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.66", diff --git a/Cargo.toml b/Cargo.toml index dc9f388..c8a5989 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "main" } +neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "feat/add_simulateXXQueries" } prost = "0.12.4" prost-types = "0.12.4" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index 5d0f732..f491e45 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -18,7 +18,8 @@ use neutron_sdk::bindings::{ EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, LimitOrderTrancheUserResponse, ParamsResponse, PoolMetadataResponse, PoolReservesResponse, - PoolResponse, + PoolResponse, SimulateDepositResponse, SimulateWithdrawalResponse, SimulateWithdrawFilledLimitOrderResponse, + SimulateCancelLimitOrderResponse, SimulatePlaceLimitOrderResponse, SimulateMultiHopSwapResponse, }, msg::NeutronMsg, query::NeutronQuery, @@ -143,5 +144,29 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { + let query_response: SimulateDepositResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } + DexQuery::SimulateWithdrawal { .. } => { + let query_response: SimulateWithdrawalResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } + DexQuery::SimulatePlaceLimitOrder { .. } => { + let query_response: SimulatePlaceLimitOrderResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } + DexQuery::SimulateWithdrawFilledLimitOrder { .. } => { + let query_response: SimulateWithdrawFilledLimitOrderResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } + DexQuery::SimulateCancelLimitOrder { .. } => { + let query_response: SimulateCancelLimitOrderResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } + DexQuery::SimulateMultiHopSwap { .. } => { + let query_response: SimulateMultiHopSwapResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) + } } } diff --git a/contracts/dex_grpc/src/contract.rs b/contracts/dex_grpc/src/contract.rs index 42b444f..57998ee 100644 --- a/contracts/dex_grpc/src/contract.rs +++ b/contracts/dex_grpc/src/contract.rs @@ -235,6 +235,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { &dex_querier.pool_reserves(pair_id, token_in, tick_index, fee)?, )?), + #[allow(deprecated)] // Allow deprecated call until its remove from neutron-core QueryMsg::EstimateMultiHopSwap { creator, receiver, @@ -251,6 +252,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { pick_best_route, )?)?), + #[allow(deprecated)] // Allow deprecated call until its remove from neutron-core QueryMsg::EstimatePlaceLimitOrder { creator, receiver, @@ -288,6 +290,30 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { QueryMsg::AllPoolMetadata { pagination } => { Ok(to_json_binary(&dex_querier.pool_metadata_all(pagination)?)?) } + + QueryMsg::SimulateDeposit { msg } => { + Ok(to_json_binary(&dex_querier.simulate_deposit(Some(msg))?)?) + } + + QueryMsg::SimulateWithdrawal { msg } => Ok(to_json_binary( + &dex_querier.simulate_withdrawal(Some(msg))?, + )?), + + QueryMsg::SimulatePlaceLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_place_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateWithdrawFilledLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_withdraw_filled_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateCancelLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_cancel_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateMultiHopSwap { msg } => Ok(to_json_binary( + &dex_querier.simulate_multi_hop_swap(Some(msg))?, + )?), } } diff --git a/contracts/dex_grpc/src/msg.rs b/contracts/dex_grpc/src/msg.rs index 1b8abc8..d536d4f 100644 --- a/contracts/dex_grpc/src/msg.rs +++ b/contracts/dex_grpc/src/msg.rs @@ -1,4 +1,7 @@ -use neutron_sdk::proto_types::neutron::dex::{DepositOptions, MultiHopRoute}; +use neutron_sdk::proto_types::neutron::dex::{ + DepositOptions, MsgCancelLimitOrder, MsgDeposit, MsgMultiHopSwap, MsgPlaceLimitOrder, + MsgWithdrawFilledLimitOrder, MsgWithdrawal, MultiHopRoute, +}; use neutron_sdk::proto_types::{cosmos::base::query::v1beta1::PageRequest, neutron::dex}; use neutron_sdk::shim::Timestamp; use schemars::JsonSchema; @@ -144,6 +147,24 @@ pub enum QueryMsg { AllPoolMetadata { pagination: Option, }, + SimulateDeposit { + msg: MsgDeposit, + }, + SimulateWithdrawal { + msg: MsgWithdrawal, + }, + SimulatePlaceLimitOrder { + msg: MsgPlaceLimitOrder, + }, + SimulateWithdrawFilledLimitOrder { + msg: MsgWithdrawFilledLimitOrder, + }, + SimulateCancelLimitOrder { + msg: MsgCancelLimitOrder, + }, + SimulateMultiHopSwap { + msg: MsgMultiHopSwap, + }, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] From a99bf4bf32b2a37d1f7efda4554b8ef4aac81c8f Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 28 Aug 2024 02:55:42 -0400 Subject: [PATCH 02/12] schema --- contracts/dex/schema/dex_msg.json | 12 +- contracts/dex/schema/dex_query.json | 364 +++++++++++++++++++++ contracts/dex_grpc/schema/query_msg.json | 379 ++++++++++++++++++++++ contracts/reflect/schema/execute_msg.json | 12 +- 4 files changed, 759 insertions(+), 8 deletions(-) diff --git a/contracts/dex/schema/dex_msg.json b/contracts/dex/schema/dex_msg.json index b8c612f..9d36969 100644 --- a/contracts/dex/schema/dex_msg.json +++ b/contracts/dex/schema/dex_msg.json @@ -49,7 +49,7 @@ "description": "Additional deposit options", "type": "array", "items": { - "$ref": "#/definitions/DepositOption" + "$ref": "#/definitions/DepositOptions" } }, "receiver": { @@ -322,13 +322,17 @@ } ], "definitions": { - "DepositOption": { + "DepositOptions": { "type": "object", "required": [ - "disable_swap" + "disable_autoswap", + "fail_tx_on_bel" ], "properties": { - "disable_swap": { + "disable_autoswap": { + "type": "boolean" + }, + "fail_tx_on_bel": { "type": "boolean" } }, diff --git a/contracts/dex/schema/dex_query.json b/contracts/dex/schema/dex_query.json index bc0a5c0..6525148 100644 --- a/contracts/dex/schema/dex_query.json +++ b/contracts/dex/schema/dex_query.json @@ -593,6 +593,138 @@ } }, "additionalProperties": false + }, + { + "description": "Simulates MsgDeposit", + "type": "object", + "required": [ + "simulate_deposit" + ], + "properties": { + "simulate_deposit": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgDeposit" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulates MsgWithdrawal", + "type": "object", + "required": [ + "simulate_withdrawal" + ], + "properties": { + "simulate_withdrawal": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawal" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulates MsgPlaceLimitOrder", + "type": "object", + "required": [ + "simulate_place_limit_order" + ], + "properties": { + "simulate_place_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgPlaceLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulates MsgWithdrawFilledLimitOrder", + "type": "object", + "required": [ + "simulate_withdraw_filled_limit_order" + ], + "properties": { + "simulate_withdraw_filled_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawFilledLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulates MsgCancelLimitOrder", + "type": "object", + "required": [ + "simulate_cancel_limit_order" + ], + "properties": { + "simulate_cancel_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgCancelLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulates MsgMultiHopSwap", + "type": "object", + "required": [ + "simulate_multi_hop_swap" + ], + "properties": { + "simulate_multi_hop_swap": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgMultiHopSwap" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { @@ -600,6 +732,22 @@ "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, + "DepositOptions": { + "type": "object", + "required": [ + "disable_autoswap", + "fail_tx_on_bel" + ], + "properties": { + "disable_autoswap": { + "type": "boolean" + }, + "fail_tx_on_bel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, "Int128": { "description": "An implementation of i128 that is using strings for JSON encoding/decoding, such that the full i128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `i128` to get the value out:\n\n``` # use cosmwasm_std::Int128; let a = Int128::from(258i128); assert_eq!(a.i128(), 258); ```", "type": "string" @@ -643,6 +791,218 @@ } ] }, + "MsgCancelLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgDeposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "fees", + "options", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "amounts_a": { + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "amounts_b": { + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/DepositOptions" + } + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgMultiHopSwap": { + "type": "object", + "required": [ + "amount_in", + "exit_limit_price", + "pick_best_route", + "routes" + ], + "properties": { + "amount_in": { + "$ref": "#/definitions/Uint128" + }, + "exit_limit_price": { + "$ref": "#/definitions/PrecDec" + }, + "pick_best_route": { + "type": "boolean" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + }, + "additionalProperties": false + }, + "MsgPlaceLimitOrder": { + "type": "object", + "required": [ + "amount_in", + "limit_sell_price", + "order_type", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "amount_in": { + "$ref": "#/definitions/Uint128" + }, + "expiration_time": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "limit_sell_price": { + "$ref": "#/definitions/PrecDec" + }, + "max_amount_out": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "order_type": { + "$ref": "#/definitions/LimitOrderType" + }, + "tick_index_in_to_out": { + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "token_out": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawFilledLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawal": { + "type": "object", + "required": [ + "creator", + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "creator": { + "type": "string" + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "receiver": { + "type": "string" + }, + "shares_to_remove": { + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, "MultiHopRoute": { "type": "object", "required": [ @@ -710,6 +1070,10 @@ } }, "additionalProperties": false + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" } } } diff --git a/contracts/dex_grpc/schema/query_msg.json b/contracts/dex_grpc/schema/query_msg.json index 425765a..3bc7e5e 100644 --- a/contracts/dex_grpc/schema/query_msg.json +++ b/contracts/dex_grpc/schema/query_msg.json @@ -576,9 +576,388 @@ } }, "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_deposit" + ], + "properties": { + "simulate_deposit": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgDeposit" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_withdrawal" + ], + "properties": { + "simulate_withdrawal": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawal" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_place_limit_order" + ], + "properties": { + "simulate_place_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgPlaceLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_withdraw_filled_limit_order" + ], + "properties": { + "simulate_withdraw_filled_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawFilledLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_cancel_limit_order" + ], + "properties": { + "simulate_cancel_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgCancelLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_multi_hop_swap" + ], + "properties": { + "simulate_multi_hop_swap": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgMultiHopSwap" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { + "DepositOptions": { + "type": "object", + "required": [ + "disable_autoswap", + "fail_tx_on_bel" + ], + "properties": { + "disable_autoswap": { + "type": "boolean" + }, + "fail_tx_on_bel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "MsgCancelLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgDeposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "creator", + "fees", + "options", + "receiver", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "amounts_a": { + "type": "array", + "items": { + "type": "string" + } + }, + "amounts_b": { + "type": "array", + "items": { + "type": "string" + } + }, + "creator": { + "type": "string" + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/DepositOptions" + } + }, + "receiver": { + "type": "string" + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgMultiHopSwap": { + "type": "object", + "required": [ + "amount_in", + "creator", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_in": { + "type": "string" + }, + "creator": { + "type": "string" + }, + "exit_limit_price": { + "type": "string" + }, + "pick_best_route": { + "description": "If pickBestRoute == true then all routes are run and the route with the best price is chosen otherwise, the first succesful route is used.", + "type": "boolean" + }, + "receiver": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + }, + "additionalProperties": false + }, + "MsgPlaceLimitOrder": { + "type": "object", + "required": [ + "amount_in", + "creator", + "limit_sell_price", + "max_amount_out", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "amount_in": { + "type": "string" + }, + "creator": { + "type": "string" + }, + "expiration_time": { + "description": "expirationTime is only valid iff orderType == GOOD_TIL_TIME.", + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "limit_sell_price": { + "type": "string" + }, + "max_amount_out": { + "type": "string" + }, + "order_type": { + "type": "integer", + "format": "int32" + }, + "receiver": { + "type": "string" + }, + "tick_index_in_to_out": { + "description": "DEPRECATED: tick_index_in_to_out will be removed in future release; limit_sell_price should be used instead.", + "deprecated": true, + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "token_out": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawFilledLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawal": { + "type": "object", + "required": [ + "creator", + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "creator": { + "type": "string" + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "receiver": { + "type": "string" + }, + "shares_to_remove": { + "type": "array", + "items": { + "type": "string" + } + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, "MultiHopRoute": { "type": "object", "required": [ diff --git a/contracts/reflect/schema/execute_msg.json b/contracts/reflect/schema/execute_msg.json index ac3033f..7a8f96c 100644 --- a/contracts/reflect/schema/execute_msg.json +++ b/contracts/reflect/schema/execute_msg.json @@ -539,13 +539,17 @@ }, "additionalProperties": false }, - "DepositOption": { + "DepositOptions": { "type": "object", "required": [ - "disable_swap" + "disable_autoswap", + "fail_tx_on_bel" ], "properties": { - "disable_swap": { + "disable_autoswap": { + "type": "boolean" + }, + "fail_tx_on_bel": { "type": "boolean" } }, @@ -600,7 +604,7 @@ "description": "Additional deposit options", "type": "array", "items": { - "$ref": "#/definitions/DepositOption" + "$ref": "#/definitions/DepositOptions" } }, "receiver": { From 41681a5a3d02359bc49b6c917b51d96f4d1568e1 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 28 Aug 2024 02:57:07 -0400 Subject: [PATCH 03/12] TEMP: Burn Tokens so contract compiles --- contracts/tokenfactory/src/contract.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/tokenfactory/src/contract.rs b/contracts/tokenfactory/src/contract.rs index c66085b..715e8dd 100644 --- a/contracts/tokenfactory/src/contract.rs +++ b/contracts/tokenfactory/src/contract.rs @@ -37,7 +37,8 @@ pub fn execute( NeutronMsg::submit_mint_tokens(denom, amount, env.contract.address).into() } ExecuteMsg::BurnTokens { denom, amount } => { - NeutronMsg::submit_burn_tokens(denom, amount).into() + // TEMP: fix so that contract compiles + NeutronMsg::submit_burn_tokens(denom, amount, Some("TEMP".to_string())).into() } ExecuteMsg::SetBeforeSendHook { denom, From dea3e82571f9b19fed779f76b458f70be56d51ed Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 28 Aug 2024 03:00:02 -0400 Subject: [PATCH 04/12] fmt --- contracts/dex/src/contract.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index f491e45..3b0ad10 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -18,8 +18,9 @@ use neutron_sdk::bindings::{ EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, LimitOrderTrancheUserResponse, ParamsResponse, PoolMetadataResponse, PoolReservesResponse, - PoolResponse, SimulateDepositResponse, SimulateWithdrawalResponse, SimulateWithdrawFilledLimitOrderResponse, - SimulateCancelLimitOrderResponse, SimulatePlaceLimitOrderResponse, SimulateMultiHopSwapResponse, + PoolResponse, SimulateCancelLimitOrderResponse, SimulateDepositResponse, + SimulateMultiHopSwapResponse, SimulatePlaceLimitOrderResponse, + SimulateWithdrawFilledLimitOrderResponse, SimulateWithdrawalResponse, }, msg::NeutronMsg, query::NeutronQuery, @@ -145,27 +146,30 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { - let query_response: SimulateDepositResponse = deps.querier.query(&msg.into())?; + let query_response: SimulateDepositResponse = deps.querier.query(&msg.into())?; to_json_binary(&query_response) } DexQuery::SimulateWithdrawal { .. } => { - let query_response: SimulateWithdrawalResponse = deps.querier.query(&msg.into())?; + let query_response: SimulateWithdrawalResponse = deps.querier.query(&msg.into())?; to_json_binary(&query_response) } DexQuery::SimulatePlaceLimitOrder { .. } => { - let query_response: SimulatePlaceLimitOrderResponse = deps.querier.query(&msg.into())?; + let query_response: SimulatePlaceLimitOrderResponse = + deps.querier.query(&msg.into())?; to_json_binary(&query_response) } DexQuery::SimulateWithdrawFilledLimitOrder { .. } => { - let query_response: SimulateWithdrawFilledLimitOrderResponse = deps.querier.query(&msg.into())?; + let query_response: SimulateWithdrawFilledLimitOrderResponse = + deps.querier.query(&msg.into())?; to_json_binary(&query_response) } DexQuery::SimulateCancelLimitOrder { .. } => { - let query_response: SimulateCancelLimitOrderResponse = deps.querier.query(&msg.into())?; + let query_response: SimulateCancelLimitOrderResponse = + deps.querier.query(&msg.into())?; to_json_binary(&query_response) } DexQuery::SimulateMultiHopSwap { .. } => { - let query_response: SimulateMultiHopSwapResponse = deps.querier.query(&msg.into())?; + let query_response: SimulateMultiHopSwapResponse = deps.querier.query(&msg.into())?; to_json_binary(&query_response) } } From ee4b3840d28fe2d827070d9a891d18ef5625dca3 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Fri, 30 Aug 2024 20:15:52 -0400 Subject: [PATCH 05/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec7858..939e574 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#aacd22a3b77c7ab27b69815e18fe69149e727368" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f17d7f802538daa392f8a0fa87fc82e68edead05" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#aacd22a3b77c7ab27b69815e18fe69149e727368" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f17d7f802538daa392f8a0fa87fc82e68edead05" dependencies = [ "itertools 0.10.5", "proc-macro2", From 9266dab6a3c4d259d05bddefec3e09b132394442 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Fri, 30 Aug 2024 20:57:59 -0400 Subject: [PATCH 06/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 939e574..7b849b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f17d7f802538daa392f8a0fa87fc82e68edead05" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#fc90769f86a4d13a5af043092ac3928cefbb3b5c" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f17d7f802538daa392f8a0fa87fc82e68edead05" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#fc90769f86a4d13a5af043092ac3928cefbb3b5c" dependencies = [ "itertools 0.10.5", "proc-macro2", From 6fd68a4cd01c781fe931912a047fd440610b22cb Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Mon, 2 Sep 2024 18:23:53 -0400 Subject: [PATCH 07/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b849b1..a3a8d91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#fc90769f86a4d13a5af043092ac3928cefbb3b5c" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#a4e23feabb57b57369b4820cc0e28333a240b550" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#fc90769f86a4d13a5af043092ac3928cefbb3b5c" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#a4e23feabb57b57369b4820cc0e28333a240b550" dependencies = [ "itertools 0.10.5", "proc-macro2", From 5a22ef88a61324ad70c452d52f4e229d08031be4 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Tue, 3 Sep 2024 13:58:00 -0400 Subject: [PATCH 08/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3a8d91..771c203 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#a4e23feabb57b57369b4820cc0e28333a240b550" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#9fb4fbd6bc1395c481b0570da307be108aef54c9" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#a4e23feabb57b57369b4820cc0e28333a240b550" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#9fb4fbd6bc1395c481b0570da307be108aef54c9" dependencies = [ "itertools 0.10.5", "proc-macro2", From ef510034e236a3edbe6096d5aff7c8b6c028c3aa Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 4 Sep 2024 16:31:05 -0400 Subject: [PATCH 09/12] remove bindings --- contracts/dex/src/contract.rs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index 3b0ad10..60ce3fd 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -145,32 +145,5 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { - let query_response: SimulateDepositResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - DexQuery::SimulateWithdrawal { .. } => { - let query_response: SimulateWithdrawalResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - DexQuery::SimulatePlaceLimitOrder { .. } => { - let query_response: SimulatePlaceLimitOrderResponse = - deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - DexQuery::SimulateWithdrawFilledLimitOrder { .. } => { - let query_response: SimulateWithdrawFilledLimitOrderResponse = - deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - DexQuery::SimulateCancelLimitOrder { .. } => { - let query_response: SimulateCancelLimitOrderResponse = - deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - DexQuery::SimulateMultiHopSwap { .. } => { - let query_response: SimulateMultiHopSwapResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } } } From a1fe3f9ed8c9defe94a0c9caddd0fcb3de8382c5 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Wed, 4 Sep 2024 16:53:32 -0400 Subject: [PATCH 10/12] remove simulate bindings --- Cargo.lock | 4 +- contracts/dex/schema/dex_msg.json | 14 +- contracts/dex/schema/dex_query.json | 364 ---------------------- contracts/dex/src/contract.rs | 4 +- contracts/reflect/schema/execute_msg.json | 14 +- 5 files changed, 19 insertions(+), 381 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 771c203..14caaca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#9fb4fbd6bc1395c481b0570da307be108aef54c9" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#b46325e33b003c33ca4ab45349b81d534a6ad37f" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#9fb4fbd6bc1395c481b0570da307be108aef54c9" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#b46325e33b003c33ca4ab45349b81d534a6ad37f" dependencies = [ "itertools 0.10.5", "proc-macro2", diff --git a/contracts/dex/schema/dex_msg.json b/contracts/dex/schema/dex_msg.json index 9d36969..9d0c7b2 100644 --- a/contracts/dex/schema/dex_msg.json +++ b/contracts/dex/schema/dex_msg.json @@ -324,16 +324,18 @@ "definitions": { "DepositOptions": { "type": "object", - "required": [ - "disable_autoswap", - "fail_tx_on_bel" - ], "properties": { "disable_autoswap": { - "type": "boolean" + "type": [ + "boolean", + "null" + ] }, "fail_tx_on_bel": { - "type": "boolean" + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false diff --git a/contracts/dex/schema/dex_query.json b/contracts/dex/schema/dex_query.json index 6525148..bc0a5c0 100644 --- a/contracts/dex/schema/dex_query.json +++ b/contracts/dex/schema/dex_query.json @@ -593,138 +593,6 @@ } }, "additionalProperties": false - }, - { - "description": "Simulates MsgDeposit", - "type": "object", - "required": [ - "simulate_deposit" - ], - "properties": { - "simulate_deposit": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgDeposit" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Simulates MsgWithdrawal", - "type": "object", - "required": [ - "simulate_withdrawal" - ], - "properties": { - "simulate_withdrawal": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgWithdrawal" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Simulates MsgPlaceLimitOrder", - "type": "object", - "required": [ - "simulate_place_limit_order" - ], - "properties": { - "simulate_place_limit_order": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgPlaceLimitOrder" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Simulates MsgWithdrawFilledLimitOrder", - "type": "object", - "required": [ - "simulate_withdraw_filled_limit_order" - ], - "properties": { - "simulate_withdraw_filled_limit_order": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgWithdrawFilledLimitOrder" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Simulates MsgCancelLimitOrder", - "type": "object", - "required": [ - "simulate_cancel_limit_order" - ], - "properties": { - "simulate_cancel_limit_order": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgCancelLimitOrder" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Simulates MsgMultiHopSwap", - "type": "object", - "required": [ - "simulate_multi_hop_swap" - ], - "properties": { - "simulate_multi_hop_swap": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/MsgMultiHopSwap" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false } ], "definitions": { @@ -732,22 +600,6 @@ "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, - "DepositOptions": { - "type": "object", - "required": [ - "disable_autoswap", - "fail_tx_on_bel" - ], - "properties": { - "disable_autoswap": { - "type": "boolean" - }, - "fail_tx_on_bel": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "Int128": { "description": "An implementation of i128 that is using strings for JSON encoding/decoding, such that the full i128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `i128` to get the value out:\n\n``` # use cosmwasm_std::Int128; let a = Int128::from(258i128); assert_eq!(a.i128(), 258); ```", "type": "string" @@ -791,218 +643,6 @@ } ] }, - "MsgCancelLimitOrder": { - "type": "object", - "required": [ - "creator", - "tranche_key" - ], - "properties": { - "creator": { - "type": "string" - }, - "tranche_key": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MsgDeposit": { - "type": "object", - "required": [ - "amounts_a", - "amounts_b", - "fees", - "options", - "tick_indexes_a_to_b", - "token_a", - "token_b" - ], - "properties": { - "amounts_a": { - "type": "array", - "items": { - "$ref": "#/definitions/Uint128" - } - }, - "amounts_b": { - "type": "array", - "items": { - "$ref": "#/definitions/Uint128" - } - }, - "fees": { - "type": "array", - "items": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/DepositOptions" - } - }, - "tick_indexes_a_to_b": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "token_a": { - "type": "string" - }, - "token_b": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MsgMultiHopSwap": { - "type": "object", - "required": [ - "amount_in", - "exit_limit_price", - "pick_best_route", - "routes" - ], - "properties": { - "amount_in": { - "$ref": "#/definitions/Uint128" - }, - "exit_limit_price": { - "$ref": "#/definitions/PrecDec" - }, - "pick_best_route": { - "type": "boolean" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/MultiHopRoute" - } - } - }, - "additionalProperties": false - }, - "MsgPlaceLimitOrder": { - "type": "object", - "required": [ - "amount_in", - "limit_sell_price", - "order_type", - "tick_index_in_to_out", - "token_in", - "token_out" - ], - "properties": { - "amount_in": { - "$ref": "#/definitions/Uint128" - }, - "expiration_time": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "limit_sell_price": { - "$ref": "#/definitions/PrecDec" - }, - "max_amount_out": { - "anyOf": [ - { - "$ref": "#/definitions/Uint128" - }, - { - "type": "null" - } - ] - }, - "order_type": { - "$ref": "#/definitions/LimitOrderType" - }, - "tick_index_in_to_out": { - "type": "integer", - "format": "int64" - }, - "token_in": { - "type": "string" - }, - "token_out": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MsgWithdrawFilledLimitOrder": { - "type": "object", - "required": [ - "creator", - "tranche_key" - ], - "properties": { - "creator": { - "type": "string" - }, - "tranche_key": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MsgWithdrawal": { - "type": "object", - "required": [ - "creator", - "fees", - "receiver", - "shares_to_remove", - "tick_indexes_a_to_b", - "token_a", - "token_b" - ], - "properties": { - "creator": { - "type": "string" - }, - "fees": { - "type": "array", - "items": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "receiver": { - "type": "string" - }, - "shares_to_remove": { - "type": "array", - "items": { - "$ref": "#/definitions/Uint128" - } - }, - "tick_indexes_a_to_b": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "token_a": { - "type": "string" - }, - "token_b": { - "type": "string" - } - }, - "additionalProperties": false - }, "MultiHopRoute": { "type": "object", "required": [ @@ -1070,10 +710,6 @@ } }, "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" } } } diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index 60ce3fd..5d0f732 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -18,9 +18,7 @@ use neutron_sdk::bindings::{ EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, LimitOrderTrancheUserResponse, ParamsResponse, PoolMetadataResponse, PoolReservesResponse, - PoolResponse, SimulateCancelLimitOrderResponse, SimulateDepositResponse, - SimulateMultiHopSwapResponse, SimulatePlaceLimitOrderResponse, - SimulateWithdrawFilledLimitOrderResponse, SimulateWithdrawalResponse, + PoolResponse, }, msg::NeutronMsg, query::NeutronQuery, diff --git a/contracts/reflect/schema/execute_msg.json b/contracts/reflect/schema/execute_msg.json index c335f69..69c7dd8 100644 --- a/contracts/reflect/schema/execute_msg.json +++ b/contracts/reflect/schema/execute_msg.json @@ -548,16 +548,18 @@ }, "DepositOptions": { "type": "object", - "required": [ - "disable_autoswap", - "fail_tx_on_bel" - ], "properties": { "disable_autoswap": { - "type": "boolean" + "type": [ + "boolean", + "null" + ] }, "fail_tx_on_bel": { - "type": "boolean" + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false From eaae9d9975ef66421d712516365fe33047c86f24 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Fri, 6 Sep 2024 13:31:21 -0400 Subject: [PATCH 11/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14caaca..6722c1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#b46325e33b003c33ca4ab45349b81d534a6ad37f" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#8bf48075272fbc77498a0b0a40c7fe9a61f65b47" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#b46325e33b003c33ca4ab45349b81d534a6ad37f" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#8bf48075272fbc77498a0b0a40c7fe9a61f65b47" dependencies = [ "itertools 0.10.5", "proc-macro2", From 1be0f1033107a993f4ee0f333211bf71a5b097de Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Thu, 19 Sep 2024 17:56:42 -0400 Subject: [PATCH 12/12] update neutron-sdk --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6722c1d..8c6b7eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#8bf48075272fbc77498a0b0a40c7fe9a61f65b47" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f3aa326af43f8631bae51545e3b205a577522c44" dependencies = [ "bech32 0.9.1", "chrono", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#8bf48075272fbc77498a0b0a40c7fe9a61f65b47" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=feat/add_simulateXXQueries#f3aa326af43f8631bae51545e3b205a577522c44" dependencies = [ "itertools 0.10.5", "proc-macro2",