diff --git a/Cargo.lock b/Cargo.lock index 365d55a..f3bbcb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,9 +33,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "ark-bls12-381" @@ -160,13 +160,13 @@ dependencies = [ [[package]] name = "astroport" -version = "5.3.0" -source = "git+https://github.com/astroport-fi/astroport-core#8bb2e109cfb717bee2cdd1495f385d2db1e8726d" +version = "5.5.0" +source = "git+https://github.com/astroport-fi/astroport-core#b9566f26ed21c85904a866697fb3cc13e9096478" dependencies = [ "astroport-circular-buffer", "cosmos-sdk-proto 0.19.0", - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-asset", "cw-storage-plus 1.2.0", "cw-utils", @@ -179,27 +179,27 @@ dependencies = [ [[package]] name = "astroport-circular-buffer" version = "0.2.0" -source = "git+https://github.com/astroport-fi/astroport-core#8bb2e109cfb717bee2cdd1495f385d2db1e8726d" +source = "git+https://github.com/astroport-fi/astroport-core#b9566f26ed21c85904a866697fb3cc13e9096478" dependencies = [ - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-storage-plus 1.2.0", "thiserror", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "balance-tracker" version = "0.1.0" dependencies = [ "astroport", - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-storage-plus 1.2.0", "cw2 1.1.2", "thiserror", @@ -245,8 +245,8 @@ checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" name = "before-send-hook-test" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "schemars", "serde", @@ -290,9 +290,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -316,8 +316,8 @@ dependencies = [ name = "client_updater" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -355,15 +355,15 @@ dependencies = [ [[package]] name = "cosmwasm-core" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d905990ef3afb5753bb709dc7de88e9e370aa32bcc2f31731d4b533b63e82490" +checksum = "5f6ceb8624260d0d3a67c4e1a1d43fc7e9406720afbcb124521501dd138f90aa" [[package]] name = "cosmwasm-crypto" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f862b355f7e47711e0acfe6af92cb3fd8fd5936b66a9eaa338b51edabd1e77d" +checksum = "58535cbcd599b3c193e3967c8292fe1dbbb5de7c2a2d87380661091dd4744044" dependencies = [ "digest 0.10.7", "ed25519-zebra 3.1.0", @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b2a7bd9c1dd9a377a4dc0f4ad97d24b03c33798cd5a6d7ceb8869b41c5d2f2d" +checksum = "4125381e5fd7fefe9f614640049648088015eca2b60d861465329a5d87dfa538" dependencies = [ "ark-bls12-381", "ark-ec", @@ -397,31 +397,31 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd85de6467cd1073688c86b39833679ae6db18cf4771471edd9809f15f1679f1" +checksum = "a8e07de16c800ac82fd188d055ecdb923ead0cf33960d3350089260bb982c09f" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-derive" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029910b409398fdf81955d7301b906caf81f2c42b013ea074fbd89720229c424" +checksum = "1b5658b1dc64e10b56ae7a449f678f96932a96f6cfad1769d608d1d1d656480a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "cosmwasm-schema" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b4cd28147a66eba73720b47636a58097a979ad8c8bfdb4ed437ebcbfe362576" +checksum = "93d388adfa9cb449557a92e9318121ac1a481fc4f599213b03a5b62699b403b4" dependencies = [ - "cosmwasm-schema-derive 1.5.7", + "cosmwasm-schema-derive 1.5.8", "schemars", "serde", "serde_json", @@ -430,11 +430,11 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc0d4d85e83438ab9a0fea9348446f7268bc016aacfebce37e998559f151294" +checksum = "f86b4d949b6041519c58993a73f4bbfba8083ba14f7001eae704865a09065845" dependencies = [ - "cosmwasm-schema-derive 2.1.3", + "cosmwasm-schema-derive 2.1.4", "schemars", "serde", "serde_json", @@ -443,9 +443,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9acd45c63d41bc9b16bc6dc7f6bd604a8c2ad29ce96c8f3c96d7fc8ef384392e" +checksum = "2411b389e56e6484f81ba955b758d02522d620c98fc960c4bd2251d48b7aa19f" dependencies = [ "proc-macro2", "quote", @@ -454,26 +454,26 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf5c8adac41bb7751c050d7c4c18675be19ee128714454454575e894424eeef" +checksum = "c8ef1b5835a65fcca3ab8b9a02b4f4dacc78e233a5c2f20b270efb9db0666d12" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "cosmwasm-std" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2685c2182624b2e9e17f7596192de49a3f86b7a0c9a5f6b25c1df5e24592e836" +checksum = "c21fde95ccd20044a23c0ac6fd8c941f3e8c158169dc94b5aa6491a2d9551a8d" dependencies = [ "base64 0.21.7", "bech32 0.9.1", "bnum 0.10.0", - "cosmwasm-crypto 1.5.7", - "cosmwasm-derive 1.5.7", + "cosmwasm-crypto 1.5.8", + "cosmwasm-derive 1.5.8", "derivative", "forward_ref", "hex", @@ -487,16 +487,16 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51dec99a2e478715c0a4277f0dbeadbb8466500eb7dec873d0924edd086e77f1" +checksum = "70eb7ab0c1e99dd6207496963ba2a457c4128ac9ad9c72a83f8d9808542b849b" dependencies = [ "base64 0.22.1", "bech32 0.11.0", "bnum 0.11.0", "cosmwasm-core", - "cosmwasm-crypto 2.1.3", - "cosmwasm-derive 2.1.3", + "cosmwasm-crypto 2.1.4", + "cosmwasm-derive 2.1.4", "derive_more", "hex", "rand_core 0.6.4", @@ -510,13 +510,26 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] +[[package]] +name = "cron" +version = "0.1.0" +dependencies = [ + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", + "cw-storage-plus 2.0.0", + "cw2 2.0.0", + "neutron-sdk", + "schemars", + "serde", +] + [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -607,7 +620,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -616,7 +629,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451a4691083a88a3c0630a8a88799e9d4cd6679b7ce8ff22b8da2873ff31d380" dependencies = [ - "cosmwasm-std 1.5.7", + "cosmwasm-std 1.5.8", ] [[package]] @@ -625,8 +638,8 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c999a12f8cd8736f6f86e9a4ede5905530cb23cfdef946b9da1c506ad1b70799" dependencies = [ - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-address-like", "cw-storage-plus 1.2.0", "cw20", @@ -639,7 +652,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ - "cosmwasm-std 1.5.7", + "cosmwasm-std 1.5.8", "schemars", "serde", ] @@ -650,7 +663,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" dependencies = [ - "cosmwasm-std 2.1.3", + "cosmwasm-std 2.1.4", "schemars", "serde", ] @@ -661,8 +674,8 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw2 1.1.2", "schemars", "semver", @@ -676,8 +689,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-storage-plus 1.2.0", "schemars", "semver", @@ -691,8 +704,8 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b04852cd38f044c0751259d5f78255d07590d136b8a86d4e09efdd7666bd6d27" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "schemars", "semver", @@ -706,8 +719,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" dependencies = [ - "cosmwasm-schema 1.5.7", - "cosmwasm-std 1.5.7", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", "cw-utils", "schemars", "serde", @@ -760,7 +773,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "unicode-xid", ] @@ -768,8 +781,8 @@ dependencies = [ name = "dex" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "schemars", @@ -781,8 +794,8 @@ name = "dex_grpc" version = "0.1.0" dependencies = [ "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "neutron-std", @@ -837,8 +850,8 @@ dependencies = [ name = "echo" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "schemars", "serde", ] @@ -975,8 +988,8 @@ dependencies = [ name = "grpc_querier" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "neutron-std", @@ -1039,8 +1052,8 @@ dependencies = [ name = "ibc_transfer" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -1076,9 +1089,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -1090,16 +1103,16 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "marketmap" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "schemars", @@ -1116,8 +1129,8 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" name = "msg_receiver" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -1129,8 +1142,8 @@ dependencies = [ name = "neutron-price-feed-mock" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "thiserror", @@ -1139,13 +1152,14 @@ dependencies = [ [[package]] name = "neutron-sdk" version = "0.11.0" -source = "git+https://github.com/neutron-org/neutron-sdk?branch=chore/neutron-std#bc7df7ae88e3f307a0b643652d2aea04d1f82a4a" +source = "git+https://github.com/neutron-org/neutron-sdk?branch=main#38197fb61ca4180ca695a5d215d31309813046d6" dependencies = [ "bech32 0.9.1", "chrono", "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", + "neutron-std-derive 0.20.1 (git+https://github.com/neutron-org/neutron-sdk?branch=main)", "prost 0.12.6", "prost-types 0.12.6", "protobuf", @@ -1161,15 +1175,15 @@ 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=main#cc49ece967353bcae7ad29ce04f75d2cc167b028" dependencies = [ "bech32 0.9.1", "chrono", "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", - "neutron-std-derive", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", + "neutron-std-derive 0.20.1 (git+https://github.com/neutron-org/neutron-std?branch=main)", "prost 0.12.6", "prost-types 0.12.6", "protobuf", @@ -1186,7 +1200,19 @@ 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-sdk?branch=main#38197fb61ca4180ca695a5d215d31309813046d6" +dependencies = [ + "itertools 0.10.5", + "proc-macro2", + "prost-types 0.12.6", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "neutron-std-derive" +version = "0.20.1" +source = "git+https://github.com/neutron-org/neutron-std?branch=main#cc49ece967353bcae7ad29ce04f75d2cc167b028" dependencies = [ "itertools 0.10.5", "proc-macro2", @@ -1201,8 +1227,8 @@ version = "0.1.0" dependencies = [ "base64 0.21.7", "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -1217,8 +1243,8 @@ name = "neutron_interchain_txs" version = "0.1.0" dependencies = [ "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -1235,8 +1261,8 @@ name = "neutron_validators_test" version = "0.1.0" dependencies = [ "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "cw2 2.0.0", "neutron-sdk", @@ -1293,9 +1319,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -1307,8 +1333,8 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" name = "oracle" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "schemars", @@ -1369,9 +1395,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -1419,7 +1445,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1528,8 +1554,8 @@ dependencies = [ name = "reflect" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "cw2 2.0.0", "neutron-sdk", "schemars", @@ -1588,7 +1614,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1613,9 +1639,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -1658,13 +1684,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1675,14 +1701,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -1769,7 +1795,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1800,9 +1826,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1847,22 +1873,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1898,8 +1924,8 @@ dependencies = [ name = "tokenfactory" version = "0.1.0" dependencies = [ - "cosmwasm-schema 2.1.3", - "cosmwasm-std 2.1.3", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "neutron-sdk", "schemars", "serde", @@ -1925,15 +1951,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "version_check" @@ -1965,7 +1991,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1985,5 +2011,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] diff --git a/Cargo.toml b/Cargo.toml index e52c312..5f31114 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false overflow-checks = true [workspace.dependencies] -neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "chore/neutron-std" } +neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "main" } neutron-std = { package = "neutron-std", git = "https://github.com/neutron-org/neutron-std", branch = "main" } prost = "0.12.4" prost-types = "0.12.4" diff --git a/contracts/cron/Cargo.toml b/contracts/cron/Cargo.toml new file mode 100644 index 0000000..67af7a1 --- /dev/null +++ b/contracts/cron/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "cron" +version = "0.1.0" +authors = ["joldie777 "] +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"] + +[features] +library = [] + +[dependencies] +cosmwasm-std = { workspace = true } +cw2 = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true } +neutron-sdk = { workspace = true } +cw-storage-plus = { workspace = true } + +[dev-dependencies] +cosmwasm-schema = { workspace = true } diff --git a/contracts/cron/src/contract.rs b/contracts/cron/src/contract.rs new file mode 100644 index 0000000..538eeca --- /dev/null +++ b/contracts/cron/src/contract.rs @@ -0,0 +1,73 @@ +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use crate::state::{BEGIN_BLOCKER_SHEDULES, END_BLOCKER_SHEDULES}; +use cosmwasm_std::{ + entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, + StdResult, +}; +use cw2::set_contract_version; + +const CONTRACT_NAME: &str = concat!("crates.io:neutron-contracts__", env!("CARGO_PKG_NAME")); +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +const MODULE_ACCOUNT: &str = "neutron1cd6wafvehv79pm2yxth40thpyc7dc0yrqkyk95"; + +#[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()) +} + +#[entry_point] +pub fn execute(deps: DepsMut, _: Env, info: MessageInfo, msg: ExecuteMsg) -> StdResult { + deps.api + .debug(format!("WASMDEBUG: execute: received msg: {:?}", msg).as_str()); + + if info.sender.as_str() != MODULE_ACCOUNT { + return Err(StdError::generic_err("Unauthorized")); + } + + match msg { + ExecuteMsg::AddBeginBlockerSchedule { name } => { + let counter = BEGIN_BLOCKER_SHEDULES + .may_load(deps.storage, name.clone())? + .unwrap_or_default() + .checked_add(1) + .unwrap_or_default(); + + BEGIN_BLOCKER_SHEDULES.save(deps.storage, name, &counter)?; + + Ok(Response::default()) + } + ExecuteMsg::AddEndBlockerSchedule { name } => { + let counter = END_BLOCKER_SHEDULES + .may_load(deps.storage, name.clone())? + .unwrap_or_default() + .checked_add(1) + .unwrap_or_default(); + + END_BLOCKER_SHEDULES.save(deps.storage, name, &counter)?; + + Ok(Response::default()) + } + } +} + +#[entry_point] +pub fn query(deps: Deps, _: Env, msg: QueryMsg) -> StdResult { + match msg { + QueryMsg::GetBeginBlockerScheduleCounter { name } => { + let res = BEGIN_BLOCKER_SHEDULES.may_load(deps.storage, name)?; + to_json_binary(&res) + } + QueryMsg::GetEndBlockerScheduleCounter { name } => { + let res = END_BLOCKER_SHEDULES.may_load(deps.storage, name)?; + to_json_binary(&res) + } + } +} diff --git a/contracts/cron/src/lib.rs b/contracts/cron/src/lib.rs new file mode 100644 index 0000000..9159fa3 --- /dev/null +++ b/contracts/cron/src/lib.rs @@ -0,0 +1,19 @@ +// 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. + +#![warn(clippy::unwrap_used, clippy::expect_used)] + +pub mod contract; +pub mod msg; +pub mod state; diff --git a/contracts/cron/src/msg.rs b/contracts/cron/src/msg.rs new file mode 100644 index 0000000..e75d6c4 --- /dev/null +++ b/contracts/cron/src/msg.rs @@ -0,0 +1,19 @@ +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +pub struct InstantiateMsg {} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ExecuteMsg { + AddBeginBlockerSchedule { name: String }, + AddEndBlockerSchedule { name: String }, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsg { + GetBeginBlockerScheduleCounter { name: String }, + GetEndBlockerScheduleCounter { name: String }, +} diff --git a/contracts/cron/src/state.rs b/contracts/cron/src/state.rs new file mode 100644 index 0000000..065ebbc --- /dev/null +++ b/contracts/cron/src/state.rs @@ -0,0 +1,4 @@ +use cw_storage_plus::Map; + +pub const BEGIN_BLOCKER_SHEDULES: Map = Map::new("begin_blocker_shedules"); +pub const END_BLOCKER_SHEDULES: Map = Map::new("end_blocker_shedules"); diff --git a/contracts/dex/schema/dex_msg.json b/contracts/dex/schema/dex_msg.json index b8c612f..9d0c7b2 100644 --- a/contracts/dex/schema/dex_msg.json +++ b/contracts/dex/schema/dex_msg.json @@ -49,7 +49,7 @@ "description": "Additional deposit options", "type": "array", "items": { - "$ref": "#/definitions/DepositOption" + "$ref": "#/definitions/DepositOptions" } }, "receiver": { @@ -322,14 +322,20 @@ } ], "definitions": { - "DepositOption": { + "DepositOptions": { "type": "object", - "required": [ - "disable_swap" - ], "properties": { - "disable_swap": { - "type": "boolean" + "disable_autoswap": { + "type": [ + "boolean", + "null" + ] + }, + "fail_tx_on_bel": { + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false diff --git a/contracts/dex_grpc/schema/query_msg.json b/contracts/dex_grpc/schema/query_msg.json index 425765a..3bc7e5e 100644 --- a/contracts/dex_grpc/schema/query_msg.json +++ b/contracts/dex_grpc/schema/query_msg.json @@ -576,9 +576,388 @@ } }, "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_deposit" + ], + "properties": { + "simulate_deposit": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgDeposit" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_withdrawal" + ], + "properties": { + "simulate_withdrawal": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawal" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_place_limit_order" + ], + "properties": { + "simulate_place_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgPlaceLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_withdraw_filled_limit_order" + ], + "properties": { + "simulate_withdraw_filled_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgWithdrawFilledLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_cancel_limit_order" + ], + "properties": { + "simulate_cancel_limit_order": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgCancelLimitOrder" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "simulate_multi_hop_swap" + ], + "properties": { + "simulate_multi_hop_swap": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/MsgMultiHopSwap" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { + "DepositOptions": { + "type": "object", + "required": [ + "disable_autoswap", + "fail_tx_on_bel" + ], + "properties": { + "disable_autoswap": { + "type": "boolean" + }, + "fail_tx_on_bel": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "MsgCancelLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgDeposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "creator", + "fees", + "options", + "receiver", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "amounts_a": { + "type": "array", + "items": { + "type": "string" + } + }, + "amounts_b": { + "type": "array", + "items": { + "type": "string" + } + }, + "creator": { + "type": "string" + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/DepositOptions" + } + }, + "receiver": { + "type": "string" + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgMultiHopSwap": { + "type": "object", + "required": [ + "amount_in", + "creator", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_in": { + "type": "string" + }, + "creator": { + "type": "string" + }, + "exit_limit_price": { + "type": "string" + }, + "pick_best_route": { + "description": "If pickBestRoute == true then all routes are run and the route with the best price is chosen otherwise, the first succesful route is used.", + "type": "boolean" + }, + "receiver": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + }, + "additionalProperties": false + }, + "MsgPlaceLimitOrder": { + "type": "object", + "required": [ + "amount_in", + "creator", + "limit_sell_price", + "max_amount_out", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "amount_in": { + "type": "string" + }, + "creator": { + "type": "string" + }, + "expiration_time": { + "description": "expirationTime is only valid iff orderType == GOOD_TIL_TIME.", + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "limit_sell_price": { + "type": "string" + }, + "max_amount_out": { + "type": "string" + }, + "order_type": { + "type": "integer", + "format": "int32" + }, + "receiver": { + "type": "string" + }, + "tick_index_in_to_out": { + "description": "DEPRECATED: tick_index_in_to_out will be removed in future release; limit_sell_price should be used instead.", + "deprecated": true, + "type": "integer", + "format": "int64" + }, + "token_in": { + "type": "string" + }, + "token_out": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawFilledLimitOrder": { + "type": "object", + "required": [ + "creator", + "tranche_key" + ], + "properties": { + "creator": { + "type": "string" + }, + "tranche_key": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MsgWithdrawal": { + "type": "object", + "required": [ + "creator", + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "creator": { + "type": "string" + }, + "fees": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "receiver": { + "type": "string" + }, + "shares_to_remove": { + "type": "array", + "items": { + "type": "string" + } + }, + "tick_indexes_a_to_b": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "type": "string" + }, + "token_b": { + "type": "string" + } + }, + "additionalProperties": false + }, "MultiHopRoute": { "type": "object", "required": [ diff --git a/contracts/dex_grpc/src/contract.rs b/contracts/dex_grpc/src/contract.rs index e7936c2..9400b3c 100644 --- a/contracts/dex_grpc/src/contract.rs +++ b/contracts/dex_grpc/src/contract.rs @@ -235,6 +235,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { &dex_querier.pool_reserves(pair_id, token_in, tick_index, fee)?, )?), + #[allow(deprecated)] // Allow deprecated call until its remove from neutron-core QueryMsg::EstimateMultiHopSwap { creator, receiver, @@ -251,6 +252,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { pick_best_route, )?)?), + #[allow(deprecated)] // Allow deprecated call until its remove from neutron-core QueryMsg::EstimatePlaceLimitOrder { creator, receiver, @@ -288,6 +290,30 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { QueryMsg::AllPoolMetadata { pagination } => { Ok(to_json_binary(&dex_querier.pool_metadata_all(pagination)?)?) } + + QueryMsg::SimulateDeposit { msg } => { + Ok(to_json_binary(&dex_querier.simulate_deposit(Some(msg))?)?) + } + + QueryMsg::SimulateWithdrawal { msg } => Ok(to_json_binary( + &dex_querier.simulate_withdrawal(Some(msg))?, + )?), + + QueryMsg::SimulatePlaceLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_place_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateWithdrawFilledLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_withdraw_filled_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateCancelLimitOrder { msg } => Ok(to_json_binary( + &dex_querier.simulate_cancel_limit_order(Some(msg))?, + )?), + + QueryMsg::SimulateMultiHopSwap { msg } => Ok(to_json_binary( + &dex_querier.simulate_multi_hop_swap(Some(msg))?, + )?), } } diff --git a/contracts/dex_grpc/src/msg.rs b/contracts/dex_grpc/src/msg.rs index d7c2fde..140cfbc 100644 --- a/contracts/dex_grpc/src/msg.rs +++ b/contracts/dex_grpc/src/msg.rs @@ -1,6 +1,7 @@ use neutron_std::shim::Timestamp; -use neutron_std::types::neutron::dex::{DepositOptions, MultiHopRoute}; +use neutron_std::types::neutron::dex::*; use neutron_std::types::{cosmos::base::query::v1beta1::PageRequest, neutron::dex}; + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -144,6 +145,24 @@ pub enum QueryMsg { AllPoolMetadata { pagination: Option, }, + SimulateDeposit { + msg: MsgDeposit, + }, + SimulateWithdrawal { + msg: MsgWithdrawal, + }, + SimulatePlaceLimitOrder { + msg: MsgPlaceLimitOrder, + }, + SimulateWithdrawFilledLimitOrder { + msg: MsgWithdrawFilledLimitOrder, + }, + SimulateCancelLimitOrder { + msg: MsgCancelLimitOrder, + }, + SimulateMultiHopSwap { + msg: MsgMultiHopSwap, + }, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] diff --git a/contracts/grpc_querier/src/contract.rs b/contracts/grpc_querier/src/contract.rs index 1c5417e..dc63825 100644 --- a/contracts/grpc_querier/src/contract.rs +++ b/contracts/grpc_querier/src/contract.rs @@ -73,6 +73,13 @@ pub fn query(deps: Deps, _: Env, msg: QueryMsg) -> StdResult { Ok(to_json_binary(&transfer_querier.denom_trace(hash)?)?) } + QueryMsg::TransferEscrowAddress { + port_id, + channel_id, + } => Ok(to_json_binary( + &transfer_querier.escrow_address(port_id, channel_id)?, + )?), + QueryMsg::IbcClientState { client_id } => { Ok(to_json_binary(&client_querier.client_state(client_id)?)?) } diff --git a/contracts/grpc_querier/src/msg.rs b/contracts/grpc_querier/src/msg.rs index 0cecf8e..b7848a1 100644 --- a/contracts/grpc_querier/src/msg.rs +++ b/contracts/grpc_querier/src/msg.rs @@ -28,6 +28,10 @@ pub enum QueryMsg { TransferDenomTrace { hash: String, }, + TransferEscrowAddress { + port_id: String, + channel_id: String, + }, IbcClientState { client_id: String, }, diff --git a/contracts/neutron_interchain_txs/schema/execute_msg.json b/contracts/neutron_interchain_txs/schema/execute_msg.json index 6841b02..d80aedf 100644 --- a/contracts/neutron_interchain_txs/schema/execute_msg.json +++ b/contracts/neutron_interchain_txs/schema/execute_msg.json @@ -20,6 +20,16 @@ }, "interchain_account_id": { "type": "string" + }, + "ordering": { + "anyOf": [ + { + "$ref": "#/definitions/ChannelOrdering" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -242,7 +252,7 @@ "additionalProperties": false }, { - "description": "Used only in integration tests framework to simulate failures. After executing this message, any sudo call to the contract will result in an submessage processing error.", + "description": "Used only in integration tests framework to simulate failures. After executing this message, any sudo call to the contract will result in a submessage processing error.", "type": "object", "required": [ "integration_tests_set_sudo_submsg_failure_mock" @@ -256,7 +266,7 @@ "additionalProperties": false }, { - "description": "Used only in integration tests framework to simulate failures. After executing this message, any sudo call to the contract will result in an submessage reply processing error.", + "description": "Used only in integration tests framework to simulate failures. After executing this message, any sudo call to the contract will result in a submessage reply processing error.", "type": "object", "required": [ "integration_tests_set_sudo_submsg_reply_failure_mock" @@ -299,6 +309,13 @@ } ], "definitions": { + "ChannelOrdering": { + "type": "string", + "enum": [ + "ORDER_ORDERED", + "ORDER_UNORDERED" + ] + }, "IntegrationTestsSudoFailureMock": { "type": "string", "enum": [ diff --git a/contracts/neutron_interchain_txs/src/contract.rs b/contracts/neutron_interchain_txs/src/contract.rs index b4766b6..7ba5af2 100644 --- a/contracts/neutron_interchain_txs/src/contract.rs +++ b/contracts/neutron_interchain_txs/src/contract.rs @@ -34,7 +34,7 @@ use crate::integration_tests_mock_handlers::{ use crate::msg::{ AcknowledgementResultsResponse, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; -use neutron_sdk::bindings::msg::{IbcFee, NeutronMsg}; +use neutron_sdk::bindings::msg::{ChannelOrdering, IbcFee, NeutronMsg}; use neutron_sdk::bindings::query::{NeutronQuery, QueryInterchainAccountAddressResponse}; use neutron_sdk::bindings::types::ProtobufAny; use neutron_sdk::interchain_txs::helpers::{decode_message_response, get_port_id}; @@ -108,7 +108,8 @@ pub fn execute( ExecuteMsg::Register { connection_id, interchain_account_id, - } => execute_register_ica(deps, env, connection_id, interchain_account_id), + ordering, + } => execute_register_ica(deps, env, connection_id, interchain_account_id, ordering), ExecuteMsg::Delegate { validator, interchain_account_id, @@ -307,12 +308,14 @@ fn execute_register_ica( env: Env, connection_id: String, interchain_account_id: String, + ordering: Option, ) -> StdResult> { let register_fee = REGISTER_FEE.load(deps.storage)?; let register = NeutronMsg::register_interchain_account( connection_id, interchain_account_id.clone(), Option::from(register_fee), + ordering, ); let key = get_port_id(env.contract.address.as_str(), &interchain_account_id); INTERCHAIN_ACCOUNTS.save(deps.storage, key, &None)?; diff --git a/contracts/neutron_interchain_txs/src/msg.rs b/contracts/neutron_interchain_txs/src/msg.rs index 298ba7b..a6ed4b0 100644 --- a/contracts/neutron_interchain_txs/src/msg.rs +++ b/contracts/neutron_interchain_txs/src/msg.rs @@ -1,5 +1,6 @@ use crate::storage::{AcknowledgementResult, IntegrationTestsSudoFailureMock}; use cosmwasm_std::Uint128; +use neutron_sdk::bindings::msg::ChannelOrdering; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -38,6 +39,7 @@ pub enum ExecuteMsg { Register { connection_id: String, interchain_account_id: String, + ordering: Option, }, SetFees { denom: String, @@ -76,11 +78,11 @@ pub enum ExecuteMsg { state: IntegrationTestsSudoFailureMock, }, /// Used only in integration tests framework to simulate failures. - /// After executing this message, any sudo call to the contract will result in an submessage + /// After executing this message, any sudo call to the contract will result in a submessage /// processing error. IntegrationTestsSetSudoSubmsgFailureMock {}, /// Used only in integration tests framework to simulate failures. - /// After executing this message, any sudo call to the contract will result in an submessage + /// After executing this message, any sudo call to the contract will result in a submessage /// reply processing error. IntegrationTestsSetSudoSubmsgReplyFailureMock {}, /// Used only in integration tests framework to simulate failures. diff --git a/contracts/neutron_validator_test/src/contract.rs b/contracts/neutron_validator_test/src/contract.rs index 53a31f3..74f7500 100644 --- a/contracts/neutron_validator_test/src/contract.rs +++ b/contracts/neutron_validator_test/src/contract.rs @@ -32,7 +32,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; -use neutron_sdk::bindings::msg::{IbcFee, NeutronMsg}; +use neutron_sdk::bindings::msg::{ChannelOrdering, IbcFee, NeutronMsg}; use neutron_sdk::bindings::query::{ NeutronQuery, QueryInterchainAccountAddressResponse, QueryRegisteredQueryResponse, }; @@ -267,8 +267,12 @@ fn execute_register_ica( connection_id: String, interchain_account_id: String, ) -> NeutronResult> { - let register = - NeutronMsg::register_interchain_account(connection_id, interchain_account_id.clone(), None); + let register = NeutronMsg::register_interchain_account( + connection_id, + interchain_account_id.clone(), + None, + Some(ChannelOrdering::OrderOrdered), + ); let key = get_port_id(env.contract.address.as_str(), &interchain_account_id); INTERCHAIN_ACCOUNTS.save(deps.storage, key, &None)?; Ok(Response::new().add_message(register)) diff --git a/contracts/reflect/schema/execute_msg.json b/contracts/reflect/schema/execute_msg.json index ac3033f..69c7dd8 100644 --- a/contracts/reflect/schema/execute_msg.json +++ b/contracts/reflect/schema/execute_msg.json @@ -310,6 +310,13 @@ }, "additionalProperties": false }, + "ChannelOrdering": { + "type": "string", + "enum": [ + "ORDER_ORDERED", + "ORDER_UNORDERED" + ] + }, "ClearAdminProposal": { "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", "deprecated": true, @@ -539,14 +546,20 @@ }, "additionalProperties": false }, - "DepositOption": { + "DepositOptions": { "type": "object", - "required": [ - "disable_swap" - ], "properties": { - "disable_swap": { - "type": "boolean" + "disable_autoswap": { + "type": [ + "boolean", + "null" + ] + }, + "fail_tx_on_bel": { + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false @@ -600,7 +613,7 @@ "description": "Additional deposit options", "type": "array", "items": { - "$ref": "#/definitions/DepositOption" + "$ref": "#/definitions/DepositOptions" } }, "receiver": { @@ -1338,6 +1351,17 @@ "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" }, + "ordering": { + "description": "**ordering** is an order of channel. Can be ordered or unordered. Set to ordered if not specified.", + "anyOf": [ + { + "$ref": "#/definitions/ChannelOrdering" + }, + { + "type": "null" + } + ] + }, "register_fee": { "description": "*register_fee** is a fees required to be payed to register interchain account", "type": [ @@ -1473,7 +1497,7 @@ ], "properties": { "new_keys": { - "description": "*new_keys** is the new query keys to retrive.", + "description": "*new_keys** is the new query keys to retrieve.", "type": [ "array", "null" diff --git a/contracts/reflect/src/contract.rs b/contracts/reflect/src/contract.rs index f9ebb8b..cf4033c 100644 --- a/contracts/reflect/src/contract.rs +++ b/contracts/reflect/src/contract.rs @@ -74,7 +74,14 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResul pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> StdResult { match msg.id { REFLECT_REPLY_ID => { - Ok(Response::default().set_data(msg.result.unwrap().msg_responses[0].clone().value)) + let res = Response::default(); + + let msg_responses = msg.result.unwrap().msg_responses; + if msg_responses.is_empty() { + Ok(res) + } else { + Ok(res.set_data(msg_responses[0].clone().value)) + } } _ => { unimplemented!()