diff --git a/.github/workflows/basic-rust.yml b/.github/workflows/basic-rust.yml index 89ed25b92..e03e6890f 100644 --- a/.github/workflows/basic-rust.yml +++ b/.github/workflows/basic-rust.yml @@ -13,8 +13,8 @@ on: branches: - main env: - RUSTC_VERSION: '1.69.0' - RUSTC_TOOLCHAIN: '1.69.0-x86_64-unknown-linux-gnu' + RUSTC_VERSION: '1.78.0' + RUSTC_TOOLCHAIN: '1.78.0-x86_64-unknown-linux-gnu' jobs: diff --git a/.github/workflows/cosmwasm-contracts-code-coverage.yml b/.github/workflows/cosmwasm-contracts-code-coverage.yml index 36a92b25b..62381fff9 100644 --- a/.github/workflows/cosmwasm-contracts-code-coverage.yml +++ b/.github/workflows/cosmwasm-contracts-code-coverage.yml @@ -17,8 +17,8 @@ defaults: working-directory: contracts/cosmwasm-vm env: - RUSTC_VERSION: '1.69.0' - RUSTC_TOOLCHAIN: '1.69.0-x86_64-unknown-linux-gnu' + RUSTC_VERSION: '1.78.0' + RUSTC_TOOLCHAIN: '1.78.0-x86_64-unknown-linux-gnu' jobs: code-coverage: diff --git a/Cargo.lock b/Cargo.lock index a68d4c36a..98b2b1db6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -15,38 +15,91 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys", +] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base16ct" @@ -55,10 +108,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] -name = "base64" -version = "0.11.0" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -66,6 +119,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64ct" version = "1.6.0" @@ -80,9 +139,9 @@ checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -102,6 +161,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bnum" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" + [[package]] name = "borsh" version = "0.10.3" @@ -121,7 +186,7 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.59", + "proc-macro2", "syn 1.0.109", ] @@ -131,8 +196,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -142,8 +207,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -155,25 +220,19 @@ 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" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" dependencies = [ "serde", ] -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - [[package]] name = "cfg-if" version = "1.0.0" @@ -182,14 +241,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", "num-traits", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "common" version = "0.1.0" @@ -214,9 +278,9 @@ dependencies = [ "rustc-hex", "safe-regex", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "subtle-encoding", "tendermint", @@ -229,7 +293,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/icon-project/IBC-Integration.git?branch=main#8b3dbac3e846fdc2bf36861a3c0f65b917acda43" +source = "git+https://github.com/icon-project/IBC-Integration.git?branch=main#c277c320238f5955e9243d7860e382a375233a98" dependencies = [ "bytes", "cosmwasm-schema", @@ -251,9 +315,9 @@ dependencies = [ "rustc-hex", "safe-regex", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "subtle-encoding", "tendermint", @@ -262,53 +326,41 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" - -[[package]] -name = "cosmwasm" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8709ce7dabeac33f4132cab84fda3796ac484d82c91ff5ccfb4ed61227af4bb5" -dependencies = [ - "base64 0.11.0", - "schemars 0.5.1", - "serde", - "serde-json-wasm 0.1.3", - "snafu", -] +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "cosmwasm-crypto" -version = "1.2.6" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c0e41be7e6c7d7ab3c61cdc32fcfaa14f948491a401cbc1c74bb33b6f4b851" +checksum = "dd50718a2b6830ce9eb5d465de5a018a12e71729d66b70807ce97e6dd14f931d" dependencies = [ "digest 0.10.7", + "ecdsa 0.16.9", "ed25519-zebra", - "k256", + "k256 0.13.1", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.2.6" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a7ee2798c92c00dd17bebb4210f81d5f647e5e92d847959b7977e0fd29a3500" +checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.2.6" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "407aca6f1671a08b60db8167f03bb7cb6b2378f0ddd9a030367b66ba33c2fd41" +checksum = "7879036156092ad1c22fe0d7316efc5a5eceec2bc3906462a2560215f2a2f929" dependencies = [ "cosmwasm-schema-derive", - "schemars 0.8.12", + "schemars", "serde", "serde_json", "thiserror", @@ -316,40 +368,42 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.6" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d1e00b8fd27ff923c10303023626358e23a6f9079f8ebec23a8b4b0bfcd4b3" +checksum = "0bb57855fbfc83327f8445ae0d413b1a05ac0d68c396ab4d122b2abd7bb82cb6" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "cosmwasm-std" -version = "1.2.6" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5fdfd112b070055f068fad079d490117c8e905a588b92a5a7c9276d029930" +checksum = "78c1556156fdf892a55cced6115968b961eaaadd6f724a2c2cb7d1e168e32dd3" dependencies = [ - "base64 0.13.1", + "base64 0.21.7", + "bech32", + "bnum", "cosmwasm-crypto", "cosmwasm-derive", "derivative", "forward_ref", "hex", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", - "sha2 0.10.6", + "serde-json-wasm", + "sha2 0.10.8", + "static_assertions", "thiserror", - "uint", ] [[package]] name = "cosmwasm-storage" -version = "1.2.6" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9e21c4f58986fd20184d7685e1c43c5732c9309337b09307d5952fd34dba6e" +checksum = "66de2ab9db04757bcedef2b5984fbe536903ada4a8a9766717a4a71197ef34f6" dependencies = [ "cosmwasm-std", "serde", @@ -357,9 +411,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -382,6 +436,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -420,7 +486,7 @@ dependencies = [ [[package]] name = "cw-common" -version = "0.1.1" +version = "0.1.2" dependencies = [ "bech32", "bytes", @@ -435,16 +501,16 @@ dependencies = [ "hex-buffer-serde", "ibc-proto", "prost 0.11.9", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm", "serde_json", "test-utils", ] [[package]] name = "cw-ibc-core" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "bytes", @@ -461,10 +527,10 @@ dependencies = [ "hex", "hex-literal 0.3.4", "prost 0.11.9", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", - "sha2 0.10.6", + "serde-json-wasm", + "sha2 0.10.8", "sha3", "test-utils", "thiserror", @@ -472,11 +538,10 @@ dependencies = [ [[package]] name = "cw-icon-light-client" -version = "0.1.1" +version = "0.1.2" dependencies = [ "bytes", "common 0.1.0", - "cosmwasm", "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", @@ -488,10 +553,10 @@ dependencies = [ "hex", "hex-literal 0.3.4", "prost 0.11.9", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", - "sha2 0.10.6", + "serde-json-wasm", + "sha2 0.10.8", "sha3", "test-utils", "thiserror", @@ -499,7 +564,7 @@ dependencies = [ [[package]] name = "cw-integration" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "common 0.1.0", @@ -514,7 +579,7 @@ dependencies = [ "cw-mock-ibc-core", "cw-multi-test", "cw-storage-plus 1.1.0", - "cw-xcall 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", + "cw-xcall 0.1.0", "cw-xcall-ibc-connection", "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "hex", @@ -537,9 +602,9 @@ dependencies = [ "cw-storage-plus 1.1.0", "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "cw2", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm", "thiserror", ] @@ -555,37 +620,36 @@ dependencies = [ "cw-storage-plus 1.1.0", "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "cw2", - "schemars 0.8.12", + "schemars", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm", "thiserror", ] [[package]] name = "cw-mock-ibc-connection" -version = "0.1.1" +version = "0.1.2" dependencies = [ "common 0.1.0", - "cosmwasm", "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-common", "cw-storage-plus 1.1.0", - "cw-xcall 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", + "cw-xcall 0.1.0", "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "cw2", "debug_print", "getrandom", "hex", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-mock-ibc-core" -version = "0.1.1" +version = "0.1.2" dependencies = [ "common 0.1.0", "cosmwasm-schema", @@ -593,21 +657,20 @@ dependencies = [ "cosmwasm-storage", "cw-common", "cw-storage-plus 1.1.0", - "cw-xcall 0.1.0 (git+https://github.com/icon-project/xCall.git?branch=main)", + "cw-xcall 0.2.0", "cw2", "getrandom", "hex", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-mock-ibc-dapp" -version = "0.1.1" +version = "0.1.2" dependencies = [ "common 0.1.0", - "cosmwasm", "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", @@ -617,61 +680,61 @@ dependencies = [ "debug_print", "getrandom", "hex", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-multi-test" -version = "0.16.4" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a18afd2e201221c6d72a57f0886ef2a22151bbc9e6db7af276fde8a91081042" +checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" dependencies = [ "anyhow", "cosmwasm-std", - "cw-storage-plus 1.0.1", + "cw-storage-plus 1.2.0", "cw-utils", "derivative", "itertools", - "k256", + "k256 0.11.6", "prost 0.9.0", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-storage-plus" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a5083c258acd68386734f428a5a171b29f7d733151ae83090c6fcc9417ffa" +version = "1.1.0" +source = "git+https://github.com/icon-project/cw-storage-plus.git?branch=fix-raw#238b520c3e193226143eedb717a3ed76187d11de" dependencies = [ "cosmwasm-std", - "schemars 0.8.12", + "schemars", "serde", ] [[package]] name = "cw-storage-plus" -version = "1.1.0" -source = "git+https://github.com/icon-project/cw-storage-plus.git?branch=fix-raw#238b520c3e193226143eedb717a3ed76187d11de" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ "cosmwasm-std", - "schemars 0.8.12", + "schemars", "serde", ] [[package]] name = "cw-utils" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "schemars 0.8.12", + "schemars", "semver", "serde", "thiserror", @@ -690,15 +753,15 @@ dependencies = [ "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "cw2", "debug_print", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-xcall" -version = "0.1.0" -source = "git+https://github.com/icon-project/xCall.git?branch=main#59960dcb8bcfb43e7e079ebe7e86dbf9baf05160" +version = "0.2.0" +source = "git+https://github.com/icon-project/xCall.git?branch=main#092c549c0891bafde954a74b17d5c335a64c83c9" dependencies = [ "common 0.1.0 (git+https://github.com/icon-project/IBC-Integration.git?branch=main)", "cosmwasm-schema", @@ -708,29 +771,28 @@ dependencies = [ "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?branch=main)", "cw2", "debug_print", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw-xcall-ibc-connection" -version = "0.1.1" +version = "0.1.2" dependencies = [ "common 0.1.0", - "cosmwasm", "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-common", "cw-storage-plus 1.1.0", - "cw-xcall 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", + "cw-xcall 0.1.0", "cw-xcall-lib 0.1.0 (git+https://github.com/icon-project/xCall.git?tag=v0.1.0-alpha.5)", "cw2", "debug_print", "getrandom", "hex", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] @@ -746,7 +808,7 @@ dependencies = [ "cw-storage-plus 1.1.0", "cw2", "debug_print", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] @@ -754,30 +816,33 @@ dependencies = [ [[package]] name = "cw-xcall-lib" version = "0.1.0" -source = "git+https://github.com/icon-project/xCall.git?branch=main#59960dcb8bcfb43e7e079ebe7e86dbf9baf05160" +source = "git+https://github.com/icon-project/xCall.git?branch=main#092c549c0891bafde954a74b17d5c335a64c83c9" dependencies = [ + "common 0.1.0 (git+https://github.com/icon-project/IBC-Integration.git?branch=main)", "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-storage-plus 1.1.0", "cw2", "debug_print", - "schemars 0.8.12", + "schemars", "serde", "thiserror", ] [[package]] name = "cw2" -version = "1.0.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb70cee2cf0b4a8ff7253e6bc6647107905e8eb37208f87d54f67810faa62f8" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.0.1", - "schemars 0.8.12", + "cw-storage-plus 1.2.0", + "schemars", + "semver", "serde", + "thiserror", ] [[package]] @@ -796,26 +861,36 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "derivative" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] @@ -834,32 +909,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 2.0.18", + "proc-macro2", + "quote", + "syn 2.0.72", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -867,10 +937,24 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.9", + "digest 0.10.7", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", ] [[package]] @@ -879,7 +963,7 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature", + "signature 1.6.4", ] [[package]] @@ -912,9 +996,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -922,59 +1006,91 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", "digest 0.10.7", - "ff", + "ff 0.12.1", "generic-array", - "group", - "pkcs8", + "group 0.12.1", + "pkcs8 0.9.0", "rand_core 0.6.4", - "sec1", + "sec1 0.3.0", "subtle", "zeroize", ] [[package]] -name = "erased-serde" -version = "0.3.25" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "serde", + "base16ct 0.2.0", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff 0.13.0", + "generic-array", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1 0.7.3", + "subtle", + "zeroize", ] [[package]] -name = "errno" -version = "0.3.1" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", + "log", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "env_logger" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ - "cc", - "libc", + "anstream", + "anstyle", + "env_filter", + "log", ] [[package]] -name = "fastrand" -version = "1.9.0" +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "erased-serde" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ - "instant", + "serde", ] +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + [[package]] name = "ff" version = "0.12.1" @@ -985,6 +1101,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -1017,9 +1143,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1031,9 +1157,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1041,33 +1167,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-sink", @@ -1084,13 +1210,14 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1103,7 +1230,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -1114,7 +1252,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.8", ] [[package]] @@ -1123,20 +1261,20 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", ] [[package]] -name = "heck" -version = "0.4.1" +name = "hashbrown" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] -name = "hermit-abi" -version = "0.3.1" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hex" @@ -1175,6 +1313,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + [[package]] name = "ibc" version = "0.32.0" @@ -1198,7 +1345,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "subtle-encoding", "tendermint", "tendermint-light-client-verifier", @@ -1237,7 +1384,7 @@ dependencies = [ "hex", "prost 0.11.9", "ripemd", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", ] @@ -1256,40 +1403,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "instant" -version = "0.1.12" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "cfg-if", + "equivalent", + "hashbrown 0.14.5", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1302,9 +1435,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "k256" @@ -1313,43 +1446,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", + "once_cell", + "sha2 0.10.8", + "signature 2.2.0", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.145" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.18" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -1357,14 +1504,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "multimap" @@ -1388,31 +1535,31 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "overload" @@ -1422,9 +1569,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parity-scale-codec" -version = "3.5.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "byte-slice-cast", @@ -1434,21 +1581,21 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbjson" @@ -1489,9 +1636,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", @@ -1499,9 +1646,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1515,8 +1662,18 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "der", - "spki", + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.9", + "spki 0.7.3", ] [[package]] @@ -1525,15 +1682,15 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ - "proc-macro2 1.0.59", + "proc-macro2", "syn 1.0.109", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-serde", @@ -1551,28 +1708,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "once_cell", "toml_edit", ] [[package]] name = "proc-macro2" -version = "0.4.30" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1627,8 +1774,8 @@ checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1640,8 +1787,8 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1656,20 +1803,11 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 1.0.59", + "proc-macro2", ] [[package]] @@ -1688,30 +1826,35 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "regex" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ - "bitflags", + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] -name = "regex" -version = "1.8.4" +name = "regex-automata" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax 0.7.2", + "regex-syntax 0.6.29", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ - "regex-syntax 0.6.29", + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", ] [[package]] @@ -1722,9 +1865,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rfc6979" @@ -1732,11 +1875,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.4.9", "hmac", "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -1752,8 +1905,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1765,37 +1918,36 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "safe-proc-macro2" -version = "1.0.36" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814c536dcd27acf03296c618dab7ad62d28e70abd7ba41d3f34a2ce707a2c666" +checksum = "7fd85be67db87168aa3c13fd0da99f48f2ab005dccad5af5626138dc1df20eb6" dependencies = [ - "unicode-xid 0.2.4", + "unicode-ident", ] [[package]] @@ -1809,18 +1961,18 @@ dependencies = [ [[package]] name = "safe-regex" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15289bf322e0673d52756a18194167f2378ec1a15fe884af6e2d2cb934822b0" +checksum = "e6ab4bc484ef480a9ce79b381efd7b6767700f514d47bc599036e9d6f7f3c49d" dependencies = [ "safe-regex-macro", ] [[package]] name = "safe-regex-compiler" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba76fae590a2aa665279deb1f57b5098cbace01a0c5e60e262fcf55f7c51542" +checksum = "6d71f8c78bffb07962595e1bfa5ed11d24dd855eedc50b6a735f5ef648ce621b" dependencies = [ "safe-proc-macro2", "safe-quote", @@ -1828,9 +1980,9 @@ dependencies = [ [[package]] name = "safe-regex-macro" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c2e96b5c03f158d1b16ba79af515137795f4ad4e8de3f790518aae91f1d127" +checksum = "0909ab4b77511df24201cd66541d6a028887c77ecc065f277c68a12a663274ef" dependencies = [ "safe-proc-macro2", "safe-regex-compiler", @@ -1838,9 +1990,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.7.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if", "derive_more", @@ -1850,172 +2002,144 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.6.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "schemars" -version = "0.5.1" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273d9b56198caf703e271dcc07b28f2e794971750ace6585399d40e2af9f4823" -dependencies = [ - "schemars_derive 0.5.0", - "serde", - "serde_json", -] - -[[package]] -name = "schemars" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", - "schemars_derive 0.8.12", + "schemars_derive", "serde", "serde_json", ] [[package]] name = "schemars_derive" -version = "0.5.0" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab7f0b9b64633747a68dce4ed6318bbf30e3befe67df7624ad83abb7295c09" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "serde_derive_internals 0.25.0", - "syn 1.0.109", + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.72", ] [[package]] -name = "schemars_derive" -version = "0.8.12" +name = "sec1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "serde_derive_internals 0.26.0", - "syn 1.0.109", + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", ] [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", + "base16ct 0.2.0", + "der 0.7.9", "generic-array", - "pkcs8", + "pkcs8 0.10.2", "subtle", "zeroize", ] [[package]] name = "semver" -version = "1.0.17" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde-json-wasm" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cf509484e297252a195b1338a6d45843fe11ef234259f67649e8729934f443" -dependencies = [ - "serde", -] - -[[package]] -name = "serde-json-wasm" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ "serde", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 2.0.18", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "serde_derive_internals" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" -dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 1.0.109", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 2.0.18", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] @@ -2033,9 +2157,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2054,9 +2178,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -2072,40 +2196,39 @@ dependencies = [ ] [[package]] -name = "smallvec" -version = "1.10.0" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] [[package]] -name = "snafu" -version = "0.5.0" +name = "smallvec" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0bf93d08d6a44363b47d737f1f5bebbf5e6a1eaaa3d4c128ceeaca6b718292" -dependencies = [ - "doc-comment", - "snafu-derive", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] -name = "snafu-derive" -version = "0.5.0" +name = "spki" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624e94bd38e471f67883b467711e7a7ad7dbe284f5fb7e661dc8a671fc5b26a0" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "base64ct", + "der 0.6.1", ] [[package]] name = "spki" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der", + "der 0.7.9", ] [[package]] @@ -2116,9 +2239,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strum" -version = "0.24.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -2127,17 +2250,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck", - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "rustversion", "syn 1.0.109", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-encoding" @@ -2154,50 +2277,38 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.18" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", + "proc-macro2", + "quote", "unicode-ident", ] [[package]] name = "tempfile" -version = "3.5.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -2220,8 +2331,8 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.6", - "signature", + "sha2 0.10.8", + "signature 1.6.4", "subtle", "subtle-encoding", "tendermint-proto", @@ -2262,13 +2373,24 @@ dependencies = [ [[package]] name = "test-log" -version = "0.2.11" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f0c854faeb68a048f0f2dc410c5ddae3bf83854ef0e4977d58306a5edef50e" +checksum = "3dffced63c2b5c7be278154d76b479f9f9920ed34e7574201407f0b14e2bbb93" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 1.0.109", + "env_logger", + "test-log-macros", + "tracing-subscriber", +] + +[[package]] +name = "test-log-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] @@ -2289,29 +2411,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 2.0.18", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -2353,15 +2475,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", @@ -2370,20 +2492,19 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -2391,12 +2512,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -2412,9 +2533,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -2433,9 +2554,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -2451,21 +2572,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" - -[[package]] -name = "unicode-xid" -version = "0.1.0" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-xid" -version = "0.2.4" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -2475,9 +2590,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -2487,13 +2602,14 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", ] [[package]] @@ -2520,150 +2636,111 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_msvc" -version = "0.42.2" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] [[package]] -name = "winnow" -version = "0.4.6" +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ - "memchr", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -2674,7 +2751,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.59", - "quote 1.0.28", - "syn 2.0.18", + "proc-macro2", + "quote", + "syn 2.0.72", ] diff --git a/Cargo.toml b/Cargo.toml index 44513da23..9f93d43ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,10 @@ exclude = ["contracts/cosmwasm-vm/archway"] [workspace.package] authors = ["Icon Foundation"] repository = "https://github.com/icon-project/ibc-integration.git" -version="0.1.1" +version="0.1.2" [workspace.dependencies] -cosmwasm-std = {version="1.2.2",default-features = false,features = ["iterator", "ibc3","staking"]} +cosmwasm-std = {version="1.5.5",default-features = false,features = ["iterator", "ibc3","staking"]} cosmwasm-storage = "1.2.2" cosmwasm-schema = "1.2.2" schemars = "0.8.12" diff --git a/contracts/cosmwasm-vm/cw-common/Cargo.toml b/contracts/cosmwasm-vm/cw-common/Cargo.toml index 6b36c9903..f1186b4d0 100644 --- a/contracts/cosmwasm-vm/cw-common/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-common/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] cosmwasm-schema = {workspace=true} -cosmwasm-std = {workspace=true, features=["ibc3"]} +cosmwasm-std = {workspace=true} serde = { workspace=true} cw-storage-plus = {workspace=true} serde_json = {workspace=true} diff --git a/contracts/cosmwasm-vm/cw-ibc-core/Cargo.toml b/contracts/cosmwasm-vm/cw-ibc-core/Cargo.toml index ae1e8cf5f..753d0d170 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-ibc-core/Cargo.toml @@ -17,8 +17,7 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] + # use library feature to disable all instantiate/execute/query exports library = [] diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/context.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/context.rs index b2d8d0ba1..66d55c61c 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/context.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/context.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{from_slice, to_vec}; +use cosmwasm_std::{from_json as from_slice, to_json_vec as to_vec}; use serde::{de::DeserializeOwned, Serialize}; use super::*; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/contract.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/contract.rs index fda115c85..0fc8253c5 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/contract.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/contract.rs @@ -2,7 +2,7 @@ use std::env; use super::*; -use cosmwasm_std::to_binary; +use cosmwasm_std::to_json_binary as to_binary; use cw_common::hex_string::HexString; use cw_common::query_helpers::build_smart_query; @@ -714,7 +714,7 @@ mod tests { use super::{instantiate, query, InstantiateMsg, QueryMsg}; use cosmwasm_std::{ - from_binary, + from_json as from_binary, testing::{mock_dependencies, mock_env, mock_info, MockApi, MockQuerier, MockStorage}, Addr, OwnedDeps, }; @@ -736,14 +736,14 @@ mod tests { let mut deps = setup(); let msg = QueryMsg::GetNextClientSequence {}; let result = query(deps.as_ref(), mock_env(), msg.clone()).unwrap(); - let result_parsed: u64 = from_binary(&result).unwrap(); + let result_parsed: u64 = from_binary(result).unwrap(); assert_eq!(0, result_parsed); contract .increase_client_counter(deps.as_mut().storage) .unwrap(); let result = query(deps.as_ref(), mock_env(), msg).unwrap(); - let result_parsed: u64 = from_binary(&result).unwrap(); + let result_parsed: u64 = from_binary(result).unwrap(); assert_eq!(1, result_parsed); } @@ -763,7 +763,7 @@ mod tests { _type: client_type_str, }; let result = query(deps.as_ref(), mock_env(), msg).unwrap(); - let result_parsed: Addr = from_binary(&result).unwrap(); + let result_parsed: Addr = from_binary(result).unwrap(); assert_eq!(client, result_parsed.as_str()); } diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/client.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/client.rs index 3375166b4..86e11d4b7 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/client.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/client.rs @@ -298,10 +298,9 @@ impl<'a> CwIbcCoreContext<'a> { .may_load(store, client_type) { Ok(result) => match result { - Some(_) => Err(ClientError::Other { + Some(_) => Err(Into::::into(ClientError::Other { description: "Client Implementation Already Exist".to_string(), - }) - .map_err(Into::::into), + })), None => Ok(()), }, @@ -332,10 +331,9 @@ impl<'a> CwIbcCoreContext<'a> { let client = self.get_client_implementations(store, client_id).ok(); if client.is_none() { - return Err(ClientError::ClientSpecific { + return Err(Into::::into(ClientError::ClientSpecific { description: "LightclientNotFount".to_string(), - }) - .map_err(Into::::into); + })); } Ok(client.unwrap()) } @@ -408,7 +406,7 @@ impl<'a> CwIbcCoreContext<'a> { client_id: &common::ibc::core::ics24_host::identifier::ClientId, ) -> Result, ContractError> { let light_client = self.get_light_client(deps.storage, client_id)?; - return light_client.get_client_state(deps, client_id); + light_client.get_client_state(deps, client_id) } pub fn client_state_any( @@ -428,7 +426,7 @@ impl<'a> CwIbcCoreContext<'a> { ) -> Result, ContractError> { let client_impl = self.get_light_client(deps.storage, client_id)?; let height = height.revision_height(); - return client_impl.get_consensus_state(deps, client_id, height); + client_impl.get_consensus_state(deps, client_id, height) } pub fn consensus_state_any( diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs index b1bbdf5af..2dd0b0622 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs @@ -139,10 +139,9 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), &client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } self.store_callback_data(deps.storage, EXECUTE_UPDATE_CLIENT, &client_id)?; @@ -195,10 +194,9 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { })?; if old_client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let old_consensus_state = @@ -214,11 +212,12 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { .map_err(Into::::into)?; if old_client_state.expired(duration) { - return Err(ClientError::HeaderNotWithinTrustPeriod { - latest_time: old_consensus_state.timestamp(), - update_time: now, - }) - .map_err(Into::::into); + return Err(Into::::into( + ClientError::HeaderNotWithinTrustPeriod { + latest_time: old_consensus_state.timestamp(), + update_time: now, + }, + )); }; let wasm_exec_message = LightClientMessage::UpgradeClient { @@ -354,13 +353,14 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { .add_attribute("methods", "execute_update_client_reply") .add_attribute("height", height)) } - None => Err(ClientError::Other { + None => Err(Into::::into(ClientError::Other { description: "UNKNOWN ERROR".to_string(), - }) - .map_err(Into::::into), + })), }, cosmwasm_std::SubMsgResult::Err(error) => { - Err(ClientError::Other { description: error }).map_err(Into::::into) + Err(Into::::into(ClientError::Other { + description: error, + })) } } } @@ -390,7 +390,7 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { cosmwasm_std::SubMsgResult::Ok(result) => match result.data { Some(data) => { let response: UpgradeClientResponse = - from_binary(&data).map_err(ContractError::Std)?; + from_binary(data).map_err(ContractError::Std)?; let client_id = response.client_id().map_err(ContractError::from)?; self.store_client_commitment( @@ -417,13 +417,14 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { .add_attribute("method", "execute_upgrade_client_reply") .add_attribute("client_id", client_id.as_str())) } - None => Err(ClientError::Other { + None => Err(Into::::into(ClientError::Other { description: "Invalid Response Data".to_string(), - }) - .map_err(Into::::into), + })), }, cosmwasm_std::SubMsgResult::Err(error) => { - Err(ClientError::Other { description: error }).map_err(Into::::into) + Err(Into::::into(ClientError::Other { + description: error, + })) } } } @@ -459,10 +460,9 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), &client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let client = self.get_light_client(deps.as_ref().storage, &client_id)?; @@ -535,13 +535,14 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { .add_attribute("method", "execute_misbheaviour_reply") .add_attribute("client_id", client_id.as_str())) } - None => Err(ClientError::Other { + None => Err(Into::::into(ClientError::Other { description: "Invalid Response Data".to_string(), - }) - .map_err(Into::::into), + })), }, cosmwasm_std::SubMsgResult::Err(error) => { - Err(ClientError::Other { description: error }).map_err(Into::::into) + Err(Into::::into(ClientError::Other { + description: error, + })) } } } @@ -549,14 +550,14 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> { #[cfg(test)] mod tests { - use cosmwasm_std::{from_binary, to_binary}; + use cosmwasm_std::{from_json, to_json_binary}; use cw_common::client_response::CreateClientResponse; #[test] fn test_binary_conversion() { let res: CreateClientResponse = CreateClientResponse::default(); - let bytes = to_binary(&res).unwrap(); + let bytes = to_json_binary(&res).unwrap(); println!("{}", hex::encode(bytes.0.clone())); - let decoded: CreateClientResponse = from_binary(&bytes).unwrap(); + let decoded: CreateClientResponse = from_json(&bytes).unwrap(); assert_eq!(res, decoded) } } diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/mod.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/mod.rs index c9e814968..258841938 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/mod.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/mod.rs @@ -10,8 +10,8 @@ use crate::{ use common::ibc::core::ics24_host::identifier::ClientId; use cosmwasm_std::{ - from_binary, to_binary, to_vec, Addr, CosmosMsg, DepsMut, Event, MessageInfo, Reply, Response, - Storage, SubMsg, + from_json as from_binary, to_json_binary as to_binary, to_json_vec as to_vec, Addr, CosmosMsg, + DepsMut, Event, MessageInfo, Reply, Response, Storage, SubMsg, }; use cw_common::client_response::{ MisbehaviourResponse, UpdateClientResponse, UpgradeClientResponse, diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/connection.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/connection.rs index 2c29ccef9..78fe43c9c 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/connection.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/connection.rs @@ -255,8 +255,9 @@ impl<'a> CwIbcCoreContext<'a> { .may_load(store, client_id) { Ok(result) => match result { - Some(id) => Err(ConnectionError::ConnectionExists(id.to_string())) - .map_err(Into::::into), + Some(id) => Err(Into::::into( + ConnectionError::ConnectionExists(id.to_string()), + )), None => Ok(()), }, Err(error) => Err(ContractError::Std(error)), diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/handler.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/handler.rs index c9172099a..2ef3adeae 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/handler.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/handler.rs @@ -49,10 +49,9 @@ impl<'a> CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), &client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let delay_period = Duration::from_nanos(message.delay_period); @@ -64,8 +63,7 @@ impl<'a> CwIbcCoreContext<'a> { if self.get_compatible_versions().contains(&version) { vec![version] } else { - return Err(ConnectionError::EmptyVersions) - .map_err(Into::::into); + return Err(Into::::into(ConnectionError::EmptyVersions)); } } None => self.get_compatible_versions(), @@ -175,10 +173,9 @@ impl<'a> CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let prefix = self.commitment_prefix(deps.as_ref(), &env); @@ -316,10 +313,9 @@ impl<'a> CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), &client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let counterparty = to_ibc_counterparty(message.counterparty)?; @@ -493,10 +489,9 @@ impl<'a> CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } let prefix = self.commitment_prefix(deps.as_ref(), &env); cw_println!( diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/mod.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/mod.rs index 6650d6395..2a1053d8e 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/mod.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/mod.rs @@ -10,7 +10,7 @@ use cosmwasm_std::DepsMut; use cosmwasm_std::Event; use cosmwasm_std::Response; use cosmwasm_std::Storage; -use cosmwasm_std::{to_vec, MessageInfo}; +use cosmwasm_std::{to_json_vec as to_vec, MessageInfo}; use cw_common::client_msg::{ VerifyClientConsensusState, VerifyClientFullState, VerifyConnectionState, }; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/channel.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/channel.rs index b75583a01..fdcf9d769 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/channel.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/channel.rs @@ -30,11 +30,10 @@ impl<'a> CwIbcCoreContext<'a> { .may_load(store, (port_id, channel_id))? { Some(request) => Ok(request), - None => Err(ChannelError::ChannelNotFound { + None => Err(Into::::into(ChannelError::ChannelNotFound { port_id: port_id.clone(), channel_id: channel_id.clone(), - }) - .map_err(Into::::into)?, + }))?, } } @@ -233,11 +232,12 @@ impl<'a> CwIbcCoreContext<'a> { |req_id| -> Result<_, ContractError> { match req_id { Some(seq) => Ok(seq.increment()), - None => Err(PacketError::MissingNextSendSeq { - port_id: port_id.clone(), - channel_id: channel_id.clone(), - }) - .map_err(Into::::into)?, + None => Err(Into::::into( + PacketError::MissingNextSendSeq { + port_id: port_id.clone(), + channel_id: channel_id.clone(), + }, + ))?, } }, )?; @@ -345,11 +345,12 @@ impl<'a> CwIbcCoreContext<'a> { |req_id| -> Result<_, ContractError> { match req_id { Some(seq) => Ok(seq.increment()), - None => Err(PacketError::MissingNextRecvSeq { - port_id: port_id.clone(), - channel_id: channel_id.clone(), - }) - .map_err(Into::::into)?, + None => Err(Into::::into( + PacketError::MissingNextRecvSeq { + port_id: port_id.clone(), + channel_id: channel_id.clone(), + }, + ))?, } }, )?; @@ -462,11 +463,12 @@ impl<'a> CwIbcCoreContext<'a> { |req_id| -> Result<_, ContractError> { match req_id { Some(seq) => Ok(seq.increment()), - None => Err(PacketError::MissingNextAckSeq { - port_id: port_id.clone(), - channel_id: channel_id.clone(), - }) - .map_err(Into::::into)?, + None => Err(Into::::into( + PacketError::MissingNextAckSeq { + port_id: port_id.clone(), + channel_id: channel_id.clone(), + }, + ))?, } }, )?; @@ -525,7 +527,7 @@ impl<'a> CwIbcCoreContext<'a> { ) -> Result<(), ContractError> { let channel_commitment_key = commitment::channel_commitment_key(port_id, channel_id); - let raw_channel: RawChannel = channel_end.clone().try_into().unwrap(); + let raw_channel: RawChannel = channel_end.clone().into(); let channel_end_commitment = raw_channel.encode_to_vec(); self.ibc_store().save_commitment( diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs index b7ac9b5e7..46900e085 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs @@ -72,11 +72,12 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { let src_port = to_ibc_port_id(&message.port_id)?; if channel_end.connection_hops.len() != 1 { - return Err(ChannelError::InvalidConnectionHopsLength { - expected: 1, - actual: channel_end.connection_hops.len(), - }) - .map_err(Into::::into)?; + return Err(Into::::into( + ChannelError::InvalidConnectionHopsLength { + expected: 1, + actual: channel_end.connection_hops.len(), + }, + ))?; } let connection_id = channel_end.connection_hops[0].clone(); // An IBC connection running on the local (host) chain should exist. @@ -85,10 +86,9 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } channel_open_init_msg_validate(&channel_end, connection_end)?; let counter = self.channel_counter(deps.storage)?; @@ -217,7 +217,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { vec![conn_id_on_a.clone()], channel_end.version().clone(), ); - let raw_expected_chan = RawChannel::try_from(expected_channel_end).unwrap(); + let raw_expected_chan = RawChannel::from(expected_channel_end); let chan_end_path_on_a = commitment::channel_path(&source_port, &source_channel); let vector = raw_expected_chan.encode_to_vec(); @@ -348,7 +348,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { version.clone(), ); - let raw_expected_chan = RawChannel::try_from(expected_channel_end).unwrap(); + let raw_expected_chan = RawChannel::from(expected_channel_end); let chan_end_path_on_b = commitment::channel_path(&dst_port, &dst_channel); let vector = raw_expected_chan.encode_to_vec(); @@ -471,7 +471,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { channel_end.version.clone(), ); - let raw_expected_chan = RawChannel::try_from(expected_channel_end).unwrap(); + let raw_expected_chan = RawChannel::from(expected_channel_end); let counterparty_channel_path = commitment::channel_path(src_port, src_channel); let expected_counterparty_channel_end = raw_expected_chan.encode_to_vec(); @@ -557,10 +557,9 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), client_id)?; if client_state.is_frozen() { - return Err(ClientError::ClientFrozen { + return Err(Into::::into(ClientError::ClientFrozen { client_id: client_id.clone(), - }) - .map_err(Into::::into); + })); } ensure_connection_state(&connection_id, &connection_end, &ConnectionState::Open)?; @@ -673,7 +672,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { vec![conn_id_on_a.clone()], channel_end.version().clone(), ); - let raw_expected_chan = RawChannel::try_from(expected_channel_end).unwrap(); + let raw_expected_chan = RawChannel::from(expected_channel_end); let counterparty_chan_end_path = commitment::channel_path(src_port, src_channel); let expected_counterparty_channel_end = raw_expected_chan.encode_to_vec(); diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_ack.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_ack.rs index addbfb61a..a4edc6c2f 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_ack.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_ack.rs @@ -47,7 +47,6 @@ pub fn on_chan_open_ack_submessage( connection_id: &ConnectionId, ) -> Result { let port_id = port_id.clone(); - let channel_id = channel_id; let counter_party_port_id = channel_end.counterparty().port_id.clone(); let counter_party_channel = channel_end.counterparty().channel_id().unwrap().clone(); let endpoint = cosmwasm_std::IbcEndpoint { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_init.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_init.rs index 2c33c18d0..8012b0550 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_init.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_init.rs @@ -16,7 +16,6 @@ pub fn on_chan_open_init_submessage( channel_id: &ChannelId, connection_id: &ConnectionId, ) -> cosmwasm_std::IbcChannelOpenMsg { - let channel_id = channel_id; let counter_party_port_id = channel.remote.port_id(); let counter_party_channel = channel .remote diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_try.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_try.rs index 9d7ce9ea5..b5ba71917 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_try.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler/open_try.rs @@ -19,24 +19,27 @@ pub fn channel_open_try_msg_validate( conn_end_on_b: &ConnectionEnd, ) -> Result<(), ContractError> { if !conn_end_on_b.state_matches(&ConnectionState::Open) { - return Err(ChannelError::ConnectionNotOpen { - connection_id: channel.connection_hops[0].clone(), - }) - .map_err(Into::::into); + return Err(Into::::into( + ChannelError::ConnectionNotOpen { + connection_id: channel.connection_hops[0].clone(), + }, + )); }; let conn_version = match conn_end_on_b.versions() { [version] => version, _ => { - return Err(ChannelError::InvalidVersionLengthConnection) - .map_err(Into::::into) + return Err(Into::::into( + ChannelError::InvalidVersionLengthConnection, + )) } }; let channel_feature = channel.ordering.to_string(); if !conn_version.is_supported_feature(channel_feature) { - return Err(ChannelError::ChannelFeatureNotSupportedByConnection) - .map_err(Into::::into); + return Err(Into::::into( + ChannelError::ChannelFeatureNotSupportedByConnection, + )); } Ok(()) @@ -59,7 +62,6 @@ pub fn on_chan_open_try_submessage( connection_id: &ConnectionId, ) -> cosmwasm_std::IbcChannelOpenMsg { let port_id = port_id.clone(); - let channel_id = channel_id; let counter_party_port_id = msg.counterparty().port_id.clone(); let counter_party_channel = msg.counterparty().channel_id().unwrap().clone(); let endpoint = cosmwasm_std::IbcEndpoint { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs index e845e73c3..afdc961e8 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs @@ -1,12 +1,10 @@ //! ICS 04: Channel implementation that facilitates communication between pub mod channel; -pub use channel::*; pub mod events; pub use events::*; pub mod handler; pub use super::*; use crate::context::CwIbcCoreContext; -pub use channel::*; pub use handler::*; use common::ibc::core::ics03_connection::connection::State as ConnectionState; @@ -20,7 +18,8 @@ use cosmwasm_std::Event; use cosmwasm_std::Reply; use cosmwasm_std::Storage; use cosmwasm_std::{ - to_binary, to_vec, Binary, CosmosMsg, Empty, MessageInfo, Response, SubMsg, WasmMsg, + to_json_binary as to_binary, to_json_vec as to_vec, Binary, CosmosMsg, Empty, MessageInfo, + Response, SubMsg, WasmMsg, }; pub use cw_common::client_msg::ExecuteMsg as LightClientMessage; use cw_common::commitment; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet.rs index 141b8f526..e6b5ac33d 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet.rs @@ -1,15 +1,10 @@ use super::*; +pub mod acknowledgement; +pub mod receive_packet; +pub mod send_packet; pub mod timeout; -pub use timeout::*; pub mod timeout_on_close; -pub use timeout_on_close::*; -pub mod send_packet; -pub use send_packet::*; -pub mod receive_packet; -pub use receive_packet::*; -pub mod acknowledgement; -pub use acknowledgement::*; pub mod write_acknowledgement; impl<'a> CwIbcCoreContext<'a> { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet/receive_packet.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet/receive_packet.rs index 5a6959c21..dab4f953e 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet/receive_packet.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/packet/receive_packet.rs @@ -59,11 +59,12 @@ impl<'a> CwIbcCoreContext<'a> { let counterparty = Counterparty::new(src_port.clone(), Some(src_channel.clone())); if !channel_end.counterparty_matches(&counterparty) { - return Err(PacketError::InvalidPacketCounterparty { - port_id: src_port, - channel_id: src_channel, - }) - .map_err(Into::::into)?; + return Err(Into::::into( + PacketError::InvalidPacketCounterparty { + port_id: src_port, + channel_id: src_channel, + }, + ))?; } let packet_already_received = self.is_packet_already_received( @@ -82,10 +83,11 @@ impl<'a> CwIbcCoreContext<'a> { let connection_id = &channel_end.connection_hops()[0]; let connection_end = self.connection_end(deps.storage, connection_id)?; if !connection_end.state_matches(&ConnectionState::Open) { - return Err(PacketError::ConnectionNotOpen { - connection_id: channel_end.connection_hops()[0].clone(), - }) - .map_err(Into::::into)?; + return Err(Into::::into( + PacketError::ConnectionNotOpen { + connection_id: channel_end.connection_hops()[0].clone(), + }, + ))?; } let current_host_height = self.host_height(&env)?; let current_host_timestamp = self.host_timestamp(&env)?; @@ -98,10 +100,9 @@ impl<'a> CwIbcCoreContext<'a> { let client_state = self.client_state(deps.as_ref(), client_id)?; // The client must not be frozen. if client_state.is_frozen() { - return Err(PacketError::FrozenClient { + return Err(Into::::into(PacketError::FrozenClient { client_id: client_id.clone(), - }) - .map_err(Into::::into)?; + }))?; } cw_println!(deps, "client state created ",); @@ -303,11 +304,10 @@ impl<'a> CwIbcCoreContext<'a> { let packet_timeout_height = to_ibc_timeout_height(packet.timeout_height.clone())?; if packet_timeout_height.has_expired(host_height) { - return Err(PacketError::LowPacketHeight { + return Err(Into::::into(PacketError::LowPacketHeight { chain_height: host_height, timeout_height: packet_timeout_height, - }) - .map_err(Into::::into)?; + }))?; } } if packet.timeout_timestamp > 0 { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/light_client/light_client.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/light_client/light_client.rs index 31195855b..1f87450c6 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/light_client/light_client.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/light_client/light_client.rs @@ -4,7 +4,7 @@ use common::consensus_state::IConsensusState; use common::icon::icon::lightclient::v1::{ClientState, ConsensusState}; use common::traits::AnyTypes; use cosmwasm_schema::cw_serde; -use cosmwasm_std::{to_binary, Binary, CosmosMsg, Deps, SubMsg}; +use cosmwasm_std::{to_json_binary as to_binary, Binary, CosmosMsg, Deps, SubMsg}; use cw_common::client_msg::{LightClientPacketMessage, VerifyConnectionState}; use cw_common::ibc_types::IbcClientId; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_handler.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_handler.rs index e58e7f8f3..185dc569a 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_handler.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_handler.rs @@ -54,11 +54,11 @@ fn fail_channel_open_init_msg_validate_on_invalid_version_length_of_connection() let ctx = TestContext::default(get_mock_env()); let conn_end = ConnectionEnd::new( - ctx.connection_end().state.clone(), + ctx.connection_end().state, ctx.client_id.clone(), ctx.connection_end().counterparty().clone(), Vec::new(), - ctx.connection_end().delay_period().clone(), + ctx.connection_end().delay_period(), ); open_init::channel_open_init_msg_validate(&ctx.channel_end(), conn_end).unwrap(); } diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_ack.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_ack.rs index c34e4e72c..5815bf7d7 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_ack.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_ack.rs @@ -228,11 +228,8 @@ fn test_channel_open_ack_msg_validate_on_ordered_type() { .unwrap(), ); - let res_exist = match res { - Some(_) => true, - None => false, - }; - assert_eq!(res_exist, true); + let res_exist = res.is_some(); + assert!(res_exist); } #[test] diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_confirm.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_confirm.rs index 6cea7b20b..b64ed9af6 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_confirm.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_open_confirm.rs @@ -175,11 +175,8 @@ fn test_channel_open_confirm_msg_validate_on_ordered_type() { .unwrap(), ); - let res_exist = match res { - Some(_) => true, - None => false, - }; - assert_eq!(res_exist, true); + let res_exist = res.is_some(); + assert!(res_exist); } #[test] diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_receive_packet.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_receive_packet.rs index ee001072d..2e963fef5 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_receive_packet.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_receive_packet.rs @@ -297,7 +297,7 @@ fn test_is_packet_already_received_for_none_ordered_channel() { ) .unwrap(); - assert_eq!(res, false) + assert!(!res) } #[test] @@ -372,7 +372,7 @@ fn test_is_packet_already_received() { ) .unwrap(); - assert_eq!(res, false) + assert!(!res) } #[test] diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_timeout.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_timeout.rs index eb3b0f05f..7ca8d8ab4 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_timeout.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/channel/test_timeout.rs @@ -1,5 +1,3 @@ -use common::icon::icon::proto::core::channel::channel::Order; - use cw_common::types::TimeoutMsgType; use cw_ibc_core::{light_client::light_client::LightClient, VALIDATE_ON_PACKET_TIMEOUT_ON_MODULE}; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/setup.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/setup.rs index 2a1bb77e0..efef87fc3 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/setup.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/setup.rs @@ -67,6 +67,12 @@ pub struct MockEnvBuilder { env: Env, } +impl Default for MockEnvBuilder { + fn default() -> Self { + Self::new() + } +} + impl MockEnvBuilder { pub fn new() -> MockEnvBuilder { MockEnvBuilder { @@ -1050,7 +1056,7 @@ impl TestContext { } pub fn init_client_state(&mut self, deps: DepsMut, contract: &CwIbcCoreContext) { - self.init_context(deps.storage, &contract); + self.init_context(deps.storage, contract); self.save_consensus_state( deps.storage, self.client_state.clone().unwrap().latest_height, @@ -1058,10 +1064,10 @@ impl TestContext { contract.init_client_counter(deps.storage, 0).unwrap(); self.save_client_commitment( deps.storage, - &contract, + contract, &self.client_state.clone().unwrap().encode_to_vec(), ); - self.save_register_client(deps, &contract); + self.save_register_client(deps, contract); } pub fn save_next_sequence_send(&self, storage: &mut dyn Storage, contract: &CwIbcCoreContext) { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/test_channel.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/test_channel.rs index 64d2b28fd..c62849221 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/test_channel.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/test_channel.rs @@ -683,8 +683,8 @@ fn fail_create_channel_event() { create_channel_event( IbcEventType::AppModule, - &ctx.port_id.to_string(), - &ctx.channel_id.to_string(), + ctx.port_id.as_ref(), + ctx.channel_id.as_ref(), &ctx.channel_end(), ) .unwrap(); diff --git a/contracts/cosmwasm-vm/cw-ibc-core/tests/test_client.rs b/contracts/cosmwasm-vm/cw-ibc-core/tests/test_client.rs index e6d422990..6a99c32bb 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/tests/test_client.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/tests/test_client.rs @@ -308,7 +308,7 @@ fn check_for_consensus_state_from_storage() { mock_lightclient_query(ctx.mock_queries, &mut deps); let height = &ctx.client_state.unwrap().latest_height(); - let consensus_state_result = contract.consensus_state(deps.as_ref(), &ctx.client_id, &height); + let consensus_state_result = contract.consensus_state(deps.as_ref(), &ctx.client_id, height); assert!(consensus_state_result.is_ok()); assert_eq!( diff --git a/contracts/cosmwasm-vm/cw-icon-light-client/Cargo.toml b/contracts/cosmwasm-vm/cw-icon-light-client/Cargo.toml index ce374c189..755eeda06 100644 --- a/contracts/cosmwasm-vm/cw-icon-light-client/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-icon-light-client/Cargo.toml @@ -17,8 +17,7 @@ crate-type = ["cdylib", "rlib"] [features] default = [] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] + # use library feature to disable all instantiate/execute/query exports library = [] mock=[] @@ -51,7 +50,6 @@ debug_print = {workspace=true} [dev-dependencies] -cosmwasm = "0.7.2" hex-literal="*" test-utils={path="../../../libraries/rust/test-utils"} getrandom = {version = "0.2", default-features = false, features = ["custom"]} diff --git a/contracts/cosmwasm-vm/cw-icon-light-client/src/contract.rs b/contracts/cosmwasm-vm/cw-icon-light-client/src/contract.rs index 0dee73030..bce2c8792 100644 --- a/contracts/cosmwasm-vm/cw-icon-light-client/src/contract.rs +++ b/contracts/cosmwasm-vm/cw-icon-light-client/src/contract.rs @@ -13,7 +13,8 @@ use common::icon::icon::types::v1::{MerkleProofs, SignedHeader}; #[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 as to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, + StdResult, }; use cw2::set_contract_version; use cw_common::client_response::{CreateClientResponse, UpdateClientResponse}; @@ -539,7 +540,7 @@ mod tests { use common::icon::icon::types::v1::{BtpHeader, SignedHeader}; use cosmwasm_std::{ testing::{mock_dependencies, mock_env, mock_info, MockApi, MockQuerier, MockStorage}, - to_binary, Addr, OwnedDeps, Response, + to_json_binary as to_binary, Addr, OwnedDeps, Response, }; use cw2::get_contract_version; use cw_common::{client_msg::QueryMsg, raw_types::Any}; diff --git a/contracts/cosmwasm-vm/cw-icon-light-client/src/light_client.rs b/contracts/cosmwasm-vm/cw-icon-light-client/src/light_client.rs index b3f6130c8..c38ff7eea 100644 --- a/contracts/cosmwasm-vm/cw-icon-light-client/src/light_client.rs +++ b/contracts/cosmwasm-vm/cw-icon-light-client/src/light_client.rs @@ -26,8 +26,8 @@ impl<'a> IconClient<'a> { &self, client_id: &str, header: &BtpHeader, - signatures: &Vec>, - validators: &Vec>, + signatures: &[Vec], + validators: &[Vec], ) -> Result { let mut votes = u64::default(); let state = self.context.get_client_state(client_id)?; diff --git a/contracts/cosmwasm-vm/cw-icon-light-client/tests/setup.rs b/contracts/cosmwasm-vm/cw-icon-light-client/tests/setup.rs index f5975dba3..3d1d91bac 100644 --- a/contracts/cosmwasm-vm/cw-icon-light-client/tests/setup.rs +++ b/contracts/cosmwasm-vm/cw-icon-light-client/tests/setup.rs @@ -12,6 +12,12 @@ pub struct MockEnvBuilder { env: Env, } +impl Default for MockEnvBuilder { + fn default() -> Self { + Self::new() + } +} + impl MockEnvBuilder { pub fn new() -> MockEnvBuilder { MockEnvBuilder { diff --git a/contracts/cosmwasm-vm/cw-integration/tests/test_host_lightclient.rs b/contracts/cosmwasm-vm/cw-integration/tests/test_host_lightclient.rs index 578da82cf..0c6dbbf25 100644 --- a/contracts/cosmwasm-vm/cw-integration/tests/test_host_lightclient.rs +++ b/contracts/cosmwasm-vm/cw-integration/tests/test_host_lightclient.rs @@ -427,7 +427,7 @@ fn test_icon_to_arcway_handshake() -> TestContext { let mut ctx = setup_test("icon_to_archway_raw.json"); let port_name = PORT; let module_address = ctx.get_xcall_ibc_connection().to_string(); - call_bind_port(&mut ctx, port_name.clone(), &module_address).unwrap(); + call_bind_port(&mut ctx, port_name, &module_address).unwrap(); call_register_client_type(&mut ctx).unwrap(); call_set_xcall_host(&mut ctx).unwrap(); @@ -483,7 +483,7 @@ fn test_archway_to_icon_handshake() -> TestContext { let mut ctx = setup_test("archway_to_icon_raw.json"); let port_name = PORT; let module_address = ctx.get_xcall_ibc_connection().to_string(); - call_bind_port(&mut ctx, port_name.clone(), &module_address).unwrap(); + call_bind_port(&mut ctx, port_name, &module_address).unwrap(); call_register_client_type(&mut ctx).unwrap(); let res = query_get_capability(&ctx.app, port_name.to_string(), ctx.get_ibc_core()); diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-connection/Cargo.toml b/contracts/cosmwasm-vm/cw-mock-ibc-connection/Cargo.toml index 663b58271..f44941c2e 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-connection/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-mock-ibc-connection/Cargo.toml @@ -16,8 +16,7 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] + # use native_ibc feature to enable entry points for ibc native_ibc = [] library = [] @@ -48,6 +47,5 @@ cw-xcall = {workspace=true} [dev-dependencies] -cosmwasm = "0.7.2" getrandom = {version = "0.2", default-features = false, features = ["custom"]} hex = "0.4.3" diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-connection/src/lib.rs b/contracts/cosmwasm-vm/cw-mock-ibc-connection/src/lib.rs index 69f98b789..68d317e70 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-connection/src/lib.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-connection/src/lib.rs @@ -16,8 +16,8 @@ use crate::{ }; use cosmwasm_schema::cw_serde; use cosmwasm_std::{ - entry_point, to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, - StdError, StdResult, Storage, + entry_point, to_json_binary as to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Reply, + Response, StdError, StdResult, Storage, }; use cw2::set_contract_version; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-core/Cargo.toml b/contracts/cosmwasm-vm/cw-mock-ibc-core/Cargo.toml index 4fda9910c..d2c2d3880 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-core/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-mock-ibc-core/Cargo.toml @@ -27,8 +27,7 @@ incremental = false overflow-checks = true [features] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] + # use library feature to disable all instantiate/execute/query exports library = [] diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-core/src/contract.rs b/contracts/cosmwasm-vm/cw-mock-ibc-core/src/contract.rs index fb43cc5fd..1839be44e 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-core/src/contract.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-core/src/contract.rs @@ -2,9 +2,9 @@ use common::ibc::core::ics04_channel::timeout::TimeoutHeight; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, Event, IbcEndpoint, IbcPacket, - IbcPacketReceiveMsg, IbcTimeout, IbcTimeoutBlock, MessageInfo, Reply, Response, StdResult, - SubMsg, Timestamp, WasmMsg, + to_json_binary as to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, Event, + IbcEndpoint, IbcPacket, IbcPacketReceiveMsg, IbcTimeout, IbcTimeoutBlock, MessageInfo, Reply, + Response, StdResult, SubMsg, Timestamp, WasmMsg, }; use cw2::set_contract_version; use cw_common::hex_string::HexString; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-core/src/helpers.rs b/contracts/cosmwasm-vm/cw-mock-ibc-core/src/helpers.rs index a39b15588..4f160cb6d 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-core/src/helpers.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-core/src/helpers.rs @@ -1,7 +1,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{to_binary, Addr, CosmosMsg, StdResult, WasmMsg}; +use cosmwasm_std::{to_json_binary as to_binary, Addr, CosmosMsg, StdResult, WasmMsg}; use crate::msg::ExecuteMsg; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/Cargo.toml b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/Cargo.toml index d4d0783c3..53938a458 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/Cargo.toml @@ -16,8 +16,7 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] + # use native_ibc feature to enable entry points for ibc native_ibc = [] library = [] @@ -46,6 +45,5 @@ debug_print={workspace=true} [dev-dependencies] -cosmwasm = "0.7.2" getrandom = {version = "0.2", default-features = false, features = ["custom"]} hex = "0.4.3" diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/admin.rs b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/admin.rs index abf96249b..84fbcde35 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/admin.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/admin.rs @@ -108,7 +108,7 @@ impl<'a> CwIbcConnection<'a> { if current_admin == new_admin { Err(ContractError::AdminAlreadyExist) } else { - current_admin = new_admin.clone(); + current_admin.clone_from(&new_admin); Ok(current_admin) } })?; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/ibc_host.rs b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/ibc_host.rs index 32061da31..27d6e9b29 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/ibc_host.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/ibc_host.rs @@ -1,6 +1,8 @@ use crate::state::IbcConfig; use crate::types::LOG_PREFIX; -use cosmwasm_std::{to_binary, CosmosMsg, Deps, DepsMut, MessageInfo, Storage, SubMsg, WasmMsg}; +use cosmwasm_std::{ + to_json_binary as to_binary, CosmosMsg, Deps, DepsMut, MessageInfo, Storage, SubMsg, WasmMsg, +}; use cw_common::cw_types::CwPacket; use cw_common::query_helpers::build_smart_query; use cw_common::{hex_string::HexString, raw_types::channel::RawPacket, ProstMessage}; @@ -92,7 +94,7 @@ mod tests { use cosmwasm_std::{ coin, testing::{mock_dependencies_with_balance, mock_env}, - to_binary, Addr, CosmosMsg, MessageInfo, SubMsg, WasmMsg, + to_json_binary as to_binary, Addr, CosmosMsg, MessageInfo, SubMsg, WasmMsg, }; use cw_common::{hex_string::HexString, raw_types::channel::RawPacket, ProstMessage}; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/lib.rs b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/lib.rs index 65af654f8..e0ed5e086 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/lib.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/lib.rs @@ -22,8 +22,8 @@ use crate::{ }; use cosmwasm_schema::cw_serde; use cosmwasm_std::{ - entry_point, to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Never, Reply, Response, - StdError, StdResult, Storage, + entry_point, to_json_binary as to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Never, + Reply, Response, StdError, StdResult, Storage, }; #[cfg(feature = "native_ibc")] use cw_common::cw_types::{CwTimeout, CwTimeoutBlock}; diff --git a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/owner.rs b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/owner.rs index 81aeaad9d..8d5d530e1 100644 --- a/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/owner.rs +++ b/contracts/cosmwasm-vm/cw-mock-ibc-dapp/src/owner.rs @@ -88,7 +88,7 @@ impl<'a> CwIbcConnection<'a> { if current_owner == new_owner { Err(ContractError::OwnerAlreadyExist) } else { - current_owner = new_owner.clone(); + current_owner.clone_from(&new_owner); Ok(current_owner) } } else { diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/Cargo.toml b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/Cargo.toml index f0ce8c480..6f8a4f62e 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/Cargo.toml +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/Cargo.toml @@ -16,8 +16,6 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -# for more explicit tests, cargo test --features=backtraces -backtraces = ["cosmwasm-std/backtraces"] # use native_ibc feature to enable entry points for ibc native_ibc = [] library = [] @@ -48,6 +46,5 @@ cw-xcall = {workspace=true} [dev-dependencies] -cosmwasm = "0.7.2" getrandom = {version = "0.2", default-features = false, features = ["custom"]} hex = "0.4.3" diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ack.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ack.rs index c4c7d2eb0..9d1385f15 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ack.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ack.rs @@ -1,5 +1,5 @@ use crate::error::ContractError; -use cosmwasm_std::{attr, to_binary, Binary}; +use cosmwasm_std::{attr, to_json_binary as to_binary, Binary}; use cw_common::cw_types::{CwBasicResponse, CwPacket}; use cw_common::types::Ack; diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ibc_host.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ibc_host.rs index a398bb44b..98b7b4d13 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ibc_host.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/ibc_host.rs @@ -1,7 +1,9 @@ use crate::state::IbcConfig; use crate::types::LOG_PREFIX; use common::ibc::Height; -use cosmwasm_std::{to_binary, CosmosMsg, Deps, DepsMut, Storage, SubMsg, WasmMsg}; +use cosmwasm_std::{ + to_json_binary as to_binary, CosmosMsg, Deps, DepsMut, Storage, SubMsg, WasmMsg, +}; use cw_common::cw_types::CwPacket; use cw_common::query_helpers::build_smart_query; use cw_common::raw_types::channel::RawChannel; @@ -130,7 +132,7 @@ mod tests { use cosmwasm_std::{ coin, testing::{mock_dependencies_with_balance, mock_env}, - to_binary, Addr, CosmosMsg, SubMsg, WasmMsg, + to_json_binary as to_binary, Addr, CosmosMsg, SubMsg, WasmMsg, }; use cw_common::{hex_string::HexString, raw_types::channel::RawPacket, ProstMessage}; diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/lib.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/lib.rs index 61c5b5c53..abca56418 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/lib.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/lib.rs @@ -26,8 +26,8 @@ use crate::{ }; use cosmwasm_schema::cw_serde; use cosmwasm_std::{ - entry_point, to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Never, Reply, Response, - StdError, StdResult, Storage, SubMsg, SubMsgResult, + entry_point, to_json_binary as to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Never, + Reply, Response, StdError, StdResult, Storage, SubMsg, SubMsgResult, }; #[cfg(feature = "native_ibc")] use cw_common::cw_types::{CwTimeout, CwTimeoutBlock}; diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/xcall.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/xcall.rs index 6d060622f..5f87c4ed8 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/xcall.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/src/xcall.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, CosmosMsg, Empty, Storage, SubMsg, WasmMsg}; +use cosmwasm_std::{to_json_binary as to_binary, CosmosMsg, Empty, Storage, SubMsg, WasmMsg}; use cw_xcall_lib::network_address::NetId; use crate::{ diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/setup.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/setup.rs index 75c6c402c..91f5554b0 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/setup.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/setup.rs @@ -7,9 +7,9 @@ use cosmwasm_std::{ mock_dependencies, mock_env, mock_info, MockApi, MockQuerier, MockStorage, MOCK_CONTRACT_ADDR, }, - to_binary, Addr, BlockInfo, ContractInfo, DepsMut, Empty, Env, Event, IbcChannel, IbcEndpoint, - IbcPacket, IbcTimeout, IbcTimeoutBlock, MessageInfo, OwnedDeps, Storage, SubMsgResponse, - Timestamp, TransactionInfo, + to_json_binary as to_binary, Addr, BlockInfo, ContractInfo, DepsMut, Empty, Env, Event, + IbcChannel, IbcEndpoint, IbcPacket, IbcTimeout, IbcTimeoutBlock, MessageInfo, OwnedDeps, + Storage, SubMsgResponse, Timestamp, TransactionInfo, }; use cw_xcall_ibc_connection::{ @@ -24,6 +24,12 @@ pub struct MockEnvBuilder { env: Env, } +impl Default for MockEnvBuilder { + fn default() -> Self { + Self::new() + } +} + impl MockEnvBuilder { pub fn new() -> MockEnvBuilder { MockEnvBuilder { @@ -216,17 +222,17 @@ impl TestContext { } pub fn init_channel_open(&self, deps: DepsMut, contract: &CwIbcConnection) { - self.init_context(deps.storage, &contract); + self.init_context(deps.storage, contract); self.store_counterparty_nid(deps.storage, contract); - self.configure_connection(deps, &contract); + self.configure_connection(deps, contract); } pub fn init_channel_connect(&self, deps: DepsMut, contract: &CwIbcConnection) { - self.init_context(deps.storage, &contract); + self.init_context(deps.storage, contract); self.store_counterparty_nid(deps.storage, contract); - self.configure_connection(deps, &contract); + self.configure_connection(deps, contract); } pub fn add_owner(&self, storage: &mut dyn Storage, contract: &CwIbcConnection) { diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_admin.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_admin.rs index 6d5264d55..baa4c050f 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_admin.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_admin.rs @@ -1,7 +1,7 @@ mod account; mod setup; use account::*; -use cosmwasm_std::{testing::mock_env, Addr}; +use cosmwasm_std::testing::mock_env; use cw_common::xcall_connection_msg::{ExecuteMsg, QueryMsg}; use cw_xcall_ibc_connection::{execute, state::CwIbcConnection}; use setup::*; diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc.rs index 748e4101f..dcd4c2993 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc.rs @@ -1,8 +1,8 @@ pub mod setup; use cosmwasm_std::{ - to_binary, Addr, Binary, Ibc3ChannelOpenResponse, IbcAcknowledgement, IbcChannelCloseMsg, - IbcChannelConnectMsg, IbcChannelOpenMsg, IbcPacketAckMsg, + to_json_binary as to_binary, Addr, Binary, Ibc3ChannelOpenResponse, IbcAcknowledgement, + IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcPacketAckMsg, }; use cw_common::types::Ack; diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc_functions.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc_functions.rs index 6737d275e..7902df936 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc_functions.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_ibc_functions.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use common::rlp::{self, Nullable}; use cosmwasm_std::{ - testing::mock_env, to_binary, Addr, Binary, IbcAcknowledgement, IbcChannel, + testing::mock_env, to_json_binary as to_binary, Addr, Binary, IbcAcknowledgement, IbcChannel, IbcChannelConnectMsg::OpenAck, IbcChannelOpenMsg::OpenInit, IbcChannelOpenMsg::OpenTry, IbcEndpoint, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcTimeout, IbcTimeoutBlock, }; @@ -24,7 +24,7 @@ pub mod account; use account::admin_one; use account::alice; -use cosmwasm_std::{from_binary, IbcChannelCloseMsg, IbcPacketTimeoutMsg, Reply, SubMsgResult}; +use cosmwasm_std::{from_json as from_binary, IbcChannelCloseMsg, Reply, SubMsgResult}; use cw_common::xcall_connection_msg::{ExecuteMsg, QueryMsg}; use cw_xcall::types::message::CSMessage; use cw_xcall::types::request::CSMessageRequest; @@ -195,7 +195,7 @@ fn test_query_get_fee() { response: true, }; let res = query(deps.as_ref(), ctx.env, msg).unwrap(); - let fee: u128 = from_binary(&res).unwrap(); + let fee: u128 = from_binary(res).unwrap(); assert_eq!(fee, 0) } @@ -212,14 +212,13 @@ fn test_query_get_unclaimed_fee() { relayer: "crly".to_owned(), }; let res = query(deps.as_ref(), ctx.env, msg).unwrap(); - let fee: u128 = from_binary(&res).unwrap(); + let fee: u128 = from_binary(res).unwrap(); assert_eq!(fee, 0) } #[test] #[cfg(not(feature = "native_ibc"))] fn success_on_open_channel_open_try_valid_version() { - use cosmwasm_std::from_binary; use cw_xcall_lib::network_address::NetId; let mut deps = deps(); @@ -277,7 +276,7 @@ fn success_on_open_channel_open_try_valid_version() { .execute(deps.as_mut(), mock_env, mock_info, execute_message) .unwrap(); - let result_data: IbcEndpoint = from_binary(&result.data.unwrap()).unwrap(); + let result_data: IbcEndpoint = from_binary(result.data.unwrap()).unwrap(); assert_eq!(src.channel_id, result_data.channel_id); assert_eq!("ics20-1", result.attributes[1].value) @@ -594,7 +593,7 @@ fn success_receive_packet_for_call_message_request() { vec![], ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let message: Message = Message { sn: Nullable::new(Some(1)), fee: 0, @@ -752,7 +751,7 @@ fn fails_receive_packet_for_call_message_request() { vec![], ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let timeout_block = IbcTimeoutBlock { revision: 0, @@ -850,7 +849,7 @@ fn success_on_setting_timeout_height() { .unwrap(); let response: u64 = from_binary( - &contract + contract .query( deps.as_ref(), mock_env, @@ -914,7 +913,7 @@ fn test_ack_success_on_call_request() { vec![], ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let timeout_block = IbcTimeoutBlock { revision: 0, @@ -947,7 +946,7 @@ fn test_ack_success_on_call_response() { cw_xcall::types::response::CallServiceResponseType::CallServiceResponseSuccess, ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let timeout_block = IbcTimeoutBlock { revision: 0, @@ -986,7 +985,7 @@ fn test_ack_failure_on_call_request() { vec![], ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let timeout_block = IbcTimeoutBlock { revision: 0, @@ -1019,7 +1018,7 @@ fn test_ack_failure_on_call_response() { cw_xcall::types::response::CallServiceResponseType::CallServiceResponseSuccess, ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let timeout_block = IbcTimeoutBlock { revision: 0, @@ -1071,7 +1070,7 @@ fn test_handle_response() { cw_xcall::types::response::CallServiceResponseType::CallServiceResponseSuccess, ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let message = Message { sn: Nullable::new(Some(0)), fee: 0, diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_receive_packet.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_receive_packet.rs index 480fa1d32..79f7ec58e 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_receive_packet.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_receive_packet.rs @@ -45,7 +45,7 @@ fn test_receive_packet_for_call_message_request() { vec![], ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let message: Message = Message { sn: common::rlp::Nullable::new(Some(0)), fee: 0, @@ -95,7 +95,7 @@ fn test_receive_packet_for_call_message_response() { cw_xcall::types::response::CallServiceResponseType::CallServiceResponseSuccess, ); - let message: CSMessage = data.try_into().unwrap(); + let message: CSMessage = data.into(); let message: Message = Message { sn: common::rlp::Nullable::new(Some(0)), fee: 0, diff --git a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_send_message.rs b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_send_message.rs index cd838398c..883516c10 100644 --- a/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_send_message.rs +++ b/contracts/cosmwasm-vm/cw-xcall-ibc-connection/tests/test_send_message.rs @@ -2,7 +2,8 @@ pub mod setup; use std::str::FromStr; use cosmwasm_std::{ - testing::mock_env, to_binary, Addr, IbcEndpoint, IbcPacket, IbcTimeout, IbcTimeoutBlock, + testing::mock_env, to_json_binary as to_binary, Addr, IbcEndpoint, IbcPacket, IbcTimeout, + IbcTimeoutBlock, }; use cw_xcall_ibc_connection::types::config::Config; diff --git a/contracts/javascore/gochain-btp b/contracts/javascore/gochain-btp index 4c7d229c4..a4c1ac89c 160000 --- a/contracts/javascore/gochain-btp +++ b/contracts/javascore/gochain-btp @@ -1 +1 @@ -Subproject commit 4c7d229c4ec366d04d1c70b4dd09d70b901f06ef +Subproject commit a4c1ac89c543b92a745ae7a62d0149a177f2a48d diff --git a/libraries/rust/common/src/ibc/core/ics23_commitment/merkle.rs b/libraries/rust/common/src/ibc/core/ics23_commitment/merkle.rs index f2500f260..f6d5a24fc 100644 --- a/libraries/rust/common/src/ibc/core/ics23_commitment/merkle.rs +++ b/libraries/rust/common/src/ibc/core/ics23_commitment/merkle.rs @@ -120,7 +120,7 @@ impl MerkleProof { ) { return Err(CommitmentError::VerificationFailure); } - value = subroot.clone(); + value.clone_from(&subroot); } _ => return Err(CommitmentError::InvalidMerkleProof), } @@ -158,10 +158,10 @@ impl MerkleProof { // verify the absence of key in lowest subtree let proof = self .proofs - .get(0) + .first() .ok_or(CommitmentError::InvalidMerkleProof)?; let spec = ics23_specs - .get(0) + .first() .ok_or(CommitmentError::InvalidMerkleProof)?; // keys are represented from root-to-leaf let key = keys diff --git a/libraries/rust/common/src/lib.rs b/libraries/rust/common/src/lib.rs index 4902e8626..a2d52cbda 100644 --- a/libraries/rust/common/src/lib.rs +++ b/libraries/rust/common/src/lib.rs @@ -4,7 +4,7 @@ use crate::ibc::core::ics24_host::identifier::ClientId; use constants::{ ICON_CLIENT_STATE_TYPE_URL, ICON_CONSENSUS_STATE_TYPE_URL, ICON_SIGNED_HEADER_TYPE_URL, }; -use cosmwasm_std::StdError; +use cosmwasm_std::{StdError, StdResult}; use cw_storage_plus::{Key, KeyDeserialize, Prefixer, PrimaryKey}; use ibc::core::{ ics02_client::client_type::ClientType, @@ -63,10 +63,8 @@ impl<'a> PrimaryKey<'a> for &ClientId { impl KeyDeserialize for &ClientId { type Output = ClientId; - fn from_vec(value: Vec) -> cosmwasm_std::StdResult { - let result = String::from_utf8(value) - .map_err(StdError::invalid_utf8) - .unwrap(); + fn from_vec(value: Vec) -> std::result::Result { + let result = String::from_utf8(value).unwrap(); let client_id = ClientId::from_str(&result).unwrap(); Ok(client_id) } @@ -193,7 +191,8 @@ impl<'a> PrimaryKey<'a> for &ChannelId { impl KeyDeserialize for &ChannelId { type Output = ChannelId; - fn from_vec(value: Vec) -> cosmwasm_std::StdResult { + + fn from_vec(value: Vec) -> StdResult { let result = String::from_utf8(value) .map_err(StdError::invalid_utf8) .unwrap(); diff --git a/libraries/rust/test-utils/Cargo.toml b/libraries/rust/test-utils/Cargo.toml index c1b9ccce5..ead9a2394 100644 --- a/libraries/rust/test-utils/Cargo.toml +++ b/libraries/rust/test-utils/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] serde = { workspace=true} serde_json = "1.0" -cosmwasm-std = {workspace=true, features = ["iterator", "ibc3"]} +cosmwasm-std = {workspace=true, features = ["iterator"]} prost = { workspace=true} ibc-proto = { workspace=true} #ibc = { version = "0.32.0", default-features = false, features = ["parity-scale-codec", "mocks-no-std", "serde", "borsh"]} diff --git a/scripts/.DockerfileContractBuilder b/scripts/.DockerfileContractBuilder index cc6eb5bd1..1bdf56da7 100644 --- a/scripts/.DockerfileContractBuilder +++ b/scripts/.DockerfileContractBuilder @@ -4,7 +4,7 @@ FROM adoptopenjdk/openjdk11 ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:/opt/binaryen/bin:$PATH \ - RUST_VERSION=1.69.0 + RUST_VERSION=1.78.0 RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ gcc \ libc6-dev \ ; \ - BINARYEN_VERS=110; \ + BINARYEN_VERS=116; \ BINARYEN_URL="https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERS}/binaryen-version_${BINARYEN_VERS}-x86_64-linux.tar.gz";\ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ diff --git a/scripts/optimize-cosmwasm.sh b/scripts/optimize-cosmwasm.sh index 893bb23b7..87eb21c41 100755 --- a/scripts/optimize-cosmwasm.sh +++ b/scripts/optimize-cosmwasm.sh @@ -1,11 +1,11 @@ #!/bin/bash set -e -BINARYEN_VERS=110 +BINARYEN_VERS=116 BINARYEN_DWN="https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERS}/binaryen-version_${BINARYEN_VERS}-x86_64-linux.tar.gz" -WASMOPT_VERS="110" -RUSTC_VERS="1.69.0" +WASMOPT_VERS="116" +RUSTC_VERS="1.78.0" MAX_WASM_SIZE=800 # 800 KB @@ -34,15 +34,15 @@ cargo fmt --all cargo clean rustup target add wasm32-unknown-unknown -cargo install cosmwasm-check@1.4.1 --locked +cargo install cosmwasm-check@2.1.0 --locked -RUSTFLAGS='-C link-arg=-s' cargo build --workspace --exclude test-utils --release --lib --target wasm32-unknown-unknown +RUSTFLAGS='-C target-feature=-sign-ext -C link-arg=-s -C target-cpu=mvp' cargo build --workspace --exclude test-utils --release --lib --target wasm32-unknown-unknown for WASM in ./target/wasm32-unknown-unknown/release/*.wasm; do NAME=$(basename "$WASM" .wasm)${SUFFIX}.wasm echo "Creating intermediate hash for $NAME ..." sha256sum -- "$WASM" | tee -a artifacts/archway/checksums_intermediate.txt echo "Optimizing $NAME ..." - wasm-opt -Oz "$WASM" -o "artifacts/archway/$NAME" + wasm-opt -Os --signext-lowering "$WASM" -o "artifacts/archway/$NAME" done # check all generated wasm files