From 16c3853480a34dc11e64bfb01d3c00823adf82e9 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Tue, 7 Nov 2023 02:20:49 -0300 Subject: [PATCH 1/8] changed injective-math to newer version. Downgraded cosmwasm-std and cosmwasm-schema in injective-cosmwasm, injective-math and injective-testing --- Cargo.lock | 6 +++--- packages/injective-cosmwasm/Cargo.toml | 8 ++++---- packages/injective-math/Cargo.toml | 4 ++-- packages/injective-testing/Cargo.toml | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92e36696..0b42d6eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -938,7 +938,7 @@ dependencies = [ [[package]] name = "injective-cosmwasm" -version = "0.2.15" +version = "0.2.16" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1014,13 +1014,13 @@ dependencies = [ [[package]] name = "injective-testing" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "base64 0.13.1", "cosmwasm-std", "cw-multi-test", - "injective-cosmwasm 0.2.15", + "injective-cosmwasm 0.2.16", "injective-math 0.2.1", "rand 0.4.6", "secp256k1", diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index a88cf4ce..f69e4ee9 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -11,15 +11,15 @@ license = "Apache-2.0" name = "injective-cosmwasm" readme = "README.md" repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/bindings" -version = "0.2.15" +version = "0.2.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.4.1" } +cosmwasm-std = { version = "1.2.0" } cw-storage-plus = { version = "0.15.0" } ethereum-types = "0.5.2" hex = { version = "0.4.3", features = [ "serde" ] } -injective-math = { path = "../injective-math", version = "0.2.0" } +injective-math = { path = "../injective-math", version = "0.2.1" } schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } serde_repr = "0.1" @@ -27,6 +27,6 @@ subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } tiny-keccak = "1.2.1" [dev-dependencies] -cosmwasm-schema = { version = "1.4.1" } +cosmwasm-schema = { version = "1.2.0" } serde-json-wasm = { version = "0.4.1" } serde_test = { version = "1.0.166" } diff --git a/packages/injective-math/Cargo.toml b/packages/injective-math/Cargo.toml index 0d0f1615..2e04521b 100644 --- a/packages/injective-math/Cargo.toml +++ b/packages/injective-math/Cargo.toml @@ -16,11 +16,11 @@ backtraces = [ "cosmwasm-std/backtraces" ] [dependencies] primitive-types = "0.12.2" -cosmwasm-std = { version = "1.4.1" } +cosmwasm-std = { version = "1.2.0" } ethereum-types = "0.5.2" schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } [dev-dependencies] -cosmwasm-schema = { version = "1.4.1" } +cosmwasm-schema = { version = "1.2.0" } diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index d9f08e17..ca78df02 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -5,15 +5,15 @@ edition = "2021" license = "Apache-2.0" name = "injective-testing" repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/injective-testing" -version = "0.1.3" +version = "0.1.4" [dependencies] anyhow = "1.0.66" base64 = "0.13.1" -cosmwasm-std = { version = "1.4.1", features = [ "abort", "iterator" ] } +cosmwasm-std = { version = "1.2.0", features = [ "abort", "iterator" ] } cw-multi-test = "0.16.2" -injective-cosmwasm = { version = "0.2.15", path = "../injective-cosmwasm" } -injective-math = { version = "0.2.0", path = "../injective-math" } +injective-cosmwasm = { version = "0.2.16", path = "../injective-cosmwasm" } +injective-math = { version = "0.2.1", path = "../injective-math" } rand = "0.4.6" secp256k1 = "0.6.2" serde = { version = "1.0.103", default-features = false, features = [ "derive" ] } From 39d473d8854a5ad4847260ef48ac21dd5e1d2c58 Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 12:48:22 -0500 Subject: [PATCH 2/8] fixed dependencies --- Cargo.lock | 430 +++++++----------- contracts/atomic-order-example/Cargo.toml | 8 +- .../atomic-order-example/src/contract.rs | 1 + contracts/atomic-order-example/src/helpers.rs | 4 +- contracts/atomic-order-example/src/tests.rs | 13 +- contracts/dummy/Cargo.toml | 4 +- contracts/dummy/src/contract.rs | 10 +- packages/injective-cosmwasm/Cargo.toml | 2 +- .../src/exchange_mock_querier.rs | 109 ++--- packages/injective-math/Cargo.toml | 2 +- packages/injective-protobuf/Cargo.toml | 4 +- packages/injective-std/Cargo.toml | 2 +- packages/injective-testing/src/chain_mock.rs | 6 +- 13 files changed, 247 insertions(+), 348 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b42d6eb..f5982f02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -61,12 +61,12 @@ dependencies = [ "cw-storage-plus 0.14.0", "cw-utils 0.14.0", "cw2 0.14.0", - "injective-cosmwasm 0.1.105", - "injective-math 0.1.21", + "injective-cosmwasm", + "injective-math", "injective-protobuf", "protobuf", "schemars", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] @@ -96,9 +96,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -107,20 +107,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "bigint" -version = "4.4.3" +name = "bech32" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def" -dependencies = [ - "byteorder", - "crunchy 0.1.6", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bitvec" @@ -172,9 +162,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -211,15 +201,6 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "const-oid" version = "0.9.5" @@ -234,11 +215,12 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosmwasm-crypto" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fb22494cf7d23d0c348740e06e5c742070b2991fd41db77bba0bcfbae1a723" +checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" dependencies = [ "digest 0.10.7", + "ecdsa 0.16.8", "ed25519-zebra", "k256 0.13.1", "rand_core 0.6.4", @@ -247,31 +229,31 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e199424486ea97d6b211db6387fd72e26b4a439d40cc23140b2d8305728055b" +checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef683a9c1c4eabd6d31515719d0d2cc66952c4c87f7eb192bfc90384517dc34" +checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" dependencies = [ "cosmwasm-schema-derive", "schemars", - "serde 1.0.188", - "serde_json 1.0.107", + "serde 1.0.192", + "serde_json 1.0.108", "thiserror", ] [[package]] name = "cosmwasm-schema-derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9567025acbb4c0c008178393eb53b3ac3c2e492c25949d3bf415b9cbe80772d8" +checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ "proc-macro2", "quote", @@ -280,11 +262,12 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d89d680fb60439b7c5947b15f9c84b961b88d1f8a3b20c4bd178a3f87db8bae" +checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", + "bech32", "bnum", "cosmwasm-crypto", "cosmwasm-derive", @@ -292,37 +275,32 @@ dependencies = [ "forward_ref", "hex", "schemars", - "serde 1.0.188", + "serde 1.0.192", "serde-json-wasm 0.5.1", "sha2 0.10.8", + "static_assertions", "thiserror", ] [[package]] name = "cosmwasm-storage" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1c574d30feffe4b8121e61e839c231a5ce21901221d2fb4d5c945968a4f00" +checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4" dependencies = [ "cosmwasm-std", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] -[[package]] -name = "crunchy" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" - [[package]] name = "crunchy" version = "0.2.2" @@ -385,13 +363,13 @@ dependencies = [ "anyhow", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.2", "derivative", "itertools", "k256 0.11.6", "prost 0.9.0", "schemars", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] @@ -403,7 +381,7 @@ checksum = "1c8b264257c4f44c49b7ce09377af63aa040768ecd3fd7bdd2d48a09323a1e90" dependencies = [ "cosmwasm-std", "schemars", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -414,7 +392,7 @@ checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0" dependencies = [ "cosmwasm-std", "schemars", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -425,7 +403,7 @@ checksum = "d9b6f91c0b94481a3e9ef1ceb183c37d00764f8751e39b45fc09f4d9b970d469" dependencies = [ "cosmwasm-std", "schemars", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -436,7 +414,7 @@ checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" dependencies = [ "cosmwasm-std", "schemars", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -449,22 +427,22 @@ dependencies = [ "cw2 0.14.0", "schemars", "semver", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] [[package]] name = "cw-utils" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.0", + "cw2 1.1.1", "schemars", "semver", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] @@ -477,20 +455,20 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus 0.14.0", "schemars", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] name = "cw2" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" +checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", "schemars", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] @@ -553,17 +531,17 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus 0.16.0", "cw2 0.14.0", - "injective-cosmwasm 0.1.105", + "injective-cosmwasm", "schemars", - "serde 1.0.188", + "serde 1.0.192", "thiserror", ] [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -585,7 +563,7 @@ checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "rfc6979 0.4.0", "signature 2.1.0", "spki 0.7.2", @@ -601,7 +579,7 @@ dependencies = [ "hashbrown 0.12.3", "hex", "rand_core 0.6.4", - "serde 1.0.188", + "serde 1.0.192", "sha2 0.9.9", "zeroize", ] @@ -634,9 +612,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.3", @@ -659,38 +637,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "ethbloom" -version = "0.6.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3932e82d64d347a045208924002930dc105a138995ccdc1479d0f05f0359f17c" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ - "crunchy 0.2.2", - "fixed-hash 0.3.2", + "crunchy", + "fixed-hash", "impl-rlp", "impl-serde", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] name = "ethereum-types" -version = "0.5.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b054df51e53f253837ea422681215b42823c02824bde982699d0dceecf6165a1" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "crunchy 0.2.2", "ethbloom", - "ethereum-types-serialize", - "fixed-hash 0.3.2", - "serde 1.0.188", - "uint 0.5.0", -] - -[[package]] -name = "ethereum-types-serialize" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1873d77b32bc1891a79dad925f2acbc318ee942b38b9110f9dbc5fbeffcea350" -dependencies = [ - "serde 1.0.188", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types", + "uint", ] [[package]] @@ -713,19 +682,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "fixed-hash" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a683d1234507e4f3bf2736eeddf0de1dc65996dc0164d57eba0a74bcf29489" -dependencies = [ - "byteorder", - "heapsize", - "rand 0.5.6", - "rustc-hex", - "static_assertions 0.2.5", -] - [[package]] name = "fixed-hash" version = "0.8.0" @@ -735,7 +691,7 @@ dependencies = [ "byteorder", "rand 0.8.5", "rustc-hex", - "static_assertions 1.1.0", + "static_assertions", ] [[package]] @@ -821,22 +777,13 @@ version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" -[[package]] -name = "heapsize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" -dependencies = [ - "winapi", -] - [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -850,16 +797,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -882,20 +829,20 @@ dependencies = [ [[package]] name = "impl-rlp" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" dependencies = [ "rlp", ] [[package]] name = "impl-serde" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -911,31 +858,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", ] -[[package]] -name = "injective-cosmwasm" -version = "0.1.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b2d3b5cfe251bfe4d7f1aea33ad98886f2a01cefafaac4e14e86ad23822729" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus 0.15.1", - "ethereum-types", - "hex", - "injective-math 0.1.21", - "schemars", - "serde 1.0.188", - "serde_repr", - "subtle-encoding", -] - [[package]] name = "injective-cosmwasm" version = "0.2.16" @@ -945,29 +875,14 @@ dependencies = [ "cw-storage-plus 0.15.1", "ethereum-types", "hex", - "injective-math 0.2.1", + "injective-math", "schemars", - "serde 1.0.188", + "serde 1.0.192", "serde-json-wasm 0.4.1", "serde_repr", "serde_test", "subtle-encoding", - "tiny-keccak", -] - -[[package]] -name = "injective-math" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b345e8411da7db74f269194f1e085b77767a652cba9c51f9ec953a9eb80345a8" -dependencies = [ - "bigint", - "cosmwasm-std", - "ethereum-types", - "num 0.4.1", - "schemars", - "serde 1.0.188", - "subtle-encoding", + "tiny-keccak 1.5.0", ] [[package]] @@ -979,7 +894,7 @@ dependencies = [ "ethereum-types", "primitive-types", "schemars", - "serde 1.0.188", + "serde 1.0.192", "subtle-encoding", ] @@ -994,7 +909,7 @@ dependencies = [ "protobuf", "protobuf-codegen-pure", "schemars", - "serde 1.0.188", + "serde 1.0.192", "subtle-encoding", ] @@ -1008,7 +923,7 @@ dependencies = [ "prost 0.11.9", "prost-types", "schemars", - "serde 1.0.188", + "serde 1.0.192", "serde-cw-value", ] @@ -1020,12 +935,12 @@ dependencies = [ "base64 0.13.1", "cosmwasm-std", "cw-multi-test", - "injective-cosmwasm 0.2.16", - "injective-math 0.2.1", + "injective-cosmwasm", + "injective-math", "rand 0.4.6", "secp256k1", - "serde 1.0.188", - "tiny-keccak", + "serde 1.0.192", + "tiny-keccak 1.5.0", ] [[package]] @@ -1045,9 +960,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -1072,7 +987,7 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "once_cell", "sha2 0.10.8", "signature 2.1.0", @@ -1080,9 +995,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.148" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "log" @@ -1267,7 +1182,7 @@ dependencies = [ "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -1314,9 +1229,11 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ - "fixed-hash 0.8.0", + "fixed-hash", "impl-codec", - "uint 0.9.5", + "impl-rlp", + "impl-serde", + "uint", ] [[package]] @@ -1331,9 +1248,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1459,19 +1376,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "winapi", -] - [[package]] name = "rand" version = "0.8.5" @@ -1555,10 +1459,11 @@ dependencies = [ [[package]] name = "rlp" -version = "0.4.6" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1190dcc8c3a512f1eef5d09bb8c84c7f39e1054e174d1795482e18f5272f2e73" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ + "bytes", "rustc-hex", ] @@ -1588,8 +1493,8 @@ checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", - "serde 1.0.188", - "serde_json 1.0.107", + "serde 1.0.192", + "serde_json 1.0.108", ] [[package]] @@ -1649,9 +1554,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" @@ -1664,9 +1569,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.188" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] @@ -1677,7 +1582,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -1686,7 +1591,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -1695,18 +1600,18 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.39", ] [[package]] @@ -1732,24 +1637,24 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", - "serde 1.0.188", + "serde 1.0.192", ] [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.39", ] [[package]] @@ -1758,7 +1663,7 @@ version = "1.0.176" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab" dependencies = [ - "serde 1.0.188", + "serde 1.0.192", ] [[package]] @@ -1825,12 +1730,6 @@ dependencies = [ "der 0.7.8", ] -[[package]] -name = "static_assertions" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" - [[package]] name = "static_assertions" version = "1.1.0" @@ -1865,9 +1764,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -1882,22 +1781,22 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.39", ] [[package]] @@ -1906,14 +1805,23 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" dependencies = [ - "crunchy 0.2.2", + "crunchy", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" @@ -1932,18 +1840,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "uint" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "082df6964410f6aa929a61ddfafc997e4f32c62c22490e439ac351cec827f436" -dependencies = [ - "byteorder", - "crunchy 0.2.2", - "heapsize", - "rustc-hex", -] - [[package]] name = "uint" version = "0.9.5" @@ -1951,9 +1847,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", - "crunchy 0.2.2", + "crunchy", "hex", - "static_assertions 1.1.0", + "static_assertions", ] [[package]] @@ -1976,9 +1872,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1986,24 +1882,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2011,22 +1907,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "winapi" @@ -2051,10 +1947,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets", ] @@ -2118,9 +2014,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] diff --git a/contracts/atomic-order-example/Cargo.toml b/contracts/atomic-order-example/Cargo.toml index 062b3b1e..e5489234 100644 --- a/contracts/atomic-order-example/Cargo.toml +++ b/contracts/atomic-order-example/Cargo.toml @@ -29,17 +29,17 @@ optimize = """docker run --rm -v "$(pwd)":/code \ """ [dependencies] -cosmwasm-std = "1.4.1" -cosmwasm-storage = "1.4.1" +cosmwasm-std = "1.2.0" +cosmwasm-storage = "1.2.0" cw-storage-plus = "0.14.0" cw2 = "0.14.0" cw-utils = "0.14.0" schemars = "0.8.8" serde = { version = "1.0.137", default-features = false, features = ["derive"] } thiserror = { version = "1.0.31" } -injective-cosmwasm = { version = "0.1.104" } -injective-math = { version = "0.1.4" } protobuf = { version = "2", features = ["with-bytes"] } +injective-cosmwasm = { path = "../../packages/injective-cosmwasm", version = "0.2.15" } +injective-math = { path = "../../packages/injective-math", version = "0.2.1" } injective-protobuf = { path = "../../packages/injective-protobuf", version = "0.2" } [dev-dependencies] diff --git a/contracts/atomic-order-example/src/contract.rs b/contracts/atomic-order-example/src/contract.rs index d33840fc..4b8a3754 100644 --- a/contracts/atomic-order-example/src/contract.rs +++ b/contracts/atomic-order-example/src/contract.rs @@ -96,6 +96,7 @@ pub fn try_swap( &config.market_id, subaccount_id, Some(contract.to_owned()), + None, ); let coins = &info.funds[0]; diff --git a/contracts/atomic-order-example/src/helpers.rs b/contracts/atomic-order-example/src/helpers.rs index 30567ade..3f3fe182 100644 --- a/contracts/atomic-order-example/src/helpers.rs +++ b/contracts/atomic-order-example/src/helpers.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, Addr, CosmosMsg, StdResult, SubMsg, WasmMsg}; +use cosmwasm_std::{to_json_binary, Addr, CosmosMsg, StdResult, SubMsg, WasmMsg}; use injective_cosmwasm::InjectiveMsgWrapper; use injective_math::FPDecimal; use schemars::JsonSchema; @@ -17,7 +17,7 @@ impl CwTemplateContract { } pub fn call>(&self, msg: T) -> StdResult { - let msg = to_binary(&msg.into())?; + let msg = to_json_binary(&msg.into())?; Ok(WasmMsg::Execute { contract_addr: self.addr().into(), msg, diff --git a/contracts/atomic-order-example/src/tests.rs b/contracts/atomic-order-example/src/tests.rs index 283398e8..8ae12924 100644 --- a/contracts/atomic-order-example/src/tests.rs +++ b/contracts/atomic-order-example/src/tests.rs @@ -2,15 +2,15 @@ use std::str::FromStr; use cosmwasm_std::testing::{mock_info, MockApi, MockStorage}; use cosmwasm_std::{ - coins, to_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, Reply, + coins, to_json_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, Reply, SubMsgResponse, SubMsgResult, SystemResult, Uint128, }; use injective_cosmwasm::InjectiveMsg::CreateSpotMarketOrder; use injective_cosmwasm::{ - inj_mock_deps, inj_mock_env, HandlesMarketIdQuery, InjectiveQueryWrapper, InjectiveRoute, - MarketId, OrderInfo, OrderType, OwnedDepsExt, SpotMarket, SpotMarketResponse, SpotOrder, - SubaccountId, WasmMockQuerier, + exchange::market::MarketStatus, inj_mock_deps, inj_mock_env, HandlesMarketIdQuery, + InjectiveQueryWrapper, InjectiveRoute, MarketId, OrderInfo, OrderType, OwnedDepsExt, + SpotMarket, SpotMarketResponse, SpotOrder, SubaccountId, WasmMockQuerier, }; use injective_math::FPDecimal; @@ -77,6 +77,7 @@ fn test_swap() { fee_recipient: Some(env.contract.address), price: i32_to_dec(1000), quantity: i32_to_dec(8), + cid: None, }, order_type: OrderType::BuyAtomic, trigger_price: None, @@ -132,12 +133,12 @@ fn create_spot_market_handler() -> impl HandlesMarketIdQuery { taker_fee_rate: FPDecimal::from_str("0.1").unwrap(), relayer_fee_share_rate: FPDecimal::from_str("0.4").unwrap(), market_id, - status: 0, + status: MarketStatus::Unspecified, min_price_tick_size: FPDecimal::from_str("0.000000000000001").unwrap(), min_quantity_tick_size: FPDecimal::from_str("1000000000000000").unwrap(), }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Temp() diff --git a/contracts/dummy/Cargo.toml b/contracts/dummy/Cargo.toml index bfd324f7..e4186cc3 100644 --- a/contracts/dummy/Cargo.toml +++ b/contracts/dummy/Cargo.toml @@ -29,10 +29,10 @@ optimize = """docker run --rm -v "$(pwd)":/code \ """ [dependencies] -cosmwasm-std = { version = "1.4.1" } +cosmwasm-std = { version = "1.2.0" } cw-storage-plus = "0.16.0" cw2 = "0.14.0" serde = { version = "1.0.136", default-features = false, features = ["derive"] } schemars = "0.8.8" thiserror = { version = "1.0.30" } -injective-cosmwasm = { version = "0.1.104" } +injective-cosmwasm = { path = "../../packages/injective-cosmwasm", version = "0.2.15" } diff --git a/contracts/dummy/src/contract.rs b/contracts/dummy/src/contract.rs index 2776b61e..b1c2378f 100644 --- a/contracts/dummy/src/contract.rs +++ b/contracts/dummy/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, + to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, }; use cw2::set_contract_version; use cw_storage_plus::Item; @@ -44,7 +44,7 @@ pub fn execute( match msg { ExecuteMsg::Ping { .. } => { let mut response = Response::new(); - response.data = Some(to_binary("pong")?); + response.data = Some(to_json_binary("pong")?); Ok(response) } ExecuteMsg::Error { .. } => Err(ContractError::Std(StdError::generic_err("oh no!"))), @@ -71,15 +71,15 @@ pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result StdResult { match msg { - QueryMsg::Ping { .. } => to_binary("pong"), + QueryMsg::Ping { .. } => to_json_binary("pong"), QueryMsg::Error { .. } => Err(StdError::generic_err("oh no!")), QueryMsg::Runs {} => { let runs_count = COUNTER.load(deps.storage)?; - to_binary(&format!("{runs_count}")) + to_json_binary(&format!("{runs_count}")) } QueryMsg::Active {} => { let is_active = ACTIVE.load(deps.storage)?; - to_binary(&format!("{is_active}")) + to_json_binary(&format!("{is_active}")) } } } diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index f69e4ee9..c6bca617 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -17,7 +17,7 @@ version = "0.2.16" [dependencies] cosmwasm-std = { version = "1.2.0" } cw-storage-plus = { version = "0.15.0" } -ethereum-types = "0.5.2" +ethereum-types = "0.14.1" hex = { version = "0.4.3", features = [ "serde" ] } injective-math = { path = "../injective-math", version = "0.2.1" } schemars = "0.8.8" diff --git a/packages/injective-cosmwasm/src/exchange_mock_querier.rs b/packages/injective-cosmwasm/src/exchange_mock_querier.rs index 7395488a..974dc096 100644 --- a/packages/injective-cosmwasm/src/exchange_mock_querier.rs +++ b/packages/injective-cosmwasm/src/exchange_mock_querier.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use cosmwasm_std::testing::{MockApi, MockStorage}; use cosmwasm_std::{ - from_slice, to_binary, Addr, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, + from_json, to_json_binary, Addr, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, WasmQuery, }; @@ -49,7 +49,7 @@ fn default_subaccount_deposit_response_handler() -> QuerierResult { total_balance: FPDecimal::from(10_000_000_000u128), }, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_spot_market_response_handler(market_id: MarketId) -> QuerierResult { @@ -67,22 +67,22 @@ fn default_spot_market_response_handler(market_id: MarketId) -> QuerierResult { min_quantity_tick_size: FPDecimal::from_str("1000000000000000.0").unwrap(), }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_spot_orders_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_spot_orders_to_cancel_up_to_amount_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_derivative_orders_to_cancel_up_to_amount_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_derivative_market_response_handler(market_id: MarketId) -> QuerierResult { @@ -109,7 +109,7 @@ fn default_derivative_market_response_handler(market_id: MarketId) -> QuerierRes mark_price: FPDecimal::ONE, }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_subaccount_positions_response_handler() -> QuerierResult { @@ -118,37 +118,37 @@ fn default_subaccount_positions_response_handler() -> QuerierResult { fn default_subaccount_position_in_market_response_handler() -> QuerierResult { let response = SubaccountPositionInMarketResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_subaccount_effective_position_in_market_response_handler() -> QuerierResult { let response = SubaccountEffectivePositionInMarketResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_derivative_orders_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_transient_spot_orders_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_trader_transient_derivative_orders_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_perpetual_market_info_response_handler() -> QuerierResult { let response = PerpetualMarketInfoResponse { info: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_perpetual_market_funding_response_handler() -> QuerierResult { let response = PerpetualMarketFundingResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_market_volatility_response_handler() -> QuerierResult { @@ -157,7 +157,7 @@ fn default_market_volatility_response_handler() -> QuerierResult { history_metadata: None, raw_history: None, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_spot_market_mid_price_and_tob_response_handler() -> QuerierResult { @@ -166,7 +166,7 @@ fn default_spot_market_mid_price_and_tob_response_handler() -> QuerierResult { best_buy_price: None, best_sell_price: None, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_derivative_market_mid_price_and_tob_response_handler() -> QuerierResult { @@ -175,7 +175,7 @@ fn default_derivative_market_mid_price_and_tob_response_handler() -> QuerierResu best_buy_price: None, best_sell_price: None, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_aggregate_market_volume_handler() -> QuerierResult { @@ -185,7 +185,7 @@ fn default_aggregate_market_volume_handler() -> QuerierResult { taker_volume: FPDecimal::from(100u128), }, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_aggregate_account_volume_handler() -> QuerierResult { @@ -207,17 +207,17 @@ fn default_aggregate_account_volume_handler() -> QuerierResult { }, ], }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_denom_decimal_handler() -> QuerierResult { let response = QueryDenomDecimalResponse { decimals: 6 }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_denom_decimals_handler() -> QuerierResult { let response = QueryDenomDecimalsResponse { denom_decimals: vec![] }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_oracle_volatility_response_handler() -> QuerierResult { @@ -226,7 +226,7 @@ fn default_oracle_volatility_response_handler() -> QuerierResult { history_metadata: None, raw_history: None, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_pyth_price_response_handler() -> QuerierResult { @@ -244,40 +244,40 @@ fn default_pyth_price_response_handler() -> QuerierResult { }, }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_token_factory_denom_total_supply_handler() -> QuerierResult { let response = TokenFactoryDenomSupplyResponse { total_supply: Uint128::from(1000u128), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_token_factory_denom_creation_fee_handler() -> QuerierResult { let response = TokenFactoryCreateDenomFeeResponse { fee: vec![Coin::new(10, "inj")], }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_contract_registration_info_response_handler() -> QuerierResult { let response = QueryContractRegistrationInfoResponse { contract: None }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_balance_bank_query_handler(denom: impl Into) -> QuerierResult { let response = BalanceResponse { amount: Coin::new(1000000000000000, denom), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_all_balances_bank_query_handler() -> QuerierResult { let response = AllBalanceResponse { amount: vec![Coin::new(1000000000000000, "inj")], }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_exchange_params_response_handler() -> QuerierResult { @@ -311,7 +311,7 @@ fn default_exchange_params_response_handler() -> QuerierResult { is_instant_derivative_market_launch_enabled: Some(true), }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_spot_market_orderbook_response_handler() -> QuerierResult { @@ -322,14 +322,14 @@ fn default_spot_market_orderbook_response_handler() -> QuerierResult { PriceLevel::new(12u128.into(), 10u128.into()), ], }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_market_atomic_execution_fee_multiplier_response_handler() -> QuerierResult { let response = QueryMarketAtomicExecutionFeeMultiplierResponse { multiplier: FPDecimal::from_str("2.0").unwrap(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } pub trait HandlesSmartQuery { @@ -487,7 +487,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return SystemResult::Err(SystemError::InvalidRequest { @@ -760,7 +760,8 @@ impl TestDeposit { pub mod handlers { use cosmwasm_std::{ - to_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, Uint128, + to_json_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, + Uint128, }; use std::collections::HashMap; @@ -804,7 +805,7 @@ pub mod handlers { total_balance: matching_coins.first().unwrap().amount, }, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { coins })) @@ -829,7 +830,7 @@ pub mod handlers { let response = SubaccountDepositResponse { deposits: matching_deposits.first().unwrap().deposit.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { deposits })) @@ -854,7 +855,7 @@ pub mod handlers { let response = SpotMarketResponse { market: self.market.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { market })) @@ -875,7 +876,7 @@ pub mod handlers { buys_price_level: if order_side != OrderSide::Sell { price_levels.clone() } else { vec![] }, sells_price_level: if order_side != OrderSide::Buy { price_levels } else { vec![] }, }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { orderbooks })) @@ -891,7 +892,7 @@ pub mod handlers { let response = SpotMarketResponse { market: self.markets.get(&market_id).cloned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } @@ -924,7 +925,7 @@ pub mod handlers { let response = TraderSpotOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { orders, assertion })) @@ -955,7 +956,7 @@ pub mod handlers { let response = TraderDerivativeOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { orders, assertion })) @@ -980,7 +981,7 @@ pub mod handlers { mark_price: self.mark_price.to_owned(), }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { market, info, mark_price })) @@ -995,7 +996,7 @@ pub mod handlers { let response = TraderSpotOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { orders })) @@ -1012,7 +1013,7 @@ pub mod handlers { let response = TraderDerivativeOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { orders })) @@ -1030,7 +1031,7 @@ pub mod handlers { let response = SubaccountEffectivePositionInMarketResponse { state: self.position.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } @@ -1047,7 +1048,7 @@ pub mod handlers { let response = SubaccountPositionInMarketResponse { state: self.position.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } @@ -1071,7 +1072,7 @@ pub mod handlers { best_buy_price: self.best_buy_price.to_owned(), best_sell_price: self.best_sell_price.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { @@ -1103,7 +1104,7 @@ pub mod handlers { history_metadata: self.history_metadata.to_owned(), raw_history: self.raw_history.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { @@ -1144,7 +1145,7 @@ pub mod handlers { quote_timestamp: self.quote_timestamp.to_owned(), }), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { @@ -1165,7 +1166,7 @@ pub mod handlers { impl HandlesDenomSupplyQuery for Temp { fn handle(&self, _denom: String) -> QuerierResult { let response = TokenFactoryDenomSupplyResponse { total_supply: self.supply }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { supply })) @@ -1178,7 +1179,7 @@ pub mod handlers { impl HandlesFeeQuery for Temp { fn handle(&self) -> QuerierResult { let response = TokenFactoryCreateDenomFeeResponse { fee: self.fee.to_owned() }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { fee })) @@ -1193,7 +1194,7 @@ pub mod handlers { let response = QueryContractRegistrationInfoResponse { contract: self.contract.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { contract })) @@ -1210,7 +1211,7 @@ pub mod handlers { let balance = balances.iter().find(|b| -> bool { b.denom == denom }).unwrap_or(&empty); let res = BalanceResponse { amount: balance.to_owned() }; - SystemResult::Ok(ContractResult::from(to_binary(&res))) + SystemResult::Ok(ContractResult::from(to_json_binary(&res))) } } Some(Box::new(Temp { balances })) @@ -1226,7 +1227,7 @@ pub mod handlers { amount: self.balances.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_binary(&res))) + SystemResult::Ok(ContractResult::from(to_json_binary(&res))) } } Some(Box::new(Temp { balances })) @@ -1239,7 +1240,7 @@ pub mod handlers { impl HandlesMarketIdQuery for Temp { fn handle(&self, _market_id: MarketId) -> QuerierResult { let response = QueryMarketAtomicExecutionFeeMultiplierResponse { multiplier: self.multiplier }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } } Some(Box::new(Temp { multiplier })) diff --git a/packages/injective-math/Cargo.toml b/packages/injective-math/Cargo.toml index 2e04521b..eab90338 100644 --- a/packages/injective-math/Cargo.toml +++ b/packages/injective-math/Cargo.toml @@ -17,7 +17,7 @@ backtraces = [ "cosmwasm-std/backtraces" ] [dependencies] primitive-types = "0.12.2" cosmwasm-std = { version = "1.2.0" } -ethereum-types = "0.5.2" +ethereum-types = "0.14.1" schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } diff --git a/packages/injective-protobuf/Cargo.toml b/packages/injective-protobuf/Cargo.toml index 5c8381d0..81da50cf 100644 --- a/packages/injective-protobuf/Cargo.toml +++ b/packages/injective-protobuf/Cargo.toml @@ -18,10 +18,10 @@ protobuf-codegen-pure = "2" backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "1.4.1" } +cosmwasm-std = { version = "1.2.0" } schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = ["derive"] } -ethereum-types = "0.5.2" +ethereum-types = "0.14.1" subtle-encoding = { version = "0.5.1", features = ["bech32-preview"] } num = "0.4.0" protobuf = { version = "2", features = ["with-bytes"] } diff --git a/packages/injective-std/Cargo.toml b/packages/injective-std/Cargo.toml index e1b85a8e..ec6d4578 100644 --- a/packages/injective-std/Cargo.toml +++ b/packages/injective-std/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] chrono = {version = "0.4.24"} -cosmwasm-std = {version = "1.1.2", features = ["stargate"]} +cosmwasm-std = {version = "1.2.0", features = ["stargate"]} osmosis-std-derive = {version = "0.15.2"} prost = "0.11.0" prost-types = {version = "0.11.1", default-features = false} diff --git a/packages/injective-testing/src/chain_mock.rs b/packages/injective-testing/src/chain_mock.rs index 14f8e80e..c66bfc9d 100644 --- a/packages/injective-testing/src/chain_mock.rs +++ b/packages/injective-testing/src/chain_mock.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Result as AnyResult}; use cosmwasm_std::{testing::MockApi, Addr, Api, Binary, BlockInfo, Coin, CustomQuery, Empty, MemoryStorage, Querier, Storage}; -use cosmwasm_std::{to_binary, StdError}; +use cosmwasm_std::{to_json_binary, StdError}; use cw_multi_test::{AddressGenerator, App}; use cw_multi_test::{AppResponse, BankKeeper, BasicAppBuilder, CosmosRouter, DistributionKeeper, Module, Router, StakeKeeper, WasmKeeper}; use injective_cosmwasm::{InjectiveMsgWrapper, InjectiveQueryWrapper}; @@ -84,7 +84,7 @@ pub struct ExecuteResponseContainer { impl ExecuteResponseContainer { pub fn with_ok_response(payload: &T) -> Self { ExecuteResponseContainer { - response: Some(Ok(Some(to_binary(payload).unwrap()))), + response: Some(Ok(Some(to_json_binary(payload).unwrap()))), } } @@ -108,7 +108,7 @@ pub struct QueryResponseContainer { impl QueryResponseContainer { pub fn with_ok_response(payload: &T) -> Self { QueryResponseContainer { - response: Some(Ok(to_binary(payload).unwrap())), + response: Some(Ok(to_json_binary(payload).unwrap())), } } From ebe4bab9905a5d24a7af10c2731b6931a3db4eb0 Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 12:52:40 -0500 Subject: [PATCH 3/8] fixed lint --- contracts/atomic-order-example/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/atomic-order-example/src/tests.rs b/contracts/atomic-order-example/src/tests.rs index 8ae12924..3e2efd3b 100644 --- a/contracts/atomic-order-example/src/tests.rs +++ b/contracts/atomic-order-example/src/tests.rs @@ -2,8 +2,8 @@ use std::str::FromStr; use cosmwasm_std::testing::{mock_info, MockApi, MockStorage}; use cosmwasm_std::{ - coins, to_json_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, Reply, - SubMsgResponse, SubMsgResult, SystemResult, Uint128, + coins, to_json_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, + Reply, SubMsgResponse, SubMsgResult, SystemResult, Uint128, }; use injective_cosmwasm::InjectiveMsg::CreateSpotMarketOrder; From 07470065c4a678011aaf1bf3f5d4afb53ad99fa8 Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 13:03:08 -0500 Subject: [PATCH 4/8] delete num from dependency --- Cargo.lock | 59 +++----------------------- packages/injective-protobuf/Cargo.toml | 1 - 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f5982f02..0b4c5efb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -905,7 +905,6 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "ethereum-types", - "num 0.4.1", "protobuf", "protobuf-codegen-pure", "schemars", @@ -1023,25 +1022,11 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" dependencies = [ - "num-bigint 0.1.44", - "num-complex 0.1.43", + "num-bigint", + "num-complex", "num-integer", "num-iter", - "num-rational 0.1.42", - "num-traits", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint 0.4.4", - "num-complex 0.4.4", - "num-integer", - "num-iter", - "num-rational 0.4.1", + "num-rational", "num-traits", ] @@ -1057,17 +1042,6 @@ dependencies = [ "rustc-serialize", ] -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-complex" version = "0.1.43" @@ -1078,15 +1052,6 @@ dependencies = [ "rustc-serialize", ] -[[package]] -name = "num-complex" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" -dependencies = [ - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -1114,24 +1079,12 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" dependencies = [ - "num-bigint 0.1.44", + "num-bigint", "num-integer", "num-traits", "rustc-serialize", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint 0.4.4", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.17" @@ -1564,7 +1517,7 @@ version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c97b18e9e53de541f11e497357d6c5eaeb39f0cb9c8734e274abe4935f6991fa" dependencies = [ - "num 0.1.42", + "num", ] [[package]] @@ -1631,7 +1584,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aaee47e038bf9552d30380d3973fff2593ee0a76d81ad4c581f267cdcadf36" dependencies = [ - "num 0.1.42", + "num", "serde 0.6.15", ] diff --git a/packages/injective-protobuf/Cargo.toml b/packages/injective-protobuf/Cargo.toml index 81da50cf..e2fedf7c 100644 --- a/packages/injective-protobuf/Cargo.toml +++ b/packages/injective-protobuf/Cargo.toml @@ -23,7 +23,6 @@ schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = ["derive"] } ethereum-types = "0.14.1" subtle-encoding = { version = "0.5.1", features = ["bech32-preview"] } -num = "0.4.0" protobuf = { version = "2", features = ["with-bytes"] } [dev-dependencies] From a3cce4fe1fba4f65a86dc117c1eb22c6fdc4dd23 Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 15:50:37 -0500 Subject: [PATCH 5/8] wip --- Cargo.lock | 123 +++++++++++------- Cargo.toml | 55 ++++++++ contracts/atomic-order-example/Cargo.toml | 28 ++-- contracts/dummy/Cargo.toml | 14 +- packages/injective-cosmwasm/Cargo.toml | 26 ++-- packages/injective-math/Cargo.toml | 14 +- packages/injective-protobuf/Cargo.toml | 14 +- packages/injective-testing/Cargo.toml | 21 +-- .../src/address_generator.rs | 1 - 9 files changed, 192 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b4c5efb..daecdb98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,9 +58,9 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 0.14.0", - "cw-utils 0.14.0", - "cw2 0.14.0", + "cw-storage-plus 0.15.1", + "cw-utils", + "cw2 0.15.1", "injective-cosmwasm", "injective-math", "injective-protobuf", @@ -363,7 +363,7 @@ dependencies = [ "anyhow", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-utils", "derivative", "itertools", "k256 0.11.6", @@ -373,17 +373,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cw-storage-plus" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8b264257c4f44c49b7ce09377af63aa040768ecd3fd7bdd2d48a09323a1e90" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde 1.0.192", -] - [[package]] name = "cw-storage-plus" version = "0.15.1" @@ -395,17 +384,6 @@ dependencies = [ "serde 1.0.192", ] -[[package]] -name = "cw-storage-plus" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b6f91c0b94481a3e9ef1ceb183c37d00764f8751e39b45fc09f4d9b970d469" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde 1.0.192", -] - [[package]] name = "cw-storage-plus" version = "1.1.0" @@ -417,20 +395,6 @@ dependencies = [ "serde 1.0.192", ] -[[package]] -name = "cw-utils" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414b91f3d7a619bb26c835119d7095804596a1382ddc1d184c33c1d2c17f6c5e" -dependencies = [ - "cosmwasm-std", - "cw2 0.14.0", - "schemars", - "semver", - "serde 1.0.192", - "thiserror", -] - [[package]] name = "cw-utils" version = "1.0.2" @@ -448,12 +412,13 @@ dependencies = [ [[package]] name = "cw2" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa74c324af8e3506fd8d50759a265bead3f87402e413c840042af5d2808463d6" +checksum = "5abb8ecea72e09afff830252963cb60faf945ce6cef2c20a43814516082653da" dependencies = [ + "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.14.0", + "cw-storage-plus 0.15.1", "schemars", "serde 1.0.192", ] @@ -472,6 +437,40 @@ dependencies = [ "thiserror", ] +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.39", +] + [[package]] name = "der" version = "0.6.1" @@ -529,8 +528,8 @@ name = "dummy" version = "1.0.0" dependencies = [ "cosmwasm-std", - "cw-storage-plus 0.16.0", - "cw2 0.14.0", + "cw-storage-plus 0.15.1", + "cw2 0.15.1", "injective-cosmwasm", "schemars", "serde 1.0.192", @@ -629,6 +628,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "enumset" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -694,6 +714,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "forward_ref" version = "1.0.0" @@ -818,6 +844,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "impl-codec" version = "0.6.0" @@ -1445,6 +1477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", + "enumset", "schemars_derive", "serde 1.0.192", "serde_json 1.0.108", diff --git a/Cargo.toml b/Cargo.toml index 6a707c49..780accdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,61 @@ panic = 'abort' incremental = false overflow-checks = true + +[workspace.dependencies] +anyhow = { version = "1.0.66" } +base64 = { version = "0.13.1" } +bincode = { version = "1.3.3" } +chrono = { version = "0.4.24" } +cosmrs = { version = "0.9.0", features = [ "cosmwasm" ] } +cosmwasm-schema = { version = "1.2.0" } +cosmwasm-std = { version = "1.2.0", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-storage = { version = "1.2.0", features = [ "iterator" ] } +cosmwasm-vm = { version = "1.2.0", features = [ "iterator" ] } +cw-multi-test = { version = "0.16.2" } +cw-storage-plus = { version = "0.15.1" } +cw-utils = { version = "1.0.1" } +cw2 = { version = "0.15.1" } +cw20 = { version = "0.15.0" } +cw20-base = { version = "0.15.0", features = [ "library" ] } +enumset = { version = "1.0.12", features = [ "serde" ] } +ethereum-types = { version = "0.14.1" } +injective-test-tube = { git = "https://github.com/InjectiveLabs/test-tube", branch = "latest" } +json = { version = "0.12.4" } +hex = { version = "0.4.3", features = [ "serde" ] } +osmosis-std-derive = { version = "0.15.2" } +primitive-types = { version = "0.12.2" } +prost = { version = "0.11.9" } +prost-types = {version = "0.11.1", default-features = false} +protobuf = { version = "2.28.0", features = ["with-bytes"] } +rand = { version = "0.4.6" } +schemars = { version = "0.8.8", features = [ "enumset" ] } +secp256k1 = { versio = "0.6.2" , features = ["rand"]} +serde = { version = "1.0.137", default-features = false, features = ["derive"] } +serde-cw-value = { version = "0.7.0" } +serde_json = { version = "1.0.96"} +serde-json-wasm = { version = "0.4.1" } +serde_repr = { version = "0.1" } +serde_test = { version = "1.0.166" } +subtle-encoding = { version = "0.5.1", features = ["bech32-preview"] } +thiserror = { version = "1.0.31" } +tiny-keccak = { version = "1.2.1" } + +# packages +injective-cosmwasm = { version = "0.2.16", path = "./packages/injective-cosmwasm" } +injective-math = { version = "0.2.1", path = "./packages/injective-math" } +injective-protobuf = { version = "0.2", path = "./packages/injective-protobuf" } +injective-std = { version = "0.1.3" , path = "./packages/injective-std" } +injective-testing = { version = "0.1.3" , path = "./packages/injective-testing" } + + [patch.crates-io] #cw-multi-test = { path = "../cw-multi-test" } #cw-multi-test = { git = "https://github.com/InjectiveLabs/cw-multi-test.git", branch ="feature/custom_address_generator" } + + + +# [dev-dependencies] +# cosmwasm-schema = { version = "1.2.0" } +# serde-json-wasm = { version = "0.4.1" } +# cw-multi-test = { version = "0.16.2" } diff --git a/contracts/atomic-order-example/Cargo.toml b/contracts/atomic-order-example/Cargo.toml index e5489234..c8705061 100644 --- a/contracts/atomic-order-example/Cargo.toml +++ b/contracts/atomic-order-example/Cargo.toml @@ -29,19 +29,19 @@ optimize = """docker run --rm -v "$(pwd)":/code \ """ [dependencies] -cosmwasm-std = "1.2.0" -cosmwasm-storage = "1.2.0" -cw-storage-plus = "0.14.0" -cw2 = "0.14.0" -cw-utils = "0.14.0" -schemars = "0.8.8" -serde = { version = "1.0.137", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.31" } -protobuf = { version = "2", features = ["with-bytes"] } -injective-cosmwasm = { path = "../../packages/injective-cosmwasm", version = "0.2.15" } -injective-math = { path = "../../packages/injective-math", version = "0.2.1" } -injective-protobuf = { path = "../../packages/injective-protobuf", version = "0.2" } +cosmwasm-std = { workspace = true } +cosmwasm-storage = { workspace = true } +cw-storage-plus = { workspace = true } +cw2 = { workspace = true } +cw-utils = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +protobuf = { workspace = true } +injective-cosmwasm = { workspace = true } +injective-math = { workspace = true } +injective-protobuf = { workspace = true } [dev-dependencies] -cosmwasm-schema = "1.4.1" -cw-multi-test = "0.16.2" +cosmwasm-schema = { workspace = true } +cw-multi-test = { workspace = true } diff --git a/contracts/dummy/Cargo.toml b/contracts/dummy/Cargo.toml index e4186cc3..87f8e606 100644 --- a/contracts/dummy/Cargo.toml +++ b/contracts/dummy/Cargo.toml @@ -29,10 +29,10 @@ optimize = """docker run --rm -v "$(pwd)":/code \ """ [dependencies] -cosmwasm-std = { version = "1.2.0" } -cw-storage-plus = "0.16.0" -cw2 = "0.14.0" -serde = { version = "1.0.136", default-features = false, features = ["derive"] } -schemars = "0.8.8" -thiserror = { version = "1.0.30" } -injective-cosmwasm = { path = "../../packages/injective-cosmwasm", version = "0.2.15" } +cosmwasm-std = { workspace = true } +cw-storage-plus = { workspace = true } +cw2 = { workspace = true } +serde = { workspace = true } +schemars = { workspace = true } +thiserror = { workspace = true } +injective-cosmwasm = { workspace = true } diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index c6bca617..41794c98 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -15,18 +15,18 @@ version = "0.2.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.2.0" } -cw-storage-plus = { version = "0.15.0" } -ethereum-types = "0.14.1" -hex = { version = "0.4.3", features = [ "serde" ] } -injective-math = { path = "../injective-math", version = "0.2.1" } -schemars = "0.8.8" -serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } -serde_repr = "0.1" -subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } -tiny-keccak = "1.2.1" +cosmwasm-std = { workspace = true } +cw-storage-plus = { workspace = true } +ethereum-types = { workspace = true } +hex = { workspace = true } +injective-math = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true } +serde_repr = { workspace = true } +subtle-encoding = { workspace = true } +tiny-keccak = { workspace = true } [dev-dependencies] -cosmwasm-schema = { version = "1.2.0" } -serde-json-wasm = { version = "0.4.1" } -serde_test = { version = "1.0.166" } +cosmwasm-schema = { workspace = true } +serde-json-wasm = { workspace = true } +serde_test = { workspace = true } diff --git a/packages/injective-math/Cargo.toml b/packages/injective-math/Cargo.toml index eab90338..f3beb7b2 100644 --- a/packages/injective-math/Cargo.toml +++ b/packages/injective-math/Cargo.toml @@ -15,12 +15,12 @@ version = "0.2.1" backtraces = [ "cosmwasm-std/backtraces" ] [dependencies] -primitive-types = "0.12.2" -cosmwasm-std = { version = "1.2.0" } -ethereum-types = "0.14.1" -schemars = "0.8.8" -serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } -subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } +primitive-types = { workspace = true } +cosmwasm-std = { workspace = true } +ethereum-types = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true } +subtle-encoding = { workspace = true } [dev-dependencies] -cosmwasm-schema = { version = "1.2.0" } +cosmwasm-schema = { workspace = true } diff --git a/packages/injective-protobuf/Cargo.toml b/packages/injective-protobuf/Cargo.toml index e2fedf7c..de981608 100644 --- a/packages/injective-protobuf/Cargo.toml +++ b/packages/injective-protobuf/Cargo.toml @@ -18,12 +18,12 @@ protobuf-codegen-pure = "2" backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "1.2.0" } -schemars = "0.8.8" -serde = { version = "1.0.136", default-features = false, features = ["derive"] } -ethereum-types = "0.14.1" -subtle-encoding = { version = "0.5.1", features = ["bech32-preview"] } -protobuf = { version = "2", features = ["with-bytes"] } +cosmwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true } +ethereum-types = { workspace = true } +subtle-encoding = { workspace = true } +protobuf = { workspace = true } [dev-dependencies] -cosmwasm-schema = { version = "1.4.1" } +cosmwasm-schema = { workspace = true } diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index ca78df02..c8daf95f 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -8,13 +8,14 @@ repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/package version = "0.1.4" [dependencies] -anyhow = "1.0.66" -base64 = "0.13.1" -cosmwasm-std = { version = "1.2.0", features = [ "abort", "iterator" ] } -cw-multi-test = "0.16.2" -injective-cosmwasm = { version = "0.2.16", path = "../injective-cosmwasm" } -injective-math = { version = "0.2.1", path = "../injective-math" } -rand = "0.4.6" -secp256k1 = "0.6.2" -serde = { version = "1.0.103", default-features = false, features = [ "derive" ] } -tiny-keccak = "1.2.1" +anyhow = { workspace = true } +base64 = { workspace = true } +cosmwasm-std = { workspace = true } +cw-multi-test = { workspace = true } +injective-cosmwasm = { workspace = true } +injective-math = { workspace = true } +rand = { workspace = true } +# secp256k1 = { workspace = true } +serde = { workspace = true } +tiny-keccak = { workspace = true } +secp256k1 = "0.6.2" diff --git a/packages/injective-testing/src/address_generator.rs b/packages/injective-testing/src/address_generator.rs index ef680cd6..2e264768 100644 --- a/packages/injective-testing/src/address_generator.rs +++ b/packages/injective-testing/src/address_generator.rs @@ -60,7 +60,6 @@ pub fn generate_inj_address() -> Addr { let secp256k1 = Secp256k1::new(); let mut rng = OsRng::new().expect("failed to create new random number generator"); let (_, public_key) = secp256k1.generate_keypair(&mut rng).expect("failed to generate key pair"); - let public_key_array = &public_key.serialize_vec(&secp256k1, false)[1..]; let keccak = tiny_keccak::keccak256(public_key_array); let address_short = to_hex_string(&keccak[ADDRESS_BYTE_INDEX..], 40); // get rid of the constant 0x04 byte From a379f432f942ad47fcdab64b5cc4f7fdc94e050f Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 15:56:20 -0500 Subject: [PATCH 6/8] moved all packages and contracts dependencies to workspace level Cargo.toml --- Cargo.toml | 2 +- packages/injective-testing/Cargo.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 780accdd..3dce3f26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ prost-types = {version = "0.11.1", default-features = false} protobuf = { version = "2.28.0", features = ["with-bytes"] } rand = { version = "0.4.6" } schemars = { version = "0.8.8", features = [ "enumset" ] } -secp256k1 = { versio = "0.6.2" , features = ["rand"]} +secp256k1 = { versio = "0.6.2" } serde = { version = "1.0.137", default-features = false, features = ["derive"] } serde-cw-value = { version = "0.7.0" } serde_json = { version = "1.0.96"} diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index c8daf95f..5f49ed81 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -15,7 +15,6 @@ cw-multi-test = { workspace = true } injective-cosmwasm = { workspace = true } injective-math = { workspace = true } rand = { workspace = true } -# secp256k1 = { workspace = true } +secp256k1 = { workspace = true } serde = { workspace = true } tiny-keccak = { workspace = true } -secp256k1 = "0.6.2" From 1a66b1597062855bb74348d6e0cb387371fbced7 Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Tue, 7 Nov 2023 16:07:56 -0500 Subject: [PATCH 7/8] added rust-toolchain --- rust-toolchain.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..d7f286c4 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "1.69.0" +# components = [ "rustc" ] +#targets = [ "wasm32-unknown-unknown" ] +profile = "minimal" From 8e4293d8ec3d24efcf181a0c7ecbdd23e9e48df0 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Wed, 8 Nov 2023 01:14:16 -0300 Subject: [PATCH 8/8] Updated cw packages and fixed deprecated function calls --- Cargo.lock | 43 +++++++++++++------ Cargo.toml | 22 +++++----- .../src/exchange_mock_querier.rs | 2 +- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index daecdb98..7d7a7fbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,9 +58,9 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 0.15.1", - "cw-utils", - "cw2 0.15.1", + "cw-storage-plus 0.16.0", + "cw-utils 0.16.0", + "cw2 0.16.0", "injective-cosmwasm", "injective-math", "injective-protobuf", @@ -363,7 +363,7 @@ dependencies = [ "anyhow", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils", + "cw-utils 1.0.2", "derivative", "itertools", "k256 0.11.6", @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0" +checksum = "d9b6f91c0b94481a3e9ef1ceb183c37d00764f8751e39b45fc09f4d9b970d469" dependencies = [ "cosmwasm-std", "schemars", @@ -395,6 +395,21 @@ dependencies = [ "serde 1.0.192", ] +[[package]] +name = "cw-utils" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6a84c6c1c0acc3616398eba50783934bd6c964bad6974241eaee3460c8f5b26" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2 0.16.0", + "schemars", + "semver", + "serde 1.0.192", + "thiserror", +] + [[package]] name = "cw-utils" version = "1.0.2" @@ -412,13 +427,13 @@ dependencies = [ [[package]] name = "cw2" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5abb8ecea72e09afff830252963cb60faf945ce6cef2c20a43814516082653da" +checksum = "91398113b806f4d2a8d5f8d05684704a20ffd5968bf87e3473e1973710b884ad" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 0.16.0", "schemars", "serde 1.0.192", ] @@ -528,8 +543,8 @@ name = "dummy" version = "1.0.0" dependencies = [ "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", + "cw-storage-plus 0.16.0", + "cw2 0.16.0", "injective-cosmwasm", "schemars", "serde 1.0.192", @@ -757,9 +772,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -904,7 +919,7 @@ version = "0.2.16" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 0.16.0", "ethereum-types", "hex", "injective-math", diff --git a/Cargo.toml b/Cargo.toml index 3dce3f26..0d4ebccc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,16 +24,16 @@ base64 = { version = "0.13.1" } bincode = { version = "1.3.3" } chrono = { version = "0.4.24" } cosmrs = { version = "0.9.0", features = [ "cosmwasm" ] } -cosmwasm-schema = { version = "1.2.0" } -cosmwasm-std = { version = "1.2.0", features = [ "abort", "iterator", "stargate" ] } -cosmwasm-storage = { version = "1.2.0", features = [ "iterator" ] } -cosmwasm-vm = { version = "1.2.0", features = [ "iterator" ] } -cw-multi-test = { version = "0.16.2" } -cw-storage-plus = { version = "0.15.1" } -cw-utils = { version = "1.0.1" } -cw2 = { version = "0.15.1" } -cw20 = { version = "0.15.0" } -cw20-base = { version = "0.15.0", features = [ "library" ] } +cosmwasm-schema = { version = "1.2.7" } +cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-storage = { version = "1.2.7", features = [ "iterator" ] } +cosmwasm-vm = { version = "1.2.7", features = [ "iterator" ] } +cw-multi-test = { version = "0.16.5" } +cw-storage-plus = { version = "0.16.0" } +cw-utils = { version = "0.16.0" } +cw2 = { version = "0.16.0" } +cw20 = { version = "0.16.0" } +cw20-base = { version = "0.16.0", features = [ "library" ] } enumset = { version = "1.0.12", features = [ "serde" ] } ethereum-types = { version = "0.14.1" } injective-test-tube = { git = "https://github.com/InjectiveLabs/test-tube", branch = "latest" } @@ -46,7 +46,7 @@ prost-types = {version = "0.11.1", default-features = false} protobuf = { version = "2.28.0", features = ["with-bytes"] } rand = { version = "0.4.6" } schemars = { version = "0.8.8", features = [ "enumset" ] } -secp256k1 = { versio = "0.6.2" } +secp256k1 = { version = "0.6.2" } serde = { version = "1.0.137", default-features = false, features = ["derive"] } serde-cw-value = { version = "0.7.0" } serde_json = { version = "1.0.96"} diff --git a/packages/injective-cosmwasm/src/exchange_mock_querier.rs b/packages/injective-cosmwasm/src/exchange_mock_querier.rs index e5cc4475..42081c72 100644 --- a/packages/injective-cosmwasm/src/exchange_mock_querier.rs +++ b/packages/injective-cosmwasm/src/exchange_mock_querier.rs @@ -333,7 +333,7 @@ fn default_derivative_market_orderbook_response_handler() -> QuerierResult { PriceLevel::new(12u128.into(), 10u128.into()), ], }; - SystemResult::Ok(ContractResult::from(to_binary(&response))) + SystemResult::Ok(ContractResult::from(to_json_binary(&response))) } fn default_market_atomic_execution_fee_multiplier_response_handler() -> QuerierResult {