From 31c80cc5e0a8bba21e42248fce2543055a04ab8e Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 14 Nov 2023 16:29:20 +0300 Subject: [PATCH 01/12] dev contract to test dex bindings --- Cargo.lock | 45 +- artifacts/checksums.txt | 29 +- artifacts/checksums_intermediate.txt | 24 +- contracts/dex/.cargo/config | 6 + contracts/dex/Cargo.toml | 43 ++ contracts/dex/README.md | 3 + contracts/dex/examples/schema.rs | 31 + contracts/dex/schema/dex_msg.json | 328 ++++++++++ contracts/dex/schema/dex_query.json | 703 ++++++++++++++++++++++ contracts/dex/schema/instantiate_msg.json | 5 + contracts/dex/src/contract.rs | 169 ++++++ contracts/dex/src/lib.rs | 3 + contracts/dex/src/msg.rs | 0 contracts/dex/src/query.rs | 42 ++ 14 files changed, 1403 insertions(+), 28 deletions(-) create mode 100644 contracts/dex/.cargo/config create mode 100644 contracts/dex/Cargo.toml create mode 100644 contracts/dex/README.md create mode 100644 contracts/dex/examples/schema.rs create mode 100644 contracts/dex/schema/dex_msg.json create mode 100644 contracts/dex/schema/dex_query.json create mode 100644 contracts/dex/schema/instantiate_msg.json create mode 100644 contracts/dex/src/contract.rs create mode 100644 contracts/dex/src/lib.rs create mode 100644 contracts/dex/src/msg.rs create mode 100644 contracts/dex/src/query.rs diff --git a/Cargo.lock b/Cargo.lock index 2b548ca..4e77ebd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,6 +400,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "dex" +version = "0.1.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2", + "neutron-sdk 0.7.0", + "schemars", + "serde", +] + [[package]] name = "digest" version = "0.9.0" @@ -798,6 +810,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "neutron-sdk" +version = "0.7.0" +dependencies = [ + "base64", + "bech32", + "cosmos-sdk-proto 0.16.0", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "prost 0.11.9", + "protobuf", + "schemars", + "serde", + "serde-json-wasm", + "serde_json", + "serde_repr", + "thiserror", +] + [[package]] name = "neutron-sdk" version = "0.7.0" @@ -846,7 +878,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.7.0", + "neutron-sdk 0.7.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=7249d5369dc04b189434de0c42d55aad6cbb61ec)", "prost 0.11.9", "prost-types", "protobuf", @@ -1358,6 +1390,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +dependencies = [ + "proc-macro2", + "quote 1.0.33", + "syn 2.0.37", +] + [[package]] name = "sha2" version = "0.9.9" diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index dc34be4..100eb74 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,16 +1,13 @@ -c0190cf28da64b4058da71a9083c187d45f84ee7b9db11a0830025ecb0a687dc client_updater.wasm -4ee0b1e8a1c39e7a440f236778e76935f29506f354b6a59712d267181da77678 echo.wasm -ce5e308994094fbf5b339fd4ae761d9ff38db7dfa7fe17c10c86f942ec050509 ibc_transfer-x86_64.wasm -cf4b2b555032cffa472b98122dee6d6c8f53d07be31c2565d651b4941584f4f1 ibc_transfer.wasm -af52c56fb25355afa04d86c7d9e867f9db9295a455fb8a89f9cfdbd6374dd1ff msg_receiver.wasm -5e10902809cdff421e1fa33aa390f085f7f378fd767c929fb30db581c6a6a4ef neutron_interchain_queries-x86_64.wasm -05e49fb2d0295c9a9e27a0077da856126f8285c2e949cb1f927f08fa8a867c8e neutron_interchain_queries.wasm -867c5235f0dc7fa15b1e175173ffeab24776cfe2c79ff0a62962ef17b10669c8 neutron_interchain_txs-x86_64.wasm -e80d5b9b68d9a1a7d00fd8f13cf52157c8fb50989b6e28e3ea5c69211b384b06 neutron_interchain_txs.wasm -344ec19c522cc5e6135a77a181345f02a0f65ef19ad919d5236dc16f53d33e76 neutron_price_feed_mock.wasm -2dac4d3a4bf9239291205a2d4840aac3664a24faecd143d66ad9ef690beffbd7 neutron_validators_test-x86_64.wasm -4678704ef3ffd9f1240b719991dc629623929fa75499fd6ed9f76eda4c8a556a neutron_validators_test.wasm -68ab8e8f880300ec82912a1b686e0e0535ad06f8d5c3050bf2f815eb5fe8d4d3 reflect-x86_64.wasm -c24970beb5a08bfc73dc422e63207342343802a329f28d527b4accaaf66209f8 reflect.wasm -d4f2b08d01566df34a150e7a48b7b143efaa2787de2a1245d7c1cb9276662fb7 stargate_querier.wasm -a9ee139212dca756adbde1e86723154b1fd79dc96cbc7e4885a851d8c978e946 tokenfactory.wasm +0087fdbcf7ee06a49fbda882ce83c75a0001edbb801e26500b894c8e6627010a before_send_hook_test-x86_64.wasm +37038e0be3b11d0d9995623cabdc1ff4631fe51de0255582bd5034a8b87439d0 client_updater-x86_64.wasm +3b8eba37d63f3177b9ea8ccee67ed4d8cf5a5abc53f56d578508a1188fbc99d1 dex-x86_64.wasm +d72be13a225ce00c97392784f0b6f3b505cb8133a83808b53a95c5e9ed98b3ed echo-x86_64.wasm +f65741a936b596696a29fc9bdf9ec4567cad3722a15f75a0d659f2b3a9ab1d64 ibc_transfer-x86_64.wasm +fac774830d6242494b8fd530052d8ed4365498220541e137284aefbf64337b24 msg_receiver-x86_64.wasm +a645a35fecaa37edc5aed9540f8b4e322b0d1f4d875e79e378a03a04f976eb1a neutron_price_feed_mock-x86_64.wasm +80629b4e1d82cdfa3a88cd04eeecc366eb8795b4a194c9a961d9fc11541188ff neutron_interchain_queries-x86_64.wasm +cdc6a338ac32812e7fd5a5ee8e2fc72c332a1557e1560ac1e0e1cf7d914c85e1 neutron_interchain_txs-x86_64.wasm +4631c30073448d1fc59035a62706d5107f2ad56933668a41d988ff52d218cbf0 neutron_validators_test-x86_64.wasm +4fdfd01aae515dce4bade05be8b59c2f0b2e8c8da6852eb3d3d1c0ea728dd099 reflect-x86_64.wasm +1bc336fd5a827019c87264cf15abb3f284f8da2c551597e3f59ca3a840bb9faf stargate_querier-x86_64.wasm +ff592f20c448e37f7697f17de5c86e4b1ce60414d763efb704f71b32ad61e7bf tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index ce1f991..f6382a4 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,11 +1,13 @@ -b388b89207c69e9e243f5acf64b761e1cf1116adcc2d79e4eb59bf8cb6c9b99a target/wasm32-unknown-unknown/release/ibc_transfer.wasm -d89ba235e130977d1f79ac4d7f9252f6f6bed3002dfc1d08227ba138acec70b1 target/wasm32-unknown-unknown/release/client_updater.wasm -a67c60c5853497b890d67dd2bfed1caf0984a03af01ec67c877e63688970814e target/wasm32-unknown-unknown/release/echo.wasm -f1ec0aa2f9c84a8b0d63d877fb6dcaf2d25c30023740f3ef53072496124c7dce target/wasm32-unknown-unknown/release/msg_receiver.wasm -b09e4f513e19e78b5ea08e10d26dc4d61056a4c6f534e783039f32494c39021b target/wasm32-unknown-unknown/release/neutron_interchain_queries.wasm -87924a496ac48e2581587f17a234e409f266b5deacc063a506bdeb43766e621e target/wasm32-unknown-unknown/release/neutron_interchain_txs.wasm -e947d71ddeb4f6e61d756b48981bedae6973e0b25a9d873c3bba5e9878079d8b target/wasm32-unknown-unknown/release/neutron_price_feed_mock.wasm -8893279611c69a5ca55628f0476e943ca60b8900cb0ae17fefc2f38c4e472215 target/wasm32-unknown-unknown/release/neutron_validators_test.wasm -b260fdda36208b9017f0f142821fa3bb47f3d3dea86901d687cf3d3da00946e0 target/wasm32-unknown-unknown/release/reflect.wasm -8b02c1c4e8536bb8a5be00b45993dd45ac9f9f996df2b66f0ca72e71d9598e69 target/wasm32-unknown-unknown/release/stargate_querier.wasm -fc80abbf059bafa21b25162af22ddb963a1ea1c6ab4dd671855adb3e1f8a8a84 target/wasm32-unknown-unknown/release/tokenfactory.wasm +8c7004b7d8d23d9ec193b4f603bb0370a2962fd362a2c06f6ef634f5f86c4f3a before_send_hook_test.wasm +82e05994b5ccfb6d06d29ccc2e2965b8c6c4805b6a2699eb857096608a2eec0a client_updater.wasm +77a84e60ff062eb4131310d59882b76f1381e66c36311fa8e2cb0bef3edbb09d dex.wasm +f39a345f49d72c01ef99afff01fa259085f2301f0643b27721446633b462e16e echo.wasm +9940322a86da6f2512d526dd28c5f4057eae77119153763853e211082f76f750 ibc_transfer.wasm +43bdbfcd7c6015b557e1798e93f13fdc15cd4e662faffc714d2e78e5e0a8e3e5 msg_receiver.wasm +068691ad69d62c89173ef12fa209c2ddbb64a368d2c7fe4c284bed3ae84436ba neutron_price_feed_mock.wasm +7dc6f43e470458732faab4a92f9170f8971628f2756f85dea9f975329b8d3b73 neutron_interchain_queries.wasm +eb7667972cbdb94b4fe86351ca9ce0b0afb53a9e3a8578e9feb1e5329725f469 neutron_interchain_txs.wasm +cf5ca0fe134843c2e5837ad533bbc5e879404e693cee035810e108b9e67add82 neutron_validators_test.wasm +536842f6cfe2eaeac3b3f9eb62d9adf16ada54e4815abd2bb6ab4c6735ddcad5 reflect.wasm +03d5bdc03c9621d136671182c98d393307217f1bacd26da0f97667eff2bbac89 stargate_querier.wasm +e8029e711ba381ba851b45bf5053e52244ee8c5978c799ba1f38b6a743144dcd tokenfactory.wasm diff --git a/contracts/dex/.cargo/config b/contracts/dex/.cargo/config new file mode 100644 index 0000000..7c11532 --- /dev/null +++ b/contracts/dex/.cargo/config @@ -0,0 +1,6 @@ +[alias] +wasm = "build --release --target wasm32-unknown-unknown" +wasm-debug = "build --target wasm32-unknown-unknown" +unit-test = "test --lib --features backtraces" +integration-test = "test --test integration" +schema = "run --example schema" diff --git a/contracts/dex/Cargo.toml b/contracts/dex/Cargo.toml new file mode 100644 index 0000000..1c80489 --- /dev/null +++ b/contracts/dex/Cargo.toml @@ -0,0 +1,43 @@ +[package] +name = "dex" +version = "0.1.0" +edition = "2021" + + +exclude = [ + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", +] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +opt-level = 3 +debug = false +rpath = false +lto = true +debug-assertions = false +codegen-units = 1 +panic = 'abort' +incremental = false +overflow-checks = true + +[features] +# for quicker tests, cargo test --lib +# for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces"] +library = [] + +[dependencies] +cosmwasm-std = "1.3.1" +cw2 = "1.1.0" +schemars = "0.8.10" +serde = { version = "1.0.180", default-features = false, features = ["derive"] } +neutron-sdk = { package = "neutron-sdk", path = "../../../neutron-sdk/packages/neutron-sdk/" } + +[dev-dependencies] +cosmwasm-schema = { version = "1.3.1", default-features = false } diff --git a/contracts/dex/README.md b/contracts/dex/README.md new file mode 100644 index 0000000..5fae2c9 --- /dev/null +++ b/contracts/dex/README.md @@ -0,0 +1,3 @@ +# Dex + +This contract is used for tests in the main neutron repository. diff --git a/contracts/dex/examples/schema.rs b/contracts/dex/examples/schema.rs new file mode 100644 index 0000000..1ddfb52 --- /dev/null +++ b/contracts/dex/examples/schema.rs @@ -0,0 +1,31 @@ +// Copyright 2022 Neutron +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use std::env::current_dir; +use std::fs::create_dir_all; + +use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; +use dex::contract::InstantiateMsg; +use neutron_sdk::bindings::{msg::DexMsg, query::DexQuery}; + +fn main() { + let mut out_dir = current_dir().unwrap(); + out_dir.push("schema"); + create_dir_all(&out_dir).unwrap(); + remove_schemas(&out_dir).unwrap(); + + export_schema(&schema_for!(InstantiateMsg), &out_dir); + export_schema(&schema_for!(DexMsg), &out_dir); + export_schema(&schema_for!(DexQuery), &out_dir); +} diff --git a/contracts/dex/schema/dex_msg.json b/contracts/dex/schema/dex_msg.json new file mode 100644 index 0000000..ac32f68 --- /dev/null +++ b/contracts/dex/schema/dex_msg.json @@ -0,0 +1,328 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DexMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "fees", + "options", + "receiver", + "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": { + "anyOf": [ + { + "$ref": "#/definitions/DepositOption" + }, + { + "type": "null" + } + ] + } + }, + "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 + }, + { + "type": "object", + "required": [ + "withdrawal" + ], + "properties": { + "withdrawal": { + "type": "object", + "required": [ + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "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 + }, + { + "type": "object", + "required": [ + "place_limit_order" + ], + "properties": { + "place_limit_order": { + "type": "object", + "required": [ + "amount_in", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "tonek_out" + ], + "properties": { + "amount_in": { + "$ref": "#/definitions/Uint128" + }, + "expiration_time": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "max_amount_out": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "order_type": { + "$ref": "#/definitions/LimitOrderType" + }, + "receiver": { + "type": "string" + }, + "tick_index_in_to_out": { + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "tonek_out": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "withdraw_filled_limit_order" + ], + "properties": { + "withdraw_filled_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cancel_limit_order" + ], + "properties": { + "cancel_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "multi_hop_swap" + ], + "properties": { + "multi_hop_swap": { + "type": "object", + "required": [ + "amount_in", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_in": { + "$ref": "#/definitions/Uint128" + }, + "exit_limit_price": { + "$ref": "#/definitions/PrecDec" + }, + "pick_best_route": { + "type": "boolean" + }, + "receiver": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/MultiHopRoute" + }, + { + "type": "null" + } + ] + } + } + } + } + }, + "additionalProperties": false + } + ], + "definitions": { + "DepositOption": { + "type": "object", + "required": [ + "disable_swap" + ], + "properties": { + "disable_swap": { + "type": "boolean" + } + } + }, + "LimitOrderType": { + "type": "string", + "enum": [ + "GoodTillCancel", + "FillOrKill", + "ImmediateOrCancel", + "JustInTime", + "GoodTilTime" + ] + }, + "MultiHopRoute": { + "type": "object", + "required": [ + "hops" + ], + "properties": { + "hops": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PrecDec": { + "type": "object", + "required": [ + "i" + ], + "properties": { + "i": { + "$ref": "#/definitions/Uint128" + } + } + }, + "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/schema/dex_query.json b/contracts/dex/schema/dex_query.json new file mode 100644 index 0000000..b741119 --- /dev/null +++ b/contracts/dex/schema/dex_query.json @@ -0,0 +1,703 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DexQuery", + "oneOf": [ + { + "type": "object", + "required": [ + "params" + ], + "properties": { + "params": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "limit_order_trache_user" + ], + "properties": { + "limit_order_trache_user": { + "type": "object", + "required": [ + "address", + "tranche_key" + ], + "properties": { + "address": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "limit_order_tranche_user_all" + ], + "properties": { + "limit_order_tranche_user_all": { + "type": "object", + "required": [ + "pagination" + ], + "properties": { + "pagination": { + "$ref": "#/definitions/PageRequest" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "limit_order_tranche_user_all_by_address" + ], + "properties": { + "limit_order_tranche_user_all_by_address": { + "type": "object", + "required": [ + "limit_orders" + ], + "properties": { + "limit_orders": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/LimitOrderTrancheUser" + }, + { + "type": "null" + } + ] + } + }, + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "limit_order_tranche" + ], + "properties": { + "limit_order_tranche": { + "type": "object", + "required": [ + "pair_id", + "tick_index", + "token_in", + "tranche_key" + ], + "properties": { + "pair_id": { + "type": "string" + }, + "tick_index": { + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "limit_order_tranche_all" + ], + "properties": { + "limit_order_tranche_all": { + "type": "object", + "required": [ + "pair_id", + "token_in" + ], + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + }, + "pair_id": { + "type": "string" + }, + "token_in": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "user_deposit_all" + ], + "properties": { + "user_deposit_all": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + }, + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "tick_liquidity_all" + ], + "properties": { + "tick_liquidity_all": { + "type": "object", + "required": [ + "pair_id", + "token_in" + ], + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + }, + "pair_id": { + "type": "string" + }, + "token_in": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "inactive_limit_order_tranche" + ], + "properties": { + "inactive_limit_order_tranche": { + "type": "object", + "required": [ + "pair_id", + "tick_index", + "token_in", + "tranche_key" + ], + "properties": { + "pair_id": { + "type": "string" + }, + "tick_index": { + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "inactive_limit_order_tranche_all" + ], + "properties": { + "inactive_limit_order_tranche_all": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool_reserves_all" + ], + "properties": { + "pool_reserves_all": { + "type": "object", + "required": [ + "pair_id", + "token_in" + ], + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + }, + "pair_id": { + "type": "string" + }, + "token_in": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool_reverses" + ], + "properties": { + "pool_reverses": { + "type": "object", + "required": [ + "fee", + "pair_id", + "tick_index", + "token_in" + ], + "properties": { + "fee": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "pair_id": { + "type": "string" + }, + "tick_index": { + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "estimate_multi_hop_swap" + ], + "properties": { + "estimate_multi_hop_swap": { + "type": "object", + "required": [ + "amount_id", + "creator", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_id": { + "$ref": "#/definitions/Int128" + }, + "creator": { + "type": "string" + }, + "exit_limit_price": { + "$ref": "#/definitions/PrecDec" + }, + "pick_best_route": { + "type": "boolean" + }, + "receiver": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "estimate_place_limit_order" + ], + "properties": { + "estimate_place_limit_order": { + "type": "object", + "required": [ + "creator", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "creator": { + "type": "string" + }, + "expiration_time": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "max_amount_out": { + "anyOf": [ + { + "$ref": "#/definitions/Int128" + }, + { + "type": "null" + } + ] + }, + "order_type": { + "$ref": "#/definitions/LimitOrderType" + }, + "receiver": { + "type": "string" + }, + "tick_index_in_to_out": { + "$ref": "#/definitions/Uint128" + }, + "token_in": { + "type": "string" + }, + "token_out": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool" + ], + "properties": { + "pool": { + "type": "object", + "required": [ + "fee", + "pair_id", + "tick_index" + ], + "properties": { + "fee": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "pair_id": { + "type": "string" + }, + "tick_index": { + "type": "integer", + "format": "int64" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool_by_i_d" + ], + "properties": { + "pool_by_i_d": { + "type": "object", + "required": [ + "pool_id" + ], + "properties": { + "pool_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool_metadata" + ], + "properties": { + "pool_metadata": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "pool_metadata_all" + ], + "properties": { + "pool_metadata_all": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Binary": { + "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" + }, + "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" + }, + "LimitOrderTrancheUser": { + "type": "object", + "required": [ + "address", + "order_type", + "shares_cancelled", + "shares_owned", + "shares_withdrawn", + "tick_index_taker_to_maker", + "trade_pair_id", + "tranche_key" + ], + "properties": { + "address": { + "type": "string" + }, + "order_type": { + "$ref": "#/definitions/LimitOrderType" + }, + "shares_cancelled": { + "$ref": "#/definitions/Int128" + }, + "shares_owned": { + "$ref": "#/definitions/Int128" + }, + "shares_withdrawn": { + "$ref": "#/definitions/Int128" + }, + "tick_index_taker_to_maker": { + "type": "integer", + "format": "int64" + }, + "trade_pair_id": { + "$ref": "#/definitions/TradePairID" + }, + "tranche_key": { + "type": "string" + } + } + }, + "LimitOrderType": { + "type": "string", + "enum": [ + "GoodTillCancel", + "FillOrKill", + "ImmediateOrCancel", + "JustInTime", + "GoodTilTime" + ] + }, + "MultiHopRoute": { + "type": "object", + "required": [ + "hops" + ], + "properties": { + "hops": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PageRequest": { + "type": "object", + "required": [ + "count_total", + "key", + "limit", + "offset", + "reverse" + ], + "properties": { + "count_total": { + "description": "**count_total** is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.", + "type": "boolean" + }, + "key": { + "description": "**key** is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "limit": { + "description": "**limit** is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "offset": { + "description": "**offset** is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "reverse": { + "description": "reverse is set to true if results are to be returned in the descending order.", + "type": "boolean" + } + } + }, + "PrecDec": { + "type": "object", + "required": [ + "i" + ], + "properties": { + "i": { + "$ref": "#/definitions/Uint128" + } + } + }, + "TradePairID": { + "type": "object", + "required": [ + "maker_denom", + "taker_denom" + ], + "properties": { + "maker_denom": { + "type": "string" + }, + "taker_denom": { + "type": "string" + } + } + }, + "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/schema/instantiate_msg.json b/contracts/dex/schema/instantiate_msg.json new file mode 100644 index 0000000..44588cf --- /dev/null +++ b/contracts/dex/schema/instantiate_msg.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object" +} diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs new file mode 100644 index 0000000..e00b7d8 --- /dev/null +++ b/contracts/dex/src/contract.rs @@ -0,0 +1,169 @@ +use crate::query::{ChainResponse, InterchainQueries}; +use cosmwasm_std::{ + entry_point, to_binary, to_vec, Binary, ContractResult, CosmosMsg, Deps, DepsMut, Env, + MessageInfo, QueryRequest, Response, StdError, StdResult, SystemResult, +}; +use cw2::set_contract_version; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +pub struct InstantiateMsg {} +use neutron_sdk::{ + bindings::{ + msg::{DexMsg, NeutronMsg}, + query::{ + AllInactiveLimitOrderTrancheResponse, AllLimitOrderTrancheResponse, + AllLimitOrderTrancheUserResponse, AllPoolMetadataResponse, AllPoolReservesResponse, + AllTickLiquidityResponse, AllUserDepositsResponse, DexQuery, + EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, + InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, + LimitOrderTrancheUserResponse, NeutronQuery, ParamsResponse, PoolMetadataResponse, + PoolReservesResponse, PoolResponse, + }, + }, + sudo::msg::SudoMsg, +}; + +const CONTRACT_NAME: &str = concat!("crates.io:neutron-contracts__", env!("CARGO_PKG_NAME")); +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +#[entry_point] +pub fn instantiate( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + _msg: InstantiateMsg, +) -> StdResult { + deps.api.debug("WASMDEBUG: instantiate"); + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(Response::default()) +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ExecuteMsg { + Send { to: String, amount: u128 }, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +pub struct MigrateMsg {} + +#[entry_point] +pub fn execute( + deps: DepsMut, + env: Env, + info: MessageInfo, + msg: DexMsg, +) -> StdResult> { + deps.api + .debug(format!("WASMDEBUG: execute: received msg: {:?}", msg).as_str()); + execute_dex(deps, env, info, msg) +} + +fn execute_dex( + _deps: DepsMut, + _env: Env, + _: MessageInfo, + msg: DexMsg, +) -> StdResult> { + Ok(Response::default().add_message(CosmosMsg::Custom(NeutronMsg::Dex(msg)))) +} + +#[entry_point] +pub fn query(deps: Deps, env: Env, msg: DexQuery) -> StdResult { + query_dex(deps, env, msg) +} + +fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { + match msg { + DexQuery::Params {} => { + let query_response: ParamsResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::LimitOrderTrancheUser { .. } => { + let query_response: LimitOrderTrancheUserResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::LimitOrderTrancheUserAll { .. } => { + let query_response: AllLimitOrderTrancheUserResponse = + deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::LimitOrderTrancheUserAllByAddress { .. } => { + let query_response: AllLimitOrderTrancheUserResponse = + deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::LimitOrderTranche { .. } => { + let query_response: LimitOrderTrancheResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::LimitOrderTrancheAll { .. } => { + let query_response: AllLimitOrderTrancheResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::UserDepositAll { .. } => { + let query_response: AllUserDepositsResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::TickLiquidityAll { .. } => { + let query_response: AllTickLiquidityResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::InactiveLimitOrderTranche { .. } => { + let query_response: InactiveLimitOrderTrancheResponse = + deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::InactiveLimitOrderTrancheAll { .. } => { + let query_response: AllInactiveLimitOrderTrancheResponse = + deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::PoolReservesAll { .. } => { + let query_response: AllPoolReservesResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::PoolReverses { .. } => { + let query_response: PoolReservesResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::EstimateMultiHopSwap { .. } => { + let query_response: EstimateMultiHopSwapResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::EstimatePlaceLimitOrder { .. } => { + let query_response: EstimatePlaceLimitOrderResponse = + deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::Pool { .. } => { + let query_response: PoolResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::PoolByID { .. } => { + let query_response: PoolResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::PoolMetadata { .. } => { + let query_response: PoolMetadataResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + DexQuery::PoolMetadataAll { .. } => { + let query_response: AllPoolMetadataResponse = deps.querier.query(&msg.into())?; + return to_binary(&query_response); + } + } +} + +#[entry_point] +pub fn sudo(_deps: DepsMut, _env: Env, _msg: SudoMsg) -> StdResult { + Ok(Response::default()) +} + +#[entry_point] +pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult { + deps.api.debug("WASMDEBUG: migrate"); + Ok(Response::default()) +} diff --git a/contracts/dex/src/lib.rs b/contracts/dex/src/lib.rs new file mode 100644 index 0000000..0f51ea9 --- /dev/null +++ b/contracts/dex/src/lib.rs @@ -0,0 +1,3 @@ +pub mod contract; +pub mod query; +pub mod msg; \ No newline at end of file diff --git a/contracts/dex/src/msg.rs b/contracts/dex/src/msg.rs new file mode 100644 index 0000000..e69de29 diff --git a/contracts/dex/src/query.rs b/contracts/dex/src/query.rs new file mode 100644 index 0000000..228715b --- /dev/null +++ b/contracts/dex/src/query.rs @@ -0,0 +1,42 @@ +use cosmwasm_std::{Binary, CustomQuery, QueryRequest}; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsg { + Reflect(QueryRequest), +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum InterchainQueries { + InterchainQueryResult { + query_id: u64, + }, + InterchainAccountAddress { + owner_address: String, + interchain_account_id: String, + connection_id: String, + }, + RegisteredInterchainQueries {}, + RegisteredInterchainQuery { + query_id: u64, + }, + MinIbcFee {}, + FullDenom { + creator_addr: String, + subdenom: String, + }, + DenomAdmin { + subdenom: String, + }, +} + +impl CustomQuery for InterchainQueries {} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct ChainResponse { + pub data: Binary, +} From e5d7d3d51a919009cd7e1a9fbbbbdae3931aef38 Mon Sep 17 00:00:00 2001 From: swelf Date: Thu, 16 Nov 2023 15:04:40 +0300 Subject: [PATCH 02/12] wip --- artifacts/checksums.txt | 2 +- artifacts/checksums_intermediate.txt | 2 +- contracts/dex/src/contract.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 100eb74..47c2581 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,6 +1,6 @@ 0087fdbcf7ee06a49fbda882ce83c75a0001edbb801e26500b894c8e6627010a before_send_hook_test-x86_64.wasm 37038e0be3b11d0d9995623cabdc1ff4631fe51de0255582bd5034a8b87439d0 client_updater-x86_64.wasm -3b8eba37d63f3177b9ea8ccee67ed4d8cf5a5abc53f56d578508a1188fbc99d1 dex-x86_64.wasm +a0cbe0c48d5bc6d6881019ad86c945ac4ece7d44f8e56509aea7b9b1b39441d0 dex-x86_64.wasm d72be13a225ce00c97392784f0b6f3b505cb8133a83808b53a95c5e9ed98b3ed echo-x86_64.wasm f65741a936b596696a29fc9bdf9ec4567cad3722a15f75a0d659f2b3a9ab1d64 ibc_transfer-x86_64.wasm fac774830d6242494b8fd530052d8ed4365498220541e137284aefbf64337b24 msg_receiver-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index f6382a4..22c4cd6 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,6 +1,6 @@ 8c7004b7d8d23d9ec193b4f603bb0370a2962fd362a2c06f6ef634f5f86c4f3a before_send_hook_test.wasm 82e05994b5ccfb6d06d29ccc2e2965b8c6c4805b6a2699eb857096608a2eec0a client_updater.wasm -77a84e60ff062eb4131310d59882b76f1381e66c36311fa8e2cb0bef3edbb09d dex.wasm +926a4f2911bcbd8f0a82335c92e22bf21aeb2373827f810184feefb67f24e481 dex.wasm f39a345f49d72c01ef99afff01fa259085f2301f0643b27721446633b462e16e echo.wasm 9940322a86da6f2512d526dd28c5f4057eae77119153763853e211082f76f750 ibc_transfer.wasm 43bdbfcd7c6015b557e1798e93f13fdc15cd4e662faffc714d2e78e5e0a8e3e5 msg_receiver.wasm diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index e00b7d8..136f494 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -19,7 +19,7 @@ use neutron_sdk::{ EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, LimitOrderTrancheUserResponse, NeutronQuery, ParamsResponse, PoolMetadataResponse, - PoolReservesResponse, PoolResponse, + PoolReservesResponse, PoolResponse, AllUserLimitOrdersResponse, }, }, sudo::msg::SudoMsg, @@ -91,7 +91,7 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { - let query_response: AllLimitOrderTrancheUserResponse = + let query_response: AllUserLimitOrdersResponse = deps.querier.query(&msg.into())?; return to_binary(&query_response); } @@ -125,7 +125,7 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { + DexQuery::PoolReserves { .. } => { let query_response: PoolReservesResponse = deps.querier.query(&msg.into())?; return to_binary(&query_response); } From 79a7b8643195a67a627888842c0ed22b404abe01 Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 13 Feb 2024 12:00:07 +0300 Subject: [PATCH 03/12] updated neutron-sdk --- Cargo.lock | 122 ++++++--------------------- Cargo.toml | 2 +- artifacts/checksums.txt | 28 +++--- artifacts/checksums_intermediate.txt | 28 +++--- 4 files changed, 57 insertions(+), 123 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f11f2c9..1d611ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,7 +122,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", ] @@ -325,15 +325,18 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD name = "dex" version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.7.0", -======= + "neutron-sdk 0.8.0", + "schemars", + "serde", +] + +[[package]] name = "dex_stargate" version = "0.1.0" dependencies = [ @@ -341,10 +344,9 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "prost 0.12.3", "prost-types 0.12.3", ->>>>>>> main "schemars", "serde", ] @@ -536,7 +538,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -585,7 +587,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", ] @@ -604,8 +606,6 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f60e477bd71007d9ff78ae020ec1c6b3b47798578af6151429434d86472efc" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", @@ -616,94 +616,31 @@ dependencies = [ "protobuf", "schemars", "serde", -<<<<<<< HEAD - "serde-json-wasm", - "serde_json", - "thiserror", -] - -[[package]] -name = "neutron-sdk" -version = "0.6.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=sdk/47#9626f3086418a04b61b6ef0af8f1721810cf5eba" -dependencies = [ - "base64", - "bech32", - "cosmos-sdk-proto 0.16.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "prost 0.11.9", - "protobuf", - "schemars", - "serde", - "serde-json-wasm", - "serde_json", - "thiserror", -] - -[[package]] -name = "neutron-sdk" -version = "0.6.1" -source = "git+https://github.com/neutron-org/neutron-sdk?rev=bb2188561a30d0a7fb293ff05f73907724eb2020#bb2188561a30d0a7fb293ff05f73907724eb2020" -dependencies = [ - "base64", - "bech32", - "cosmos-sdk-proto 0.16.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "prost 0.11.9", - "protobuf", - "schemars", - "serde", - "serde-json-wasm", - "serde_json", - "thiserror", -] - -[[package]] -name = "neutron-sdk" -version = "0.7.0" -dependencies = [ - "base64", - "bech32", - "cosmos-sdk-proto 0.16.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "prost 0.11.9", - "protobuf", - "schemars", - "serde", - "serde-json-wasm", + "serde-json-wasm 1.0.0", "serde_json", "serde_repr", + "speedate", + "tendermint-proto 0.34.0", "thiserror", ] [[package]] name = "neutron-sdk" -version = "0.7.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=7249d5369dc04b189434de0c42d55aad6cbb61ec#7249d5369dc04b189434de0c42d55aad6cbb61ec" +version = "0.8.0" +source = "git+https://github.com/neutron-org/neutron-sdk.git#40f6592f1eec9e2e1bf0e0531a011294d70d1711" dependencies = [ - "base64", "bech32", - "cosmos-sdk-proto 0.16.0", + "cosmos-sdk-proto 0.20.0", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus", - "prost 0.11.9", + "prost 0.12.3", + "prost-types 0.12.3", "protobuf", "schemars", "serde", - "serde-json-wasm", - "serde_json", -======= "serde-json-wasm 1.0.0", "speedate", "tendermint-proto 0.34.0", ->>>>>>> main "thiserror", ] @@ -717,7 +654,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "prost 0.12.3", "schemars", "serde", @@ -733,16 +670,9 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", -<<<<<<< HEAD - "neutron-sdk 0.7.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=7249d5369dc04b189434de0c42d55aad6cbb61ec)", - "prost 0.11.9", - "prost-types", - "protobuf", -======= - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "prost 0.12.3", "prost-types 0.12.3", ->>>>>>> main "schemars", "serde", "serde-json-wasm 1.0.0", @@ -757,7 +687,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -970,7 +900,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", ] @@ -1126,8 +1056,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", - "quote 1.0.33", - "syn 2.0.37", + "quote", + "syn 2.0.39", ] [[package]] @@ -1192,7 +1122,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "osmosis-std", "prost 0.11.9", "schemars", @@ -1354,7 +1284,7 @@ version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "neutron-sdk", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", "schemars", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 1546b3e..c37b14d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = "0.8.0" +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", commit = "3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" } prost = "0.12.1" prost-types = "0.12.1" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 47c2581..822b2e1 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,13 +1,15 @@ -0087fdbcf7ee06a49fbda882ce83c75a0001edbb801e26500b894c8e6627010a before_send_hook_test-x86_64.wasm -37038e0be3b11d0d9995623cabdc1ff4631fe51de0255582bd5034a8b87439d0 client_updater-x86_64.wasm -a0cbe0c48d5bc6d6881019ad86c945ac4ece7d44f8e56509aea7b9b1b39441d0 dex-x86_64.wasm -d72be13a225ce00c97392784f0b6f3b505cb8133a83808b53a95c5e9ed98b3ed echo-x86_64.wasm -f65741a936b596696a29fc9bdf9ec4567cad3722a15f75a0d659f2b3a9ab1d64 ibc_transfer-x86_64.wasm -fac774830d6242494b8fd530052d8ed4365498220541e137284aefbf64337b24 msg_receiver-x86_64.wasm -a645a35fecaa37edc5aed9540f8b4e322b0d1f4d875e79e378a03a04f976eb1a neutron_price_feed_mock-x86_64.wasm -80629b4e1d82cdfa3a88cd04eeecc366eb8795b4a194c9a961d9fc11541188ff neutron_interchain_queries-x86_64.wasm -cdc6a338ac32812e7fd5a5ee8e2fc72c332a1557e1560ac1e0e1cf7d914c85e1 neutron_interchain_txs-x86_64.wasm -4631c30073448d1fc59035a62706d5107f2ad56933668a41d988ff52d218cbf0 neutron_validators_test-x86_64.wasm -4fdfd01aae515dce4bade05be8b59c2f0b2e8c8da6852eb3d3d1c0ea728dd099 reflect-x86_64.wasm -1bc336fd5a827019c87264cf15abb3f284f8da2c551597e3f59ca3a840bb9faf stargate_querier-x86_64.wasm -ff592f20c448e37f7697f17de5c86e4b1ce60414d763efb704f71b32ad61e7bf tokenfactory-x86_64.wasm +b0169e314dab1faee9001ec9eb4ae460391d58734fb9fe2cf652605d3ed9c768 before_send_hook_test-x86_64.wasm +9e6e811824c8e1df4cfbd5f9ddf13c8b247e7432880904b6126b033b98f5e10b client_updater-x86_64.wasm +9e7800507d7fd5a39ba7e3aca20f4e3eb63d351cefa497181e7dc404d504bc8d dex-x86_64.wasm +0d9d79b57cdc5e10d0dfdb4ddcbfd99a981958a56e6051438310cdef5b2248a8 dex_stargate-x86_64.wasm +e53858ac12c04b8b232f691e85c79d28ca479b643de540368d93cfc0b031ca5a echo-x86_64.wasm +d373bfc37d741c94f6e965f43bbe10789a01a72ac6b29c8134c0ade848bb2990 general-x86_64.wasm +de0a2fe45ef85728058f4bdece1af79b8336949c40502be355deebcbabb64992 ibc_transfer-x86_64.wasm +e938a87eb19467bd20bd09726f4fff8535be06f108360d3771a8935983b400fc msg_receiver-x86_64.wasm +9429175723bcb014d3a6fb0969c917d415c7d00a45b2c5f86494f0d59059e3eb neutron_price_feed_mock-x86_64.wasm +1f37d7d4d8b1254fe5d9781d421c1852b3819f6bdb2f76b8f61cd790d6885d9b neutron_interchain_queries-x86_64.wasm +974242d7fdb339736c4d3ae72f2e24892e4fae8cfd5bbcbd630e030b630f6269 neutron_interchain_txs-x86_64.wasm +a1e6f07dbae194fbcc4a1c2aa53252f059cf608543f8ac6e496028bebd46e573 neutron_validators_test-x86_64.wasm +71df79abf414395710876b755338a4bef5a67dabf83ebba0f0c224518bf581b1 reflect-x86_64.wasm +1f0c2e6157a54cba9845ee50c4fcfb34daf1ea21fabbb0e81211116eaa63a30e stargate_querier-x86_64.wasm +adce70cfcc7ff34be2a07552e24c8b8fda5e70b2fdc291df1f7433b311c3e333 tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 22c4cd6..0bb4069 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,13 +1,15 @@ -8c7004b7d8d23d9ec193b4f603bb0370a2962fd362a2c06f6ef634f5f86c4f3a before_send_hook_test.wasm -82e05994b5ccfb6d06d29ccc2e2965b8c6c4805b6a2699eb857096608a2eec0a client_updater.wasm -926a4f2911bcbd8f0a82335c92e22bf21aeb2373827f810184feefb67f24e481 dex.wasm -f39a345f49d72c01ef99afff01fa259085f2301f0643b27721446633b462e16e echo.wasm -9940322a86da6f2512d526dd28c5f4057eae77119153763853e211082f76f750 ibc_transfer.wasm -43bdbfcd7c6015b557e1798e93f13fdc15cd4e662faffc714d2e78e5e0a8e3e5 msg_receiver.wasm -068691ad69d62c89173ef12fa209c2ddbb64a368d2c7fe4c284bed3ae84436ba neutron_price_feed_mock.wasm -7dc6f43e470458732faab4a92f9170f8971628f2756f85dea9f975329b8d3b73 neutron_interchain_queries.wasm -eb7667972cbdb94b4fe86351ca9ce0b0afb53a9e3a8578e9feb1e5329725f469 neutron_interchain_txs.wasm -cf5ca0fe134843c2e5837ad533bbc5e879404e693cee035810e108b9e67add82 neutron_validators_test.wasm -536842f6cfe2eaeac3b3f9eb62d9adf16ada54e4815abd2bb6ab4c6735ddcad5 reflect.wasm -03d5bdc03c9621d136671182c98d393307217f1bacd26da0f97667eff2bbac89 stargate_querier.wasm -e8029e711ba381ba851b45bf5053e52244ee8c5978c799ba1f38b6a743144dcd tokenfactory.wasm +e4b39ce3cde5e4dc6344b7bf870cb8649401c9466ea3504675db35a6449d4d84 before_send_hook_test.wasm +232c48c5ffd1b0532259a4ffba5b037a67ca82432d89624d03b763c4d1575480 client_updater.wasm +32c18aa42e2ea875976825b8b2e603e932aaccbc28e695aac1d42e95c5e12b2d dex.wasm +50ff8a252f8c6a3ca01117f429734be2180fbf017c9bef9e686af0a05479684d dex_stargate.wasm +cf31d81b2e093dae5dca79334aac0858823f47ce79a9cfba4b1af36d1cfc28bf echo.wasm +26030a0c877f66877a81eb63a8c3f3cb27354a3777343ac4f269e2b1ea13a25b general.wasm +79836a0801d84f693ae04535940fe5351ed2e2208c82897fde0bf4998b879579 ibc_transfer.wasm +ae008a6296e6c771caa394c6bc9ae08b459499753ecaa8fe08a2ebaa122bfc39 msg_receiver.wasm +4698492f51a750b8fa5b3ac2355589dd5c672efd0aba9e7373f83b5adf00143a neutron_price_feed_mock.wasm +247a4c0da4c38bca227d73a16999fdd613d3be5ca1f3a843a011fffc7c44eebe neutron_interchain_queries.wasm +eeaa82bc93a2de9dfcbcb968bce22f64cabee48f1a3a5eebc6a81f07be420951 neutron_interchain_txs.wasm +5644fdc52a5648ed24e286798935349873101850835d25b9a37b2eca1888e7e7 neutron_validators_test.wasm +c309fa30b966f04913249b343449adcabcf3ec0c0fb666ebd0ee51b7fcda10b7 reflect.wasm +42a53d22aefb2cb27f2e0fd0a6afc77f601decf368e8615e774f67134464e595 stargate_querier.wasm +b6abe4509b003b0f90e3aebe4e2763848fcd7b62ae9acbb03567f2da2290e57b tokenfactory.wasm From a2eff3693d395b159726d8af469d044935a417ab Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 13 Feb 2024 12:51:26 +0300 Subject: [PATCH 04/12] updated neutron-sdk --- Cargo.lock | 24 ++++++++++++----------- Cargo.toml | 2 +- artifacts/checksums.txt | 29 ++++++++++++++-------------- artifacts/checksums_intermediate.txt | 29 ++++++++++++++-------------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d611ac..30cb205 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,7 +122,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", ] @@ -344,7 +344,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "prost 0.12.3", "prost-types 0.12.3", "schemars", @@ -538,7 +538,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -587,7 +587,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", ] @@ -627,7 +627,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git#40f6592f1eec9e2e1bf0e0531a011294d70d1711" +source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b#3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", @@ -639,6 +639,8 @@ dependencies = [ "schemars", "serde", "serde-json-wasm 1.0.0", + "serde_json", + "serde_repr", "speedate", "tendermint-proto 0.34.0", "thiserror", @@ -654,7 +656,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "prost 0.12.3", "schemars", "serde", @@ -670,7 +672,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "prost 0.12.3", "prost-types 0.12.3", "schemars", @@ -687,7 +689,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -900,7 +902,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", ] @@ -1122,7 +1124,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "osmosis-std", "prost 0.11.9", "schemars", @@ -1284,7 +1286,7 @@ version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git)", + "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", "schemars", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index c37b14d..29bd745 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", commit = "3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" } prost = "0.12.1" prost-types = "0.12.1" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 822b2e1..507119b 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,15 +1,14 @@ -b0169e314dab1faee9001ec9eb4ae460391d58734fb9fe2cf652605d3ed9c768 before_send_hook_test-x86_64.wasm -9e6e811824c8e1df4cfbd5f9ddf13c8b247e7432880904b6126b033b98f5e10b client_updater-x86_64.wasm -9e7800507d7fd5a39ba7e3aca20f4e3eb63d351cefa497181e7dc404d504bc8d dex-x86_64.wasm -0d9d79b57cdc5e10d0dfdb4ddcbfd99a981958a56e6051438310cdef5b2248a8 dex_stargate-x86_64.wasm -e53858ac12c04b8b232f691e85c79d28ca479b643de540368d93cfc0b031ca5a echo-x86_64.wasm -d373bfc37d741c94f6e965f43bbe10789a01a72ac6b29c8134c0ade848bb2990 general-x86_64.wasm -de0a2fe45ef85728058f4bdece1af79b8336949c40502be355deebcbabb64992 ibc_transfer-x86_64.wasm -e938a87eb19467bd20bd09726f4fff8535be06f108360d3771a8935983b400fc msg_receiver-x86_64.wasm -9429175723bcb014d3a6fb0969c917d415c7d00a45b2c5f86494f0d59059e3eb neutron_price_feed_mock-x86_64.wasm -1f37d7d4d8b1254fe5d9781d421c1852b3819f6bdb2f76b8f61cd790d6885d9b neutron_interchain_queries-x86_64.wasm -974242d7fdb339736c4d3ae72f2e24892e4fae8cfd5bbcbd630e030b630f6269 neutron_interchain_txs-x86_64.wasm -a1e6f07dbae194fbcc4a1c2aa53252f059cf608543f8ac6e496028bebd46e573 neutron_validators_test-x86_64.wasm -71df79abf414395710876b755338a4bef5a67dabf83ebba0f0c224518bf581b1 reflect-x86_64.wasm -1f0c2e6157a54cba9845ee50c4fcfb34daf1ea21fabbb0e81211116eaa63a30e stargate_querier-x86_64.wasm -adce70cfcc7ff34be2a07552e24c8b8fda5e70b2fdc291df1f7433b311c3e333 tokenfactory-x86_64.wasm +5b9df1c997336ced609f927a954a4dbcc7ebb0a8f030d9cfc10279a12516e74a before_send_hook_test-x86_64.wasm +dac8803d87198ea182ddeb88ef1930460b5792b2d3ab4ce04b8722c88d29be10 client_updater-x86_64.wasm +6fe5aef4cea24170f5b04c9e790bb8b9d285454450e3f9366f74faa3349dbeac dex-x86_64.wasm +40954f8fcf2645a1fe1aeeab2cf26c34f2967e773d902e458a5656a20cc21757 dex_stargate-x86_64.wasm +cd5eaf31c5a335059bd61e5c14bcf5037953073401aabb340e85b97b5c49be74 echo-x86_64.wasm +fce58efa732f14cf9997d26ebd6680c59299e0712cfa5cf0f5b50f4a93738baf ibc_transfer-x86_64.wasm +cf67eea03b6501298b280deae88815aaa386492ea472891edc9a8a6e17dc2b58 msg_receiver-x86_64.wasm +94860b2bcfe806162f0dacda4b9c7f661cdcfb287a8245eaae8fb18f26e7b126 neutron_price_feed_mock-x86_64.wasm +f7f7ad04b8893310ae4c88faa2e991183bfec32387b5c1d6e95787984cf78c14 neutron_interchain_queries-x86_64.wasm +bfd9bda4d714b9e57900c343ea9d4426c1911546b781f2099a7cf2069ad4b73c neutron_interchain_txs-x86_64.wasm +893eae6a4d73ea53d79cc9b4b626cff2aa843ab589d4c6e08cde89001b8a4084 neutron_validators_test-x86_64.wasm +4d77c08d27296704ac91426253c29ea4d33968ba6562136dac989dc064897327 reflect-x86_64.wasm +57c978e7123a42c2858ceeeda44990d23a13f99dcb7a11892632848913cbf365 stargate_querier-x86_64.wasm +ba1d9310de04d113ad1f71ac5958741713c644470b15a4ff3bd0fdd43973db5b tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 0bb4069..68e1c27 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,15 +1,14 @@ -e4b39ce3cde5e4dc6344b7bf870cb8649401c9466ea3504675db35a6449d4d84 before_send_hook_test.wasm -232c48c5ffd1b0532259a4ffba5b037a67ca82432d89624d03b763c4d1575480 client_updater.wasm -32c18aa42e2ea875976825b8b2e603e932aaccbc28e695aac1d42e95c5e12b2d dex.wasm -50ff8a252f8c6a3ca01117f429734be2180fbf017c9bef9e686af0a05479684d dex_stargate.wasm -cf31d81b2e093dae5dca79334aac0858823f47ce79a9cfba4b1af36d1cfc28bf echo.wasm -26030a0c877f66877a81eb63a8c3f3cb27354a3777343ac4f269e2b1ea13a25b general.wasm -79836a0801d84f693ae04535940fe5351ed2e2208c82897fde0bf4998b879579 ibc_transfer.wasm -ae008a6296e6c771caa394c6bc9ae08b459499753ecaa8fe08a2ebaa122bfc39 msg_receiver.wasm -4698492f51a750b8fa5b3ac2355589dd5c672efd0aba9e7373f83b5adf00143a neutron_price_feed_mock.wasm -247a4c0da4c38bca227d73a16999fdd613d3be5ca1f3a843a011fffc7c44eebe neutron_interchain_queries.wasm -eeaa82bc93a2de9dfcbcb968bce22f64cabee48f1a3a5eebc6a81f07be420951 neutron_interchain_txs.wasm -5644fdc52a5648ed24e286798935349873101850835d25b9a37b2eca1888e7e7 neutron_validators_test.wasm -c309fa30b966f04913249b343449adcabcf3ec0c0fb666ebd0ee51b7fcda10b7 reflect.wasm -42a53d22aefb2cb27f2e0fd0a6afc77f601decf368e8615e774f67134464e595 stargate_querier.wasm -b6abe4509b003b0f90e3aebe4e2763848fcd7b62ae9acbb03567f2da2290e57b tokenfactory.wasm +93de0d82a62839b6a40da84d4779680c9024fd8d327958d89f52f637776db9b0 before_send_hook_test.wasm +0894c1fb07db09238097f4d51adecb599129105713fe3e8437de3a09d264a21a client_updater.wasm +cf952aa3212b079c07c30e53bfe83e6bcf4c32e9f4e7ae4f63fcbd391b6b56f2 dex.wasm +5ed83f2847ce35a40b318a3cacfb5cbe5df01ad940d32697b35aade56f676af3 dex_stargate.wasm +3f96305646e197cffda27778ce652af3ccdeaa2b1335c189bb9ffd173c091dd7 echo.wasm +7e5707f1e8aba851f9199f66ac5e6d52ee1331c76fcb9d6d28526667ee30072b ibc_transfer.wasm +a621525d9fd6ca8a785a76c8b9d8fd0deec0a7decd0ecf77f2263753941bfd54 msg_receiver.wasm +d688c20c12961e5cf036c36a08e77842a29c1a96d170c3847b4c8bf5744216d1 neutron_price_feed_mock.wasm +82c406c8bf624ce15f7e67bcf79560d79d83652ec138c9baeba279ac84abccaa neutron_interchain_queries.wasm +bdbf2051b3be14b598d9bc2ece8aece387bf53d53c7e6b48f99f10c8c64deaf3 neutron_interchain_txs.wasm +c396688c5bcf28692f25a1dcb7ddef30f7081e8d5ebb792f27e168d9980b5883 neutron_validators_test.wasm +e2bc9d6c43b343fef3f3af948ca8857ba07f3daff9da2350d22d28d2379bf496 reflect.wasm +87c6ae0391a8a1688b0fd7a077c8d88e616fd0a42b7cf010e7ec5d079dea0a2c stargate_querier.wasm +132e37ff04e81694c8d151e6149ef151953bc87251be1b9bc5f03fce9ac043a2 tokenfactory.wasm From dc488c560781ee964084722e056b94966deafc64 Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 13 Feb 2024 16:49:29 +0300 Subject: [PATCH 05/12] neutron-sdk --- Cargo.lock | 43 ++++++++++------------------------------ contracts/dex/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30cb205..fa788b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,7 +122,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", ] @@ -331,7 +331,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0", + "neutron-sdk", "schemars", "serde", ] @@ -344,7 +344,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "prost 0.12.3", "prost-types 0.12.3", "schemars", @@ -538,7 +538,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -587,7 +587,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", ] @@ -603,27 +603,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "neutron-sdk" -version = "0.8.0" -dependencies = [ - "bech32", - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema", - "cosmwasm-std", - "prost 0.12.3", - "prost-types 0.12.3", - "protobuf", - "schemars", - "serde", - "serde-json-wasm 1.0.0", - "serde_json", - "serde_repr", - "speedate", - "tendermint-proto 0.34.0", - "thiserror", -] - [[package]] name = "neutron-sdk" version = "0.8.0" @@ -656,7 +635,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "prost 0.12.3", "schemars", "serde", @@ -672,7 +651,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "prost 0.12.3", "prost-types 0.12.3", "schemars", @@ -689,7 +668,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", "serde-json-wasm 1.0.0", @@ -902,7 +881,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", ] @@ -1124,7 +1103,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "osmosis-std", "prost 0.11.9", "schemars", @@ -1286,7 +1265,7 @@ version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "neutron-sdk 0.8.0 (git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b)", + "neutron-sdk", "schemars", "serde", ] diff --git a/contracts/dex/Cargo.toml b/contracts/dex/Cargo.toml index 1c80489..fdbaf64 100644 --- a/contracts/dex/Cargo.toml +++ b/contracts/dex/Cargo.toml @@ -37,7 +37,7 @@ cosmwasm-std = "1.3.1" cw2 = "1.1.0" schemars = "0.8.10" serde = { version = "1.0.180", default-features = false, features = ["derive"] } -neutron-sdk = { package = "neutron-sdk", path = "../../../neutron-sdk/packages/neutron-sdk/" } +neutron-sdk = { workspace = true } [dev-dependencies] cosmwasm-schema = { version = "1.3.1", default-features = false } From 29f78ec20fd6e7604434723de9ac868c6c882a40 Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 13 Feb 2024 16:55:51 +0300 Subject: [PATCH 06/12] clippy --- contracts/dex/src/contract.rs | 50 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index 136f494..baaee28 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -1,7 +1,6 @@ -use crate::query::{ChainResponse, InterchainQueries}; use cosmwasm_std::{ - entry_point, to_binary, to_vec, Binary, ContractResult, CosmosMsg, Deps, DepsMut, Env, - MessageInfo, QueryRequest, Response, StdError, StdResult, SystemResult, + entry_point, to_json_binary, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, + StdResult, }; use cw2::set_contract_version; use schemars::JsonSchema; @@ -15,11 +14,11 @@ use neutron_sdk::{ query::{ AllInactiveLimitOrderTrancheResponse, AllLimitOrderTrancheResponse, AllLimitOrderTrancheUserResponse, AllPoolMetadataResponse, AllPoolReservesResponse, - AllTickLiquidityResponse, AllUserDepositsResponse, DexQuery, - EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, + AllTickLiquidityResponse, AllUserDepositsResponse, AllUserLimitOrdersResponse, + DexQuery, EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, LimitOrderTrancheUserResponse, NeutronQuery, ParamsResponse, PoolMetadataResponse, - PoolReservesResponse, PoolResponse, AllUserLimitOrdersResponse, + PoolReservesResponse, PoolResponse, }, }, sudo::msg::SudoMsg, @@ -79,80 +78,79 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult { let query_response: ParamsResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::LimitOrderTrancheUser { .. } => { let query_response: LimitOrderTrancheUserResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::LimitOrderTrancheUserAll { .. } => { let query_response: AllLimitOrderTrancheUserResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::LimitOrderTrancheUserAllByAddress { .. } => { - let query_response: AllUserLimitOrdersResponse = - deps.querier.query(&msg.into())?; - return to_binary(&query_response); + let query_response: AllUserLimitOrdersResponse = deps.querier.query(&msg.into())?; + to_json_binary(&query_response) } DexQuery::LimitOrderTranche { .. } => { let query_response: LimitOrderTrancheResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::LimitOrderTrancheAll { .. } => { let query_response: AllLimitOrderTrancheResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::UserDepositAll { .. } => { let query_response: AllUserDepositsResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::TickLiquidityAll { .. } => { let query_response: AllTickLiquidityResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::InactiveLimitOrderTranche { .. } => { let query_response: InactiveLimitOrderTrancheResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::InactiveLimitOrderTrancheAll { .. } => { let query_response: AllInactiveLimitOrderTrancheResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::PoolReservesAll { .. } => { let query_response: AllPoolReservesResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::PoolReserves { .. } => { let query_response: PoolReservesResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::EstimateMultiHopSwap { .. } => { let query_response: EstimateMultiHopSwapResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::EstimatePlaceLimitOrder { .. } => { let query_response: EstimatePlaceLimitOrderResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::Pool { .. } => { let query_response: PoolResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::PoolByID { .. } => { let query_response: PoolResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::PoolMetadata { .. } => { let query_response: PoolMetadataResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } DexQuery::PoolMetadataAll { .. } => { let query_response: AllPoolMetadataResponse = deps.querier.query(&msg.into())?; - return to_binary(&query_response); + to_json_binary(&query_response) } } } From 31cba098021f27862522af97ca126f82ddbf795d Mon Sep 17 00:00:00 2001 From: swelf Date: Tue, 13 Feb 2024 17:03:05 +0300 Subject: [PATCH 07/12] fmt --- contracts/dex/src/lib.rs | 2 +- contracts/dex/src/msg.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/dex/src/lib.rs b/contracts/dex/src/lib.rs index 0f51ea9..a8d2ff8 100644 --- a/contracts/dex/src/lib.rs +++ b/contracts/dex/src/lib.rs @@ -1,3 +1,3 @@ pub mod contract; +pub mod msg; pub mod query; -pub mod msg; \ No newline at end of file diff --git a/contracts/dex/src/msg.rs b/contracts/dex/src/msg.rs index e69de29..8b13789 100644 --- a/contracts/dex/src/msg.rs +++ b/contracts/dex/src/msg.rs @@ -0,0 +1 @@ + From baa6325a8b9757dab688b5010b81e2ba9164526c Mon Sep 17 00:00:00 2001 From: swelf Date: Wed, 14 Feb 2024 02:18:59 +0300 Subject: [PATCH 08/12] neutron-sdk up --- Cargo.lock | 14 +------------- Cargo.toml | 2 +- artifacts/checksums.txt | 22 +++++++++++----------- artifacts/checksums_intermediate.txt | 22 +++++++++++----------- 4 files changed, 24 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa788b8..467eda3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b#3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" +source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=26e49c95f707f252e283ac660e89d6d0d10b0545#26e49c95f707f252e283ac660e89d6d0d10b0545" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", @@ -619,7 +619,6 @@ dependencies = [ "serde", "serde-json-wasm 1.0.0", "serde_json", - "serde_repr", "speedate", "tendermint-proto 0.34.0", "thiserror", @@ -1030,17 +1029,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_repr" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "sha2" version = "0.9.9" diff --git a/Cargo.toml b/Cargo.toml index 29bd745..1ca8c7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "3f3a89ecfaabb69bdaee02f0a0c3a9ce7c57891b" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "26e49c95f707f252e283ac660e89d6d0d10b0545" } prost = "0.12.1" prost-types = "0.12.1" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 507119b..d881264 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,14 +1,14 @@ 5b9df1c997336ced609f927a954a4dbcc7ebb0a8f030d9cfc10279a12516e74a before_send_hook_test-x86_64.wasm -dac8803d87198ea182ddeb88ef1930460b5792b2d3ab4ce04b8722c88d29be10 client_updater-x86_64.wasm -6fe5aef4cea24170f5b04c9e790bb8b9d285454450e3f9366f74faa3349dbeac dex-x86_64.wasm -40954f8fcf2645a1fe1aeeab2cf26c34f2967e773d902e458a5656a20cc21757 dex_stargate-x86_64.wasm +c1150f68bda5f36a76797e3f8db74afe1be0cfe9bc8a6ed6e6b4d0c9b33436b7 client_updater-x86_64.wasm +5a66f62c18bf8f1592f5319b9fcb033f506b32291f463383f3ae19f034fb92fb dex-x86_64.wasm +2b0f04d99c137a4df163981ad2fe7e8b211a373ff79061732b7d9f8094ac4ebf dex_stargate-x86_64.wasm cd5eaf31c5a335059bd61e5c14bcf5037953073401aabb340e85b97b5c49be74 echo-x86_64.wasm -fce58efa732f14cf9997d26ebd6680c59299e0712cfa5cf0f5b50f4a93738baf ibc_transfer-x86_64.wasm -cf67eea03b6501298b280deae88815aaa386492ea472891edc9a8a6e17dc2b58 msg_receiver-x86_64.wasm +3e8f0a11357afa8f4e6bbc29b00c9bf2dcf85be639cfe7cbf29b1cb5923ac290 ibc_transfer-x86_64.wasm +0f027f620547834130cdf150661ba4e1cda8ad42418ecb199c54cd7b787a17b8 msg_receiver-x86_64.wasm 94860b2bcfe806162f0dacda4b9c7f661cdcfb287a8245eaae8fb18f26e7b126 neutron_price_feed_mock-x86_64.wasm -f7f7ad04b8893310ae4c88faa2e991183bfec32387b5c1d6e95787984cf78c14 neutron_interchain_queries-x86_64.wasm -bfd9bda4d714b9e57900c343ea9d4426c1911546b781f2099a7cf2069ad4b73c neutron_interchain_txs-x86_64.wasm -893eae6a4d73ea53d79cc9b4b626cff2aa843ab589d4c6e08cde89001b8a4084 neutron_validators_test-x86_64.wasm -4d77c08d27296704ac91426253c29ea4d33968ba6562136dac989dc064897327 reflect-x86_64.wasm -57c978e7123a42c2858ceeeda44990d23a13f99dcb7a11892632848913cbf365 stargate_querier-x86_64.wasm -ba1d9310de04d113ad1f71ac5958741713c644470b15a4ff3bd0fdd43973db5b tokenfactory-x86_64.wasm +83e85b1522fa61daf123e009b6dc0f778b5c01149a28216fc146e90c1b7d94aa neutron_interchain_queries-x86_64.wasm +d7190d2551738a489b4fd4e6f06387d8153fbb16a733f0c9abf758d6215b729a neutron_interchain_txs-x86_64.wasm +296e4ae0f4093872e055caa2fec61fa1167a4fa68b58007bcd385ae6a40c2759 neutron_validators_test-x86_64.wasm +82ad0e1d299e305f9d81ac8bdf7950528a24ff0413bda85f8d17b3eea543bba3 reflect-x86_64.wasm +ef9d692ea88149664d703107b11122772c331d915d38acf16a96673c78acb348 stargate_querier-x86_64.wasm +3dd0b17dcd35b300b886d5b25ad6a5480734324a80138c4043c0befc7817e6bb tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 68e1c27..2e50a1b 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,14 +1,14 @@ 93de0d82a62839b6a40da84d4779680c9024fd8d327958d89f52f637776db9b0 before_send_hook_test.wasm -0894c1fb07db09238097f4d51adecb599129105713fe3e8437de3a09d264a21a client_updater.wasm -cf952aa3212b079c07c30e53bfe83e6bcf4c32e9f4e7ae4f63fcbd391b6b56f2 dex.wasm -5ed83f2847ce35a40b318a3cacfb5cbe5df01ad940d32697b35aade56f676af3 dex_stargate.wasm +057b719f6387a60ea9b1773cbe858455088486bfc7792e52dac6de1c9cc04d21 client_updater.wasm +0e476bc05b34b98df08ab45c31746e398504c9ad127e260ae2af7f84a2cd5fd3 dex.wasm +8df698e70eca5aee01e644b8dd46b8c06928a120ffb8f1d94ae7c57a89ebb56a dex_stargate.wasm 3f96305646e197cffda27778ce652af3ccdeaa2b1335c189bb9ffd173c091dd7 echo.wasm -7e5707f1e8aba851f9199f66ac5e6d52ee1331c76fcb9d6d28526667ee30072b ibc_transfer.wasm -a621525d9fd6ca8a785a76c8b9d8fd0deec0a7decd0ecf77f2263753941bfd54 msg_receiver.wasm +7b27a86ccb548dd714e0bcb7863dab0e0b2c00b33fd8258c42ff58df0af13b86 ibc_transfer.wasm +72e9c957f47cd79d0e8ce052ede7623156b78e933891e32533104bab2e6cc0cb msg_receiver.wasm d688c20c12961e5cf036c36a08e77842a29c1a96d170c3847b4c8bf5744216d1 neutron_price_feed_mock.wasm -82c406c8bf624ce15f7e67bcf79560d79d83652ec138c9baeba279ac84abccaa neutron_interchain_queries.wasm -bdbf2051b3be14b598d9bc2ece8aece387bf53d53c7e6b48f99f10c8c64deaf3 neutron_interchain_txs.wasm -c396688c5bcf28692f25a1dcb7ddef30f7081e8d5ebb792f27e168d9980b5883 neutron_validators_test.wasm -e2bc9d6c43b343fef3f3af948ca8857ba07f3daff9da2350d22d28d2379bf496 reflect.wasm -87c6ae0391a8a1688b0fd7a077c8d88e616fd0a42b7cf010e7ec5d079dea0a2c stargate_querier.wasm -132e37ff04e81694c8d151e6149ef151953bc87251be1b9bc5f03fce9ac043a2 tokenfactory.wasm +afac9f3ffbc1e40b3d1db6ba683c1b52b28344d50da7b8457f6e82835e0c1443 neutron_interchain_queries.wasm +fa487bd45847c7ab1899339c8762173b2baec6e6ca3ac3bc451f72cca3cbfb14 neutron_interchain_txs.wasm +ec8775cc42b327be31eaa4fa99e8821ac02ce0dc8d3bc536bc8214c842bbe0fd neutron_validators_test.wasm +eb8db07510b028cc3cd6f282047d022a751718c50098eb0eaaa5bc89b2c07c78 reflect.wasm +b95c258422cf05c033c81de44572b3194307200718c5092958d153b917d10997 stargate_querier.wasm +41c797c9fe440b32720dcdd75705e914ff8011a28890513d63920710d836798d tokenfactory.wasm From fc4db08bea037ca04f15ad1eeaf2c27543b857b0 Mon Sep 17 00:00:00 2001 From: swelf Date: Wed, 14 Feb 2024 12:25:47 +0300 Subject: [PATCH 09/12] latest neutron-sdk --- Cargo.lock | 2 +- Cargo.toml | 3 ++- artifacts/checksums.txt | 22 +++++++++++----------- artifacts/checksums_intermediate.txt | 22 +++++++++++----------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 467eda3..87b2a89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=26e49c95f707f252e283ac660e89d6d0d10b0545#26e49c95f707f252e283ac660e89d6d0d10b0545" +source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=59be62c5260658d1c7bd1cfec378b373faa5e10b#59be62c5260658d1c7bd1cfec378b373faa5e10b" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", diff --git a/Cargo.toml b/Cargo.toml index 1ca8c7a..a66bb24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,8 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "26e49c95f707f252e283ac660e89d6d0d10b0545" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "59be62c5260658d1c7bd1cfec378b373faa5e10b" } +#neutron-sdk = { path = "../neutron-sdk/packages/neutron-sdk/" } prost = "0.12.1" prost-types = "0.12.1" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index d881264..b3bb1a0 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,14 +1,14 @@ 5b9df1c997336ced609f927a954a4dbcc7ebb0a8f030d9cfc10279a12516e74a before_send_hook_test-x86_64.wasm -c1150f68bda5f36a76797e3f8db74afe1be0cfe9bc8a6ed6e6b4d0c9b33436b7 client_updater-x86_64.wasm -5a66f62c18bf8f1592f5319b9fcb033f506b32291f463383f3ae19f034fb92fb dex-x86_64.wasm -2b0f04d99c137a4df163981ad2fe7e8b211a373ff79061732b7d9f8094ac4ebf dex_stargate-x86_64.wasm +155def36317e9f8c635021fbba3ad58f9552ac20951068a2260e6b95e635247e client_updater-x86_64.wasm +2a91060421b6e927a18eaaf82d2b14bd2db335e43fc283da18c02f996b41117c dex-x86_64.wasm +6b76ce1de2f5909cf6eaa2a3fcafb627b6c09822d53d2b9c59046ddec99cb737 dex_stargate-x86_64.wasm cd5eaf31c5a335059bd61e5c14bcf5037953073401aabb340e85b97b5c49be74 echo-x86_64.wasm -3e8f0a11357afa8f4e6bbc29b00c9bf2dcf85be639cfe7cbf29b1cb5923ac290 ibc_transfer-x86_64.wasm -0f027f620547834130cdf150661ba4e1cda8ad42418ecb199c54cd7b787a17b8 msg_receiver-x86_64.wasm +7b7e7f579e22aa9abe3c2c15f25de156c7066251d984b3398677c744c76793e5 ibc_transfer-x86_64.wasm +ae1893daad4438ebf5313d217c6677a62a697204959cadce233f2ad2aa9a4167 msg_receiver-x86_64.wasm 94860b2bcfe806162f0dacda4b9c7f661cdcfb287a8245eaae8fb18f26e7b126 neutron_price_feed_mock-x86_64.wasm -83e85b1522fa61daf123e009b6dc0f778b5c01149a28216fc146e90c1b7d94aa neutron_interchain_queries-x86_64.wasm -d7190d2551738a489b4fd4e6f06387d8153fbb16a733f0c9abf758d6215b729a neutron_interchain_txs-x86_64.wasm -296e4ae0f4093872e055caa2fec61fa1167a4fa68b58007bcd385ae6a40c2759 neutron_validators_test-x86_64.wasm -82ad0e1d299e305f9d81ac8bdf7950528a24ff0413bda85f8d17b3eea543bba3 reflect-x86_64.wasm -ef9d692ea88149664d703107b11122772c331d915d38acf16a96673c78acb348 stargate_querier-x86_64.wasm -3dd0b17dcd35b300b886d5b25ad6a5480734324a80138c4043c0befc7817e6bb tokenfactory-x86_64.wasm +b86a00e34e16136109daa245fb783497f27f0152bbd7108c2bf604b3cd393807 neutron_interchain_queries-x86_64.wasm +b6f9f6c5f0179a716d30c9043af1e6543a54ca7553b0337846c5db0edaf8d5ac neutron_interchain_txs-x86_64.wasm +bf3ca7feb73e5cca45679a1b23d795d6823b6a1bd4076ec6393358632278d32a neutron_validators_test-x86_64.wasm +476c3f030db2b6e5a67b75ac61266d9c9fe8b9a85af438e0f1f8383c68c7fe97 reflect-x86_64.wasm +02c11ac4905ce906ceb4ed70a88f892e0d7efc6a54a8dfc5a1ec8313ff187ad6 stargate_querier-x86_64.wasm +c4a00302adc394d8b77f256a13044366ebdf479f912e0bc542bf2c4b92fa6b24 tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 2e50a1b..7cb2863 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,14 +1,14 @@ 93de0d82a62839b6a40da84d4779680c9024fd8d327958d89f52f637776db9b0 before_send_hook_test.wasm -057b719f6387a60ea9b1773cbe858455088486bfc7792e52dac6de1c9cc04d21 client_updater.wasm -0e476bc05b34b98df08ab45c31746e398504c9ad127e260ae2af7f84a2cd5fd3 dex.wasm -8df698e70eca5aee01e644b8dd46b8c06928a120ffb8f1d94ae7c57a89ebb56a dex_stargate.wasm +8283af745174fb1da5c57be2daf0d5196e82050147f69a00a97e394d8fae4cbf client_updater.wasm +789bfba8d2eca0d512028a20e93eceb75e3299dee6305c83f650e861984a6743 dex.wasm +45b2441c2c986a4c033d993aa03f4a935af7e4f0e8c2806e8811ad42e7b07419 dex_stargate.wasm 3f96305646e197cffda27778ce652af3ccdeaa2b1335c189bb9ffd173c091dd7 echo.wasm -7b27a86ccb548dd714e0bcb7863dab0e0b2c00b33fd8258c42ff58df0af13b86 ibc_transfer.wasm -72e9c957f47cd79d0e8ce052ede7623156b78e933891e32533104bab2e6cc0cb msg_receiver.wasm +9d6512f2a92a7344e4e4a971a7d384d96d6d3005529cde69efe4c8bd366d93b6 ibc_transfer.wasm +fa4c789f63b19599ae8b7f9eca2d65e78ff06acb4c54ff7c92cae99e89f491bc msg_receiver.wasm d688c20c12961e5cf036c36a08e77842a29c1a96d170c3847b4c8bf5744216d1 neutron_price_feed_mock.wasm -afac9f3ffbc1e40b3d1db6ba683c1b52b28344d50da7b8457f6e82835e0c1443 neutron_interchain_queries.wasm -fa487bd45847c7ab1899339c8762173b2baec6e6ca3ac3bc451f72cca3cbfb14 neutron_interchain_txs.wasm -ec8775cc42b327be31eaa4fa99e8821ac02ce0dc8d3bc536bc8214c842bbe0fd neutron_validators_test.wasm -eb8db07510b028cc3cd6f282047d022a751718c50098eb0eaaa5bc89b2c07c78 reflect.wasm -b95c258422cf05c033c81de44572b3194307200718c5092958d153b917d10997 stargate_querier.wasm -41c797c9fe440b32720dcdd75705e914ff8011a28890513d63920710d836798d tokenfactory.wasm +5d3da04ebb10f5b0be70e4f94bb57dcb5afefb2a2f7617d76fc6f9bf077124dc neutron_interchain_queries.wasm +2085eca69d0bbc31f04fe8af08fa9cd8367310cb6422916bf3392fa005a615f3 neutron_interchain_txs.wasm +8bf47fedbb2d348060a6893189f9e28e40d265e2842b5b3dc21b4fb145534c66 neutron_validators_test.wasm +4a3ff5185068c5202a86f0a3356a0ec96d146d1b5153d00a753fc2ff9b3e102d reflect.wasm +1e003a775e6ee818206912117dd7b57ffa759b2b8d18cd66837b8f7856994201 stargate_querier.wasm +83d66e3b5ef0df2c64d5ec6817672481755c396dd85956bf743dffd41cead9d6 tokenfactory.wasm From c0844809dc61b692ce60213493cb5ded28c3f176 Mon Sep 17 00:00:00 2001 From: swelf Date: Thu, 22 Feb 2024 18:35:30 +0300 Subject: [PATCH 10/12] cleaned dex. updated neutron-sdk --- Cargo.lock | 2 +- Cargo.toml | 2 +- artifacts/checksums.txt | 14 ++++---- artifacts/checksums_intermediate.txt | 14 ++++---- contracts/dex/examples/schema.rs | 3 +- contracts/dex/src/contract.rs | 46 ++++++++------------------ contracts/dex/src/lib.rs | 2 -- contracts/dex/src/msg.rs | 1 - contracts/dex/src/query.rs | 42 ----------------------- contracts/dex_stargate/src/contract.rs | 2 ++ contracts/dex_stargate/src/msg.rs | 1 + 11 files changed, 34 insertions(+), 95 deletions(-) delete mode 100644 contracts/dex/src/msg.rs delete mode 100644 contracts/dex/src/query.rs diff --git a/Cargo.lock b/Cargo.lock index 87b2a89..94eed50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=59be62c5260658d1c7bd1cfec378b373faa5e10b#59be62c5260658d1c7bd1cfec378b373faa5e10b" +source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=0e491bcd50805f7e2a3de599553d8bc3a52971ec#0e491bcd50805f7e2a3de599553d8bc3a52971ec" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", diff --git a/Cargo.toml b/Cargo.toml index a66bb24..d508e27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "59be62c5260658d1c7bd1cfec378b373faa5e10b" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "0e491bcd50805f7e2a3de599553d8bc3a52971ec" } #neutron-sdk = { path = "../neutron-sdk/packages/neutron-sdk/" } prost = "0.12.1" prost-types = "0.12.1" diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index b3bb1a0..0bdbcb3 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,14 +1,14 @@ 5b9df1c997336ced609f927a954a4dbcc7ebb0a8f030d9cfc10279a12516e74a before_send_hook_test-x86_64.wasm 155def36317e9f8c635021fbba3ad58f9552ac20951068a2260e6b95e635247e client_updater-x86_64.wasm -2a91060421b6e927a18eaaf82d2b14bd2db335e43fc283da18c02f996b41117c dex-x86_64.wasm -6b76ce1de2f5909cf6eaa2a3fcafb627b6c09822d53d2b9c59046ddec99cb737 dex_stargate-x86_64.wasm +e830c4b64db92f9c611a668b93ab2c0a2743d488a3dae4d3c95a6b60d9687ece dex-x86_64.wasm +d5cc6e7378af10fc683136e9c1b122c68c7883afa9fbef80ce483758dc2c1d5d dex_stargate-x86_64.wasm cd5eaf31c5a335059bd61e5c14bcf5037953073401aabb340e85b97b5c49be74 echo-x86_64.wasm 7b7e7f579e22aa9abe3c2c15f25de156c7066251d984b3398677c744c76793e5 ibc_transfer-x86_64.wasm ae1893daad4438ebf5313d217c6677a62a697204959cadce233f2ad2aa9a4167 msg_receiver-x86_64.wasm 94860b2bcfe806162f0dacda4b9c7f661cdcfb287a8245eaae8fb18f26e7b126 neutron_price_feed_mock-x86_64.wasm -b86a00e34e16136109daa245fb783497f27f0152bbd7108c2bf604b3cd393807 neutron_interchain_queries-x86_64.wasm -b6f9f6c5f0179a716d30c9043af1e6543a54ca7553b0337846c5db0edaf8d5ac neutron_interchain_txs-x86_64.wasm -bf3ca7feb73e5cca45679a1b23d795d6823b6a1bd4076ec6393358632278d32a neutron_validators_test-x86_64.wasm -476c3f030db2b6e5a67b75ac61266d9c9fe8b9a85af438e0f1f8383c68c7fe97 reflect-x86_64.wasm +3b40c66c118e2aec169f0f97c33d89a6dfc2385460563800d5f82c4c0ffdd55b neutron_interchain_queries-x86_64.wasm +ad06889a15ddc02d98b7ee094553ab1794688a10175d199973d8f48429451822 neutron_interchain_txs-x86_64.wasm +446cfe34708cecbd6b41bcf4069a3c92166fad979e1625d822667c3bd621707a neutron_validators_test-x86_64.wasm +51cb4fa9df1ba7a0023aab00d8f0af128f9464fa778de7d46d409d9eb097709f reflect-x86_64.wasm 02c11ac4905ce906ceb4ed70a88f892e0d7efc6a54a8dfc5a1ec8313ff187ad6 stargate_querier-x86_64.wasm -c4a00302adc394d8b77f256a13044366ebdf479f912e0bc542bf2c4b92fa6b24 tokenfactory-x86_64.wasm +627f1b9fa7dfe105e427e1590caf817e072c27dfc1e211b2a60d4f9b64b4699f tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 7cb2863..08643f1 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,14 +1,14 @@ 93de0d82a62839b6a40da84d4779680c9024fd8d327958d89f52f637776db9b0 before_send_hook_test.wasm 8283af745174fb1da5c57be2daf0d5196e82050147f69a00a97e394d8fae4cbf client_updater.wasm -789bfba8d2eca0d512028a20e93eceb75e3299dee6305c83f650e861984a6743 dex.wasm -45b2441c2c986a4c033d993aa03f4a935af7e4f0e8c2806e8811ad42e7b07419 dex_stargate.wasm +68a040403ea054a332504fece09d0a667deb558367da3559b77ca00367778b35 dex.wasm +3164eff573ca6ba33da2c9cea60f05ebcc95d5b074c13aac9ee7d74d0e52ce31 dex_stargate.wasm 3f96305646e197cffda27778ce652af3ccdeaa2b1335c189bb9ffd173c091dd7 echo.wasm 9d6512f2a92a7344e4e4a971a7d384d96d6d3005529cde69efe4c8bd366d93b6 ibc_transfer.wasm fa4c789f63b19599ae8b7f9eca2d65e78ff06acb4c54ff7c92cae99e89f491bc msg_receiver.wasm d688c20c12961e5cf036c36a08e77842a29c1a96d170c3847b4c8bf5744216d1 neutron_price_feed_mock.wasm -5d3da04ebb10f5b0be70e4f94bb57dcb5afefb2a2f7617d76fc6f9bf077124dc neutron_interchain_queries.wasm -2085eca69d0bbc31f04fe8af08fa9cd8367310cb6422916bf3392fa005a615f3 neutron_interchain_txs.wasm -8bf47fedbb2d348060a6893189f9e28e40d265e2842b5b3dc21b4fb145534c66 neutron_validators_test.wasm -4a3ff5185068c5202a86f0a3356a0ec96d146d1b5153d00a753fc2ff9b3e102d reflect.wasm +9f885d9ac15b3f40eb032229fead1d5e046c08df116af98990e5a3d5d843eb44 neutron_interchain_queries.wasm +cdac75fd7efebd4450b1ded16b9839e1b5b0646831e337545343aa01da03c60b neutron_interchain_txs.wasm +2ddbbb885c191e7e9a0714971c8b1d48bc788e60fb4e2f56a625035152b51d9d neutron_validators_test.wasm +0e7a5f816d41d9ed27bbb42e298f87637962e80571f2b68ab9b4ba23854510f4 reflect.wasm 1e003a775e6ee818206912117dd7b57ffa759b2b8d18cd66837b8f7856994201 stargate_querier.wasm -83d66e3b5ef0df2c64d5ec6817672481755c396dd85956bf743dffd41cead9d6 tokenfactory.wasm +964135cb32e0c4e079f1a3bd037a04434e1cc225232d96999350b7401f089faf tokenfactory.wasm diff --git a/contracts/dex/examples/schema.rs b/contracts/dex/examples/schema.rs index 1ddfb52..e6413d9 100644 --- a/contracts/dex/examples/schema.rs +++ b/contracts/dex/examples/schema.rs @@ -17,7 +17,8 @@ use std::fs::create_dir_all; use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; use dex::contract::InstantiateMsg; -use neutron_sdk::bindings::{msg::DexMsg, query::DexQuery}; +use neutron_sdk::bindings::dex::msg::DexMsg; +use neutron_sdk::bindings::dex::query::DexQuery; fn main() { let mut out_dir = current_dir().unwrap(); diff --git a/contracts/dex/src/contract.rs b/contracts/dex/src/contract.rs index baaee28..5d0f732 100644 --- a/contracts/dex/src/contract.rs +++ b/contracts/dex/src/contract.rs @@ -8,20 +8,20 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct InstantiateMsg {} -use neutron_sdk::{ - bindings::{ - msg::{DexMsg, NeutronMsg}, - query::{ - AllInactiveLimitOrderTrancheResponse, AllLimitOrderTrancheResponse, - AllLimitOrderTrancheUserResponse, AllPoolMetadataResponse, AllPoolReservesResponse, - AllTickLiquidityResponse, AllUserDepositsResponse, AllUserLimitOrdersResponse, - DexQuery, EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, - InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, - LimitOrderTrancheUserResponse, NeutronQuery, ParamsResponse, PoolMetadataResponse, - PoolReservesResponse, PoolResponse, - }, + +use neutron_sdk::bindings::{ + dex::msg::DexMsg, + dex::query::{ + AllInactiveLimitOrderTrancheResponse, AllLimitOrderTrancheResponse, + AllLimitOrderTrancheUserResponse, AllPoolMetadataResponse, AllPoolReservesResponse, + AllTickLiquidityResponse, AllUserDepositsResponse, AllUserLimitOrdersResponse, DexQuery, + EstimateMultiHopSwapResponse, EstimatePlaceLimitOrderResponse, + InactiveLimitOrderTrancheResponse, LimitOrderTrancheResponse, + LimitOrderTrancheUserResponse, ParamsResponse, PoolMetadataResponse, PoolReservesResponse, + PoolResponse, }, - sudo::msg::SudoMsg, + msg::NeutronMsg, + query::NeutronQuery, }; const CONTRACT_NAME: &str = concat!("crates.io:neutron-contracts__", env!("CARGO_PKG_NAME")); @@ -39,15 +39,6 @@ pub fn instantiate( Ok(Response::default()) } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum ExecuteMsg { - Send { to: String, amount: u128 }, -} - -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] -pub struct MigrateMsg {} - #[entry_point] pub fn execute( deps: DepsMut, @@ -154,14 +145,3 @@ fn query_dex(deps: Deps, _env: Env, msg: DexQuery) -> StdResult StdResult { - Ok(Response::default()) -} - -#[entry_point] -pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult { - deps.api.debug("WASMDEBUG: migrate"); - Ok(Response::default()) -} diff --git a/contracts/dex/src/lib.rs b/contracts/dex/src/lib.rs index a8d2ff8..2943dbb 100644 --- a/contracts/dex/src/lib.rs +++ b/contracts/dex/src/lib.rs @@ -1,3 +1 @@ pub mod contract; -pub mod msg; -pub mod query; diff --git a/contracts/dex/src/msg.rs b/contracts/dex/src/msg.rs deleted file mode 100644 index 8b13789..0000000 --- a/contracts/dex/src/msg.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/contracts/dex/src/query.rs b/contracts/dex/src/query.rs deleted file mode 100644 index 228715b..0000000 --- a/contracts/dex/src/query.rs +++ /dev/null @@ -1,42 +0,0 @@ -use cosmwasm_std::{Binary, CustomQuery, QueryRequest}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum QueryMsg { - Reflect(QueryRequest), -} - -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum InterchainQueries { - InterchainQueryResult { - query_id: u64, - }, - InterchainAccountAddress { - owner_address: String, - interchain_account_id: String, - connection_id: String, - }, - RegisteredInterchainQueries {}, - RegisteredInterchainQuery { - query_id: u64, - }, - MinIbcFee {}, - FullDenom { - creator_addr: String, - subdenom: String, - }, - DenomAdmin { - subdenom: String, - }, -} - -impl CustomQuery for InterchainQueries {} - -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub struct ChainResponse { - pub data: Binary, -} diff --git a/contracts/dex_stargate/src/contract.rs b/contracts/dex_stargate/src/contract.rs index f9fa36c..32afbb9 100644 --- a/contracts/dex_stargate/src/contract.rs +++ b/contracts/dex_stargate/src/contract.rs @@ -220,11 +220,13 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { QueryMsg::AllUserDeposits { address, + include_pool_data, pagination, } => Ok(to_json_binary(&get_user_deposits_all( deps, AllUserDepositsRequest { address, + include_pool_data, pagination, }, )?)?), diff --git a/contracts/dex_stargate/src/msg.rs b/contracts/dex_stargate/src/msg.rs index f29115e..3e39506 100644 --- a/contracts/dex_stargate/src/msg.rs +++ b/contracts/dex_stargate/src/msg.rs @@ -80,6 +80,7 @@ pub enum QueryMsg { }, AllUserDeposits { address: String, + include_pool_data: bool, pagination: Option, }, AllTickLiquidity { From 323554104d2636ba6f90f95a6a1ff8796ea43a14 Mon Sep 17 00:00:00 2001 From: swelf Date: Fri, 23 Feb 2024 13:22:39 +0300 Subject: [PATCH 11/12] updated neutron-sdk --- Cargo.lock | 2 +- Cargo.toml | 2 +- artifacts/checksums.txt | 28 ++++++++++++++-------------- artifacts/checksums_intermediate.txt | 28 ++++++++++++++-------------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c05a7d8..889cd58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -615,7 +615,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.8.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=9625897f47ab440f6cad1f97f190243345d02938#9625897f47ab440f6cad1f97f190243345d02938" +source = "git+https://github.com/neutron-org/neutron-sdk.git?rev=47753dda9029209a70f6f213058e13447a5a8ffb#47753dda9029209a70f6f213058e13447a5a8ffb" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", diff --git a/Cargo.toml b/Cargo.toml index 9f71440..f6a2677 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "9625897f47ab440f6cad1f97f190243345d02938" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", rev = "47753dda9029209a70f6f213058e13447a5a8ffb" } #neutron-sdk = { path = "../neutron-sdk/packages/neutron-sdk/" } prost = "0.12.1" prost-types = "0.12.1" diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 0bdbcb3..fb2de7c 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1,14 +1,14 @@ -5b9df1c997336ced609f927a954a4dbcc7ebb0a8f030d9cfc10279a12516e74a before_send_hook_test-x86_64.wasm -155def36317e9f8c635021fbba3ad58f9552ac20951068a2260e6b95e635247e client_updater-x86_64.wasm -e830c4b64db92f9c611a668b93ab2c0a2743d488a3dae4d3c95a6b60d9687ece dex-x86_64.wasm -d5cc6e7378af10fc683136e9c1b122c68c7883afa9fbef80ce483758dc2c1d5d dex_stargate-x86_64.wasm -cd5eaf31c5a335059bd61e5c14bcf5037953073401aabb340e85b97b5c49be74 echo-x86_64.wasm -7b7e7f579e22aa9abe3c2c15f25de156c7066251d984b3398677c744c76793e5 ibc_transfer-x86_64.wasm -ae1893daad4438ebf5313d217c6677a62a697204959cadce233f2ad2aa9a4167 msg_receiver-x86_64.wasm -94860b2bcfe806162f0dacda4b9c7f661cdcfb287a8245eaae8fb18f26e7b126 neutron_price_feed_mock-x86_64.wasm -3b40c66c118e2aec169f0f97c33d89a6dfc2385460563800d5f82c4c0ffdd55b neutron_interchain_queries-x86_64.wasm -ad06889a15ddc02d98b7ee094553ab1794688a10175d199973d8f48429451822 neutron_interchain_txs-x86_64.wasm -446cfe34708cecbd6b41bcf4069a3c92166fad979e1625d822667c3bd621707a neutron_validators_test-x86_64.wasm -51cb4fa9df1ba7a0023aab00d8f0af128f9464fa778de7d46d409d9eb097709f reflect-x86_64.wasm -02c11ac4905ce906ceb4ed70a88f892e0d7efc6a54a8dfc5a1ec8313ff187ad6 stargate_querier-x86_64.wasm -627f1b9fa7dfe105e427e1590caf817e072c27dfc1e211b2a60d4f9b64b4699f tokenfactory-x86_64.wasm +cf31690dfd2478f42f55cea30fa3a9874f06cd328f736df3fdf687b5387e44fa before_send_hook_test-x86_64.wasm +d5e983d67abaac10be8b2e63391af00a2cae828f4b095e3f86b1330d2304c44b client_updater-x86_64.wasm +3b290fbf64137be653ff1452ec3a101f360f10cff521b569c3fcc54a1455a46e dex-x86_64.wasm +e85798953e4b1ddd5561ab75c8330646043259bd5eb5cdadee6214e05f37ac2a dex_stargate-x86_64.wasm +45f13bb2a934f5c95c634dd12da9d95d0aeef498c08b81c0de1009fb90d65306 echo-x86_64.wasm +ef21b5544bd40a188198c6e2c88477c8d223562e7ded42e3773e3c62b07154ac ibc_transfer-x86_64.wasm +6ebaf70045ce390df28db83a65be6a1dfac46626d7242268d7d95f82c70d2855 msg_receiver-x86_64.wasm +0e59719cf88bc458011630af1b6b724f1e3c74eb440e92a117d1525088d4793f neutron_price_feed_mock-x86_64.wasm +11cee5c2a11bff1a0e41a0f3cfe3061adb909670bb29dd45daed9831ba34c133 neutron_interchain_queries-x86_64.wasm +5442356c8780004821e4690eb8547b4fdbcd9134ad4eb94cc5e9e2decb65fd82 neutron_interchain_txs-x86_64.wasm +b2f6dde6d73b39d6d9ab778632af600e172ecf44dc02159095325e92e18663ae neutron_validators_test-x86_64.wasm +4884f1ce16c7fd854d4e9900dc5ff6c67c7b18588eab6de4a162a116f7735af7 reflect-x86_64.wasm +c4c6e59c08048d5c1275d2a35a84a5b91862b827012704415ed5aa56363a362e stargate_querier-x86_64.wasm +d146050aca63e1a52932675a67dfd4aa9a23948383fbad275cc7ffb0ef1b2145 tokenfactory-x86_64.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt index 08643f1..d2c3d6b 100644 --- a/artifacts/checksums_intermediate.txt +++ b/artifacts/checksums_intermediate.txt @@ -1,14 +1,14 @@ -93de0d82a62839b6a40da84d4779680c9024fd8d327958d89f52f637776db9b0 before_send_hook_test.wasm -8283af745174fb1da5c57be2daf0d5196e82050147f69a00a97e394d8fae4cbf client_updater.wasm -68a040403ea054a332504fece09d0a667deb558367da3559b77ca00367778b35 dex.wasm -3164eff573ca6ba33da2c9cea60f05ebcc95d5b074c13aac9ee7d74d0e52ce31 dex_stargate.wasm -3f96305646e197cffda27778ce652af3ccdeaa2b1335c189bb9ffd173c091dd7 echo.wasm -9d6512f2a92a7344e4e4a971a7d384d96d6d3005529cde69efe4c8bd366d93b6 ibc_transfer.wasm -fa4c789f63b19599ae8b7f9eca2d65e78ff06acb4c54ff7c92cae99e89f491bc msg_receiver.wasm -d688c20c12961e5cf036c36a08e77842a29c1a96d170c3847b4c8bf5744216d1 neutron_price_feed_mock.wasm -9f885d9ac15b3f40eb032229fead1d5e046c08df116af98990e5a3d5d843eb44 neutron_interchain_queries.wasm -cdac75fd7efebd4450b1ded16b9839e1b5b0646831e337545343aa01da03c60b neutron_interchain_txs.wasm -2ddbbb885c191e7e9a0714971c8b1d48bc788e60fb4e2f56a625035152b51d9d neutron_validators_test.wasm -0e7a5f816d41d9ed27bbb42e298f87637962e80571f2b68ab9b4ba23854510f4 reflect.wasm -1e003a775e6ee818206912117dd7b57ffa759b2b8d18cd66837b8f7856994201 stargate_querier.wasm -964135cb32e0c4e079f1a3bd037a04434e1cc225232d96999350b7401f089faf tokenfactory.wasm +732392426c1160ea1899955ee7ea263db5d5023fd601115c2039dfa9df648738 before_send_hook_test.wasm +52b18e18dd1782d46e425acfc82d0a88de5153834fbeec5e9db83703e2e05153 client_updater.wasm +01ab3c76b0f34dba1f52d8bb3a827deed26b295138f9ee01733842f408d1b909 dex.wasm +ca2ec2b77a90c2b2a76fb9cc59256e571ffe76ae3c9f6ee72838715153e89fd2 dex_stargate.wasm +212e7034418b28abacbf393438f0c509cbad294be51153a38a8288c95b67a67a echo.wasm +bfa8799864fba19455f1a11301d4312e22c17bd4019826e8ba5f9dd4e9a456d3 ibc_transfer.wasm +42ac2bd34a8a4e7c9db0a28592354e9eb000d5c0d644e160b9064f20d8873240 msg_receiver.wasm +4d2ec7085a1dd6e8a4eab15a15580b7343ddde273c1a6471622c632573361343 neutron_price_feed_mock.wasm +a35efe4e5ddcbddccfcf0e13385cd7aa9b95da642a67441bb9b1301041bd8ea2 neutron_interchain_queries.wasm +8763335f18eff836ee0797ada8d5362eaddcd72ee2cafaebe71dfef7d4595aed neutron_interchain_txs.wasm +4aa23ebc76c3fe48c451b19b4a8076476ead1dd74dc964ca67b30efb09857e72 neutron_validators_test.wasm +d4c10fb536cb64ca91be931efa24682e85e6ff3c0a58d440390a9e820bd0d049 reflect.wasm +a782e7867ec0dddac3d7684f5e9e106dbff475ff1cf9c355626acc8cf9018928 stargate_querier.wasm +dbdde027d2071120270f1f53bd87fdd7eff844b34b98facbcd8c7172e4c7d502 tokenfactory.wasm From 46b58e7d4249dc0806dd74616952f7a4974b68d4 Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Wed, 20 Mar 2024 10:57:35 +0200 Subject: [PATCH 12/12] main branch of neutron-sdk --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7a9e83..d849109 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -615,7 +615,7 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.9.0" -source = "git+https://github.com/neutron-org/neutron-sdk.git?branch=feat/cw-dex-bindings#ee81d282ed2967c1616f87353083363598097df8" +source = "git+https://github.com/neutron-org/neutron-sdk.git?branch=main#8645132d09229f717d13bcc5fd74b0886c0c9c31" dependencies = [ "bech32", "cosmos-sdk-proto 0.20.0", diff --git a/Cargo.toml b/Cargo.toml index 1adfa9f..f57b145 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", branch = "feat/cw-dex-bindings" } +neutron-sdk = { git = "https://github.com/neutron-org/neutron-sdk.git", branch = "main" } prost = "0.12.1" prost-types = "0.12.1" cosmos-sdk-proto = { version = "0.20.0", default-features = false }