From d6fe61bd9c0325a58cb01fdeb332c3f0641c3b73 Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Mon, 2 Sep 2024 22:58:46 +0300 Subject: [PATCH 1/2] neutron-std --- Cargo.lock | 883 +++--------------- Cargo.toml | 3 +- Makefile | 2 +- contracts/dex_grpc/Cargo.toml | 7 +- contracts/dex_grpc/src/contract.rs | 2 +- contracts/dex_grpc/src/msg.rs | 6 +- contracts/grpc_querier/Cargo.toml | 7 +- contracts/grpc_querier/src/contract.rs | 2 +- contracts/grpc_querier/src/grpc.rs | 5 +- contracts/ibc_transfer/Cargo.toml | 7 +- contracts/ibc_transfer/src/contract.rs | 2 +- contracts/neutron_interchain_txs/Cargo.toml | 7 +- .../neutron_interchain_txs/src/contract.rs | 6 +- contracts/neutron_validator_test/Cargo.toml | 7 +- .../neutron_validator_test/src/contract.rs | 2 +- rust-toolchain.toml | 2 +- 16 files changed, 190 insertions(+), 760 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f705c14..93a712b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,17 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -78,7 +67,7 @@ dependencies = [ "ark-serialize", "ark-std", "derivative", - "digest 0.10.7", + "digest", "itertools 0.10.5", "num-bigint", "num-traits", @@ -132,7 +121,7 @@ checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", "ark-std", - "digest 0.10.7", + "digest", "num-bigint", ] @@ -158,77 +147,24 @@ dependencies = [ "rayon", ] -[[package]] -name = "astroport" -version = "5.2.0" -source = "git+https://github.com/astroport-fi/astroport-core#4d3be0ee470ca27ae7da2feba1dcf95b73bba799" -dependencies = [ - "astroport-circular-buffer", - "cosmos-sdk-proto 0.19.0", - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-asset", - "cw-storage-plus 1.2.0", - "cw-utils", - "cw20", - "itertools 0.12.1", - "prost 0.11.9", - "uint", -] - -[[package]] -name = "astroport-circular-buffer" -version = "0.2.0" -source = "git+https://github.com/astroport-fi/astroport-core#4d3be0ee470ca27ae7da2feba1dcf95b73bba799" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-storage-plus 1.2.0", - "thiserror", -] - [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "balance-tracker" -version = "0.1.0" -dependencies = [ - "astroport", - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-storage-plus 1.2.0", - "cw2 1.1.2", - "thiserror", -] - [[package]] name = "base16ct" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - [[package]] name = "bech32" version = "0.9.1" @@ -241,26 +177,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" -[[package]] -name = "before-send-hook-test" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "schemars", - "serde", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -270,12 +186,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bnum" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" - [[package]] name = "bnum" version = "0.11.0" @@ -290,9 +200,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -312,208 +222,115 @@ dependencies = [ "num-traits", ] -[[package]] -name = "client_updater" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", -] - [[package]] name = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "cosmos-sdk-proto" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" -dependencies = [ - "prost 0.11.9", - "prost-types 0.11.9", - "tendermint-proto 0.32.2", -] - [[package]] name = "cosmos-sdk-proto" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ - "prost 0.12.6", - "prost-types 0.12.6", - "tendermint-proto 0.34.1", + "prost", + "prost-types", + "tendermint-proto", ] [[package]] name = "cosmwasm-core" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d075f6bb1483a6ce83b5cbc73a3a1207e0316ac1e34ed1f2a4d9fc3a0f07bf6" - -[[package]] -name = "cosmwasm-crypto" -version = "1.5.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6aa9f904de106fa16443ad14ec2abe75e94ba003bb61c681c0e43d4c58d2a" -dependencies = [ - "digest 0.10.7", - "ecdsa", - "ed25519-zebra 3.1.0", - "k256", - "rand_core 0.6.4", - "thiserror", -] +checksum = "d905990ef3afb5753bb709dc7de88e9e370aa32bcc2f31731d4b533b63e82490" [[package]] name = "cosmwasm-crypto" -version = "2.1.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ced5a6dd2801a383d3e14e5ae5caa7fdfeff1bd9f22b30e810e0aded8a5869" +checksum = "5b2a7bd9c1dd9a377a4dc0f4ad97d24b03c33798cd5a6d7ceb8869b41c5d2f2d" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ff", "ark-serialize", "cosmwasm-core", - "digest 0.10.7", + "digest", "ecdsa", - "ed25519-zebra 4.0.3", + "ed25519-zebra", "k256", "num-traits", "p256", - "rand_core 0.6.4", + "rand_core", "rayon", - "sha2 0.10.8", + "sha2", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" -dependencies = [ - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-derive" -version = "2.1.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd1873f84d9b17edf8a90ffe10a89a649b82feacc00e36788b81d2c3cbf03c" +checksum = "029910b409398fdf81955d7301b906caf81f2c42b013ea074fbd89720229c424" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "cosmwasm-schema" -version = "1.5.5" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7879036156092ad1c22fe0d7316efc5a5eceec2bc3906462a2560215f2a2f929" +checksum = "4bc0d4d85e83438ab9a0fea9348446f7268bc016aacfebce37e998559f151294" dependencies = [ - "cosmwasm-schema-derive 1.5.5", + "cosmwasm-schema-derive", "schemars", "serde", "serde_json", "thiserror", ] -[[package]] -name = "cosmwasm-schema" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27984b137eb2ac561f97f6bdb02004a98eb6f2ba263062c140b8e231ee1826b7" -dependencies = [ - "cosmwasm-schema-derive 2.1.0", - "schemars", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cosmwasm-schema-derive" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb57855fbfc83327f8445ae0d413b1a05ac0d68c396ab4d122b2abd7bb82cb6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "cosmwasm-schema-derive" -version = "2.1.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ef0d201f611bdb6c9124207032423eb956f1fc8ab3e3ee7253a9c08a5f5809" +checksum = "edf5c8adac41bb7751c050d7c4c18675be19ee128714454454575e894424eeef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "cosmwasm-std" -version = "1.5.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad011ae7447188e26e4a7dbca2fcd0fc186aa21ae5c86df0503ea44c78f9e469" +checksum = "51dec99a2e478715c0a4277f0dbeadbb8466500eb7dec873d0924edd086e77f1" dependencies = [ - "base64 0.21.7", - "bech32 0.9.1", - "bnum 0.8.1", - "cosmwasm-crypto 1.5.2", - "cosmwasm-derive 1.5.5", - "derivative", - "forward_ref", - "hex", - "schemars", - "serde", - "serde-json-wasm 0.5.2", - "sha2 0.10.8", - "static_assertions", - "thiserror", -] - -[[package]] -name = "cosmwasm-std" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2522fb5c9a0409712bb1d036128bccf3564e6b2ac82f942ae4cf3c8df3e26fa8" -dependencies = [ - "base64 0.22.1", + "base64", "bech32 0.11.0", - "bnum 0.11.0", + "bnum", "cosmwasm-core", - "cosmwasm-crypto 2.1.0", - "cosmwasm-derive 2.1.0", + "cosmwasm-crypto", + "cosmwasm-derive", "derive_more", "hex", - "rand_core 0.6.4", + "rand_core", "schemars", "serde", - "serde-json-wasm 1.0.1", - "sha2 0.10.8", + "serde-json-wasm", + "sha2", "static_assertions", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -543,12 +360,6 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -556,7 +367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -571,19 +382,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -593,7 +391,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "rustc_version", "subtle", @@ -608,41 +406,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", -] - -[[package]] -name = "cw-address-like" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451a4691083a88a3c0630a8a88799e9d4cd6679b7ce8ff22b8da2873ff31d380" -dependencies = [ - "cosmwasm-std 1.5.2", -] - -[[package]] -name = "cw-asset" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c999a12f8cd8736f6f86e9a4ede5905530cb23cfdef946b9da1c506ad1b70799" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-address-like", - "cw-storage-plus 1.2.0", - "cw20", - "thiserror", -] - -[[package]] -name = "cw-storage-plus" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" -dependencies = [ - "cosmwasm-std 1.5.2", - "schemars", - "serde", + "syn 2.0.77", ] [[package]] @@ -651,69 +415,26 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" dependencies = [ - "cosmwasm-std 2.1.0", + "cosmwasm-std", "schemars", "serde", ] -[[package]] -name = "cw-utils" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw2 1.1.2", - "schemars", - "semver", - "serde", - "thiserror", -] - -[[package]] -name = "cw2" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-storage-plus 1.2.0", - "schemars", - "semver", - "serde", - "thiserror", -] - [[package]] name = "cw2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b04852cd38f044c0751259d5f78255d07590d136b8a86d4e09efdd7666bd6d27" dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", "schemars", "semver", "serde", "thiserror", ] -[[package]] -name = "cw20" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 1.5.2", - "cw-utils", - "schemars", - "serde", -] - [[package]] name = "der" version = "0.7.9" @@ -746,68 +467,32 @@ dependencies = [ [[package]] name = "derive_more" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0-beta.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", "unicode-xid", ] -[[package]] -name = "dex" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", -] - -[[package]] -name = "dex_grpc" -version = "0.1.0" -dependencies = [ - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", - "neutron-sdk", - "prost 0.12.6", - "prost-types 0.12.6", - "schemars", - "serde", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -826,21 +511,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest 0.10.7", + "digest", "elliptic-curve", "rfc6979", "signature", - "spki", -] - -[[package]] -name = "echo" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "schemars", - "serde", ] [[package]] @@ -852,41 +526,26 @@ dependencies = [ "signature", ] -[[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" -dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", -] - [[package]] name = "ed25519-zebra" version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.3", + "curve25519-dalek", "ed25519", "hashbrown 0.14.5", "hex", - "rand_core 0.6.4", - "sha2 0.10.8", + "rand_core", + "sha2", "zeroize", ] [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -896,12 +555,11 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest 0.10.7", + "digest", "ff", "generic-array", "group", - "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -913,7 +571,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -932,12 +590,6 @@ dependencies = [ "paste", ] -[[package]] -name = "forward_ref" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" - [[package]] name = "generic-array" version = "0.14.7" @@ -967,7 +619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -975,23 +627,15 @@ dependencies = [ name = "grpc_querier" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", + "cosmwasm-schema", + "cosmwasm-std", + "cw2", "neutron-sdk", - "prost 0.12.6", + "neutron-std", + "prost", "schemars", "serde", - "serde-json-wasm 1.0.1", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", + "serde-json-wasm", ] [[package]] @@ -1000,7 +644,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash", ] [[package]] @@ -1009,7 +653,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] @@ -1031,21 +675,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "ibc_transfer" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", - "serde-json-wasm 1.0.1", + "digest", ] [[package]] @@ -1081,138 +711,80 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", + "sha2", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] -name = "marketmap" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", -] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "msg_receiver" -version = "0.1.0" +name = "neutron-sdk" +version = "0.11.0" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=chore/neutron-std#bc7df7ae88e3f307a0b643652d2aea04d1f82a4a" dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", + "bech32 0.9.1", + "chrono", + "cosmos-sdk-proto", + "cosmwasm-schema", + "cosmwasm-std", + "prost", + "prost-types", + "protobuf", "schemars", "serde", -] - -[[package]] -name = "neutron-price-feed-mock" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", + "serde-cw-value", + "serde-json-wasm", + "serde_json", + "speedate", + "tendermint-proto", "thiserror", ] [[package]] -name = "neutron-sdk" -version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#240ab2cce961e67b3dfa90c137eb64a6d15c1824" +name = "neutron-std" +version = "4.2.2" +source = "git+https://github.com/neutron-org/neutron-std?branch=main#895e303fad4e152317fd3dee4f22880bfde55bc6" dependencies = [ "bech32 0.9.1", "chrono", - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", + "cosmos-sdk-proto", + "cosmwasm-schema", + "cosmwasm-std", "neutron-std-derive", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "protobuf", "schemars", "serde", "serde-cw-value", - "serde-json-wasm 1.0.1", + "serde-json-wasm", "serde_json", "speedate", - "tendermint-proto 0.34.1", + "tendermint-proto", "thiserror", ] [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#240ab2cce961e67b3dfa90c137eb64a6d15c1824" +source = "git+https://github.com/neutron-org/neutron-std?branch=main#895e303fad4e152317fd3dee4f22880bfde55bc6" dependencies = [ "itertools 0.10.5", "proc-macro2", - "prost-types 0.12.6", + "prost-types", "quote", "syn 1.0.109", ] -[[package]] -name = "neutron_interchain_queries" -version = "0.1.0" -dependencies = [ - "base64 0.21.7", - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", - "prost 0.12.6", - "schemars", - "serde", - "serde-json-wasm 1.0.1", -] - -[[package]] -name = "neutron_interchain_txs" -version = "0.1.0" -dependencies = [ - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", - "prost 0.12.6", - "prost-types 0.12.6", - "schemars", - "serde", - "serde-json-wasm 1.0.1", -] - -[[package]] -name = "neutron_validators_test" -version = "0.1.0" -dependencies = [ - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", - "serde-json-wasm 1.0.1", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -1264,24 +836,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "oracle" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", -] - [[package]] name = "p256" version = "0.13.2" @@ -1291,7 +845,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -1300,16 +854,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -1318,9 +862,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "primeorder" @@ -1333,23 +880,13 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes", - "prost-derive 0.11.9", -] - [[package]] name = "prost" version = "0.12.6" @@ -1357,20 +894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive 0.12.6", -] - -[[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", + "prost-derive", ] [[package]] @@ -1380,19 +904,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.66", -] - -[[package]] -name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" -dependencies = [ - "prost 0.11.9", + "syn 2.0.77", ] [[package]] @@ -1401,7 +916,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost 0.12.6", + "prost", ] [[package]] @@ -1426,9 +941,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1440,7 +955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -1450,15 +965,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" - [[package]] name = "rand_core" version = "0.6.4" @@ -1488,18 +997,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "reflect" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw2 2.0.0", - "neutron-sdk", - "schemars", - "serde", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -1512,9 +1009,9 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -1552,7 +1049,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] @@ -1564,7 +1061,6 @@ dependencies = [ "base16ct", "der", "generic-array", - "pkcs8", "subtle", "zeroize", ] @@ -1577,9 +1073,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -1593,15 +1089,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde-json-wasm" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" -dependencies = [ - "serde", -] - [[package]] name = "serde-json-wasm" version = "1.0.1" @@ -1613,22 +1100,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] @@ -1639,33 +1126,21 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.8" @@ -1674,7 +1149,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -1683,8 +1158,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "digest", + "rand_core", ] [[package]] @@ -1697,16 +1172,6 @@ dependencies = [ "strum_macros", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -1732,14 +1197,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-encoding" @@ -1763,33 +1228,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "tendermint-proto" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost 0.11.9", - "prost-types 0.11.9", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - [[package]] name = "tendermint-proto" version = "0.34.1" @@ -1800,8 +1247,8 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.12.6", - "prost-types 0.12.6", + "prost", + "prost-types", "serde", "serde_bytes", "subtle-encoding", @@ -1810,22 +1257,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] @@ -1857,35 +1304,12 @@ dependencies = [ "time-core", ] -[[package]] -name = "tokenfactory" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "neutron-sdk", - "schemars", - "serde", -] - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicode-ident" version = "1.0.12" @@ -1894,15 +1318,15 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -1916,6 +1340,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -1927,7 +1352,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] @@ -1947,5 +1372,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index dc9f388..e52c312 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,8 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "main" } +neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "chore/neutron-std" } +neutron-std = { package = "neutron-std", git = "https://github.com/neutron-org/neutron-std", branch = "main" } prost = "0.12.4" prost-types = "0.12.4" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/Makefile b/Makefile index 0942ee6..7f2ba67 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ compile: --mount type=volume,source="$(notdir $(CURDIR))_cache",target=/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ --platform linux/amd64 \ - cosmwasm/workspace-optimizer:0.15.0 + cosmwasm/workspace-optimizer:0.16.0 check_contracts: @cargo install cosmwasm-check --version 2.0.4 --locked diff --git a/contracts/dex_grpc/Cargo.toml b/contracts/dex_grpc/Cargo.toml index 90fc9d6..ce3e33e 100644 --- a/contracts/dex_grpc/Cargo.toml +++ b/contracts/dex_grpc/Cargo.toml @@ -5,9 +5,9 @@ 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", + # 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 @@ -32,6 +32,7 @@ library = [] [dependencies] neutron-sdk = { workspace = true } +neutron-std = { workspace = true } cosmwasm-std = { workspace = true } cw2 = { workspace = true } schemars = { workspace = true } diff --git a/contracts/dex_grpc/src/contract.rs b/contracts/dex_grpc/src/contract.rs index 42b444f..e7936c2 100644 --- a/contracts/dex_grpc/src/contract.rs +++ b/contracts/dex_grpc/src/contract.rs @@ -4,8 +4,8 @@ use cosmwasm_std::{ StdResult, }; use cw2::set_contract_version; -use neutron_sdk::proto_types::neutron::dex; use neutron_sdk::sudo::msg::SudoMsg; +use neutron_std::types::neutron::dex; const CONTRACT_NAME: &str = concat!("crates.io:neutron-contracts__", env!("CARGO_PKG_NAME")); const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/contracts/dex_grpc/src/msg.rs b/contracts/dex_grpc/src/msg.rs index 1b8abc8..d7c2fde 100644 --- a/contracts/dex_grpc/src/msg.rs +++ b/contracts/dex_grpc/src/msg.rs @@ -1,6 +1,6 @@ -use neutron_sdk::proto_types::neutron::dex::{DepositOptions, MultiHopRoute}; -use neutron_sdk::proto_types::{cosmos::base::query::v1beta1::PageRequest, neutron::dex}; -use neutron_sdk::shim::Timestamp; +use neutron_std::shim::Timestamp; +use neutron_std::types::neutron::dex::{DepositOptions, MultiHopRoute}; +use neutron_std::types::{cosmos::base::query::v1beta1::PageRequest, neutron::dex}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/contracts/grpc_querier/Cargo.toml b/contracts/grpc_querier/Cargo.toml index a0f76f1..ac040f8 100644 --- a/contracts/grpc_querier/Cargo.toml +++ b/contracts/grpc_querier/Cargo.toml @@ -5,9 +5,9 @@ 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", + # 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 @@ -26,6 +26,7 @@ schemars = { workspace = true } serde = { workspace = true } serde-json-wasm = { workspace = true } neutron-sdk = { workspace = true } +neutron-std = { workspace = true } prost = { workspace = true } [dev-dependencies] diff --git a/contracts/grpc_querier/src/contract.rs b/contracts/grpc_querier/src/contract.rs index adee891..1c5417e 100644 --- a/contracts/grpc_querier/src/contract.rs +++ b/contracts/grpc_querier/src/contract.rs @@ -7,7 +7,7 @@ use std::str::from_utf8; use crate::grpc; use cw2::set_contract_version; -use neutron_sdk::proto_types::{ +use neutron_std::types::{ cosmos::{auth, bank}, ibc::{ applications::transfer, diff --git a/contracts/grpc_querier/src/grpc.rs b/contracts/grpc_querier/src/grpc.rs index 647311e..b9c4058 100644 --- a/contracts/grpc_querier/src/grpc.rs +++ b/contracts/grpc_querier/src/grpc.rs @@ -10,8 +10,7 @@ pub mod contractmanager { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - ::neutron_sdk::proto_types::cosmos::base::query::v1beta1::PageRequest, - >, + pub pagination: + ::core::option::Option<::neutron_std::types::cosmos::base::query::v1beta1::PageRequest>, } } diff --git a/contracts/ibc_transfer/Cargo.toml b/contracts/ibc_transfer/Cargo.toml index 6379685..45bd6a4 100644 --- a/contracts/ibc_transfer/Cargo.toml +++ b/contracts/ibc_transfer/Cargo.toml @@ -5,9 +5,9 @@ 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", + # 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 @@ -27,6 +27,7 @@ serde = { workspace = true } serde-json-wasm = { workspace = true } cw-storage-plus = { workspace = true } neutron-sdk = { workspace = true } +neutron-std = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } diff --git a/contracts/ibc_transfer/src/contract.rs b/contracts/ibc_transfer/src/contract.rs index d8ee8e4..f7dac56 100644 --- a/contracts/ibc_transfer/src/contract.rs +++ b/contracts/ibc_transfer/src/contract.rs @@ -4,11 +4,11 @@ use cosmwasm_std::{ }; use cw2::set_contract_version; use neutron_sdk::interchain_txs::helpers::decode_message_response; -use neutron_sdk::proto_types::neutron::transfer::MsgTransferResponse; use neutron_sdk::{ bindings::msg::{IbcFee, NeutronMsg}, sudo::msg::{RequestPacket, RequestPacketTimeoutHeight, TransferSudoMsg}, }; +use neutron_std::types::neutron::transfer::MsgTransferResponse; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/contracts/neutron_interchain_txs/Cargo.toml b/contracts/neutron_interchain_txs/Cargo.toml index 6ab180b..a58aa7e 100644 --- a/contracts/neutron_interchain_txs/Cargo.toml +++ b/contracts/neutron_interchain_txs/Cargo.toml @@ -5,9 +5,9 @@ authors = ["ratik "] 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", + # 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 @@ -27,6 +27,7 @@ serde-json-wasm = { workspace = true } cw-storage-plus = { workspace = true } cosmos-sdk-proto = { workspace = true } neutron-sdk = { workspace = true } +neutron-std = { workspace = true } prost = { workspace = true } prost-types = { workspace = true } diff --git a/contracts/neutron_interchain_txs/src/contract.rs b/contracts/neutron_interchain_txs/src/contract.rs index 20ff287..f2d927e 100644 --- a/contracts/neutron_interchain_txs/src/contract.rs +++ b/contracts/neutron_interchain_txs/src/contract.rs @@ -39,11 +39,11 @@ use neutron_sdk::bindings::query::{NeutronQuery, QueryInterchainAccountAddressRe use neutron_sdk::bindings::types::ProtobufAny; use neutron_sdk::interchain_txs::helpers::{decode_message_response, get_port_id}; use neutron_sdk::interchain_txs::v047::helpers::decode_acknowledgement_response; -use neutron_sdk::proto_types::neutron::interchaintxs::v1::{ - MsgRegisterInterchainAccountResponse, MsgSubmitTxResponse, -}; use neutron_sdk::sudo::msg::{RequestPacket, SudoMsg}; use neutron_sdk::NeutronResult; +use neutron_std::types::neutron::interchaintxs::v1::{ + MsgRegisterInterchainAccountResponse, MsgSubmitTxResponse, +}; use crate::storage::{ add_error_to_queue, read_errors_from_queue, read_reply_payload, read_sudo_payload, diff --git a/contracts/neutron_validator_test/Cargo.toml b/contracts/neutron_validator_test/Cargo.toml index 60b7be8..b6e1ad8 100644 --- a/contracts/neutron_validator_test/Cargo.toml +++ b/contracts/neutron_validator_test/Cargo.toml @@ -5,9 +5,9 @@ authors = ["ratik "] 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", + # 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 @@ -27,6 +27,7 @@ serde-json-wasm = { workspace = true } cw-storage-plus = { workspace = true } cosmos-sdk-proto = { workspace = true } neutron-sdk = { workspace = true } +neutron-std = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } diff --git a/contracts/neutron_validator_test/src/contract.rs b/contracts/neutron_validator_test/src/contract.rs index 9288521..a44f8dc 100644 --- a/contracts/neutron_validator_test/src/contract.rs +++ b/contracts/neutron_validator_test/src/contract.rs @@ -48,9 +48,9 @@ use neutron_sdk::interchain_queries::v045::{ }; use neutron_sdk::interchain_txs::helpers::{decode_message_response, get_port_id}; use neutron_sdk::interchain_txs::v047::helpers::decode_acknowledgement_response; -use neutron_sdk::proto_types::neutron::interchaintxs::v1::MsgSubmitTxResponse; use neutron_sdk::sudo::msg::{RequestPacket, SudoMsg}; use neutron_sdk::{NeutronError, NeutronResult}; +use neutron_std::types::neutron::interchaintxs::v1::MsgSubmitTxResponse; use crate::storage::{ read_reply_payload, read_sudo_payload, save_reply_payload, save_sudo_payload, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 8142c30..5198580 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.73.0" +channel = "1.78.0" From a9ab4c2f0b6e82f4bf43811e5ec4b36a4dcaca92 Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Mon, 7 Oct 2024 14:42:06 +0300 Subject: [PATCH 2/2] wip --- Cargo.lock | 7 ++++--- Cargo.toml | 2 +- contracts/dex_grpc/src/contract.rs | 1 + contracts/oracle/Cargo.toml | 7 ++++--- contracts/oracle/src/contract.rs | 26 ++++++++++---------------- 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 365d55a..f70464b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1161,8 +1161,8 @@ dependencies = [ [[package]] name = "neutron-std" -version = "4.2.2" -source = "git+https://github.com/neutron-org/neutron-std?branch=main#895e303fad4e152317fd3dee4f22880bfde55bc6" +version = "4.2.2-rc" +source = "git+https://github.com/neutron-org/neutron-std?branch=feat/connect#85cc4e832fd885c6316df3b1f517f5e0aaaf2d0e" dependencies = [ "bech32 0.9.1", "chrono", @@ -1186,7 +1186,7 @@ dependencies = [ [[package]] name = "neutron-std-derive" version = "0.20.1" -source = "git+https://github.com/neutron-org/neutron-std?branch=main#895e303fad4e152317fd3dee4f22880bfde55bc6" +source = "git+https://github.com/neutron-org/neutron-std?branch=feat/connect#85cc4e832fd885c6316df3b1f517f5e0aaaf2d0e" dependencies = [ "itertools 0.10.5", "proc-macro2", @@ -1311,6 +1311,7 @@ dependencies = [ "cosmwasm-std 2.1.3", "cw2 2.0.0", "neutron-sdk", + "neutron-std", "schemars", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index e52c312..121f7f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ overflow-checks = true [workspace.dependencies] neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "chore/neutron-std" } -neutron-std = { package = "neutron-std", git = "https://github.com/neutron-org/neutron-std", branch = "main" } +neutron-std = { package = "neutron-std", git = "https://github.com/neutron-org/neutron-std", branch = "feat/connect" } prost = "0.12.4" prost-types = "0.12.4" cosmos-sdk-proto = { version = "0.20.0", default-features = false } diff --git a/contracts/dex_grpc/src/contract.rs b/contracts/dex_grpc/src/contract.rs index e7936c2..4ab8464 100644 --- a/contracts/dex_grpc/src/contract.rs +++ b/contracts/dex_grpc/src/contract.rs @@ -133,6 +133,7 @@ pub fn execute( } } +#[allow(deprecated)] #[entry_point] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { deps.api diff --git a/contracts/oracle/Cargo.toml b/contracts/oracle/Cargo.toml index 603ddc9..f4112a9 100644 --- a/contracts/oracle/Cargo.toml +++ b/contracts/oracle/Cargo.toml @@ -5,9 +5,9 @@ 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", + # 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 @@ -36,6 +36,7 @@ cw2 = { workspace = true } schemars = { workspace = true } serde = { version = "1.0.180", default-features = false, features = ["derive"] } neutron-sdk = { workspace = true } +neutron-std = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } diff --git a/contracts/oracle/src/contract.rs b/contracts/oracle/src/contract.rs index fd78e97..a6c56a3 100644 --- a/contracts/oracle/src/contract.rs +++ b/contracts/oracle/src/contract.rs @@ -12,13 +12,9 @@ pub struct InstantiateMsg {} #[serde(rename_all = "snake_case")] pub enum ExecuteMsg {} -use neutron_sdk::bindings::{ - msg::NeutronMsg, - oracle::query::{ - GetAllCurrencyPairsResponse, GetPriceResponse, GetPricesResponse, OracleQuery, - }, - query::NeutronQuery, -}; +use neutron_sdk::bindings::{msg::NeutronMsg, oracle::query::OracleQuery, query::NeutronQuery}; + +use neutron_std::types::connect::oracle::v2::OracleQuerier; const CONTRACT_NAME: &str = concat!("crates.io:neutron-contracts__", env!("CARGO_PKG_NAME")); const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -51,18 +47,16 @@ pub fn query(deps: Deps, env: Env, msg: OracleQuery) -> StdResult< } fn query_oracle(deps: Deps, _env: Env, msg: OracleQuery) -> StdResult { + let oracle_querier = OracleQuerier::new(&deps.querier); match msg { - OracleQuery::GetPrice { .. } => { - let query_response: GetPriceResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) - } - OracleQuery::GetPrices { .. } => { - let query_response: GetPricesResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) + OracleQuery::GetPrice { currency_pair } => to_json_binary( + &oracle_querier.get_price(format!("{}/{}", currency_pair.base, currency_pair.quote))?, + ), + OracleQuery::GetPrices { currency_pair_ids } => { + to_json_binary(&oracle_querier.get_prices(currency_pair_ids)?) } OracleQuery::GetAllCurrencyPairs { .. } => { - let query_response: GetAllCurrencyPairsResponse = deps.querier.query(&msg.into())?; - to_json_binary(&query_response) + to_json_binary(&oracle_querier.get_all_currency_pairs()?) } } }