diff --git a/CHANGELOG.md b/CHANGELOG.md index 6566c9588..8397aeea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v0.2.0 (pre-release) +- Update `cgp` to v0.3.1 - [#527](https://github.com/informalsystems/hermes-sdk/pull/527) + - The default `Async` bound in `HasErrorType::Error` has been removed. To work with async code, all occurances of `HasErrorType` and `CanRaiseError` inside Hermes SDK is replaced with `HasAsyncErrorType` and `CanRaiseAsyncError`. + - The `Index` type in Hermes SDK is replaced with the same `Index` type provided from `cgp`. + - Update `cgp` crate to v0.2.0 - [#491](https://github.com/informalsystems/hermes-sdk/pull/491) - For a full list of changes, refer to [contextgeneric/cgp#42](https://github.com/contextgeneric/cgp/pull/42) and the `cgp` [changelog](https://github.com/contextgeneric/cgp/blob/v0.2.0/CHANGELOG.md#v020-2025-12-08). diff --git a/Cargo.lock b/Cargo.lock index f33166bb7..59745e4bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,19 +67,20 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arrayref" @@ -123,18 +124,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -302,9 +303,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bitvec" @@ -360,9 +361,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" +checksum = "9fb65153674e51d3a42c8f27b05b9508cea85edfaade8aa46bc8fc18cecdfef3" dependencies = [ "borsh-derive", "cfg_aliases", @@ -370,15 +371,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" +checksum = "a396e17ad94059c650db3d253bb6e25927f1eb462eede7e7a153bb6e75dce0a7" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -410,9 +411,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.4" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" dependencies = [ "shlex", ] @@ -431,9 +432,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cgp" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5adf76ce3579324bc8804a03da7e05a5012e4096e295d7ce16073dd0f55e923e" +checksum = "4ea80431b9e73ebb8b04657c3890f80b40b987f505f91a65659614d397ec89c5" dependencies = [ "cgp-async", "cgp-core", @@ -442,9 +443,9 @@ dependencies = [ [[package]] name = "cgp-async" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0623cc42c39044ad4223a60b58d427fdece736913fa70e0c0b7787b207545886" +checksum = "7cca3a368634ced2b77f1e00e7ebb0872402a1d8fd6dbf05880329b0a001b37e" dependencies = [ "cgp-async-macro", "cgp-sync", @@ -452,97 +453,107 @@ dependencies = [ [[package]] name = "cgp-async-macro" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22933d3a1fb401cc0208e4f8ef16f4c80579701a47b81d2f23ee5b0b697a7b0" +checksum = "c1656912abbbf7ff2fe11c9680ae5883afe79cac6f2f51bd486d04a3fbba9426" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "cgp-component" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a567833f055c865fb46258f7c6a511b22a1da6bc22f58b47a5e5e3da7a2dd2" -dependencies = [ - "cgp-component-macro", -] +checksum = "12793289566a983f8a3151448cb8820bcc4704c34a0a9cf19bb1ed48e0844e81" [[package]] name = "cgp-component-macro" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4c375220b569b618d6b4ec8793c61bbdd24925786aeb4ea1eac5010916c262" +checksum = "f37331b62cbb29d159d2c3bc3c21bdc885576d9c024d0e9ea4cb3e7513138897" dependencies = [ "cgp-component-macro-lib", - "proc-macro2", + "syn 2.0.96", ] [[package]] name = "cgp-component-macro-lib" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e9fa127625afac0527a2f1595ba365142d8d875ff04f155cb248aee456d2c0" +checksum = "29461124d295bf42c48106e81cb0f89a4eb64132752b916d5ec5df9875d03d58" dependencies = [ - "itertools 0.11.0", + "itertools 0.14.0", "prettyplease", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "cgp-core" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39951e4828fb216d51bfa42121095654f2adb0e4abbc9d03b011c5b47372a4c1" +checksum = "fbc9ec022a14d652748da1cfb4a880a9046fe9b0fddbe20faf4955e3237dd51a" dependencies = [ "cgp-async", "cgp-component", + "cgp-component-macro", "cgp-error", "cgp-field", - "cgp-inner", + "cgp-field-macro", "cgp-type", ] [[package]] name = "cgp-error" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3866da7384b88d3260e781e60bc9da3a68d5552c33eea56e6780fea8c97d000" +checksum = "ed10c471f0af57e4f5a196e21af4f95c7ba3fb6d990d623eb3f47a0f75b4d385" dependencies = [ "cgp-async", "cgp-component", + "cgp-component-macro", "cgp-type", ] +[[package]] +name = "cgp-error-extra" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb44c5e45fb8de9d5e8d77a4736c01d09fdee2f4e822b5ea5a3b6243ddbdd9c" +dependencies = [ + "cgp-error", +] + [[package]] name = "cgp-extra" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f79c15ed0088b1ca06ad58a8f124c1d63f4a554073ed372ff2b488a3fbf6fb9" +checksum = "04a67b3e5c5fd4420c0fd16c1e93a9e28a7e10f9aa911b66d7a2b9588fbb11c4" dependencies = [ + "cgp-error-extra", + "cgp-inner", "cgp-run", + "cgp-runtime", ] [[package]] name = "cgp-field" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6956ca07b849e38106ee5b3c71c7e396088619115fe60934fd2598b873a9efac" +checksum = "193dec7508c4b4efd6a1ef5eac6789eb0a297561e55dcb8cd377a904f055a176" dependencies = [ "cgp-component", - "cgp-field-macro", "cgp-type", ] [[package]] name = "cgp-field-macro" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2286ec0bd3a48571ee3644e80a52ba029f10c2edd6bc3da4f4ef9279583798d5" +checksum = "c7853451aedcc73c0edf67d44ca9652a7b1ba8a18ac0499f4fced1ac845b7711" dependencies = [ "cgp-field-macro-lib", "proc-macro2", @@ -550,60 +561,71 @@ dependencies = [ [[package]] name = "cgp-field-macro-lib" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e05fc04f941c797c28db9dd9685d779b76784f29bdbe2eb368329abfca14d9a" +checksum = "785d154b6d17929919e3bee306c515c7d78e420303605829e48116fcef2ccf9e" dependencies = [ - "itertools 0.11.0", "prettyplease", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "cgp-inner" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cd062e3bef5a8353acdcdae3e04c0012de0b19e9bd02acbccfce09e895814cf" +checksum = "be4e35f1ad7bfb5df01c9f263d054ba53ff87c3d1da20cb5c0872191df904583" dependencies = [ "cgp-component", + "cgp-component-macro", ] [[package]] name = "cgp-run" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf13ddcb395e915d314abf917d86dc7fa461bd73a3da2724b4698d45eaa283e" +checksum = "0ec7009079ecfd0a5db07a5dda0e7cece70b1774ead842a42919a93b4662eb96" dependencies = [ "cgp-async", "cgp-component", + "cgp-component-macro", "cgp-error", ] +[[package]] +name = "cgp-runtime" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d92088b07754adbde9ecdf894b8c3b9303b287c8d82d11f8886a394121925" +dependencies = [ + "cgp-core", +] + [[package]] name = "cgp-sync" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1c0e460bcccd3e2e39ded6a2078f012d3c00b523caafc05b5bdace9205b0cf" +checksum = "eb37ca18a65f3603aaa307ba76d92f64025db56160143a0e96466b5855d61a29" dependencies = [ "cgp-async-macro", ] [[package]] name = "cgp-type" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3c9a9059625de770e4acddff6d5e56c5defd959b010b9643cfcb81832f5bed" +checksum = "4a4638c888a38fbb1c88406c224c38d7b9e230a306e7b07f796280b89f5baa54" dependencies = [ "cgp-component", + "cgp-component-macro", ] [[package]] name = "clap" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", "clap_derive", @@ -611,9 +633,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstream", "anstyle", @@ -623,14 +645,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -832,9 +854,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f" [[package]] name = "der" @@ -863,7 +885,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -883,7 +905,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "unicode-xid", ] @@ -937,7 +959,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1035,9 +1057,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ "concurrent-queue", "parking", @@ -1193,7 +1215,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1225,6 +1247,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generator" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +dependencies = [ + "cfg-if", + "libc", + "log", + "rustversion", + "windows", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1553,7 +1588,7 @@ dependencies = [ "num-rational", "prost", "prost-types", - "reqwest 0.12.9", + "reqwest 0.12.12", "ripemd", "secp256k1", "serde", @@ -1652,7 +1687,7 @@ dependencies = [ "opentelemetry", "prost", "prost-types", - "reqwest 0.12.9", + "reqwest 0.12.12", "secp256k1", "serde", "serde_derive", @@ -2206,15 +2241,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", "hyper 1.5.2", "hyper-util", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", @@ -2731,7 +2766,7 @@ checksum = "7b2bbdb8c5306e4b53545026d6ecbdbf6f9fc5a6459749c60017b99cf895fed4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2906,7 +2941,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2956,7 +2991,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3009,18 +3044,18 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] @@ -3033,9 +3068,9 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -3070,9 +3105,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libredox" @@ -3080,15 +3115,15 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", ] [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -3108,9 +3143,22 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] [[package]] name = "matchers" @@ -3161,25 +3209,23 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.8" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cf62eb4dd975d2dde76432fb1075c49e3ee2331cf36f1f8fd4b66550d32b6f" +checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" dependencies = [ "async-lock", - "async-trait", "crossbeam-channel", "crossbeam-epoch", "crossbeam-utils", "event-listener", "futures-util", - "once_cell", + "loom", "parking_lot", - "quanta", + "portable-atomic", "rustc_version", "smallvec", "tagptr", "thiserror", - "triomphe", "uuid", ] @@ -3301,7 +3347,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -3318,7 +3364,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3471,29 +3517,29 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3517,6 +3563,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "portable-atomic" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" + [[package]] name = "powerfmt" version = "0.2.0" @@ -3534,12 +3586,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3565,9 +3617,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -3592,7 +3644,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3604,26 +3656,11 @@ dependencies = [ "prost", ] -[[package]] -name = "quanta" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ce68d0bb9bc7ef20be3536ffe94e223e1f365bd374108b2659fac0c65cfe6" -dependencies = [ - "crossbeam-utils", - "libc", - "once_cell", - "raw-cpuid", - "wasi", - "web-sys", - "winapi", -] - [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3664,22 +3701,13 @@ dependencies = [ "getrandom", ] -[[package]] -name = "raw-cpuid" -version = "11.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" -dependencies = [ - "bitflags 2.6.0", -] - [[package]] name = "redox_syscall" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -3780,9 +3808,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -3794,7 +3822,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "hyper 1.5.2", - "hyper-rustls 0.27.3", + "hyper-rustls 0.27.5", "hyper-tls", "hyper-util", "ipnet", @@ -3813,6 +3841,7 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -3884,11 +3913,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -3923,9 +3952,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "log", "once_cell", @@ -3970,7 +3999,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.0.1", + "security-framework 3.2.0", ] [[package]] @@ -4020,9 +4049,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -4060,7 +4089,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4093,9 +4122,15 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.96", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -4153,7 +4188,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -4162,11 +4197,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -4175,9 +4210,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -4191,9 +4226,9 @@ checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -4228,13 +4263,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4245,14 +4280,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap 2.7.0", "itoa", @@ -4269,7 +4304,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4476,9 +4511,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -4508,7 +4543,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4528,7 +4563,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "system-configuration-sys 0.6.0", ] @@ -4567,12 +4602,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -4580,9 +4616,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d513ce7f9e41c67ab2dd3d554ef65f36fbcc61745af1e1f93eafdeefa1ce37" +checksum = "d9703e34d940c2a293804752555107f8dbe2b84ec4c6dd5203831235868105d2" dependencies = [ "bytes", "digest 0.10.7", @@ -4610,9 +4646,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de4e66e78c6bfb768993e69c4fc5333dbc863f6d54ebd7a5d08d91556768087" +checksum = "89cc3ea9a39b7ee34eefcff771cc067ecaa0c988c1c5ac08defd878471a06f76" dependencies = [ "flex-error", "serde", @@ -4624,9 +4660,9 @@ dependencies = [ [[package]] name = "tendermint-light-client" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e88c08a112db05101396a79f71c017d7dbf548dc21614f82251f17ecbe5d5e8" +checksum = "a803ff14b11827772f696ba3a1873a5f24598121872c924a764011fc58fc22a0" dependencies = [ "contracts", "crossbeam-channel", @@ -4649,9 +4685,9 @@ dependencies = [ [[package]] name = "tendermint-light-client-verifier" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7affc5fffe9df158185e15bce3e47fc3a0c901e6708f3b7d33f0867d7aef8ce1" +checksum = "f0cda4a449fc70985a95f892a67286f13afa4e048d90b8d04a2bf6341e88d1c2" dependencies = [ "derive_more 0.99.18", "flex-error", @@ -4662,9 +4698,9 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c81ba1b023ec00763c3bc4f4376c67c0047f185cccf95c416c7a2f16272c4cbb" +checksum = "9ae9e1705aa0fa5ecb2c6aa7fb78c2313c4a31158ea5f02048bf318f849352eb" dependencies = [ "borsh", "bytes", @@ -4681,9 +4717,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3ec9d6a266cb079a44272189b5a033227d058ab28659722557c1f7fed6b83c" +checksum = "835a52aa504c63ec05519e31348d3f4ba2fe79493c588e2cad5323d5e81b161a" dependencies = [ "async-trait", "async-tungstenite", @@ -4730,7 +4766,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4804,9 +4840,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -4819,9 +4855,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -4837,13 +4873,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4883,7 +4919,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.21", "tokio", ] @@ -5008,6 +5044,7 @@ dependencies = [ "futures-util", "pin-project-lite", "sync_wrapper 1.0.2", + "tokio", "tower-layer", "tower-service", ] @@ -5043,7 +5080,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5098,12 +5135,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" - [[package]] name = "try-lock" version = "0.2.5" @@ -5213,9 +5244,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" dependencies = [ "getrandom", ] @@ -5265,34 +5296,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -5303,9 +5335,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5313,28 +5345,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -5371,6 +5406,51 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "windows-registry" version = "0.2.0" @@ -5551,9 +5631,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -5609,7 +5689,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -5631,7 +5711,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5651,7 +5731,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -5672,7 +5752,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5694,5 +5774,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] diff --git a/Cargo.toml b/Cargo.toml index 137dc612e..17f77aefd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,7 +85,7 @@ tendermint-light-client-verifier = { version = "0.40" } tendermint-light-client = { version = "0.40" } basecoin = { version = "0.2.0" } bitcoin = { version = "0.31.2" } -cgp = { version = "0.2.0", default-features = false } +cgp = { version = "0.3.1", default-features = false } clap = { version = "4.5.20" } dirs-next = { version = "2.0.0" } num-bigint = { version = "0.4" } diff --git a/crates/any/any-counterparty/src/impls/encoding/client_state.rs b/crates/any/any-counterparty/src/impls/encoding/client_state.rs index 4c7342076..08a08e16f 100644 --- a/crates/any/any-counterparty/src/impls/encoding/client_state.rs +++ b/crates/any/any-counterparty/src/impls/encoding/client_state.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::types::tendermint::TendermintClientState; use hermes_encoding_components::traits::convert::Converter; use hermes_encoding_components::traits::decode::{CanDecode, Decoder}; @@ -25,7 +25,7 @@ where + HasSchemaType + CanDecode + HasSchema - + CanRaiseError, + + CanRaiseAsyncError, ClientState: From, { fn convert(encoding: &Encoding, any: &Any) -> Result { @@ -50,7 +50,7 @@ where + CanDecode + CanDecode + HasSchema - + CanRaiseError, + + CanRaiseAsyncError, ClientState: From, { fn decode(encoding: &Encoding, encoded: &Vec) -> Result { diff --git a/crates/any/any-counterparty/src/impls/encoding/consensus_state.rs b/crates/any/any-counterparty/src/impls/encoding/consensus_state.rs index 44692a332..9fdac5f46 100644 --- a/crates/any/any-counterparty/src/impls/encoding/consensus_state.rs +++ b/crates/any/any-counterparty/src/impls/encoding/consensus_state.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::types::tendermint::TendermintConsensusState; use hermes_encoding_components::traits::convert::Converter; use hermes_encoding_components::traits::decode::{CanDecode, Decoder}; @@ -25,7 +25,7 @@ where + HasSchemaType + CanDecode + HasSchema - + CanRaiseError, + + CanRaiseAsyncError, ConsensusState: From, { fn convert(encoding: &Encoding, any: &Any) -> Result { @@ -50,7 +50,7 @@ where + CanDecode + CanDecode + HasSchema - + CanRaiseError, + + CanRaiseAsyncError, ConsensusState: From, { fn decode(encoding: &Encoding, encoded: &Vec) -> Result { diff --git a/crates/celestia/celestia-integration-tests/src/contexts/bootstrap.rs b/crates/celestia/celestia-integration-tests/src/contexts/bootstrap.rs index d45609eac..3784e5314 100644 --- a/crates/celestia/celestia-integration-tests/src/contexts/bootstrap.rs +++ b/crates/celestia/celestia-integration-tests/src/contexts/bootstrap.rs @@ -3,8 +3,8 @@ use std::sync::OnceLock; use cgp::core::component::UseContext; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_celestia_test_components::bootstrap::components::CelestiaBootstrapComponents as BaseCelestiaBootstrapComponents; use hermes_celestia_test_components::bootstrap::traits::bootstrap_bridge::BridgeBootstrapperComponent; diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/bridge_auth_token.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/bridge_auth_token.rs index 645123225..27070501c 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/bridge_auth_token.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/bridge_auth_token.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::os::exec_command::CanExecCommandWithEnvs; use hermes_runtime_components::traits::runtime::HasRuntime; @@ -16,7 +16,7 @@ where Bootstrap: HasRuntime + HasChainType + HasBridgeDriverType - + CanRaiseError, + + CanRaiseAsyncError, Runtime: CanExecCommandWithEnvs, Chain: HasChainIdType, BridgeDriver: HasBridgeAuthTokenType, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/copy_bridge_key.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/copy_bridge_key.rs index 7c9036cce..fe9a49301 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/copy_bridge_key.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/copy_bridge_key.rs @@ -1,7 +1,7 @@ use std::io::Error as IoError; use std::path::PathBuf; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainId; use hermes_runtime_components::traits::fs::copy_file::CanCopyFile; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; @@ -19,8 +19,8 @@ impl BridgeKeyImporter for Co where Bootstrap: HasRuntime + HasChainDriverType - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Runtime: HasFilePathType + CanCopyFile, ChainDriver: HasChain + HasRuntime + HasChainHomeDir, Chain: HasChainId, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/generate_wallet_config.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/generate_wallet_config.rs index ad8841e86..96629f0cd 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/generate_wallet_config.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/generate_wallet_config.rs @@ -20,7 +20,7 @@ where Bootstrap: HasWalletConfigType + HasChainType + HasChainGenesisConfigType - + HasErrorType + + HasAsyncErrorType + HasGenesisDenom + HasGenesisDenom, Chain: HasDenomType, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/init_bridge_data.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/init_bridge_data.rs index 3124449f6..08d817068 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/init_bridge_data.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/init_bridge_data.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::create_dir::CanCreateDir; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; @@ -12,8 +12,9 @@ pub struct InitCelestiaBridgeData; impl BridgeDataInitializer for InitCelestiaBridgeData where - Bootstrap: - HasChainType + HasRuntime + CanRaiseError, + Bootstrap: HasChainType + + HasRuntime + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommandWithEnvs + CanCreateDir, Chain: HasChainIdType, { diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/start_bridge.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/start_bridge.rs index 0cf74509b..6d341cf99 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/start_bridge.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/start_bridge.rs @@ -1,6 +1,6 @@ use core::time::Duration; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainId; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::child_process::CanStartChildProcess; @@ -22,7 +22,7 @@ where + HasChainDriverType + HasBridgeConfigType + HasRuntime - + CanRaiseError, + + CanRaiseAsyncError, ChainDriver: HasChain + HasRuntime, Chain: HasChainId, Runtime: HasFilePathType + CanStartChildProcess + CanSleep, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/impls/update_bridge_config.rs b/crates/celestia/celestia-test-components/src/bootstrap/impls/update_bridge_config.rs index ddd7fa074..a95c5b3ee 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/impls/update_bridge_config.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/impls/update_bridge_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_test_components::chain_driver::traits::grpc_port::HasGrpcPort; use hermes_cosmos_test_components::chain_driver::traits::rpc_port::HasRpcPort; use hermes_relayer_components::chain::traits::queries::block::CanQueryBlock; @@ -26,11 +26,11 @@ where + HasChainType + HasChainDriverType + HasBridgeConfigType - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Runtime: CanReadFileAsString + CanWriteStringToFile + CanReserveTcpPort, Chain: HasChainId + HasGenesisHeight + CanQueryBlock + HasBlockHash, ChainDriver: HasChain + HasRpcPort + HasGrpcPort, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/bootstrap_bridge.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/bootstrap_bridge.rs index 7e34d70ef..68b822d42 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/bootstrap_bridge.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/bootstrap_bridge.rs @@ -10,7 +10,7 @@ use crate::bootstrap::traits::types::bridge_driver::HasBridgeDriverType; }] #[async_trait] pub trait CanBootstrapBridge: - HasChainDriverType + HasBridgeDriverType + HasRuntime + HasErrorType + HasChainDriverType + HasBridgeDriverType + HasRuntime + HasAsyncErrorType { async fn bootstrap_bridge( &self, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/bridge_auth_token.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/bridge_auth_token.rs index 7e38a3c33..ff7a6dd02 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/bridge_auth_token.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/bridge_auth_token.rs @@ -14,7 +14,7 @@ use crate::bridge_driver::traits::bridge_auth_token::{BridgeAuthTokenOf, HasBrid }] #[async_trait] pub trait CanGenerateBridgeAuthToken: - HasRuntimeType + HasChainType + HasBridgeDriverType + HasErrorType + HasRuntimeType + HasChainType + HasBridgeDriverType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/build_bridge_driver.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/build_bridge_driver.rs index 40da57c60..cf182fa2b 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/build_bridge_driver.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/build_bridge_driver.rs @@ -12,7 +12,7 @@ use crate::bridge_driver::traits::bridge_auth_token::{BridgeAuthTokenOf, HasBrid }] #[async_trait] pub trait CanBuildBridgeDriver: - HasBridgeDriverType + HasBridgeConfigType + HasRuntimeType + HasErrorType + HasBridgeDriverType + HasBridgeConfigType + HasRuntimeType + HasAsyncErrorType where Self::Runtime: HasChildProcessType, Self::BridgeDriver: HasBridgeAuthTokenType, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/import_bridge_key.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/import_bridge_key.rs index 731cc7f34..9b793d516 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/import_bridge_key.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/import_bridge_key.rs @@ -11,7 +11,7 @@ use hermes_test_components::driver::traits::types::chain_driver::HasChainDriverT context: Bootstrap, }] #[async_trait] -pub trait CanImportBridgeKey: HasRuntime + HasChainDriverType + HasErrorType +pub trait CanImportBridgeKey: HasRuntime + HasChainDriverType + HasAsyncErrorType where Self::Runtime: HasFilePathType, { diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_config.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_config.rs index 044b759cd..0fe11a9b4 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_config.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_config.rs @@ -11,7 +11,7 @@ use crate::bootstrap::traits::types::bridge_config::HasBridgeConfigType; }] #[async_trait] pub trait CanInitBridgeConfig: - HasRuntimeType + HasChainDriverType + HasBridgeConfigType + HasErrorType + HasRuntimeType + HasChainDriverType + HasBridgeConfigType + HasAsyncErrorType where Self::Runtime: HasFilePathType, { diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_data.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_data.rs index 3be273aaa..bc9ad27fa 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_data.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/init_bridge_data.rs @@ -13,7 +13,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanInitBridgeData: HasRuntime + HasChainType + HasErrorType +pub trait CanInitBridgeData: HasRuntime + HasChainType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType, diff --git a/crates/celestia/celestia-test-components/src/bootstrap/traits/start_bridge.rs b/crates/celestia/celestia-test-components/src/bootstrap/traits/start_bridge.rs index e31c70ef3..91f963460 100644 --- a/crates/celestia/celestia-test-components/src/bootstrap/traits/start_bridge.rs +++ b/crates/celestia/celestia-test-components/src/bootstrap/traits/start_bridge.rs @@ -12,7 +12,7 @@ use crate::bootstrap::traits::types::bridge_config::HasBridgeConfigType; }] #[async_trait] pub trait CanStartBridge: - HasChainDriverType + HasBridgeConfigType + HasRuntimeType + HasErrorType + HasChainDriverType + HasBridgeConfigType + HasRuntimeType + HasAsyncErrorType where Self::Runtime: HasChildProcessType + HasFilePathType, { diff --git a/crates/chain/chain-components/src/impls/payload_builders/connection.rs b/crates/chain/chain-components/src/impls/payload_builders/connection.rs index 1c0a8941a..2da5bcb94 100644 --- a/crates/chain/chain-components/src/impls/payload_builders/connection.rs +++ b/crates/chain/chain-components/src/impls/payload_builders/connection.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use hermes_chain_type_components::traits::types::height::HasHeightType; use hermes_chain_type_components::traits::types::ibc::client_id::HasClientIdType; use hermes_chain_type_components::traits::types::ibc::connection_id::HasConnectionIdType; @@ -35,7 +35,7 @@ where + HasConnectionOpenInitPayloadType< Counterparty, ConnectionOpenInitPayload = ConnectionOpenInitPayload, - > + HasErrorType, + > + HasAsyncErrorType, Chain::CommitmentPrefix: Clone, { async fn build_connection_open_init_payload( @@ -59,7 +59,7 @@ where > + CanQueryConnectionEndWithProofs + CanQueryClientStateWithProofs + CanQueryConsensusStateWithProofs - + HasErrorType, + + HasAsyncErrorType, Chain::CommitmentPrefix: Clone, Counterparty: HasClientStateFields + HasConsensusStateType, { @@ -123,7 +123,7 @@ where > + CanQueryConnectionEndWithProofs + CanQueryClientStateWithProofs + CanQueryConsensusStateWithProofs - + HasErrorType, + + HasAsyncErrorType, Chain::CommitmentPrefix: Clone, Counterparty: HasClientStateFields + HasConsensusStateType, { diff --git a/crates/chain/chain-components/src/impls/payload_builders/packet.rs b/crates/chain/chain-components/src/impls/payload_builders/packet.rs index a67a630b0..ed500d11e 100644 --- a/crates/chain/chain-components/src/impls/payload_builders/packet.rs +++ b/crates/chain/chain-components/src/impls/payload_builders/packet.rs @@ -1,4 +1,4 @@ -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_chain_type_components::traits::fields::height::CanIncrementHeight; use crate::traits::packet::fields::{ @@ -33,7 +33,7 @@ where + HasClientStateType + CanQueryPacketCommitment + HasCommitmentProofHeight - + HasErrorType, + + HasAsyncErrorType, { async fn build_receive_packet_payload( chain: &Chain, @@ -74,7 +74,7 @@ where + CanQueryPacketAcknowledgement + CanIncrementHeight + HasCommitmentProofHeight - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasPacketDstChannelId + HasPacketDstPortId + HasPacketSequence, Chain::Acknowledgement: Clone, @@ -120,7 +120,7 @@ where + CanQueryPacketReceipt + HasCommitmentProofHeight + HasCommitmentProofType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasPacketDstChannelId + HasPacketDstPortId + HasPacketSequence, { diff --git a/crates/chain/chain-components/src/impls/queries/consensus_state_height.rs b/crates/chain/chain-components/src/impls/queries/consensus_state_height.rs index f6f38726b..52f831b43 100644 --- a/crates/chain/chain-components/src/impls/queries/consensus_state_height.rs +++ b/crates/chain/chain-components/src/impls/queries/consensus_state_height.rs @@ -1,6 +1,6 @@ use core::fmt::Debug; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_chain_type_components::traits::types::ibc::client_id::HasClientIdType; use crate::traits::queries::consensus_state_height::{ @@ -24,7 +24,7 @@ impl ConsensusStateHeightQuerier for QueryConsensusStateHeightsAndFindHeightBefore where Chain: CanQueryConsensusStateHeights - + for<'a> CanRaiseError>, + + for<'a> CanRaiseAsyncError>, Counterparty: HasHeightType, { async fn find_consensus_state_height_before( diff --git a/crates/chain/chain-components/src/impls/queries/query_and_convert_client_state.rs b/crates/chain/chain-components/src/impls/queries/query_and_convert_client_state.rs index 44329c975..e9f4ff18d 100644 --- a/crates/chain/chain-components/src/impls/queries/query_and_convert_client_state.rs +++ b/crates/chain/chain-components/src/impls/queries/query_and_convert_client_state.rs @@ -1,7 +1,7 @@ use alloc::vec::Vec; use core::marker::PhantomData; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::core::Async; use hermes_encoding_components::traits::convert::CanConvert; use hermes_encoding_components::traits::has_encoding::HasDefaultEncoding; @@ -18,7 +18,7 @@ pub struct QueryAndConvertRawClientState; impl ClientStateQuerier for QueryAndConvertRawClientState where - Chain: CanQueryRawClientState + CanRaiseError, + Chain: CanQueryRawClientState + CanRaiseAsyncError, Counterparty: HasClientStateType + HasDefaultEncoding, Encoding: Async + CanConvert, { @@ -41,7 +41,7 @@ where impl ClientStateWithProofsQuerier for QueryAndConvertRawClientState where - Chain: CanQueryRawClientStateWithProofs + CanRaiseError, + Chain: CanQueryRawClientStateWithProofs + CanRaiseAsyncError, Counterparty: HasClientStateType + HasDefaultEncoding, Encoding: Async + CanConvert, { diff --git a/crates/chain/chain-components/src/impls/queries/query_and_convert_consensus_state.rs b/crates/chain/chain-components/src/impls/queries/query_and_convert_consensus_state.rs index fa7c8c3e2..505b7347c 100644 --- a/crates/chain/chain-components/src/impls/queries/query_and_convert_consensus_state.rs +++ b/crates/chain/chain-components/src/impls/queries/query_and_convert_consensus_state.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::core::Async; use hermes_encoding_components::traits::convert::CanConvert; use hermes_encoding_components::traits::has_encoding::HasDefaultEncoding; @@ -18,7 +18,7 @@ pub struct QueryAndConvertRawConsensusState; impl ConsensusStateQuerier for QueryAndConvertRawConsensusState where - Chain: CanQueryRawConsensusState + CanRaiseError, + Chain: CanQueryRawConsensusState + CanRaiseAsyncError, Counterparty: HasConsensusStateType + HasDefaultEncoding + HasHeightType, @@ -46,7 +46,7 @@ where impl ConsensusStateWithProofsQuerier for QueryAndConvertRawConsensusState where - Chain: CanQueryRawConsensusStateWithProofs + CanRaiseError, + Chain: CanQueryRawConsensusStateWithProofs + CanRaiseAsyncError, Counterparty: HasConsensusStateType + HasDefaultEncoding + HasHeightType, diff --git a/crates/chain/chain-components/src/impls/queries/query_and_decode_consensus_state.rs b/crates/chain/chain-components/src/impls/queries/query_and_decode_consensus_state.rs index 8541b1dcf..cca1442ba 100644 --- a/crates/chain/chain-components/src/impls/queries/query_and_decode_consensus_state.rs +++ b/crates/chain/chain-components/src/impls/queries/query_and_decode_consensus_state.rs @@ -1,7 +1,7 @@ use alloc::vec::Vec; use core::marker::PhantomData; -use cgp::prelude::{Async, CanRaiseError}; +use cgp::prelude::{Async, CanRaiseAsyncError}; use hermes_encoding_components::traits::decode::CanDecode; use hermes_encoding_components::traits::has_encoding::HasDefaultEncoding; use hermes_encoding_components::traits::types::encoded::HasEncodedType; @@ -17,7 +17,7 @@ impl ConsensusStateQuerier where Chain: CanQueryRawConsensusState> - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasConsensusStateType + HasHeightType + HasDefaultEncoding, diff --git a/crates/chain/chain-components/src/impls/wait_chain_reach_height.rs b/crates/chain/chain-components/src/impls/wait_chain_reach_height.rs index d3f5dcb4a..4a664062f 100644 --- a/crates/chain/chain-components/src/impls/wait_chain_reach_height.rs +++ b/crates/chain/chain-components/src/impls/wait_chain_reach_height.rs @@ -8,7 +8,7 @@ use crate::traits::queries::chain_status::CanQueryChainHeight; use crate::traits::types::height::HasHeightType; #[async_trait] -pub trait CanWaitChainReachHeight: HasHeightType + HasErrorType { +pub trait CanWaitChainReachHeight: HasHeightType + HasAsyncErrorType { async fn wait_chain_reach_height( &self, height: &Self::Height, diff --git a/crates/chain/chain-components/src/traits/message_builders/ack_packet.rs b/crates/chain/chain-components/src/traits/message_builders/ack_packet.rs index 0bc65fe7c..dcccbd46f 100644 --- a/crates/chain/chain-components/src/traits/message_builders/ack_packet.rs +++ b/crates/chain/chain-components/src/traits/message_builders/ack_packet.rs @@ -10,7 +10,7 @@ use crate::traits::types::packets::ack::HasAckPacketPayloadType; }] #[async_trait] pub trait CanBuildAckPacketMessage: - HasMessageType + HasOutgoingPacketType + HasErrorType + HasMessageType + HasOutgoingPacketType + HasAsyncErrorType where Counterparty: HasAckPacketPayloadType, { diff --git a/crates/chain/chain-components/src/traits/message_builders/channel_handshake.rs b/crates/chain/chain-components/src/traits/message_builders/channel_handshake.rs index cdb788ed7..581d0082d 100644 --- a/crates/chain/chain-components/src/traits/message_builders/channel_handshake.rs +++ b/crates/chain/chain-components/src/traits/message_builders/channel_handshake.rs @@ -22,7 +22,7 @@ pub trait CanBuildChannelOpenInitMessage: + HasMessageType + HasPortIdType + HasInitChannelOptionsType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { async fn build_channel_open_init_message( @@ -41,7 +41,7 @@ pub trait CanBuildChannelOpenInitMessage: pub trait CanBuildChannelOpenTryMessage: HasMessageType + HasPortIdType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty< Counterparty, Counterparty: HasChannelIdType @@ -67,7 +67,7 @@ pub trait CanBuildChannelOpenAckMessage: HasMessageType + HasPortIdType + HasChannelIdType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty< Counterparty, Counterparty: HasChannelIdType @@ -93,7 +93,7 @@ pub trait CanBuildChannelOpenConfirmMessage: HasMessageType + HasPortIdType + HasChannelIdType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { async fn build_channel_open_confirm_message( @@ -110,7 +110,7 @@ where Chain: HasMessageType + HasPortIdType + HasInitChannelOptionsType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasPortIdType, Delegate: ChannelOpenInitMessageBuilder, Components: DelegateComponent, @@ -134,7 +134,7 @@ where impl ChannelOpenTryMessageBuilder for UseDelegate where - Chain: HasMessageType + HasPortIdType + HasErrorType, + Chain: HasMessageType + HasPortIdType + HasAsyncErrorType, Counterparty: HasChannelIdType + HasPortIdType + HasChannelOpenTryPayloadType, Delegate: ChannelOpenTryMessageBuilder, @@ -164,7 +164,7 @@ where Chain: HasMessageType + HasPortIdType + HasChannelIdType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasChannelIdType + HasPortIdType + HasChannelOpenAckPayloadType, Delegate: ChannelOpenAckMessageBuilder, @@ -194,7 +194,7 @@ where Chain: HasMessageType + HasPortIdType + HasChannelIdType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasChannelOpenConfirmPayloadType, Delegate: ChannelOpenConfirmMessageBuilder, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/message_builders/connection_handshake.rs b/crates/chain/chain-components/src/traits/message_builders/connection_handshake.rs index 7cbf2c6be..2e3c19b5a 100644 --- a/crates/chain/chain-components/src/traits/message_builders/connection_handshake.rs +++ b/crates/chain/chain-components/src/traits/message_builders/connection_handshake.rs @@ -19,7 +19,7 @@ pub trait CanBuildConnectionOpenInitMessage: HasInitConnectionOptionsType + HasClientIdType + HasMessageType - + HasErrorType + + HasAsyncErrorType where Counterparty: HasConnectionOpenInitPayloadType + HasClientIdType, { @@ -38,7 +38,7 @@ where }] #[async_trait] pub trait CanBuildConnectionOpenTryMessage: - HasMessageType + HasClientIdType + HasErrorType + HasMessageType + HasClientIdType + HasAsyncErrorType where Counterparty: HasConnectionOpenTryPayloadType + HasClientIdType + HasConnectionIdType, @@ -58,7 +58,7 @@ where }] #[async_trait] pub trait CanBuildConnectionOpenAckMessage: - HasMessageType + HasConnectionIdType + HasErrorType + HasMessageType + HasConnectionIdType + HasAsyncErrorType where Counterparty: HasConnectionOpenAckPayloadType + HasConnectionIdType, { @@ -76,7 +76,7 @@ where }] #[async_trait] pub trait CanBuildConnectionOpenConfirmMessage: - HasMessageType + HasConnectionIdType + HasErrorType + HasMessageType + HasConnectionIdType + HasAsyncErrorType where Counterparty: HasConnectionOpenConfirmPayloadType, { @@ -93,7 +93,7 @@ where Chain: HasInitConnectionOptionsType + HasClientIdType + HasMessageType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasConnectionOpenInitPayloadType + HasClientIdType, Delegate: ConnectionOpenInitMessageBuilder, Components: DelegateComponent, @@ -119,7 +119,7 @@ where impl ConnectionOpenTryMessageBuilder for UseDelegate where - Chain: HasMessageType + HasClientIdType + HasErrorType, + Chain: HasMessageType + HasClientIdType + HasAsyncErrorType, Counterparty: HasConnectionOpenTryPayloadType + HasClientIdType + HasConnectionIdType, @@ -147,7 +147,7 @@ where impl ConnectionOpenAckMessageBuilder for UseDelegate where - Chain: HasMessageType + HasConnectionIdType + HasErrorType, + Chain: HasMessageType + HasConnectionIdType + HasAsyncErrorType, Counterparty: HasConnectionOpenAckPayloadType + HasConnectionIdType, Delegate: ConnectionOpenAckMessageBuilder, Components: DelegateComponent, @@ -171,7 +171,7 @@ where impl ConnectionOpenConfirmMessageBuilder for UseDelegate where - Chain: HasMessageType + HasConnectionIdType + HasErrorType, + Chain: HasMessageType + HasConnectionIdType + HasAsyncErrorType, Counterparty: HasConnectionOpenConfirmPayloadType, Delegate: ConnectionOpenConfirmMessageBuilder, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/message_builders/create_client.rs b/crates/chain/chain-components/src/traits/message_builders/create_client.rs index a3e85ce12..f3b170cfe 100644 --- a/crates/chain/chain-components/src/traits/message_builders/create_client.rs +++ b/crates/chain/chain-components/src/traits/message_builders/create_client.rs @@ -15,7 +15,7 @@ use crate::traits::types::message::HasMessageType; pub trait CanBuildCreateClientMessage: HasCreateClientMessageOptionsType + HasMessageType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { async fn build_create_client_message( @@ -28,7 +28,7 @@ pub trait CanBuildCreateClientMessage: impl CreateClientMessageBuilder for UseDelegate where - Chain: HasCreateClientMessageOptionsType + HasMessageType + HasErrorType, + Chain: HasCreateClientMessageOptionsType + HasMessageType + HasAsyncErrorType, Counterparty: HasCreateClientPayloadType, Delegate: CreateClientMessageBuilder, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/message_builders/receive_packet.rs b/crates/chain/chain-components/src/traits/message_builders/receive_packet.rs index c363499d9..64c3ecaa2 100644 --- a/crates/chain/chain-components/src/traits/message_builders/receive_packet.rs +++ b/crates/chain/chain-components/src/traits/message_builders/receive_packet.rs @@ -9,7 +9,7 @@ use crate::traits::types::packets::receive::HasReceivePacketPayloadType; context: Chain, }] #[async_trait] -pub trait CanBuildReceivePacketMessage: HasMessageType + HasErrorType +pub trait CanBuildReceivePacketMessage: HasMessageType + HasAsyncErrorType where Counterparty: HasOutgoingPacketType + HasReceivePacketPayloadType, { diff --git a/crates/chain/chain-components/src/traits/message_builders/timeout_unordered_packet.rs b/crates/chain/chain-components/src/traits/message_builders/timeout_unordered_packet.rs index e6c23bdb9..0b50d9a7a 100644 --- a/crates/chain/chain-components/src/traits/message_builders/timeout_unordered_packet.rs +++ b/crates/chain/chain-components/src/traits/message_builders/timeout_unordered_packet.rs @@ -10,7 +10,7 @@ use crate::traits::types::packets::timeout::HasTimeoutUnorderedPacketPayloadType }] #[async_trait] pub trait CanBuildTimeoutUnorderedPacketMessage: - HasMessageType + HasOutgoingPacketType + HasErrorType + HasMessageType + HasOutgoingPacketType + HasAsyncErrorType where Counterparty: HasTimeoutUnorderedPacketPayloadType, { diff --git a/crates/chain/chain-components/src/traits/message_builders/update_client.rs b/crates/chain/chain-components/src/traits/message_builders/update_client.rs index b721369fb..2c295e868 100644 --- a/crates/chain/chain-components/src/traits/message_builders/update_client.rs +++ b/crates/chain/chain-components/src/traits/message_builders/update_client.rs @@ -17,7 +17,7 @@ pub trait CanBuildUpdateClientMessage: HasClientIdType + CanUseCounterparty> + HasMessageType - + HasErrorType + + HasAsyncErrorType { async fn build_update_client_message( &self, @@ -29,7 +29,7 @@ pub trait CanBuildUpdateClientMessage: impl UpdateClientMessageBuilder for UseDelegate where - Chain: HasClientIdType + HasMessageType + HasErrorType, + Chain: HasClientIdType + HasMessageType + HasAsyncErrorType, Counterparty: HasUpdateClientPayloadType, Delegate: UpdateClientMessageBuilder, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/packet/filter.rs b/crates/chain/chain-components/src/traits/packet/filter.rs index 5b0abc613..4cfa3846d 100644 --- a/crates/chain/chain-components/src/traits/packet/filter.rs +++ b/crates/chain/chain-components/src/traits/packet/filter.rs @@ -9,7 +9,7 @@ use hermes_chain_type_components::traits::types::ibc::packet::{ }] #[async_trait] pub trait CanFilterOutgoingPacket: - HasOutgoingPacketType + HasErrorType + HasOutgoingPacketType + HasAsyncErrorType { async fn should_relay_outgoing_packet( &self, @@ -23,7 +23,7 @@ pub trait CanFilterOutgoingPacket: }] #[async_trait] pub trait CanFilterIncomingPacket: - HasIncomingPacketType + HasErrorType + HasIncomingPacketType + HasAsyncErrorType { async fn should_relay_incoming_packet( &self, diff --git a/crates/chain/chain-components/src/traits/payload_builders/ack_packet.rs b/crates/chain/chain-components/src/traits/payload_builders/ack_packet.rs index 592f05dab..4d53fcac7 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/ack_packet.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/ack_packet.rs @@ -15,7 +15,7 @@ pub trait CanBuildAckPacketPayload: + HasAcknowledgementType + HasClientStateType + HasHeightType - + HasErrorType + + HasAsyncErrorType where Counterparty: HasOutgoingPacketType, { diff --git a/crates/chain/chain-components/src/traits/payload_builders/channel_handshake.rs b/crates/chain/chain-components/src/traits/payload_builders/channel_handshake.rs index f6c1dba7e..3fb51924a 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/channel_handshake.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/channel_handshake.rs @@ -19,7 +19,7 @@ pub trait CanBuildChannelOpenTryPayload: + HasPortIdType + HasChannelOpenTryPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_channel_open_try_payload( &self, @@ -41,7 +41,7 @@ pub trait CanBuildChannelOpenAckPayload: + HasPortIdType + HasChannelOpenAckPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_channel_open_ack_payload( &self, @@ -63,7 +63,7 @@ pub trait CanBuildChannelOpenConfirmPayload: + HasPortIdType + HasChannelOpenConfirmPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_channel_open_confirm_payload( &self, diff --git a/crates/chain/chain-components/src/traits/payload_builders/connection_handshake.rs b/crates/chain/chain-components/src/traits/payload_builders/connection_handshake.rs index 9671510a5..a127cd287 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/connection_handshake.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/connection_handshake.rs @@ -15,7 +15,9 @@ use crate::traits::types::connection::{ }] #[async_trait] pub trait CanBuildConnectionOpenInitPayload: - HasConnectionOpenInitPayloadType + HasClientStateType + HasErrorType + HasConnectionOpenInitPayloadType + + HasClientStateType + + HasAsyncErrorType { async fn build_connection_open_init_payload( &self, @@ -34,7 +36,7 @@ pub trait CanBuildConnectionOpenTryPayload: + HasConnectionIdType + HasConnectionOpenTryPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_connection_open_try_payload( &self, @@ -56,7 +58,7 @@ pub trait CanBuildConnectionOpenAckPayload: + HasConnectionIdType + HasConnectionOpenAckPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_connection_open_ack_payload( &self, @@ -78,7 +80,7 @@ pub trait CanBuildConnectionOpenConfirmPayload: + HasConnectionIdType + HasConnectionOpenConfirmPayloadType + HasClientStateType - + HasErrorType + + HasAsyncErrorType { async fn build_connection_open_confirm_payload( &self, diff --git a/crates/chain/chain-components/src/traits/payload_builders/create_client.rs b/crates/chain/chain-components/src/traits/payload_builders/create_client.rs index e9c3bc345..fab13b262 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/create_client.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/create_client.rs @@ -13,7 +13,7 @@ use crate::traits::types::create_client::{ pub trait CanBuildCreateClientPayload: HasCreateClientPayloadOptionsType + HasCreateClientPayloadType - + HasErrorType + + HasAsyncErrorType { async fn build_create_client_payload( &self, @@ -26,7 +26,7 @@ impl CreateClientPayloadBuilder + HasCreateClientPayloadType - + HasErrorType, + + HasAsyncErrorType, Components: DelegateComponent, Delegate: CreateClientPayloadBuilder, { diff --git a/crates/chain/chain-components/src/traits/payload_builders/receive_packet.rs b/crates/chain/chain-components/src/traits/payload_builders/receive_packet.rs index 0a65a7e15..b4b02dadf 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/receive_packet.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/receive_packet.rs @@ -15,7 +15,7 @@ pub trait CanBuildReceivePacketPayload: + HasOutgoingPacketType + HasClientStateType + HasHeightType - + HasErrorType + + HasAsyncErrorType { async fn build_receive_packet_payload( &self, diff --git a/crates/chain/chain-components/src/traits/payload_builders/timeout_unordered_packet.rs b/crates/chain/chain-components/src/traits/payload_builders/timeout_unordered_packet.rs index 745c2d62a..0bc532c37 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/timeout_unordered_packet.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/timeout_unordered_packet.rs @@ -14,7 +14,7 @@ pub trait CanBuildTimeoutUnorderedPacketPayload: HasTimeoutUnorderedPacketPayloadType + HasClientStateType + HasHeightType - + HasErrorType + + HasAsyncErrorType where Counterparty: HasOutgoingPacketType, { diff --git a/crates/chain/chain-components/src/traits/payload_builders/update_client.rs b/crates/chain/chain-components/src/traits/payload_builders/update_client.rs index 274bf1d2c..e15a3f9d1 100644 --- a/crates/chain/chain-components/src/traits/payload_builders/update_client.rs +++ b/crates/chain/chain-components/src/traits/payload_builders/update_client.rs @@ -14,7 +14,7 @@ pub trait CanBuildUpdateClientPayload: HasUpdateClientPayloadType + HasClientStateType + HasHeightType - + HasErrorType + + HasAsyncErrorType { async fn build_update_client_payload( &self, @@ -30,7 +30,7 @@ where Chain: HasUpdateClientPayloadType + HasClientStateType + HasHeightType - + HasErrorType, + + HasAsyncErrorType, Components: DelegateComponent, Delegate: UpdateClientPayloadBuilder, { diff --git a/crates/chain/chain-components/src/traits/queries/ack_packets.rs b/crates/chain/chain-components/src/traits/queries/ack_packets.rs index b7388bcd0..6947b0cc1 100644 --- a/crates/chain/chain-components/src/traits/queries/ack_packets.rs +++ b/crates/chain/chain-components/src/traits/queries/ack_packets.rs @@ -20,7 +20,7 @@ pub trait CanQueryAckPackets: + HasChannelIdType + HasPortIdType + HasWriteAckEvent - + HasErrorType + + HasAsyncErrorType where Counterparty: HasOutgoingPacketType + HasChannelIdType @@ -59,7 +59,7 @@ pub trait CanQueryAckPacket: + HasChannelIdType + HasPortIdType + HasWriteAckEvent - + HasErrorType + + HasAsyncErrorType where Counterparty: HasOutgoingPacketType + HasChannelIdType diff --git a/crates/chain/chain-components/src/traits/queries/block.rs b/crates/chain/chain-components/src/traits/queries/block.rs index bd8038e67..019279a81 100644 --- a/crates/chain/chain-components/src/traits/queries/block.rs +++ b/crates/chain/chain-components/src/traits/queries/block.rs @@ -8,6 +8,6 @@ use crate::traits::types::height::HasHeightType; context: Chain, }] #[async_trait] -pub trait CanQueryBlock: HasHeightType + HasBlockType + HasErrorType { +pub trait CanQueryBlock: HasHeightType + HasBlockType + HasAsyncErrorType { async fn query_block(&self, height: &Self::Height) -> Result; } diff --git a/crates/chain/chain-components/src/traits/queries/chain_status.rs b/crates/chain/chain-components/src/traits/queries/chain_status.rs index b2f43e830..1a4b7d7a2 100644 --- a/crates/chain/chain-components/src/traits/queries/chain_status.rs +++ b/crates/chain/chain-components/src/traits/queries/chain_status.rs @@ -12,7 +12,7 @@ use crate::traits::types::status::HasChainStatusType; context: Chain, }] #[async_trait] -pub trait CanQueryChainStatus: HasChainStatusType + HasErrorType { +pub trait CanQueryChainStatus: HasChainStatusType + HasAsyncErrorType { /** Query the current status of the blockchain. The returned [status](HasChainStatusType::ChainStatus) is required to have the same @@ -33,7 +33,7 @@ pub trait CanQueryChainStatus: HasChainStatusType + HasErrorType { } #[async_trait] -pub trait CanQueryChainHeight: HasHeightType + HasErrorType { +pub trait CanQueryChainHeight: HasHeightType + HasAsyncErrorType { async fn query_chain_height(&self) -> Result; } diff --git a/crates/chain/chain-components/src/traits/queries/channel_end.rs b/crates/chain/chain-components/src/traits/queries/channel_end.rs index 442134a31..063182d7b 100644 --- a/crates/chain/chain-components/src/traits/queries/channel_end.rs +++ b/crates/chain/chain-components/src/traits/queries/channel_end.rs @@ -18,7 +18,7 @@ pub trait CanQueryChannelEnd: + HasChannelIdType + HasPortIdType + HasChannelEndType - + HasErrorType + + HasAsyncErrorType { async fn query_channel_end( &self, @@ -39,7 +39,7 @@ pub trait CanQueryChannelEndWithProofs: + HasPortIdType + HasChannelEndType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType { async fn query_channel_end_with_proofs( &self, diff --git a/crates/chain/chain-components/src/traits/queries/client_state.rs b/crates/chain/chain-components/src/traits/queries/client_state.rs index a816ff607..685ea5647 100644 --- a/crates/chain/chain-components/src/traits/queries/client_state.rs +++ b/crates/chain/chain-components/src/traits/queries/client_state.rs @@ -21,7 +21,7 @@ pub trait CanQueryClientState: HasClientIdType + CanUseCounterparty> + HasHeightType - + HasErrorType + + HasAsyncErrorType { async fn query_client_state( &self, @@ -37,7 +37,7 @@ pub trait CanQueryClientState: }] #[async_trait] pub trait CanQueryClientStateWithProofs: - HasHeightType + HasClientIdType + HasCommitmentProofType + HasErrorType + HasHeightType + HasClientIdType + HasCommitmentProofType + HasAsyncErrorType where Counterparty: HasClientStateType, { @@ -55,7 +55,7 @@ where }] #[async_trait] pub trait CanQueryRawClientState: - HasClientIdType + HasHeightType + HasRawClientStateType + HasErrorType + HasClientIdType + HasHeightType + HasRawClientStateType + HasAsyncErrorType { async fn query_raw_client_state( &self, @@ -74,7 +74,7 @@ pub trait CanQueryRawClientStateWithProofs: + HasHeightType + HasRawClientStateType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType { async fn query_raw_client_state_with_proofs( &self, @@ -89,7 +89,7 @@ pub trait CanQueryRawClientStateWithProofs: }] #[async_trait] pub trait CanQueryAllClientStates: - HasClientIdType + HasHeightType + HasErrorType + HasClientIdType + HasHeightType + HasAsyncErrorType where Counterparty: HasClientStateType, { @@ -105,7 +105,7 @@ where }] #[async_trait] pub trait CanQueryAllRawClientStates: - HasClientIdType + HasHeightType + HasRawClientStateType + HasErrorType + HasClientIdType + HasHeightType + HasRawClientStateType + HasAsyncErrorType { async fn query_all_raw_client_states( &self, @@ -115,7 +115,7 @@ pub trait CanQueryAllRawClientStates: #[async_trait] pub trait CanQueryClientStateWithLatestHeight: - HasClientIdType + HasHeightType + HasErrorType + HasClientIdType + HasHeightType + HasAsyncErrorType where Counterparty: HasClientStateType, { @@ -145,7 +145,7 @@ where #[async_trait] pub trait CanQueryAllClientStatesWithLatestHeight: - HasClientIdType + HasHeightType + HasErrorType + HasClientIdType + HasHeightType + HasAsyncErrorType where Counterparty: HasClientStateType, { @@ -172,7 +172,7 @@ where impl ClientStateQuerier for UseDelegate where - Chain: HasHeightType + HasClientIdType + HasErrorType, + Chain: HasHeightType + HasClientIdType + HasAsyncErrorType, Counterparty: HasClientStateType, Components: DelegateComponent, Delegate: ClientStateQuerier, @@ -190,7 +190,8 @@ where impl ClientStateWithProofsQuerier for UseDelegate where - Chain: HasHeightType + HasClientIdType + HasCommitmentProofType + HasErrorType, + Chain: + HasHeightType + HasClientIdType + HasCommitmentProofType + HasAsyncErrorType, Counterparty: HasClientStateType, Components: DelegateComponent, Delegate: ClientStateWithProofsQuerier, @@ -208,7 +209,7 @@ where impl AllClientStatesQuerier for UseDelegate where - Chain: HasClientIdType + HasHeightType + HasErrorType, + Chain: HasClientIdType + HasHeightType + HasAsyncErrorType, Counterparty: HasClientStateType, Components: DelegateComponent, Delegate: AllClientStatesQuerier, diff --git a/crates/chain/chain-components/src/traits/queries/connection_end.rs b/crates/chain/chain-components/src/traits/queries/connection_end.rs index 6f601ef0e..a9820c20d 100644 --- a/crates/chain/chain-components/src/traits/queries/connection_end.rs +++ b/crates/chain/chain-components/src/traits/queries/connection_end.rs @@ -16,7 +16,7 @@ pub trait CanQueryConnectionEnd: HasHeightType + HasConnectionIdType + HasConnectionEndType - + HasErrorType + + HasAsyncErrorType { async fn query_connection_end( &self, @@ -35,7 +35,7 @@ pub trait CanQueryConnectionEndWithProofs: + HasConnectionIdType + HasConnectionEndType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType { async fn query_connection_end_with_proofs( &self, diff --git a/crates/chain/chain-components/src/traits/queries/consensus_state.rs b/crates/chain/chain-components/src/traits/queries/consensus_state.rs index 7bfb2d2ba..99c1af8ca 100644 --- a/crates/chain/chain-components/src/traits/queries/consensus_state.rs +++ b/crates/chain/chain-components/src/traits/queries/consensus_state.rs @@ -21,7 +21,7 @@ pub trait CanQueryConsensusState: HasClientIdType + CanUseCounterparty + HasHeightType> + HasHeightType - + HasErrorType + + HasAsyncErrorType { async fn query_consensus_state( &self, @@ -41,7 +41,7 @@ pub trait CanQueryConsensusStateWithProofs: HasClientIdType + HasHeightType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty + HasHeightType> { async fn query_consensus_state_with_proofs( @@ -59,7 +59,7 @@ pub trait CanQueryConsensusStateWithProofs: }] #[async_trait] pub trait CanQueryRawConsensusState: - HasClientIdType + HasHeightType + HasRawConsensusStateType + HasErrorType + HasClientIdType + HasHeightType + HasRawConsensusStateType + HasAsyncErrorType where Counterparty: HasHeightType, { @@ -81,7 +81,7 @@ pub trait CanQueryRawConsensusStateWithProofs: + HasHeightType + HasRawConsensusStateType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType where Counterparty: HasHeightType, { @@ -97,7 +97,7 @@ where pub trait CanQueryConsensusStateWithLatestHeight: HasClientIdType + CanUseCounterparty + HasHeightType> - + HasErrorType + + HasAsyncErrorType { async fn query_consensus_state_with_latest_height( &self, @@ -133,7 +133,7 @@ where impl ConsensusStateQuerier for UseDelegate where - Chain: HasClientIdType + HasHeightType + HasErrorType, + Chain: HasClientIdType + HasHeightType + HasAsyncErrorType, Counterparty: HasConsensusStateType + HasHeightType, Delegate: ConsensusStateQuerier, Components: DelegateComponent, @@ -152,7 +152,8 @@ where impl ConsensusStateWithProofsQuerier for UseDelegate where - Chain: HasClientIdType + HasHeightType + HasCommitmentProofType + HasErrorType, + Chain: + HasClientIdType + HasHeightType + HasCommitmentProofType + HasAsyncErrorType, Counterparty: HasConsensusStateType + HasHeightType, Delegate: ConsensusStateWithProofsQuerier, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/queries/consensus_state_height.rs b/crates/chain/chain-components/src/traits/queries/consensus_state_height.rs index e5b2d6d41..ad9a8ef79 100644 --- a/crates/chain/chain-components/src/traits/queries/consensus_state_height.rs +++ b/crates/chain/chain-components/src/traits/queries/consensus_state_height.rs @@ -12,7 +12,7 @@ use crate::traits::types::height::HasHeightType; }] #[async_trait] pub trait CanQueryConsensusStateHeight: - HasClientIdType + HasErrorType + HasClientIdType + HasAsyncErrorType where Counterparty: HasHeightType, { @@ -37,7 +37,7 @@ where }] #[async_trait] pub trait CanQueryConsensusStateHeights: - HasClientIdType + HasErrorType + HasClientIdType + HasAsyncErrorType where Counterparty: HasHeightType, { @@ -50,7 +50,7 @@ where impl ConsensusStateHeightsQuerier for UseDelegate where - Chain: HasClientIdType + HasErrorType, + Chain: HasClientIdType + HasAsyncErrorType, Counterparty: HasHeightType, Delegate: ConsensusStateHeightsQuerier, Components: DelegateComponent, diff --git a/crates/chain/chain-components/src/traits/queries/counterparty_chain_id.rs b/crates/chain/chain-components/src/traits/queries/counterparty_chain_id.rs index ef16698fd..848cbefb3 100644 --- a/crates/chain/chain-components/src/traits/queries/counterparty_chain_id.rs +++ b/crates/chain/chain-components/src/traits/queries/counterparty_chain_id.rs @@ -10,7 +10,7 @@ use crate::traits::types::chain_id::HasChainIdType; }] #[async_trait] pub trait CanQueryCounterpartyChainId: - HasChannelIdType + HasPortIdType + HasErrorType + HasChannelIdType + HasPortIdType + HasAsyncErrorType where Counterparty: HasChainIdType, { diff --git a/crates/chain/chain-components/src/traits/queries/packet_acknowledgement.rs b/crates/chain/chain-components/src/traits/queries/packet_acknowledgement.rs index 53b32b283..683883078 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_acknowledgement.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_acknowledgement.rs @@ -20,7 +20,7 @@ pub trait CanQueryPacketAcknowledgement: + HasPortIdType + HasAcknowledgementType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { async fn query_packet_acknowledgement( diff --git a/crates/chain/chain-components/src/traits/queries/packet_acknowledgements.rs b/crates/chain/chain-components/src/traits/queries/packet_acknowledgements.rs index b28c44ac5..d3de85277 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_acknowledgements.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_acknowledgements.rs @@ -12,7 +12,7 @@ use hermes_chain_type_components::traits::types::ibc::sequence::HasSequenceType; }] #[async_trait] pub trait CanQueryPacketAcknowledgements: - HasHeightType + HasChannelIdType + HasPortIdType + HasErrorType + HasHeightType + HasChannelIdType + HasPortIdType + HasAsyncErrorType where Counterparty: HasSequenceType, { diff --git a/crates/chain/chain-components/src/traits/queries/packet_commitment.rs b/crates/chain/chain-components/src/traits/queries/packet_commitment.rs index 320b135ba..c52306433 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_commitment.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_commitment.rs @@ -19,7 +19,7 @@ pub trait CanQueryPacketCommitment: + HasSequenceType + HasPacketCommitmentType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType { async fn query_packet_commitment( &self, diff --git a/crates/chain/chain-components/src/traits/queries/packet_commitments.rs b/crates/chain/chain-components/src/traits/queries/packet_commitments.rs index 3ddd86d0e..3c47694e8 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_commitments.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_commitments.rs @@ -16,7 +16,7 @@ pub trait CanQueryPacketCommitments: + HasChannelIdType + HasPortIdType + HasSequenceType - + HasErrorType + + HasAsyncErrorType { /// Query the sequences of the packets that the chain has committed to be /// sent to the counterparty chain, of which the full packet relaying is not diff --git a/crates/chain/chain-components/src/traits/queries/packet_is_received.rs b/crates/chain/chain-components/src/traits/queries/packet_is_received.rs index d132995a2..2ccbf0855 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_is_received.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_is_received.rs @@ -9,7 +9,7 @@ use hermes_chain_type_components::traits::types::ibc::sequence::HasSequenceType; }] #[async_trait] pub trait CanQueryPacketIsReceived: - HasChannelIdType + HasPortIdType + HasErrorType + HasChannelIdType + HasPortIdType + HasAsyncErrorType where Counterparty: HasSequenceType, { diff --git a/crates/chain/chain-components/src/traits/queries/packet_receipt.rs b/crates/chain/chain-components/src/traits/queries/packet_receipt.rs index 09b70405b..bd3241f5f 100644 --- a/crates/chain/chain-components/src/traits/queries/packet_receipt.rs +++ b/crates/chain/chain-components/src/traits/queries/packet_receipt.rs @@ -20,7 +20,7 @@ pub trait CanQueryPacketReceipt: + HasPortIdType + HasPacketReceiptType + HasCommitmentProofType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { async fn query_packet_receipt( diff --git a/crates/chain/chain-components/src/traits/queries/send_packets.rs b/crates/chain/chain-components/src/traits/queries/send_packets.rs index 3c0f6ccdc..1c6aa103d 100644 --- a/crates/chain/chain-components/src/traits/queries/send_packets.rs +++ b/crates/chain/chain-components/src/traits/queries/send_packets.rs @@ -21,7 +21,7 @@ pub trait CanQuerySendPackets: + HasPortIdType + HasSequenceType + HasOutgoingPacketType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty + HasPortIdType> { /// Given a list of sequences, a channel and port will query a list of outgoing @@ -51,7 +51,7 @@ pub trait CanQuerySendPacket: + HasPortIdType + HasSequenceType + HasOutgoingPacketType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty + HasPortIdType> { /// Given a list of sequences, a channel and port will query a list of outgoing diff --git a/crates/chain/chain-components/src/traits/queries/unreceived_acks_sequences.rs b/crates/chain/chain-components/src/traits/queries/unreceived_acks_sequences.rs index 1992ab95c..e56a6a5b3 100644 --- a/crates/chain/chain-components/src/traits/queries/unreceived_acks_sequences.rs +++ b/crates/chain/chain-components/src/traits/queries/unreceived_acks_sequences.rs @@ -14,7 +14,7 @@ pub trait CanQueryUnreceivedAcksSequences: HasChannelIdType + HasPortIdType + HasSequenceType - + HasErrorType + + HasAsyncErrorType { /// Performs a query about which IBC packets in the specified list has not /// been acknowledged. Returns the sequence numbers of the packets that were not diff --git a/crates/chain/chain-components/src/traits/queries/unreceived_packet_sequences.rs b/crates/chain/chain-components/src/traits/queries/unreceived_packet_sequences.rs index 0e31c7701..1e407d2a8 100644 --- a/crates/chain/chain-components/src/traits/queries/unreceived_packet_sequences.rs +++ b/crates/chain/chain-components/src/traits/queries/unreceived_packet_sequences.rs @@ -16,7 +16,7 @@ use crate::types::aliases::SequenceOf; pub trait CanQueryUnreceivedPacketSequences: HasChannelIdType + HasPortIdType - + HasErrorType + + HasAsyncErrorType + CanUseCounterparty> { /// Given a list of counterparty commitment sequences, diff --git a/crates/chain/chain-components/src/traits/queries/write_ack.rs b/crates/chain/chain-components/src/traits/queries/write_ack.rs index db70cecd9..12331a92a 100644 --- a/crates/chain/chain-components/src/traits/queries/write_ack.rs +++ b/crates/chain/chain-components/src/traits/queries/write_ack.rs @@ -8,7 +8,8 @@ use crate::traits::types::ibc_events::write_ack::HasWriteAckEvent; context: Chain, }] #[async_trait] -pub trait CanQueryWriteAck: HasWriteAckEvent + HasErrorType +pub trait CanQueryWriteAck: + HasWriteAckEvent + HasAsyncErrorType where Counterparty: HasOutgoingPacketType, { diff --git a/crates/chain/chain-components/src/traits/send_message.rs b/crates/chain/chain-components/src/traits/send_message.rs index e64e1a8ea..a6da2e384 100644 --- a/crates/chain/chain-components/src/traits/send_message.rs +++ b/crates/chain/chain-components/src/traits/send_message.rs @@ -46,7 +46,7 @@ use crate::traits::types::message::HasMessageType; context: Chain, }] #[async_trait] -pub trait CanSendMessages: HasMessageType + HasMessageResponseType + HasErrorType { +pub trait CanSendMessages: HasMessageType + HasMessageResponseType + HasAsyncErrorType { /** Given a list of [messages](HasMessageType::Message), submit the messages atomically to the chain. @@ -58,7 +58,7 @@ pub trait CanSendMessages: HasMessageType + HasMessageResponseType + HasErrorTyp the message at the same position in the input message list. On failure, the method returns an - [error](cgp_core::error::HasErrorType::Error). + [error](cgp_core::error::HasAsyncErrorType::Error). Note that since the message sending must be atomic, the sending of messages must either all succeed or all failed. i.e. partial failure is forbidden. @@ -70,7 +70,9 @@ pub trait CanSendMessages: HasMessageType + HasMessageResponseType + HasErrorTyp } #[async_trait] -pub trait CanSendSingleMessage: HasMessageType + HasMessageResponseType + HasErrorType { +pub trait CanSendSingleMessage: + HasMessageType + HasMessageResponseType + HasAsyncErrorType +{ async fn send_message( &self, message: Self::Message, @@ -82,7 +84,7 @@ pub struct EmptyMessageResponse; impl CanSendSingleMessage for Chain where - Chain: CanSendMessages + CanRaiseError, + Chain: CanSendMessages + CanRaiseAsyncError, { async fn send_message( &self, diff --git a/crates/chain/chain-components/src/traits/types/channel.rs b/crates/chain/chain-components/src/traits/types/channel.rs index 3c65cd51d..29f819fb6 100644 --- a/crates/chain/chain-components/src/traits/types/channel.rs +++ b/crates/chain/chain-components/src/traits/types/channel.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-components/src/traits/types/connection.rs b/crates/chain/chain-components/src/traits/types/connection.rs index b4f2328af..cca3b8a97 100644 --- a/crates/chain/chain-components/src/traits/types/connection.rs +++ b/crates/chain/chain-components/src/traits/types/connection.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-components/src/traits/types/create_client.rs b/crates/chain/chain-components/src/traits/types/create_client.rs index 402ab33d4..5f33ec113 100644 --- a/crates/chain/chain-components/src/traits/types/create_client.rs +++ b/crates/chain/chain-components/src/traits/types/create_client.rs @@ -1,5 +1,5 @@ use cgp::core::component::{UseDelegate, WithProvider}; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; use hermes_chain_type_components::traits::types::ibc::client_id::HasClientIdType; use hermes_chain_type_components::traits::types::message_response::HasMessageResponseType; diff --git a/crates/chain/chain-components/src/traits/types/message.rs b/crates/chain/chain-components/src/traits/types/message.rs index 08febca96..ec187ad0f 100644 --- a/crates/chain/chain-components/src/traits/types/message.rs +++ b/crates/chain/chain-components/src/traits/types/message.rs @@ -9,7 +9,7 @@ pub use hermes_chain_type_components::traits::types::message::*; provider: MessageSizeEstimator, context: Chain, }] -pub trait CanEstimateMessageSize: HasMessageType + HasErrorType { +pub trait CanEstimateMessageSize: HasMessageType + HasAsyncErrorType { /** Estimate the size of a message after it is encoded into raw bytes inside a transaction. diff --git a/crates/chain/chain-components/src/traits/types/update_client.rs b/crates/chain/chain-components/src/traits/types/update_client.rs index 83409f0c2..cc8d714ae 100644 --- a/crates/chain/chain-components/src/traits/types/update_client.rs +++ b/crates/chain/chain-components/src/traits/types/update_client.rs @@ -1,5 +1,5 @@ use cgp::core::component::{UseDelegate, WithProvider}; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/fields/height.rs b/crates/chain/chain-type-components/src/traits/fields/height.rs index 9a3427f2d..69f3a7b35 100644 --- a/crates/chain/chain-type-components/src/traits/fields/height.rs +++ b/crates/chain/chain-type-components/src/traits/fields/height.rs @@ -6,6 +6,6 @@ use crate::traits::types::height::HasHeightType; provider: HeightIncrementer, context: Chain, }] -pub trait CanIncrementHeight: HasHeightType + HasErrorType { +pub trait CanIncrementHeight: HasHeightType + HasAsyncErrorType { fn increment_height(height: &Self::Height) -> Result; } diff --git a/crates/chain/chain-type-components/src/traits/types/address.rs b/crates/chain/chain-type-components/src/traits/types/address.rs index 2f3e87644..09ea746f3 100644 --- a/crates/chain/chain-type-components/src/traits/types/address.rs +++ b/crates/chain/chain-type-components/src/traits/types/address.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/amount.rs b/crates/chain/chain-type-components/src/traits/types/amount.rs index 7fc811fad..9b08081fa 100644 --- a/crates/chain/chain-type-components/src/traits/types/amount.rs +++ b/crates/chain/chain-type-components/src/traits/types/amount.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/commitment_proof.rs b/crates/chain/chain-type-components/src/traits/types/commitment_proof.rs index 34a103fa0..314ed988e 100644 --- a/crates/chain/chain-type-components/src/traits/types/commitment_proof.rs +++ b/crates/chain/chain-type-components/src/traits/types/commitment_proof.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/denom.rs b/crates/chain/chain-type-components/src/traits/types/denom.rs index ecc940fa2..8121b286c 100644 --- a/crates/chain/chain-type-components/src/traits/types/denom.rs +++ b/crates/chain/chain-type-components/src/traits/types/denom.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/event.rs b/crates/chain/chain-type-components/src/traits/types/event.rs index af02e5b27..fb182209b 100644 --- a/crates/chain/chain-type-components/src/traits/types/event.rs +++ b/crates/chain/chain-type-components/src/traits/types/event.rs @@ -3,7 +3,7 @@ */ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; /** diff --git a/crates/chain/chain-type-components/src/traits/types/height.rs b/crates/chain/chain-type-components/src/traits/types/height.rs index 7ab86d7cc..53cd83657 100644 --- a/crates/chain/chain-type-components/src/traits/types/height.rs +++ b/crates/chain/chain-type-components/src/traits/types/height.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/ibc/channel_id.rs b/crates/chain/chain-type-components/src/traits/types/ibc/channel_id.rs index 3c1e1593d..a28c9a7b5 100644 --- a/crates/chain/chain-type-components/src/traits/types/ibc/channel_id.rs +++ b/crates/chain/chain-type-components/src/traits/types/ibc/channel_id.rs @@ -1,7 +1,7 @@ use core::fmt::Debug; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/ibc/client_id.rs b/crates/chain/chain-type-components/src/traits/types/ibc/client_id.rs index 44d982a5d..462df9b10 100644 --- a/crates/chain/chain-type-components/src/traits/types/ibc/client_id.rs +++ b/crates/chain/chain-type-components/src/traits/types/ibc/client_id.rs @@ -1,7 +1,7 @@ use core::fmt::Debug; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/ibc/client_state.rs b/crates/chain/chain-type-components/src/traits/types/ibc/client_state.rs index aaed1acc9..38a54bdac 100644 --- a/crates/chain/chain-type-components/src/traits/types/ibc/client_state.rs +++ b/crates/chain/chain-type-components/src/traits/types/ibc/client_state.rs @@ -1,5 +1,5 @@ use cgp::core::component::{UseDelegate, WithProvider}; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/ibc/connection_id.rs b/crates/chain/chain-type-components/src/traits/types/ibc/connection_id.rs index 98af646f2..2240b4459 100644 --- a/crates/chain/chain-type-components/src/traits/types/ibc/connection_id.rs +++ b/crates/chain/chain-type-components/src/traits/types/ibc/connection_id.rs @@ -1,7 +1,7 @@ use core::fmt::{Debug, Display}; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/ibc/consensus_state.rs b/crates/chain/chain-type-components/src/traits/types/ibc/consensus_state.rs index c625d250f..1c242e64f 100644 --- a/crates/chain/chain-type-components/src/traits/types/ibc/consensus_state.rs +++ b/crates/chain/chain-type-components/src/traits/types/ibc/consensus_state.rs @@ -1,5 +1,5 @@ use cgp::core::component::{UseDelegate, WithProvider}; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/message.rs b/crates/chain/chain-type-components/src/traits/types/message.rs index e93f1df2f..f18c89d3b 100644 --- a/crates/chain/chain-type-components/src/traits/types/message.rs +++ b/crates/chain/chain-type-components/src/traits/types/message.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; /** diff --git a/crates/chain/chain-type-components/src/traits/types/quantity.rs b/crates/chain/chain-type-components/src/traits/types/quantity.rs index cf3b92901..63c500c3e 100644 --- a/crates/chain/chain-type-components/src/traits/types/quantity.rs +++ b/crates/chain/chain-type-components/src/traits/types/quantity.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/chain/chain-type-components/src/traits/types/time.rs b/crates/chain/chain-type-components/src/traits/types/time.rs index e3a58f06d..d8a328066 100644 --- a/crates/chain/chain-type-components/src/traits/types/time.rs +++ b/crates/chain/chain-type-components/src/traits/types/time.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/cli/cli-components/src/impls/commands/bootstrap/chain.rs b/crates/cli/cli-components/src/impls/commands/bootstrap/chain.rs index 1f6efa2b3..0657a340c 100644 --- a/crates/cli/cli-components/src/impls/commands/bootstrap/chain.rs +++ b/crates/cli/cli-components/src/impls/commands/bootstrap/chain.rs @@ -33,15 +33,15 @@ where + HasConfigPath + CanLoadConfig + CanWriteConfig - + CanRaiseError - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + CanWrapError<&'static str>, Bootstrap: CanBootstrapChain, ChainDriver: HasChain + HasRuntime + CanTakeChainProcess - + HasErrorType, + + HasAsyncErrorType, UpdateConfig: ConfigUpdater, Chain: HasChainId, Runtime: CanWaitChildProcess + HasFilePathType, diff --git a/crates/cli/cli-components/src/impls/commands/client/create.rs b/crates/cli/cli-components/src/impls/commands/client/create.rs index 49a5fb3fc..b59cdef9b 100644 --- a/crates/cli/cli-components/src/impls/commands/client/create.rs +++ b/crates/cli/cli-components/src/impls/commands/client/create.rs @@ -1,6 +1,7 @@ use core::fmt::{Debug, Display}; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_error::traits::wrap::CanWrapError; use hermes_logging_components::traits::has_logger::HasLogger; @@ -15,7 +16,6 @@ use hermes_relayer_components::chain::traits::types::create_client::{ }; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::multi::traits::chain_at::{ChainAt, HasChainTypeAt}; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::relay::traits::chains::{HasRelayChains, HasRelayClientIds}; use hermes_relayer_components::relay::traits::client_creator::CanCreateClient; use hermes_relayer_components::relay::traits::target::{HasSourceTargetChainTypes, SourceTarget}; @@ -36,16 +36,16 @@ where + CanParseCreateClientOptions, Index<1>> + CanParseArg + CanParseArg - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + CanWrapError, Builder: CanBuildChain, Chain = Chain> + CanBuildChain, Chain = Counterparty> + CanBuildRelay, Index<1>, Relay = Relay>, Chain: HasIbcChainTypes + HasCreateClientMessageOptionsType - + HasErrorType, - Counterparty: HasChainIdType + HasCreateClientPayloadOptionsType + HasErrorType, + + HasAsyncErrorType, + Counterparty: HasChainIdType + HasCreateClientPayloadOptionsType + HasAsyncErrorType, Relay: HasRelayChains + HasSourceTargetChainTypes + HasRelayClientIds @@ -134,7 +134,7 @@ pub trait CanParseCreateClientOptions, Target>>, >, - > + HasErrorType + > + HasAsyncErrorType { async fn parse_create_client_options( &self, diff --git a/crates/cli/cli-components/src/impls/commands/client/update.rs b/crates/cli/cli-components/src/impls/commands/client/update.rs index 0f90b972c..c3019613b 100644 --- a/crates/cli/cli-components/src/impls/commands/client/update.rs +++ b/crates/cli/cli-components/src/impls/commands/client/update.rs @@ -1,5 +1,6 @@ use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_logging_components::traits::has_logger::HasLogger; use hermes_logging_components::traits::logger::CanLog; @@ -14,7 +15,6 @@ use hermes_relayer_components::chain::traits::types::client_state::{ }; use hermes_relayer_components::chain::traits::types::height::HasHeightType; use hermes_relayer_components::chain::traits::types::ibc::HasClientIdType; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::relay::traits::chains::{HasRelayChains, HasRelayClientIds}; use hermes_relayer_components::relay::traits::target::{HasSourceTargetChainTypes, SourceTarget}; use hermes_relayer_components::relay::traits::update_client_message_builder::CanSendTargetUpdateClientMessage; @@ -74,21 +74,21 @@ where + CanParseArg + CanParseArg + CanParseArg> - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Builder: CanBuildChain, Chain = Chain> + CanBuildChain, Chain = Counterparty> + CanBuildRelay, Index<1>, Relay = Relay>, - Chain: HasChainIdType + CanQueryClientStateWithLatestHeight + HasErrorType, + Chain: HasChainIdType + CanQueryClientStateWithLatestHeight + HasAsyncErrorType, Counterparty: HasChainIdType + HasClientStateType + HasClientIdType + HasHeightType + HasClientStateFields + CanQueryChainHeight - + HasErrorType, + + HasAsyncErrorType, Relay: HasRelayChains + HasSourceTargetChainTypes + HasRelayClientIds diff --git a/crates/cli/cli-components/src/impls/commands/connection/create.rs b/crates/cli/cli-components/src/impls/commands/connection/create.rs index b095a1459..de61052c9 100644 --- a/crates/cli/cli-components/src/impls/commands/connection/create.rs +++ b/crates/cli/cli-components/src/impls/commands/connection/create.rs @@ -1,6 +1,7 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_logging_components::traits::has_logger::HasLogger; use hermes_logging_components::traits::logger::CanLog; @@ -11,7 +12,6 @@ use hermes_relayer_components::chain::traits::types::connection::HasInitConnecti use hermes_relayer_components::chain::traits::types::ibc::HasClientIdType; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; use hermes_relayer_components::multi::traits::relay_at::HasRelayTypeAt; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::relay::impls::connection::bootstrap::CanBootstrapConnection; use hermes_relayer_components::relay::traits::chains::HasRelayChains; @@ -60,12 +60,12 @@ pub struct CreateConnectionArgs { impl CommandRunner for RunCreateConnectionCommand where - App: HasOutputType + HasErrorType, + App: HasOutputType + HasAsyncErrorType, App: CanLoadBuilder + HasLogger + CanProduceOutput<&'static str> - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + CanParseArg + CanParseArg + CanParseArg @@ -75,9 +75,11 @@ where + HasChainTypeAt, Chain = Counterparty> + CanBuildRelay, Index<1>, Relay = Relay> + HasRelayTypeAt, Index<1>>, - Chain: - HasChainIdType + HasClientIdType + HasInitConnectionOptionsType, - Counterparty: HasChainIdType + HasClientIdType, + Chain: HasChainIdType + + HasClientIdType + + HasInitConnectionOptionsType + + HasAsyncErrorType, + Counterparty: HasChainIdType + HasClientIdType + HasAsyncErrorType, Chain::InitConnectionOptions: Default, Chain::ChainId: Display, Chain::ClientId: Display, diff --git a/crates/cli/cli-components/src/impls/commands/queries/balance.rs b/crates/cli/cli-components/src/impls/commands/queries/balance.rs index 839d99b80..41ad8e7f2 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/balance.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/balance.rs @@ -1,10 +1,10 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_relayer_components::build::traits::builders::chain_builder::CanBuildChain; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; -use hermes_relayer_components::multi::types::index::Index; use hermes_test_components::chain::traits::queries::balance::CanQueryBalance; use crate::traits::build::CanLoadBuilder; @@ -51,8 +51,8 @@ where + CanParseArg + CanParseArg + CanParseArg - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain>, Chain: HasChainIdType + CanQueryBalance, Args: Async, diff --git a/crates/cli/cli-components/src/impls/commands/queries/chain_status.rs b/crates/cli/cli-components/src/impls/commands/queries/chain_status.rs index 2c986f789..c7abadc4d 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/chain_status.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/chain_status.rs @@ -1,11 +1,11 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_relayer_components::build::traits::builders::chain_builder::CanBuildChain; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainStatus; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -31,8 +31,8 @@ where App: CanLoadBuilder + CanProduceOutput + CanParseArg - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain>, Chain: HasChainIdType + CanQueryChainStatus, Args: Async, diff --git a/crates/cli/cli-components/src/impls/commands/queries/channel_end.rs b/crates/cli/cli-components/src/impls/commands/queries/channel_end.rs index 9a8a04f85..02d2fb46c 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/channel_end.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/channel_end.rs @@ -1,5 +1,6 @@ use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_relayer_components::build::traits::builders::chain_builder::CanBuildChain; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainHeight; @@ -8,7 +9,6 @@ use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_relayer_components::chain::traits::types::height::HasHeightType; use hermes_relayer_components::chain::traits::types::ibc::{HasChannelIdType, HasPortIdType}; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -63,8 +63,8 @@ where + CanParseArg + CanParseArg + CanParseArg> - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain> + HasChainTypeAt, Chain = Counterparty>, Chain: HasChainIdType + HasPortIdType diff --git a/crates/cli/cli-components/src/impls/commands/queries/client_state.rs b/crates/cli/cli-components/src/impls/commands/queries/client_state.rs index 6c4691794..726f8b04c 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/client_state.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/client_state.rs @@ -1,6 +1,7 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_logging_components::traits::has_logger::HasLogger; use hermes_logging_components::traits::logger::CanLog; @@ -10,7 +11,6 @@ use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryCha use hermes_relayer_components::chain::traits::queries::client_state::CanQueryClientState; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_relayer_components::chain::traits::types::client_state::HasClientStateType; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::any_counterparty::HasAnyCounterparty; use crate::traits::build::{CanLoadBuilder, HasBuilderType}; @@ -58,8 +58,8 @@ where + CanParseArg + CanParseArg + CanParseArg> - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Args: Async, Build: CanBuildChain, Chain = Chain>, Chain: HasChainIdType + CanQueryChainHeight + CanQueryClientState, diff --git a/crates/cli/cli-components/src/impls/commands/queries/client_status.rs b/crates/cli/cli-components/src/impls/commands/queries/client_status.rs index 3642d2ff1..3eeabf207 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/client_status.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/client_status.rs @@ -1,6 +1,7 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_error::traits::wrap::CanWrapError; use hermes_logging_components::traits::has_logger::HasLogger; @@ -23,7 +24,6 @@ use hermes_relayer_components::chain::traits::types::consensus_state::{ use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::timestamp::CanMeasureTime; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use serde::Serialize; use crate::traits::build::CanLoadBuilder; @@ -70,8 +70,8 @@ where // + HasAnyCounterparty + CanParseArg + CanParseArg - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain> + HasChainTypeAt, Chain = Counterparty>, Chain: HasIbcChainTypes + CanQueryClientStatus, Counterparty: HasIbcChainTypes @@ -125,7 +125,7 @@ where #[async_trait] pub trait CanQueryClientStatus: HasIbcChainTypes - + HasErrorType + + HasAsyncErrorType + CanQueryClientState + CanQueryClientStateWithLatestHeight + CanQueryChainStatus @@ -146,7 +146,7 @@ where impl CanQueryClientStatus for Chain where Chain: HasIbcChainTypes - + HasErrorType + + HasAsyncErrorType + CanQueryClientState + CanQueryClientStateWithLatestHeight + CanQueryChainStatus diff --git a/crates/cli/cli-components/src/impls/commands/queries/clients.rs b/crates/cli/cli-components/src/impls/commands/queries/clients.rs index 12b4ea158..dd83d1179 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/clients.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/clients.rs @@ -1,6 +1,7 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_logging_components::traits::has_logger::HasLogger; use hermes_logging_components::traits::logger::CanLog; @@ -11,7 +12,6 @@ use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_relayer_components::chain::traits::types::client_state::HasClientStateFields; use hermes_relayer_components::chain::traits::types::ibc::HasClientIdType; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -47,8 +47,8 @@ where + CanProduceOutput> + CanParseArg + CanParseArg> - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain> + HasChainTypeAt, Chain = Counterparty>, Chain: HasChainIdType + HasClientIdType diff --git a/crates/cli/cli-components/src/impls/commands/queries/connection_end.rs b/crates/cli/cli-components/src/impls/commands/queries/connection_end.rs index bbad30fa0..224fe73c3 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/connection_end.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/connection_end.rs @@ -1,12 +1,12 @@ use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_relayer_components::build::traits::builders::chain_builder::CanBuildChain; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainHeight; use hermes_relayer_components::chain::traits::queries::connection_end::CanQueryConnectionEnd; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -53,8 +53,8 @@ where + CanParseArg + CanParseArg + CanParseArg> - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain> + HasChainTypeAt, Chain = Counterparty>, Chain: HasChainIdType + CanQueryChainHeight + CanQueryConnectionEnd, Args: Async, diff --git a/crates/cli/cli-components/src/impls/commands/queries/consensus_state.rs b/crates/cli/cli-components/src/impls/commands/queries/consensus_state.rs index 45e9c2482..a5562e892 100644 --- a/crates/cli/cli-components/src/impls/commands/queries/consensus_state.rs +++ b/crates/cli/cli-components/src/impls/commands/queries/consensus_state.rs @@ -1,6 +1,7 @@ use core::fmt::Display; use core::marker::PhantomData; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_relayer_components::build::traits::builders::chain_builder::CanBuildChain; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainHeight; @@ -10,7 +11,6 @@ use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_relayer_components::chain::traits::types::consensus_state::HasConsensusStateType; use hermes_relayer_components::chain::traits::types::height::HasHeightType; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -63,9 +63,9 @@ where + CanParseArg + CanParseArg> + CanParseArg> - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Build: CanBuildChain, Chain = Chain> + HasChainTypeAt, Chain = Counterparty>, Chain: CanQueryChainHeight + HasChainIdType diff --git a/crates/cli/cli-components/src/impls/commands/start.rs b/crates/cli/cli-components/src/impls/commands/start.rs index d595390f0..6afbcd488 100644 --- a/crates/cli/cli-components/src/impls/commands/start.rs +++ b/crates/cli/cli-components/src/impls/commands/start.rs @@ -1,5 +1,6 @@ use std::marker::PhantomData; +use cgp::core::field::Index; use cgp::extra::run::CanRun; use cgp::prelude::*; use hermes_error::traits::wrap::CanWrapError; @@ -9,7 +10,6 @@ use hermes_logging_components::types::level::LevelInfo; use hermes_relayer_components::build::traits::builders::birelay_builder::CanBuildBiRelay; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; -use hermes_relayer_components::multi::types::index::Index; use crate::traits::build::CanLoadBuilder; use crate::traits::command::CommandRunner; @@ -66,8 +66,8 @@ where + CanParseArg + CanParseArg + CanParseArg - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + CanWrapError<&'static str>, Args: Async, App::Logger: CanLog, diff --git a/crates/cli/cli-components/src/impls/config/load_toml_config.rs b/crates/cli/cli-components/src/impls/config/load_toml_config.rs index 9668a4bde..a29669240 100644 --- a/crates/cli/cli-components/src/impls/config/load_toml_config.rs +++ b/crates/cli/cli-components/src/impls/config/load_toml_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_runtime_components::traits::fs::read_file::CanReadFileAsString; use hermes_runtime_components::traits::runtime::HasRuntime; use serde::de::DeserializeOwned; @@ -14,8 +14,8 @@ where App: HasRuntime + HasConfigType + HasConfigPath - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Runtime: CanReadFileAsString, Config: DeserializeOwned, { diff --git a/crates/cli/cli-components/src/impls/config/save_toml_config.rs b/crates/cli/cli-components/src/impls/config/save_toml_config.rs index 9142a3bd9..3257275fa 100644 --- a/crates/cli/cli-components/src/impls/config/save_toml_config.rs +++ b/crates/cli/cli-components/src/impls/config/save_toml_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::core::Async; use hermes_runtime_components::traits::fs::write_file::CanWriteStringToFile; use hermes_runtime_components::traits::runtime::HasRuntime; @@ -15,8 +15,8 @@ where App: HasRuntime + HasConfigType + HasConfigPath - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Runtime: CanWriteStringToFile, Config: Async + Serialize, { diff --git a/crates/cli/cli-components/src/impls/parse/field.rs b/crates/cli/cli-components/src/impls/parse/field.rs index d462d1ced..05064d28c 100644 --- a/crates/cli/cli-components/src/impls/parse/field.rs +++ b/crates/cli/cli-components/src/impls/parse/field.rs @@ -8,7 +8,7 @@ pub struct GetField; impl ArgParser for GetField where - App: HasErrorType, + App: HasAsyncErrorType, Args: HasField, Field: Async + Clone, { @@ -27,7 +27,7 @@ pub struct GetFieldWithTag(pub PhantomData); impl ArgParser for GetFieldWithTag where - App: HasErrorType, + App: HasAsyncErrorType, Args: HasField, Field: Async + Clone, TagB: Async, diff --git a/crates/cli/cli-components/src/impls/parse/string.rs b/crates/cli/cli-components/src/impls/parse/string.rs index 35b8235bc..77591c235 100644 --- a/crates/cli/cli-components/src/impls/parse/string.rs +++ b/crates/cli/cli-components/src/impls/parse/string.rs @@ -9,7 +9,7 @@ pub struct ParseFromString(pub PhantomData); impl ArgParser for ParseFromString where - App: CanRaiseError, + App: CanRaiseAsyncError, Args: HasField, Parsed: Async + FromStr, { @@ -26,7 +26,7 @@ pub struct ParseFromOptionalString(pub PhantomData); impl ArgParser for ParseFromOptionalString where - App: CanRaiseError, + App: CanRaiseAsyncError, Args: HasField>, Parsed: Async + FromStr, { diff --git a/crates/cli/cli-components/src/traits/bootstrap.rs b/crates/cli/cli-components/src/traits/bootstrap.rs index 348b227dc..8a4eb2d5a 100644 --- a/crates/cli/cli-components/src/traits/bootstrap.rs +++ b/crates/cli/cli-components/src/traits/bootstrap.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { @@ -16,7 +16,7 @@ pub trait HasBootstrapType: Async { context: App, }] #[async_trait] -pub trait CanLoadBootstrap: HasBootstrapType + HasErrorType { +pub trait CanLoadBootstrap: HasBootstrapType + HasAsyncErrorType { async fn load_bootstrap(&self, args: &Args) -> Result; } diff --git a/crates/cli/cli-components/src/traits/build.rs b/crates/cli/cli-components/src/traits/build.rs index 1a612e561..38fd85eb6 100644 --- a/crates/cli/cli-components/src/traits/build.rs +++ b/crates/cli/cli-components/src/traits/build.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { @@ -18,7 +18,7 @@ pub type BuilderOf = ::Builder; context: App, }] #[async_trait] -pub trait CanLoadBuilder: HasBuilderType + HasErrorType { +pub trait CanLoadBuilder: HasBuilderType + HasAsyncErrorType { async fn load_builder(&self) -> Result; } diff --git a/crates/cli/cli-components/src/traits/command.rs b/crates/cli/cli-components/src/traits/command.rs index f6483f85e..2b6a3f717 100644 --- a/crates/cli/cli-components/src/traits/command.rs +++ b/crates/cli/cli-components/src/traits/command.rs @@ -8,7 +8,7 @@ use crate::traits::output::HasOutputType; context: App, }] #[async_trait] -pub trait CanRunCommand: HasOutputType + HasErrorType +pub trait CanRunCommand: HasOutputType + HasAsyncErrorType where Args: Async, { @@ -17,7 +17,7 @@ where impl CommandRunner for UseDelegate where - App: HasOutputType + HasErrorType, + App: HasOutputType + HasAsyncErrorType, Components: DelegateComponent, Delegate: CommandRunner, Args: Async, diff --git a/crates/cli/cli-components/src/traits/config/load_config.rs b/crates/cli/cli-components/src/traits/config/load_config.rs index e3bf58e73..3eaaf1bb9 100644 --- a/crates/cli/cli-components/src/traits/config/load_config.rs +++ b/crates/cli/cli-components/src/traits/config/load_config.rs @@ -7,6 +7,6 @@ use crate::traits::types::config::HasConfigType; context: App, }] #[async_trait] -pub trait CanLoadConfig: HasConfigType + HasErrorType { +pub trait CanLoadConfig: HasConfigType + HasAsyncErrorType { async fn load_config(&self) -> Result; } diff --git a/crates/cli/cli-components/src/traits/config/write_config.rs b/crates/cli/cli-components/src/traits/config/write_config.rs index a981156fe..c5f75601a 100644 --- a/crates/cli/cli-components/src/traits/config/write_config.rs +++ b/crates/cli/cli-components/src/traits/config/write_config.rs @@ -7,6 +7,6 @@ use crate::traits::types::config::HasConfigType; context: App, }] #[async_trait] -pub trait CanWriteConfig: HasConfigType + HasErrorType { +pub trait CanWriteConfig: HasConfigType + HasAsyncErrorType { async fn write_config(&self, config: &Self::Config) -> Result<(), Self::Error>; } diff --git a/crates/cli/cli-components/src/traits/output.rs b/crates/cli/cli-components/src/traits/output.rs index 45dd4455e..d1e7c643c 100644 --- a/crates/cli/cli-components/src/traits/output.rs +++ b/crates/cli/cli-components/src/traits/output.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/cli/cli-components/src/traits/parse.rs b/crates/cli/cli-components/src/traits/parse.rs index 5147c9e57..dff1c385f 100644 --- a/crates/cli/cli-components/src/traits/parse.rs +++ b/crates/cli/cli-components/src/traits/parse.rs @@ -7,7 +7,7 @@ use cgp::prelude::*; provider: ArgParser, context: App, }] -pub trait CanParseArg: HasErrorType { +pub trait CanParseArg: HasAsyncErrorType { type Parsed: Async; fn parse_arg(&self, args: &Args, tag: PhantomData) -> Result; @@ -15,7 +15,7 @@ pub trait CanParseArg: HasErrorType { impl ArgParser for UseDelegate where - App: HasErrorType, + App: HasAsyncErrorType, Components: DelegateComponent<(Args, Tag), Delegate = Delegate>, Delegate: ArgParser, { diff --git a/crates/cli/cli-components/src/traits/types/config.rs b/crates/cli/cli-components/src/traits/types/config.rs index 78147f5b8..60fa09003 100644 --- a/crates/cli/cli-components/src/traits/types/config.rs +++ b/crates/cli/cli-components/src/traits/types/config.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/cli/cli/src/commands/bootstrap/chain.rs b/crates/cli/cli/src/commands/bootstrap/chain.rs index 2a5adc876..2e32240be 100644 --- a/crates/cli/cli/src/commands/bootstrap/chain.rs +++ b/crates/cli/cli/src/commands/bootstrap/chain.rs @@ -38,7 +38,7 @@ impl BootstrapLoader for LoadCosmosBootstrap where App: HasBootstrapType + HasRuntime - + CanRaiseError, + + CanRaiseAsyncError, { async fn load_bootstrap( app: &App, diff --git a/crates/cli/cli/src/commands/channel/create.rs b/crates/cli/cli/src/commands/channel/create.rs index d0b9b50d9..9cb777e37 100644 --- a/crates/cli/cli/src/commands/channel/create.rs +++ b/crates/cli/cli/src/commands/channel/create.rs @@ -1,11 +1,11 @@ use core::marker::PhantomData; +use cgp::core::field::Index; use hermes_cli_components::traits::build::CanLoadBuilder; use hermes_cli_framework::command::CommandRunner; use hermes_cli_framework::output::Output; use hermes_cosmos_chain_components::types::channel::CosmosInitChannelOptions; use hermes_relayer_components::build::traits::builders::relay_builder::CanBuildRelay; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::relay::impls::channel::bootstrap::CanBootstrapChannel; use ibc::core::channel::types::channel::Order; use ibc::core::channel::types::Version; diff --git a/crates/cli/cli/src/contexts/app.rs b/crates/cli/cli/src/contexts/app.rs index 328cf16f1..64bbebe92 100644 --- a/crates/cli/cli/src/contexts/app.rs +++ b/crates/cli/cli/src/contexts/app.rs @@ -3,8 +3,8 @@ use std::path::PathBuf; use cgp::core::component::{UseContext, UseDelegate}; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::{Index, WithField}; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_any_counterparty::contexts::any_counterparty::AnyCounterparty; use hermes_cli_components::impls::commands::bootstrap::chain::RunBootstrapChainCommand; @@ -89,7 +89,6 @@ use hermes_logging_components::traits::has_logger::{ GlobalLoggerGetterComponent, LoggerGetterComponent, LoggerTypeComponent, }; use hermes_relayer_components::error::traits::retry::RetryableErrorComponent; -use hermes_relayer_components::multi::types::index::Index; use hermes_runtime::types::runtime::HermesRuntime; use hermes_runtime_components::traits::runtime::{RuntimeGetterComponent, RuntimeTypeComponent}; use ibc::core::client::types::Height; @@ -311,8 +310,8 @@ pub trait CanUseHermesApp: + CanRunCommand + CanProduceOutput<&'static str> + CanProduceOutput - + CanRaiseError - + CanRaiseError> + + CanRaiseAsyncError + + CanRaiseAsyncError> { } diff --git a/crates/cli/cli/src/impls/error.rs b/crates/cli/cli/src/impls/error.rs index 228904485..1ed144b16 100644 --- a/crates/cli/cli/src/impls/error.rs +++ b/crates/cli/cli/src/impls/error.rs @@ -24,12 +24,12 @@ pub struct CliErrorHandlers; pub trait CanHandleCliError: ErrorRaiser where - Context: HasErrorType, + Context: HasAsyncErrorType, { } impl CanHandleCliError for ProvideCliError where - Context: HasErrorType + Context: HasAsyncErrorType { } diff --git a/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_forward.rs b/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_forward.rs index dd2bbaad7..205e8bec4 100644 --- a/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_forward.rs +++ b/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_forward.rs @@ -40,8 +40,8 @@ where + CanUpdateVerificationStatus + CanValidateLightBlock + CanQueryLightBlock - + CanRaiseError - + for<'a> CanRaiseError>, + + CanRaiseAsyncError + + for<'a> CanRaiseAsyncError>, Mode: Async, { async fn verify_target_height( diff --git a/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_to_target.rs b/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_to_target.rs index 86f239475..8b22f833f 100644 --- a/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_to_target.rs +++ b/crates/comet/comet-light-client-components/src/impls/verify_target_height/verify_to_target.rs @@ -21,7 +21,7 @@ where + CanQueryLightBlock + CanQueryLightBlock + CanQueryLightBlock - + CanRaiseError, + + CanRaiseAsyncError, { async fn verify_target_height( client: &mut Client, diff --git a/crates/comet/comet-light-client-components/src/traits/compute_verification_height.rs b/crates/comet/comet-light-client-components/src/traits/compute_verification_height.rs index c2cca2b8b..50ba29e31 100644 --- a/crates/comet/comet-light-client-components/src/traits/compute_verification_height.rs +++ b/crates/comet/comet-light-client-components/src/traits/compute_verification_height.rs @@ -5,7 +5,7 @@ use hermes_chain_type_components::traits::types::height::HasHeightType; provider: NextVerificationHeightComputer, context: Client, }] -pub trait CanComputeNextVerificationHeight: HasHeightType + HasErrorType { +pub trait CanComputeNextVerificationHeight: HasHeightType + HasAsyncErrorType { fn compute_next_verification_height( &self, current_height: &Self::Height, diff --git a/crates/comet/comet-light-client-components/src/traits/fetch_light_block.rs b/crates/comet/comet-light-client-components/src/traits/fetch_light_block.rs index c4850f5fa..608c81acc 100644 --- a/crates/comet/comet-light-client-components/src/traits/fetch_light_block.rs +++ b/crates/comet/comet-light-client-components/src/traits/fetch_light_block.rs @@ -9,7 +9,7 @@ use crate::traits::types::status::HasVerificationStatusType; context: Client, }] #[async_trait] -pub trait CanFetchLightBlock: HasHeightType + HasLightBlockType + HasErrorType { +pub trait CanFetchLightBlock: HasHeightType + HasLightBlockType + HasAsyncErrorType { async fn fetch_light_block( &self, height: &Self::Height, @@ -22,7 +22,7 @@ pub trait CanFetchLightBlock: HasHeightType + HasLightBlockType + HasErrorType { }] #[async_trait] pub trait CanFetchLightBlockWithStatus: - HasHeightType + HasLightBlockType + HasVerificationStatusType + HasErrorType + HasHeightType + HasLightBlockType + HasVerificationStatusType + HasAsyncErrorType { async fn fetch_light_block_with_status( &mut self, diff --git a/crates/comet/comet-light-client-components/src/traits/types/status.rs b/crates/comet/comet-light-client-components/src/traits/types/status.rs index d37379475..d5bf6ab1c 100644 --- a/crates/comet/comet-light-client-components/src/traits/types/status.rs +++ b/crates/comet/comet-light-client-components/src/traits/types/status.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/comet/comet-light-client-components/src/traits/types/verdict.rs b/crates/comet/comet-light-client-components/src/traits/types/verdict.rs index 08b36a40e..d9f8f7024 100644 --- a/crates/comet/comet-light-client-components/src/traits/types/verdict.rs +++ b/crates/comet/comet-light-client-components/src/traits/types/verdict.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/comet/comet-light-client-components/src/traits/update_client.rs b/crates/comet/comet-light-client-components/src/traits/update_client.rs index 2b5e4f855..fae7b2306 100644 --- a/crates/comet/comet-light-client-components/src/traits/update_client.rs +++ b/crates/comet/comet-light-client-components/src/traits/update_client.rs @@ -9,7 +9,7 @@ use crate::traits::types::light_block::HasLightBlockType; }] #[async_trait] pub trait CanBuildLightBlocksForUpdateClient: - HasHeightType + HasLightBlockType + HasErrorType + HasHeightType + HasLightBlockType + HasAsyncErrorType { async fn build_light_blocks_for_update_client( &mut self, diff --git a/crates/comet/comet-light-client-components/src/traits/validate_light_block.rs b/crates/comet/comet-light-client-components/src/traits/validate_light_block.rs index 9186de9f6..0b2c416c2 100644 --- a/crates/comet/comet-light-client-components/src/traits/validate_light_block.rs +++ b/crates/comet/comet-light-client-components/src/traits/validate_light_block.rs @@ -6,7 +6,7 @@ use crate::traits::types::light_block::HasLightBlockType; provider: LightBlockValidator, context: Client, }] -pub trait CanValidateLightBlock: HasLightBlockType + HasErrorType { +pub trait CanValidateLightBlock: HasLightBlockType + HasAsyncErrorType { fn validate_light_block( &self, _mode: Mode, diff --git a/crates/comet/comet-light-client-components/src/traits/verify_target_height.rs b/crates/comet/comet-light-client-components/src/traits/verify_target_height.rs index b4d6a1cea..e62b41420 100644 --- a/crates/comet/comet-light-client-components/src/traits/verify_target_height.rs +++ b/crates/comet/comet-light-client-components/src/traits/verify_target_height.rs @@ -9,7 +9,7 @@ use crate::traits::types::light_block::HasLightBlockType; }] #[async_trait] pub trait CanVerifyTargetHeight: - HasHeightType + HasLightBlockType + HasErrorType + HasHeightType + HasLightBlockType + HasAsyncErrorType { async fn verify_target_height( &mut self, diff --git a/crates/comet/comet-light-client-components/src/traits/verify_update_header.rs b/crates/comet/comet-light-client-components/src/traits/verify_update_header.rs index e302587e8..de42c88c5 100644 --- a/crates/comet/comet-light-client-components/src/traits/verify_update_header.rs +++ b/crates/comet/comet-light-client-components/src/traits/verify_update_header.rs @@ -7,7 +7,7 @@ use crate::traits::types::verdict::HasVerdictType; provider: UpdateHeaderVerifier, context: Client, }] -pub trait CanVerifyUpdateHeader: HasLightBlockType + HasVerdictType + HasErrorType { +pub trait CanVerifyUpdateHeader: HasLightBlockType + HasVerdictType + HasAsyncErrorType { fn verify_update_header( &self, untrusted_block: &Self::LightBlock, diff --git a/crates/comet/comet-light-client-context/src/contexts/light_client.rs b/crates/comet/comet-light-client-context/src/contexts/light_client.rs index a4cb2e4f9..d1e6cdd0e 100644 --- a/crates/comet/comet-light-client-context/src/contexts/light_client.rs +++ b/crates/comet/comet-light-client-context/src/contexts/light_client.rs @@ -1,6 +1,6 @@ use cgp::core::component::{UseContext, UseDelegate}; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::types::impls::WithDelegatedType; +use cgp::core::types::WithDelegatedType; use cgp::prelude::*; use hermes_chain_components::traits::types::height::{HasHeightType, HeightTypeComponent}; use hermes_comet_light_client_components::impls::verify_target_height::verify_forward::DoVerifyForward; diff --git a/crates/comet/comet-light-client-context/src/impls/bisect_height.rs b/crates/comet/comet-light-client-context/src/impls/bisect_height.rs index e8abd8537..a26bbece2 100644 --- a/crates/comet/comet-light-client-context/src/impls/bisect_height.rs +++ b/crates/comet/comet-light-client-context/src/impls/bisect_height.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_chain_type_components::traits::types::height::HasHeightType; use hermes_comet_light_client_components::traits::compute_verification_height::NextVerificationHeightComputer; use hermes_comet_light_client_components::traits::light_block::height::HasLightBlockHeight; @@ -15,8 +15,8 @@ where Client: HasHeightType + HasLightBlockHeight + CanQueryLightBlock - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, { fn compute_next_verification_height( client: &Client, diff --git a/crates/comet/comet-light-client-context/src/impls/fetch_light_block.rs b/crates/comet/comet-light-client-context/src/impls/fetch_light_block.rs index de48b61ed..ccb724ce5 100644 --- a/crates/comet/comet-light-client-context/src/impls/fetch_light_block.rs +++ b/crates/comet/comet-light-client-context/src/impls/fetch_light_block.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_chain_components::traits::types::height::HasHeightType; use hermes_comet_light_client_components::traits::fetch_light_block::LightBlockFetcher; use hermes_comet_light_client_components::traits::types::light_block::HasLightBlockType; @@ -16,8 +16,8 @@ where + HasLightBlockType + HasRpcClient + HasPeerId - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn fetch_light_block( client: &Client, diff --git a/crates/comet/comet-light-client-context/src/impls/validate_light_block.rs b/crates/comet/comet-light-client-context/src/impls/validate_light_block.rs index 4405519bd..c68f7b39a 100644 --- a/crates/comet/comet-light-client-context/src/impls/validate_light_block.rs +++ b/crates/comet/comet-light-client-context/src/impls/validate_light_block.rs @@ -1,6 +1,6 @@ use core::time::Duration; -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_comet_light_client_components::traits::types::light_block::HasLightBlockType; use hermes_comet_light_client_components::traits::validate_light_block::LightBlockValidator; use tendermint::Time; @@ -22,7 +22,7 @@ where Client: HasLightBlockType + HasVerifierOptions + HasCurrentTime - + for<'a> CanRaiseError>, + + for<'a> CanRaiseAsyncError>, { fn validate_light_block( client: &Client, diff --git a/crates/comet/comet-light-client-context/src/impls/verify_update_header.rs b/crates/comet/comet-light-client-context/src/impls/verify_update_header.rs index a280c470e..46d3e8128 100644 --- a/crates/comet/comet-light-client-context/src/impls/verify_update_header.rs +++ b/crates/comet/comet-light-client-context/src/impls/verify_update_header.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_comet_light_client_components::traits::types::light_block::HasLightBlockType; use hermes_comet_light_client_components::traits::types::verdict::HasVerdictType; use hermes_comet_light_client_components::traits::verify_update_header::UpdateHeaderVerifier; @@ -20,7 +20,7 @@ where + HasVerifier + HasVerifierOptions + HasCurrentTime - + CanRaiseError, + + CanRaiseAsyncError, { fn verify_update_header( client: &Client, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/channel/channel_handshake_message.rs b/crates/cosmos/cosmos-chain-components/src/impls/channel/channel_handshake_message.rs index 22d8e224f..fc71007eb 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/channel/channel_handshake_message.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/channel/channel_handshake_message.rs @@ -1,6 +1,6 @@ use core::fmt::Display; -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_chain_type_components::traits::types::message::HasMessageType; use hermes_relayer_components::chain::traits::message_builders::channel_handshake::{ ChannelOpenAckMessageBuilder, ChannelOpenConfirmMessageBuilder, ChannelOpenInitMessageBuilder, @@ -37,7 +37,7 @@ where + HasChannelIdType + HasPortIdType + HasInitChannelOptionsType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasPortIdType, Chain::Message: From, { @@ -84,7 +84,7 @@ where Chain: HasMessageType + HasChannelIdType + HasPortIdType - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasChannelIdType + HasPortIdType + HasChannelOpenTryPayloadType< @@ -151,7 +151,7 @@ where Chain: HasMessageType + HasChannelIdType + HasPortIdType - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasChannelIdType + HasPortIdType + HasChannelOpenAckPayloadType< @@ -196,7 +196,7 @@ where Chain: HasMessageType + HasChannelIdType + HasPortIdType - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasChannelOpenConfirmPayloadType< Chain, ChannelOpenConfirmPayload = ChannelOpenConfirmPayload, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_message.rs b/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_message.rs index 39ef4e004..a466f1434 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_message.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_message.rs @@ -23,7 +23,7 @@ impl CreateClientMessageBuilder + HasCreateClientMessageOptionsType - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasCreateClientPayloadType + HasClientStateType + HasConsensusStateType diff --git a/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_payload.rs b/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_payload.rs index a8d85455b..39f36cc69 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_payload.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/client/create_client_payload.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_chain_type_components::traits::fields::chain_id::HasChainId; use hermes_comet_light_client_components::traits::fetch_light_block::CanFetchLightBlock; use hermes_comet_light_client_context::contexts::light_client::CometLightClient; @@ -40,11 +40,11 @@ where + HasChainId + CanQueryChainHeight + CanQueryChainStatus - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn build_create_client_payload( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_message.rs b/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_message.rs index 50837d6f7..92c856fd0 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_message.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_message.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use hermes_relayer_components::chain::traits::message_builders::update_client::UpdateClientMessageBuilder; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::update_client::HasUpdateClientPayloadType; @@ -15,8 +15,8 @@ pub struct BuildCosmosUpdateClientMessage; impl UpdateClientMessageBuilder for BuildCosmosUpdateClientMessage where - Chain: - HasIbcChainTypes + HasErrorType, + Chain: HasIbcChainTypes + + HasAsyncErrorType, Counterparty: HasUpdateClientPayloadType, { diff --git a/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_payload.rs b/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_payload.rs index 4e84d382f..96f6cf20f 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_payload.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/client/update_client_payload.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_chain_type_components::traits::types::height::HasHeightType; use hermes_comet_light_client_components::traits::update_client::CanBuildLightBlocksForUpdateClient; use hermes_comet_light_client_context::contexts::light_client::CometLightClient; @@ -28,12 +28,12 @@ where + HasRpcClient + HasUpdateClientPayloadType + HasClientStateType - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, TendermintClientState: From, { async fn build_update_client_payload( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/connection/connection_handshake_message.rs b/crates/cosmos/cosmos-chain-components/src/impls/connection/connection_handshake_message.rs index 9b05143c0..6602027cd 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/connection/connection_handshake_message.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/connection/connection_handshake_message.rs @@ -1,7 +1,7 @@ use core::fmt::Display; -use cgp::core::error::CanRaiseError; -use cgp::prelude::HasErrorType; +use cgp::core::error::CanRaiseAsyncError; +use cgp::prelude::HasAsyncErrorType; use hermes_chain_type_components::traits::types::message::HasMessageType; use hermes_encoding_components::traits::convert::CanConvert; use hermes_encoding_components::traits::has_encoding::HasEncoding; @@ -47,7 +47,7 @@ where InitConnectionOptions = CosmosInitConnectionOptions, > + HasMessageType + HasClientIdType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasCommitmentPrefixType> + HasClientIdType + HasConnectionOpenInitPayloadType< @@ -88,8 +88,8 @@ where + HasClientIdType + HasClientStateType + HasEncoding - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasCommitmentPrefixType> + HasCommitmentProofBytes + HasHeightFields @@ -162,9 +162,9 @@ where + HasClientIdType + HasConnectionIdType + HasEncoding - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Counterparty: HasCommitmentProofBytes + HasConnectionEndType + HasClientIdType @@ -234,7 +234,7 @@ impl ConnectionOpenConfirmMessageBuilder - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasCommitmentProofBytes + HasHeightFields + HasConnectionOpenConfirmPayloadType< diff --git a/crates/cosmos/cosmos-chain-components/src/impls/packet/packet_message.rs b/crates/cosmos/cosmos-chain-components/src/impls/packet/packet_message.rs index 43d613127..50b778e94 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/packet/packet_message.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/packet/packet_message.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::message_builders::ack_packet::AckPacketMessageBuilder; use hermes_relayer_components::chain::traits::message_builders::receive_packet::ReceivePacketMessageBuilder; use hermes_relayer_components::chain::traits::message_builders::timeout_unordered_packet::TimeoutUnorderedPacketMessageBuilder; @@ -28,7 +28,7 @@ pub struct BuildCosmosPacketMessages; impl ReceivePacketMessageBuilder for BuildCosmosPacketMessages where - Chain: HasMessageType + CanRaiseError, + Chain: HasMessageType + CanRaiseAsyncError, Counterparty: HasReceivePacketPayloadType< Chain, ReceivePacketPayload = ReceivePacketPayload, @@ -65,7 +65,7 @@ impl AckPacketMessageBuilder for Build where Chain: HasMessageType + HasOutgoingPacketType - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasAckPacketPayloadType> + HasHeightFields + HasCommitmentProofBytes @@ -101,7 +101,7 @@ impl TimeoutUnorderedPacketMessageBuilder - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasTimeoutUnorderedPacketPayloadType< Chain, TimeoutUnorderedPacketPayload = TimeoutUnorderedPacketPayload, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/abci.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/abci.rs index 3640393c6..58c0503c2 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/abci.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/abci.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_encoding_components::traits::encode::CanEncode; use hermes_encoding_components::traits::has_encoding::HasEncoding; use hermes_encoding_components::traits::types::encoded::HasEncodedType; @@ -33,12 +33,12 @@ where + HasHeightType + HasEncoding + HasCommitmentProofType - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Encoding: HasEncodedType> + CanEncode, { async fn query_abci( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/ack_packet.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/ack_packet.rs index e296a447c..c9998a5cd 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/ack_packet.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/ack_packet.rs @@ -1,6 +1,6 @@ use alloc::sync::Arc; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::ack_packets::AckPacketQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::ibc_events::write_ack::HasWriteAckEvent; @@ -27,8 +27,8 @@ where Event = Arc, > + HasWriteAckEvent + HasRpcClient - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Counterparty: HasIbcChainTypes + HasOutgoingPacketType + HasWriteAckEvent, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/block.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/block.rs index dc912cc54..95f54fbc9 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/block.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/block.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::block::BlockQuerier; use hermes_relayer_components::chain::traits::types::block::HasBlockType; use hermes_relayer_components::chain::traits::types::height::HasHeightType; @@ -15,8 +15,8 @@ impl BlockQuerier for QueryCometBlock where Chain: HasBlockType + HasHeightType - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + HasRpcClient, Chain::Height: Clone, { diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_id.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_id.rs index b86e4b933..8db5b0fc0 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_id.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_id.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainHeight; use hermes_relayer_components::chain::traits::queries::client_state::CanQueryClientState; use hermes_relayer_components::chain::traits::queries::counterparty_chain_id::CounterpartyChainIdQuerier; @@ -26,10 +26,10 @@ where + CanQueryChainHeight + CanQueryAbci + CanQueryClientState - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasChainIdType + HasClientStateFields, { async fn query_counterparty_chain_id_from_channel_id( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_status.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_status.rs index 87393fcb7..75b2f8cd9 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_status.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/chain_status.rs @@ -1,4 +1,4 @@ -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_relayer_components::chain::traits::queries::chain_status::ChainStatusQuerier; use hermes_relayer_components::chain::traits::types::status::HasChainStatusType; use ibc::core::client::types::error::ClientError; @@ -14,12 +14,12 @@ pub struct QueryCosmosChainStatus; impl ChainStatusQuerier for QueryCosmosChainStatus where - Chain: HasErrorType + Chain: HasAsyncErrorType + HasChainStatusType + HasRpcClient - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn query_chain_status(chain: &Chain) -> Result { let rpc_client = chain.rpc_client(); diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/channel_end.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/channel_end.rs index bd762831f..a1b23258d 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/channel_end.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/channel_end.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::channel_end::{ ChannelEndQuerier, ChannelEndWithProofsQuerier, }; @@ -21,7 +21,7 @@ where Chain: HasChannelEndType + HasIbcChainTypes + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_channel_end( chain: &Chain, @@ -48,7 +48,7 @@ where + HasIbcChainTypes + HasCommitmentProofType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_channel_end_with_proofs( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/client_state.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/client_state.rs index cbd0f8632..7281b8f3e 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/client_state.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/client_state.rs @@ -1,7 +1,7 @@ use core::iter::Iterator; use core::str::FromStr; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_relayer_components::chain::traits::queries::client_state::{ AllRawClientStatesQuerier, RawClientStateQuerier, RawClientStateWithProofsQuerier, @@ -30,7 +30,7 @@ where Chain: HasIbcChainTypes + HasRawClientStateType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_raw_client_state( chain: &Chain, @@ -56,7 +56,7 @@ where Chain: HasIbcChainTypes + HasRawClientStateType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_raw_client_state_with_proofs( chain: &Chain, @@ -82,7 +82,7 @@ where Chain: HasIbcChainTypes + CanQueryAbci + HasRawClientStateType - + CanRaiseError + + CanRaiseAsyncError + CanParseClientStateEntryToAny, { async fn query_all_raw_client_states( @@ -116,7 +116,7 @@ where } pub trait CanParseClientStateEntryToAny: - HasIbcChainTypes + HasErrorType + HasIbcChainTypes + HasAsyncErrorType { fn parse_client_state_entry_to_any( entry: IdentifiedClientState, @@ -126,8 +126,8 @@ pub trait CanParseClientStateEntryToAny: impl CanParseClientStateEntryToAny for Chain where Chain: HasIbcChainTypes - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, { fn parse_client_state_entry_to_any( entry: IdentifiedClientState, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/connection_end.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/connection_end.rs index 5a8e3f73b..86b079fc8 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/connection_end.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/connection_end.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::connection_end::{ ConnectionEndQuerier, ConnectionEndWithProofsQuerier, }; @@ -22,7 +22,7 @@ where Chain: HasConnectionEndType + HasIbcChainTypes + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_connection_end( chain: &Chain, @@ -49,7 +49,7 @@ where + HasIbcChainTypes + HasCommitmentProofType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_connection_end_with_proofs( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state.rs index 4e56ccc97..76102a8e4 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::consensus_state::{ RawConsensusStateQuerier, RawConsensusStateWithProofsQuerier, }; @@ -22,7 +22,7 @@ where Chain: HasIbcChainTypes + HasRawConsensusStateType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasHeightFields, { async fn query_raw_consensus_state( @@ -59,7 +59,7 @@ where + HasRawConsensusStateType + HasCommitmentProofType + CanQueryAbci - + CanRaiseError, + + CanRaiseAsyncError, Counterparty: HasHeightFields, { async fn query_raw_consensus_state_with_proofs( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state_height.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state_height.rs index f9b89ed4d..1833ee680 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state_height.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/consensus_state_height.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::consensus_state_height::ConsensusStateHeightsQuerier; use hermes_relayer_components::chain::traits::types::height::HasHeightType; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; @@ -20,9 +20,9 @@ impl ConsensusStateHeightsQuerier where Chain: HasIbcChainTypes + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasHeightType, { async fn query_consensus_state_heights( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/dispatch.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/dispatch.rs index 23a9c8675..862d2b645 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/dispatch.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/dispatch.rs @@ -1,5 +1,5 @@ use cgp::core::Async; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use crate::impls::queries::eip::feemarket::QueryEipFromFeeMarket; use crate::impls::queries::eip::osmosis::OsmosisQueryEip; @@ -13,7 +13,7 @@ impl EipQuerier for DispatchQueryEip where QueryEipFromFeeMarket: EipQuerier, OsmosisQueryEip: EipQuerier, - Chain: HasErrorType + Async, + Chain: HasAsyncErrorType + Async, { async fn query_eip_base_fee( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/feemarket.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/feemarket.rs index 9335732a6..3349e26b8 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/feemarket.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/feemarket.rs @@ -1,6 +1,6 @@ use core::str::FromStr; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use prost::DecodeError; use subtle_encoding::base64; @@ -16,13 +16,13 @@ pub struct QueryEipFromFeeMarket; impl EipQuerier for QueryEipFromFeeMarket where Chain: HasRpcClient - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str> - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError, { async fn query_eip_base_fee( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/osmosis.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/osmosis.rs index d606a69e5..a99d75fe6 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/osmosis.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/eip/osmosis.rs @@ -1,6 +1,6 @@ use core::str::FromStr; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use ibc_proto::cosmos::base::v1beta1::DecProto; use prost::DecodeError; use subtle_encoding::base64; @@ -17,12 +17,12 @@ pub struct OsmosisQueryEip; impl EipQuerier for OsmosisQueryEip where Chain: HasRpcClient - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn query_eip_base_fee( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgement.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgement.rs index 9e9ee4a85..b4600b4ed 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgement.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgement.rs @@ -1,6 +1,6 @@ use core::fmt::Display; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_relayer_components::chain::traits::queries::packet_acknowledgement::PacketAcknowledgementQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::packets::ack::HasAcknowledgementType; @@ -18,7 +18,7 @@ where + HasAcknowledgementType> + HasCommitmentProofType + CanQueryAbci - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasIbcChainTypes, Chain::ChannelId: Display, { diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgements.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgements.rs index 8323cace4..c2d14296b 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgements.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_acknowledgements.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use eyre::eyre; use hermes_relayer_components::chain::traits::queries::packet_acknowledgements::PacketAcknowledgementsQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; @@ -29,11 +29,11 @@ where ChannelId = ChannelId, Sequence = Sequence, > + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasIbcChainTypes, { async fn query_packet_acknowlegements( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitment.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitment.rs index 60b83a9ed..125c3f582 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitment.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitment.rs @@ -1,6 +1,6 @@ use core::fmt::Display; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_relayer_components::chain::traits::queries::packet_commitment::PacketCommitmentQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::packets::receive::HasPacketCommitmentType; @@ -18,7 +18,7 @@ where + HasPacketCommitmentType> + HasCommitmentProofType + CanQueryAbci - + HasErrorType, + + HasAsyncErrorType, Chain::ChannelId: Display, { async fn query_packet_commitment( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitments.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitments.rs index d58bc79ba..b2ffeb350 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitments.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/packet_commitments.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use eyre::eyre; use hermes_relayer_components::chain::traits::queries::packet_commitments::PacketCommitmentsQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; @@ -27,11 +27,11 @@ where ChannelId = ChannelId, Sequence = Sequence, > + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn query_packet_commitments( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/received_packet.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/received_packet.rs index 29b58eb99..efcfcbe64 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/received_packet.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/received_packet.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::packet_is_received::ReceivedPacketQuerier; use hermes_relayer_components::chain::traits::queries::unreceived_packet_sequences::CanQueryUnreceivedPacketSequences; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; @@ -15,8 +15,8 @@ where Chain: HasIbcChainTypes + HasGrpcAddress + CanQueryUnreceivedPacketSequences - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasIbcChainTypes, { async fn query_packet_is_received( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/send_packet.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/send_packet.rs index 5a8a94ddb..1194a93d4 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/send_packet.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/send_packet.rs @@ -1,6 +1,6 @@ use alloc::sync::Arc; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::send_packets::SendPacketQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_relayer_components::chain::traits::types::ibc_events::send_packet::HasSendPacketEvent; @@ -29,8 +29,8 @@ where > + HasOutgoingPacketType + HasSendPacketEvent + HasRpcClient - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Counterparty: HasIbcChainTypes, { async fn query_send_packet_from_sequence( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_acks.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_acks.rs index 5343da42f..4206c4b35 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_acks.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_acks.rs @@ -1,4 +1,4 @@ -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_relayer_components::chain::traits::queries::unreceived_acks_sequences::UnreceivedAcksSequencesQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use http::uri::InvalidUri; @@ -17,12 +17,12 @@ impl UnreceivedAcksSequencesQuerier for QueryUnreceivedCosmosAcksSequences where Chain: HasIbcChainTypes - + HasErrorType + + HasAsyncErrorType + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasIbcChainTypes, { async fn query_unreceived_acknowledgments_sequences( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_packet.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_packet.rs index 93d51cf51..97811fe2e 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_packet.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/unreceived_packet.rs @@ -1,4 +1,4 @@ -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_relayer_components::chain::traits::queries::unreceived_packet_sequences::UnreceivedPacketSequencesQuerier; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use http::uri::InvalidUri; @@ -17,12 +17,12 @@ impl UnreceivedPacketSequencesQuerier for QueryUnreceivedCosmosPacketSequences where Chain: HasIbcChainTypes - + HasErrorType + + HasAsyncErrorType + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, Counterparty: HasIbcChainTypes, { async fn query_unreceived_packet_sequences( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/queries/write_ack_event.rs b/crates/cosmos/cosmos-chain-components/src/impls/queries/write_ack_event.rs index f4e01780f..3255741b8 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/queries/write_ack_event.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/queries/write_ack_event.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::queries::chain_status::CanQueryChainHeight; use hermes_relayer_components::chain::traits::queries::write_ack::WriteAckQuerier; use hermes_relayer_components::chain::traits::types::ibc_events::write_ack::HasWriteAckEvent; @@ -21,9 +21,9 @@ where Chain: HasWriteAckEvent + HasRpcClient + CanQueryChainHeight - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str>, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str>, Counterparty: HasOutgoingPacketType, { async fn query_write_ack_event( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/relay/packet_filter.rs b/crates/cosmos/cosmos-chain-components/src/impls/relay/packet_filter.rs index afb194536..59e527a75 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/relay/packet_filter.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/relay/packet_filter.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use cgp::core::Async; -use cgp::prelude::{HasErrorType, HasField}; +use cgp::prelude::{HasAsyncErrorType, HasField}; use hermes_relayer_components::chain::traits::packet::fields::{ HasPacketDstChannelId, HasPacketDstPortId, HasPacketSrcChannelId, HasPacketSrcPortId, }; @@ -23,7 +23,7 @@ where + HasPortIdType + HasChannelIdType + HasField - + HasErrorType, + + HasAsyncErrorType, { async fn should_relay_outgoing_packet( chain: &Chain, @@ -43,7 +43,7 @@ where + HasField + HasPortIdType + HasChannelIdType - + HasErrorType, + + HasAsyncErrorType, Counterparty: HasPacketDstChannelId + HasPacketDstPortId, { async fn should_relay_incoming_packet( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/convert_gas_to_fee.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/convert_gas_to_fee.rs index ea3abe83a..63f03e064 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/convert_gas_to_fee.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/convert_gas_to_fee.rs @@ -1,6 +1,6 @@ use core::cmp::min; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_relayer_components::transaction::traits::types::fee::HasFeeType; use ibc_proto::cosmos::base::v1beta1::Coin; use ibc_proto::cosmos::tx::v1beta1::Fee; @@ -15,7 +15,7 @@ pub struct StaticConvertCosmosGasToFee; impl GasToFeeConverter for StaticConvertCosmosGasToFee where - Chain: HasFeeType + HasGasConfig + HasErrorType, + Chain: HasFeeType + HasGasConfig + HasAsyncErrorType, { async fn gas_amount_to_fee(chain: &Chain, gas_used: u64) -> Result { let gas_config = chain.gas_config(); diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/encode_tx.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/encode_tx.rs index 186e567d4..176cfbb14 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/encode_tx.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/encode_tx.rs @@ -1,6 +1,6 @@ #![allow(clippy::ptr_arg)] -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainId; use hermes_relayer_components::chain::traits::types::message::HasMessageType; use hermes_relayer_components::transaction::traits::encode_tx::TxEncoder; @@ -33,8 +33,8 @@ where + HasTransactionType + HasTxExtensionOptions + HasChainId - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn encode_tx( chain: &Chain, @@ -78,7 +78,7 @@ pub fn sign_tx( extension_options: &Vec, ) -> Result where - Chain: CanRaiseError, + Chain: CanRaiseAsyncError, { let key_bytes = Message::encode_to_vec(&key_pair.public_key.serialize().to_vec()); @@ -113,7 +113,7 @@ pub fn encode_sign_doc( body_bytes: Vec, ) -> Result, Chain::Error> where - Chain: CanRaiseError, + Chain: CanRaiseAsyncError, { let sign_doc = SignDoc { body_bytes, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/estimate_fee.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/estimate_fee.rs index efaf707b6..289d9bd1b 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/estimate_fee.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/estimate_fee.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainId; use hermes_relayer_components::transaction::traits::estimate_tx_fee::TxFeeEstimator; use hermes_relayer_components::transaction::traits::types::fee::HasFeeType; @@ -28,11 +28,11 @@ where + HasGasConfig + HasRpcClient + HasChainId - + CanRaiseError - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + CanConvertGasToFee - + CanRaiseError<&'static str>, + + CanRaiseAsyncError<&'static str>, { async fn estimate_tx_fee(chain: &Chain, tx: &SignedTx) -> Result { let tx = Tx { @@ -76,7 +76,9 @@ pub async fn send_tx_simulate( tx: Tx, ) -> Result where - Chain: CanRaiseError + CanRaiseError + CanRaiseError, + Chain: CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { let mut tx_bytes = vec![]; prost::Message::encode(&tx, &mut tx_bytes).map_err(Chain::raise_error)?; diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/event.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/event.rs index 552cc4af4..86ad90ddb 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/event.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/event.rs @@ -1,6 +1,6 @@ use alloc::sync::Arc; -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use hermes_chain_type_components::traits::types::message_response::HasMessageResponseType; use hermes_relayer_components::transaction::traits::parse_events::TxMessageResponseParser; use hermes_relayer_components::transaction::traits::types::tx_response::HasTxResponseType; @@ -13,7 +13,7 @@ impl TxMessageResponseParser for ParseCosmosTxResponseAsEvents where Chain: HasTxResponseType + HasMessageResponseType>> - + HasErrorType, + + HasAsyncErrorType, { fn parse_tx_message_response( response: TxResponse, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_nonce.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_nonce.rs index 158ed7d63..6603052bc 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_nonce.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_nonce.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::transaction::traits::nonce::query_nonce::NonceQuerier; use hermes_relayer_components::transaction::traits::types::nonce::HasNonceType; use hermes_relayer_components::transaction::traits::types::signer::HasSignerType; @@ -18,11 +18,11 @@ where Chain: HasSignerType + HasNonceType + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn query_nonce( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_tx_response.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_tx_response.rs index d487673be..e1f6c0acc 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_tx_response.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/query_tx_response.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::transaction::traits::query_tx_response::TxResponseQuerier; use hermes_relayer_components::transaction::traits::types::tx_hash::HasTransactionHashType; use hermes_relayer_components::transaction::traits::types::tx_response::HasTxResponseType; @@ -16,7 +16,7 @@ where Chain: HasTransactionHashType + HasTxResponseType + HasRpcClient - + CanRaiseError, + + CanRaiseAsyncError, { async fn query_tx_response( chain: &Chain, diff --git a/crates/cosmos/cosmos-chain-components/src/impls/transaction/submit_tx.rs b/crates/cosmos/cosmos-chain-components/src/impls/transaction/submit_tx.rs index dc3b250e0..18a81a69a 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/transaction/submit_tx.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/transaction/submit_tx.rs @@ -1,6 +1,6 @@ use core::fmt::Debug; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::transaction::traits::submit_tx::TxSubmitter; use hermes_relayer_components::transaction::traits::types::transaction::HasTransactionType; use hermes_relayer_components::transaction::traits::types::tx_hash::HasTransactionHashType; @@ -34,8 +34,8 @@ where Chain: HasTransactionType + HasTransactionHashType + HasRpcClient - + CanRaiseError - + for<'a> CanRaiseError>, + + CanRaiseAsyncError + + for<'a> CanRaiseAsyncError>, { async fn submit_tx(chain: &Chain, tx: &SignedTx) -> Result { let tx_raw = TxRaw { diff --git a/crates/cosmos/cosmos-chain-components/src/impls/types/chain.rs b/crates/cosmos/cosmos-chain-components/src/impls/types/chain.rs index d27195678..0bd799a36 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/types/chain.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/types/chain.rs @@ -1,8 +1,8 @@ use alloc::sync::Arc; use core::time::Duration; -use cgp::core::error::CanRaiseError; -use cgp::core::types::impls::WithType; +use cgp::core::error::CanRaiseAsyncError; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_chain_type_components::impls::types::message_response::UseEventsMessageResponse; use hermes_chain_type_components::traits::fields::height::HeightIncrementer; @@ -108,7 +108,7 @@ where impl HeightIncrementer for ProvideCosmosChainTypes where - Chain: HasHeightType + HasErrorType, + Chain: HasHeightType + HasAsyncErrorType, { fn increment_height(height: &Height) -> Result { Ok(height.increment()) @@ -117,7 +117,7 @@ where impl GenesisHeightGetter for ProvideCosmosChainTypes where - Chain: HasHeightType + HasChainId + HasErrorType, + Chain: HasHeightType + HasChainId + HasAsyncErrorType, { fn genesis_height(chain: &Chain) -> Height { Height::new(chain.chain_id().revision_number(), 1).unwrap() @@ -153,7 +153,7 @@ where impl MessageSizeEstimator for ProvideCosmosChainTypes where - Chain: HasMessageType + CanRaiseError, + Chain: HasMessageType + CanRaiseAsyncError, { fn estimate_message_size(message: &CosmosMessage) -> Result { let raw = message.message.encode_protobuf(&Signer::from( diff --git a/crates/cosmos/cosmos-chain-components/src/impls/unbonding_period.rs b/crates/cosmos/cosmos-chain-components/src/impls/unbonding_period.rs index 2b4421e78..7603d7951 100644 --- a/crates/cosmos/cosmos-chain-components/src/impls/unbonding_period.rs +++ b/crates/cosmos/cosmos-chain-components/src/impls/unbonding_period.rs @@ -17,8 +17,8 @@ where Chain: CanQueryChainHeight + CanQueryAbci + HasHeightType - + CanRaiseError<&'static str> - + CanRaiseError, + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError, { async fn query_unbonding_period(chain: &Chain) -> Result { let latest_height = chain.query_chain_height().await?; diff --git a/crates/cosmos/cosmos-chain-components/src/traits/abci_query.rs b/crates/cosmos/cosmos-chain-components/src/traits/abci_query.rs index 25dee1a3a..7c493bae7 100644 --- a/crates/cosmos/cosmos-chain-components/src/traits/abci_query.rs +++ b/crates/cosmos/cosmos-chain-components/src/traits/abci_query.rs @@ -7,7 +7,7 @@ use hermes_relayer_components::chain::traits::types::proof::HasCommitmentProofTy context: Chain, }] #[async_trait] -pub trait CanQueryAbci: HasHeightType + HasCommitmentProofType + HasErrorType { +pub trait CanQueryAbci: HasHeightType + HasCommitmentProofType + HasAsyncErrorType { async fn query_abci( &self, path: &str, diff --git a/crates/cosmos/cosmos-chain-components/src/traits/convert_gas_to_fee.rs b/crates/cosmos/cosmos-chain-components/src/traits/convert_gas_to_fee.rs index 2b95b3230..194054da4 100644 --- a/crates/cosmos/cosmos-chain-components/src/traits/convert_gas_to_fee.rs +++ b/crates/cosmos/cosmos-chain-components/src/traits/convert_gas_to_fee.rs @@ -6,6 +6,6 @@ use hermes_relayer_components::transaction::traits::types::fee::HasFeeType; context: TxContext, }] #[async_trait] -pub trait CanConvertGasToFee: HasFeeType + HasErrorType { +pub trait CanConvertGasToFee: HasFeeType + HasAsyncErrorType { async fn gas_amount_to_fee(&self, gas: u64) -> Result; } diff --git a/crates/cosmos/cosmos-chain-components/src/traits/eip/eip_query.rs b/crates/cosmos/cosmos-chain-components/src/traits/eip/eip_query.rs index e55f650f8..0a2de08ff 100644 --- a/crates/cosmos/cosmos-chain-components/src/traits/eip/eip_query.rs +++ b/crates/cosmos/cosmos-chain-components/src/traits/eip/eip_query.rs @@ -7,7 +7,7 @@ use crate::types::config::gas::dynamic_gas_config::DynamicGasConfig; context: Chain, }] #[async_trait] -pub trait CanQueryEipBaseFee: Async + HasErrorType { +pub trait CanQueryEipBaseFee: Async + HasAsyncErrorType { async fn query_eip_base_fee( &self, dynamic_gas_config: &DynamicGasConfig, diff --git a/crates/cosmos/cosmos-chain-components/src/traits/unbonding_period.rs b/crates/cosmos/cosmos-chain-components/src/traits/unbonding_period.rs index 0bcdb9d9a..a58fe0f8f 100644 --- a/crates/cosmos/cosmos-chain-components/src/traits/unbonding_period.rs +++ b/crates/cosmos/cosmos-chain-components/src/traits/unbonding_period.rs @@ -7,6 +7,6 @@ use cgp::prelude::*; context: Chain, }] #[async_trait] -pub trait CanQueryUnbondingPeriod: HasErrorType + Async { +pub trait CanQueryUnbondingPeriod: HasAsyncErrorType + Async { async fn query_unbonding_period(&self) -> Result; } diff --git a/crates/cosmos/cosmos-chain-components/src/types/transaction/account.rs b/crates/cosmos/cosmos-chain-components/src/types/transaction/account.rs index b8d4d9ab0..d4e291602 100644 --- a/crates/cosmos/cosmos-chain-components/src/types/transaction/account.rs +++ b/crates/cosmos/cosmos-chain-components/src/types/transaction/account.rs @@ -25,11 +25,11 @@ pub async fn query_account( ) -> Result where Chain: HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { let mut client = QueryClient::connect( Uri::try_from(&chain.grpc_address().to_string()).map_err(Chain::raise_error)?, diff --git a/crates/cosmos/cosmos-encoding-components/src/impls/any.rs b/crates/cosmos/cosmos-encoding-components/src/impls/any.rs index 9e2fb17a2..fe3995373 100644 --- a/crates/cosmos/cosmos-encoding-components/src/impls/any.rs +++ b/crates/cosmos/cosmos-encoding-components/src/impls/any.rs @@ -1,4 +1,4 @@ -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_encoding_components::traits::convert::Converter; use ibc::primitives::proto::Any as IbcAny; use prost_types::Any as ProstAny; @@ -7,7 +7,7 @@ pub struct ConvertIbcAny; impl Converter for ConvertIbcAny where - Encoding: HasErrorType, + Encoding: HasAsyncErrorType, { fn convert(_encoding: &Encoding, from: &ProstAny) -> Result { Ok(IbcAny { @@ -19,7 +19,7 @@ where impl Converter for ConvertIbcAny where - Encoding: HasErrorType, + Encoding: HasAsyncErrorType, { fn convert(_encoding: &Encoding, from: &IbcAny) -> Result { Ok(ProstAny { diff --git a/crates/cosmos/cosmos-encoding-components/src/impls/chain_id.rs b/crates/cosmos/cosmos-encoding-components/src/impls/chain_id.rs index 00cb76ace..62c6bd06e 100644 --- a/crates/cosmos/cosmos-encoding-components/src/impls/chain_id.rs +++ b/crates/cosmos/cosmos-encoding-components/src/impls/chain_id.rs @@ -1,4 +1,4 @@ -use cgp::prelude::{CanRaiseError, HasErrorType}; +use cgp::prelude::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::traits::decode_mut::MutDecoder; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::decode_buffer::HasDecodeBufferType; @@ -12,7 +12,7 @@ pub struct EncodeChainIdField; impl MutEncoder for EncodeChainIdField where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncodeStringField: MutEncoder, { fn encode_mut( @@ -29,7 +29,7 @@ where impl MutDecoder for EncodeChainIdField where - Encoding: HasDecodeBufferType + CanRaiseError, + Encoding: HasDecodeBufferType + CanRaiseAsyncError, EncodeStringField: MutDecoder, { fn decode_mut<'a>( diff --git a/crates/cosmos/cosmos-encoding-components/src/impls/commitment_root.rs b/crates/cosmos/cosmos-encoding-components/src/impls/commitment_root.rs index 4c19e777f..13376d51d 100644 --- a/crates/cosmos/cosmos-encoding-components/src/impls/commitment_root.rs +++ b/crates/cosmos/cosmos-encoding-components/src/impls/commitment_root.rs @@ -20,7 +20,7 @@ delegate_components! { impl MutEncoder for EncodeCommitmentRoot where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncodeByteField<1>: for<'a> MutEncoder, { fn encode_mut( diff --git a/crates/cosmos/cosmos-encoding-components/src/impls/height.rs b/crates/cosmos/cosmos-encoding-components/src/impls/height.rs index 6c9db54cc..7407db455 100644 --- a/crates/cosmos/cosmos-encoding-components/src/impls/height.rs +++ b/crates/cosmos/cosmos-encoding-components/src/impls/height.rs @@ -1,4 +1,4 @@ -use cgp::prelude::{CanRaiseError, HasErrorType}; +use cgp::prelude::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::impls::encode_mut::pair::EncoderPair; use hermes_encoding_components::traits::decode_mut::MutDecoder; use hermes_encoding_components::traits::encode_mut::MutEncoder; @@ -12,7 +12,7 @@ pub struct EncodeHeight; impl MutEncoder for EncodeHeight where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncoderPair, EncodeU64ProtoField<2>>: MutEncoder, { @@ -33,7 +33,7 @@ where impl MutDecoder for EncodeHeight where - Encoding: HasDecodeBufferType + CanRaiseError, + Encoding: HasDecodeBufferType + CanRaiseAsyncError, EncoderPair, EncodeU64ProtoField<2>>: MutDecoder, { diff --git a/crates/cosmos/cosmos-encoding-components/src/impls/timestamp.rs b/crates/cosmos/cosmos-encoding-components/src/impls/timestamp.rs index 94e168a42..63b946c42 100644 --- a/crates/cosmos/cosmos-encoding-components/src/impls/timestamp.rs +++ b/crates/cosmos/cosmos-encoding-components/src/impls/timestamp.rs @@ -1,6 +1,6 @@ use core::num::TryFromIntError; -use cgp::prelude::{CanRaiseError, HasErrorType}; +use cgp::prelude::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::impls::encode_mut::pair::EncoderPair; use hermes_encoding_components::traits::decode_mut::MutDecoder; use hermes_encoding_components::traits::encode_mut::MutEncoder; @@ -14,7 +14,7 @@ pub struct EncodeTimestamp; impl MutEncoder for EncodeTimestamp where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncoderPair, EncodeU64ProtoField<2>>: MutEncoder, { @@ -42,7 +42,9 @@ where impl MutDecoder for EncodeTimestamp where - Encoding: HasDecodeBufferType + CanRaiseError + CanRaiseError, + Encoding: HasDecodeBufferType + + CanRaiseAsyncError + + CanRaiseAsyncError, EncoderPair, EncodeU64ProtoField<2>>: MutDecoder, { diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/setup.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/setup.rs index f3742a255..b4a27e381 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/setup.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/setup.rs @@ -1,8 +1,8 @@ use core::marker::PhantomData; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::UseField; -use cgp::core::types::impls::WithType; +use cgp::core::field::{Index, UseField}; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_cosmos_chain_components::types::channel::CosmosInitChannelOptions; use hermes_cosmos_chain_components::types::connection::CosmosInitConnectionOptions; @@ -15,7 +15,6 @@ use hermes_error::impls::ProvideHermesError; use hermes_relayer_components::multi::traits::birelay_at::BiRelayTypeAtComponent; use hermes_relayer_components::multi::traits::chain_at::ChainTypeAtComponent; use hermes_relayer_components::multi::traits::relay_at::RelayTypeAtComponent; -use hermes_relayer_components::multi::types::index::Index; use hermes_test_components::driver::traits::types::builder_at::BuilderTypeAtComponent; use hermes_test_components::driver::traits::types::chain_driver_at::ChainDriverTypeAtComponent; use hermes_test_components::setup::binary_channel::components::*; diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/test_driver.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/test_driver.rs index 5f87f7b09..4edffdf80 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/test_driver.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/binary_channel/test_driver.rs @@ -1,6 +1,7 @@ use core::marker::PhantomData; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_error::handlers::debug::DebugError; use hermes_error::impls::ProvideHermesError; @@ -11,7 +12,6 @@ use hermes_logging_components::traits::has_logger::{ use hermes_relayer_components::multi::traits::birelay_at::BiRelayTypeAtComponent; use hermes_relayer_components::multi::traits::chain_at::ChainTypeAtComponent; use hermes_relayer_components::multi::traits::relay_at::RelayTypeAtComponent; -use hermes_relayer_components::multi::types::index::Index; use hermes_test_components::driver::traits::channel_at::ChannelGetterAt; use hermes_test_components::driver::traits::types::chain_driver_at::{ ChainDriverGetterAt, ChainDriverTypeAtComponent, diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap.rs index c5939cb79..8ddd68297 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap.rs @@ -4,8 +4,8 @@ use std::path::PathBuf; use cgp::core::component::UseContext; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_cosmos_chain_components::types::config::gas::dynamic_gas_config::DynamicGasConfig; use hermes_cosmos_relayer::contexts::build::CosmosBuilder; diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap_legacy.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap_legacy.rs index 3f5c84393..bcbbc406b 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap_legacy.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/bootstrap_legacy.rs @@ -4,8 +4,8 @@ use std::sync::Arc; use cgp::core::component::UseContext; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_cosmos_chain_components::types::config::gas::dynamic_gas_config::DynamicGasConfig; use hermes_cosmos_relayer::contexts::build::CosmosBuilder; diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/chain_driver.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/chain_driver.rs index 46570eeb6..6961b6ca8 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/chain_driver.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/chain_driver.rs @@ -3,6 +3,7 @@ use core::marker::PhantomData; use std::path::PathBuf; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; +use cgp::core::field::Index; use cgp::prelude::*; use hermes_cosmos_chain_components::impls::types::config::RelayerConfig; use hermes_cosmos_relayer::contexts::chain::CosmosChain; @@ -17,7 +18,6 @@ use hermes_cosmos_test_components::chain_driver::traits::rpc_port::RpcPortGetter use hermes_error::handlers::debug::DebugError; use hermes_error::impls::ProvideHermesError; use hermes_error::types::Error; -use hermes_relayer_components::multi::types::index::Index; use hermes_runtime::impls::types::runtime::ProvideHermesRuntime; use hermes_runtime::types::runtime::HermesRuntime; use hermes_runtime_components::traits::runtime::{RuntimeGetter, RuntimeTypeComponent}; diff --git a/crates/cosmos/cosmos-integration-tests/src/contexts/relay_driver.rs b/crates/cosmos/cosmos-integration-tests/src/contexts/relay_driver.rs index 1d280a05e..600182b60 100644 --- a/crates/cosmos/cosmos-integration-tests/src/contexts/relay_driver.rs +++ b/crates/cosmos/cosmos-integration-tests/src/contexts/relay_driver.rs @@ -1,4 +1,5 @@ use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; +use cgp::core::field::Index; use cgp::extra::run::CanRun; use cgp::prelude::*; use hermes_async_runtime_components::task::types::future_task::FutureTask; @@ -11,7 +12,6 @@ use hermes_error::types::Error; use hermes_relayer_components::multi::traits::birelay_at::ProvideBiRelayTypeAt; use hermes_relayer_components::multi::traits::chain_at::ProvideChainTypeAt; use hermes_relayer_components::multi::traits::relay_at::ProvideRelayTypeAt; -use hermes_relayer_components::multi::types::index::Index; use hermes_runtime_components::traits::spawn::CanSpawnTask; use hermes_test_components::relay_driver::run::RelayerBackgroundRunner; diff --git a/crates/cosmos/cosmos-integration-tests/src/impls/binary_channel_driver.rs b/crates/cosmos/cosmos-integration-tests/src/impls/binary_channel_driver.rs index 82dbfee53..9363a766b 100644 --- a/crates/cosmos/cosmos-integration-tests/src/impls/binary_channel_driver.rs +++ b/crates/cosmos/cosmos-integration-tests/src/impls/binary_channel_driver.rs @@ -1,11 +1,11 @@ -use cgp::prelude::HasErrorType; +use cgp::core::field::Index; +use cgp::prelude::HasAsyncErrorType; use hermes_cosmos_relayer::contexts::birelay::CosmosBiRelay; use hermes_cosmos_relayer::contexts::chain::CosmosChain; use hermes_cosmos_relayer::contexts::relay::CosmosRelay; use hermes_relayer_components::multi::traits::birelay_at::HasBiRelayTypeAt; use hermes_relayer_components::multi::traits::chain_at::HasChainTypeAt; use hermes_relayer_components::multi::traits::relay_at::HasRelayTypeAt; -use hermes_relayer_components::multi::types::index::Index; use hermes_test_components::driver::traits::types::chain_driver_at::HasChainDriverTypeAt; use hermes_test_components::setup::traits::driver::HasTestDriverType; use hermes_test_components::setup::traits::drivers::binary_channel::BinaryChannelDriverBuilder; @@ -27,7 +27,7 @@ where + HasChainDriverTypeAt, ChainDriver = CosmosChainDriver> + HasChainDriverTypeAt, ChainDriver = CosmosChainDriver> + HasTestDriverType - + HasErrorType, + + HasAsyncErrorType, { async fn build_driver_with_binary_channel( _setup: &Setup, diff --git a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain.rs b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain.rs index 214c283b5..74f6c6e6e 100644 --- a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain.rs +++ b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain.rs @@ -1,6 +1,6 @@ use core::time::Duration; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_relayer::contexts::chain::CosmosChain; use hermes_cosmos_test_components::bootstrap::traits::fields::dynamic_gas_fee::HasDynamicGas; use hermes_cosmos_test_components::bootstrap::traits::types::chain_node_config::HasChainNodeConfigType; @@ -24,7 +24,7 @@ where + HasCosmosBuilder + HasRuntime + HasDynamicGas - + CanRaiseError, + + CanRaiseAsyncError, Bootstrap::Runtime: CanSleep, { async fn build_chain_with_node_config( diff --git a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain_driver.rs b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain_driver.rs index 683f5034b..cd1841370 100644 --- a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain_driver.rs +++ b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/build_cosmos_chain_driver.rs @@ -1,7 +1,7 @@ use alloc::collections::BTreeMap; use std::path::PathBuf; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_relayer::contexts::chain::CosmosChain; use hermes_cosmos_test_components::bootstrap::traits::chain::build_chain_driver::ChainDriverBuilder; use hermes_cosmos_test_components::bootstrap::traits::fields::chain_command_path::HasChainCommandPath; @@ -36,7 +36,7 @@ where + HasGenesisDenom + HasGenesisDenom + HasChainCommandPath - + CanRaiseError<&'static str>, + + CanRaiseAsyncError<&'static str>, Runtime: HasFilePathType + HasChildProcessType, { async fn build_chain_driver( diff --git a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/relayer_chain_config.rs b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/relayer_chain_config.rs index 7ab9dc0c3..e9e884d7d 100644 --- a/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/relayer_chain_config.rs +++ b/crates/cosmos/cosmos-integration-tests/src/impls/bootstrap/relayer_chain_config.rs @@ -1,7 +1,7 @@ use core::str::FromStr; use core::time::Duration; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::impls::types::config::{CosmosChainConfig, EventSourceMode}; use hermes_cosmos_chain_components::types::config::gas::gas_config::{GasConfig, GasPrice}; use hermes_cosmos_test_components::bootstrap::traits::fields::account_prefix::HasAccountPrefix; @@ -30,7 +30,7 @@ where + HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType - + CanRaiseError, + + CanRaiseAsyncError, Chain: HasWalletType, { fn build_relayer_chain_config( diff --git a/crates/cosmos/cosmos-integration-tests/src/impls/test_driver/types.rs b/crates/cosmos/cosmos-integration-tests/src/impls/test_driver/types.rs index 016b81a67..1abb1278f 100644 --- a/crates/cosmos/cosmos-integration-tests/src/impls/test_driver/types.rs +++ b/crates/cosmos/cosmos-integration-tests/src/impls/test_driver/types.rs @@ -1,3 +1,4 @@ +use cgp::core::field::Index; use cgp::prelude::Async; use hermes_cosmos_relayer::contexts::birelay::CosmosBiRelay; use hermes_cosmos_relayer::contexts::chain::CosmosChain; @@ -7,7 +8,6 @@ use hermes_relayer_components::multi::traits::birelay_at::{ }; use hermes_relayer_components::multi::traits::chain_at::{HasChainTypeAt, ProvideChainTypeAt}; use hermes_relayer_components::multi::traits::relay_at::{HasRelayTypeAt, ProvideRelayTypeAt}; -use hermes_relayer_components::multi::types::index::Index; use hermes_test_components::driver::traits::types::chain_driver_at::ProvideChainDriverTypeAt; use hermes_test_components::driver::traits::types::relay_driver_at::ProvideRelayDriverTypeAt; diff --git a/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/build_chain.rs b/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/build_chain.rs index a7babb341..f3d309bf5 100644 --- a/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/build_chain.rs +++ b/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/build_chain.rs @@ -10,7 +10,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; }] #[async_trait] pub trait CanBuildChainWithNodeConfig: - HasChainType + HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType + HasErrorType + HasChainType + HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType + HasAsyncErrorType where Self::Chain: HasWalletType, { diff --git a/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/relayer_chain_config.rs b/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/relayer_chain_config.rs index 7fce1af8e..08cbbde6f 100644 --- a/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/relayer_chain_config.rs +++ b/crates/cosmos/cosmos-integration-tests/src/traits/bootstrap/relayer_chain_config.rs @@ -13,7 +13,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] pub trait CanBuildRelayerChainConfig: - HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType + HasErrorType + HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType + HasAsyncErrorType where Self::Chain: HasWalletType, { diff --git a/crates/cosmos/cosmos-relayer/src/contexts/birelay.rs b/crates/cosmos/cosmos-relayer/src/contexts/birelay.rs index 0599970c5..0b83d3432 100644 --- a/crates/cosmos/cosmos-relayer/src/contexts/birelay.rs +++ b/crates/cosmos/cosmos-relayer/src/contexts/birelay.rs @@ -1,12 +1,11 @@ use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::{Index, WithField}; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_relayer_components::birelay::traits::two_way::TwoWayRelayGetter; use hermes_relayer_components::components::default::birelay::*; use hermes_relayer_components::multi::traits::chain_at::ProvideChainTypeAt; use hermes_relayer_components::multi::traits::relay_at::ProvideRelayTypeAt; -use hermes_relayer_components::multi::types::index::Index; use hermes_runtime::types::runtime::HermesRuntime; use hermes_runtime_components::traits::runtime::{RuntimeGetterComponent, RuntimeTypeComponent}; diff --git a/crates/cosmos/cosmos-relayer/src/contexts/build.rs b/crates/cosmos/cosmos-relayer/src/contexts/build.rs index 52b964b75..1004fa454 100644 --- a/crates/cosmos/cosmos-relayer/src/contexts/build.rs +++ b/crates/cosmos/cosmos-relayer/src/contexts/build.rs @@ -7,8 +7,8 @@ use std::fs::{self, File}; use std::str::FromStr; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::{UseField, WithField}; -use cgp::core::types::impls::WithType; +use cgp::core::field::{Index, UseField, WithField}; +use cgp::core::types::WithType; use cgp::prelude::*; use eyre::{eyre, Report}; use futures::lock::Mutex; @@ -24,7 +24,6 @@ use hermes_relayer_components::build::traits::cache::{HasChainCache, HasRelayCac use hermes_relayer_components::multi::traits::birelay_at::BiRelayTypeAtComponent; use hermes_relayer_components::multi::traits::chain_at::{ChainTypeAtComponent, HasChainTypeAt}; use hermes_relayer_components::multi::traits::relay_at::{HasRelayTypeAt, RelayTypeAtComponent}; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::multi::types::tags::{Dst, Src}; use hermes_relayer_components::relay::traits::target::SourceTarget; use hermes_relayer_components_extra::batch::traits::config::HasBatchConfig; diff --git a/crates/cosmos/cosmos-relayer/src/contexts/chain.rs b/crates/cosmos/cosmos-relayer/src/contexts/chain.rs index 22040516c..c8f46ca5e 100644 --- a/crates/cosmos/cosmos-relayer/src/contexts/chain.rs +++ b/crates/cosmos/cosmos-relayer/src/contexts/chain.rs @@ -3,8 +3,8 @@ use core::ops::Deref; use std::str::FromStr; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use futures::lock::Mutex; use hermes_any_counterparty::contexts::any_counterparty::AnyCounterparty; diff --git a/crates/cosmos/cosmos-relayer/src/contexts/relay.rs b/crates/cosmos/cosmos-relayer/src/contexts/relay.rs index 31f821407..371bc00fc 100644 --- a/crates/cosmos/cosmos-relayer/src/contexts/relay.rs +++ b/crates/cosmos/cosmos-relayer/src/contexts/relay.rs @@ -3,8 +3,8 @@ use alloc::sync::Arc; use core::ops::Deref; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::{UseField, WithField}; -use cgp::core::types::impls::WithType; +use cgp::core::field::{Index, UseField, WithField}; +use cgp::core::types::WithType; use cgp::prelude::*; use futures::lock::Mutex; use hermes_logger::ProvideHermesLogger; @@ -17,7 +17,6 @@ use hermes_relayer_components::multi::traits::chain_at::{ }; use hermes_relayer_components::multi::traits::client_id_at::ClientIdAtGetterComponent; use hermes_relayer_components::multi::traits::relay_at::ClientIdAt; -use hermes_relayer_components::multi::types::index::Index; use hermes_relayer_components::multi::types::tags::{Dst, Src}; use hermes_relayer_components::relay::impls::packet_lock::{ PacketMutexGetterComponent, PacketMutexOf, diff --git a/crates/cosmos/cosmos-relayer/src/impls/error.rs b/crates/cosmos/cosmos-relayer/src/impls/error.rs index 7e73d56ac..49467dbad 100644 --- a/crates/cosmos/cosmos-relayer/src/impls/error.rs +++ b/crates/cosmos/cosmos-relayer/src/impls/error.rs @@ -83,12 +83,12 @@ pub trait CanHandleCosmosError: + for<'a> ErrorRaiser> + for<'a> ErrorRaiser> where - Context: HasErrorType, + Context: HasAsyncErrorType, { } impl CanHandleCosmosError for HandleCosmosError where - Context: HasErrorType + Context: HasAsyncErrorType { } @@ -183,7 +183,7 @@ delegate_components! { WrapError, ]: WrapErrorDetail, - <'a, Context: HasErrorType> MaxRetryExceededError<'a, Context>: + <'a, Context: HasAsyncErrorType> MaxRetryExceededError<'a, Context>: UnwrapMaxRetryExceededError, } } diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk.rs index e336c4c39..a757e6983 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use std::path::PathBuf; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::create_dir::CanCreateDir; @@ -113,12 +113,12 @@ impl UseCosmosSdkChainBootst where Bootstrap: HasComponents + HasRuntime - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str> - + CanRaiseError - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + HasDynamicGas, Components: DelegatesToCosmosSdkBootstrapComponents + ProvideChainType diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk_legacy.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk_legacy.rs index d702a98d4..7f4fb45fe 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk_legacy.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/components/cosmos_sdk_legacy.rs @@ -1,7 +1,7 @@ use core::fmt::Display; use std::path::PathBuf; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::create_dir::CanCreateDir; @@ -99,12 +99,12 @@ impl UseLegacyCosmosSdkChain where Bootstrap: HasComponents + HasRuntime - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str> - + CanRaiseError - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + HasDynamicGas, Components: DelegatesToLegacyCosmosSdkBootstrapComponents + ProvideChainType diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/bootstrap_chain.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/bootstrap_chain.rs index fdec4fe85..6c4b9a755 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/bootstrap_chain.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/bootstrap_chain.rs @@ -25,7 +25,7 @@ pub struct BootstrapCosmosChain; impl ChainBootstrapper for BootstrapCosmosChain where - Bootstrap: HasErrorType + Bootstrap: HasAsyncErrorType + HasRuntime + HasChainType + HasChainDriverType @@ -39,7 +39,7 @@ where + CanInitChainNodeConfig + CanStartChainFullNode + CanBuildChainDriver, - Runtime: HasFilePathType + HasChildProcessType + HasErrorType, + Runtime: HasFilePathType + HasChildProcessType + HasAsyncErrorType, Chain: HasChainIdType + HasWalletType, { async fn bootstrap_chain( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/build_wait.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/build_wait.rs index f5408aefe..8e6dcbde5 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/build_wait.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/build_wait.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use std::collections::BTreeMap; -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_runtime_components::traits::os::child_process::{ChildProcessOf, HasChildProcessType}; use hermes_runtime_components::traits::runtime::HasRuntimeType; use hermes_test_components::chain::traits::types::wallet::{HasWalletType, Wallet}; @@ -23,7 +23,7 @@ where + HasChainDriverType + HasChainGenesisConfigType + HasChainNodeConfigType - + CanRaiseError, + + CanRaiseAsyncError, InBuilder: ChainDriverBuilder, ChainDriver: CanWaitChainStartup, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/start_chain.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/start_chain.rs index 89f8f3624..9a21a7f95 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/start_chain.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/chain/start_chain.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::child_process::CanStartChildProcess; @@ -16,11 +16,11 @@ pub struct StartCosmosChain; impl ChainFullNodeStarter for StartCosmosChain where Bootstrap: HasRuntime - + HasErrorType + + HasAsyncErrorType + HasChainCommandPath + HasChainNodeConfigType + HasChainGenesisConfigType - + CanRaiseError, + + CanRaiseAsyncError, Runtime: HasFilePathType + CanStartChildProcess, { async fn start_chain_full_node( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/generator/wallet_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/generator/wallet_config.rs index 89d213855..7d1d98cb7 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/generator/wallet_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/generator/wallet_config.rs @@ -26,7 +26,7 @@ where Bootstrap: HasWalletConfigType + HasChainType + HasChainGenesisConfigType - + HasErrorType + + HasAsyncErrorType + HasGenesisDenom + HasGenesisDenom, Chain: HasDenomType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_account.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_account.rs index be66a52c8..0dd077a1d 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_account.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_account.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; use hermes_runtime_components::traits::runtime::HasRuntime; @@ -20,7 +20,7 @@ impl GenesisAccountAdder for AddCosmosGene where Bootstrap: HasRuntime + HasChainType - + CanRaiseError + + CanRaiseAsyncError + HasChainCommandPath, Runtime: HasFilePathType + CanExecCommand, Chain: HasAmountType + HasAddressType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_validator.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_validator.rs index 01a35b051..5debdfb64 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_validator.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_validator.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; @@ -20,7 +20,7 @@ impl GenesisValidatorAdder for AddCosmosGe where Bootstrap: HasRuntime + HasChainType - + CanRaiseError + + CanRaiseAsyncError + HasChainCommandPath, Runtime: HasFilePathType + CanExecCommand, Chain: HasChainIdType + HasAmountType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_wallet.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_wallet.rs index a34eaf9b0..ab7516c29 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_wallet.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/add_genesis_wallet.rs @@ -23,11 +23,11 @@ where + HasChainType + HasChainDriverType + HasWalletConfigFields - + HasErrorType + + HasAsyncErrorType + CanInitWallet + CanAddGenesisAccount + CanAddGenesisValidator, - Runtime: HasFilePathType + HasErrorType, + Runtime: HasFilePathType + HasAsyncErrorType, Chain: HasChainIdType + HasWalletType + HasAmountType + HasAddressType, { async fn add_wallet_to_genesis( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/collect_gentxs.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/collect_gentxs.rs index 503c4d5be..81de1f164 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/collect_gentxs.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis/collect_gentxs.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; use hermes_runtime_components::traits::runtime::HasRuntime; @@ -10,7 +10,8 @@ pub struct CollectCosmosGentxs; impl GenesisTransactionsCollector for CollectCosmosGentxs where - Bootstrap: HasRuntime + CanRaiseError + HasChainCommandPath, + Bootstrap: + HasRuntime + CanRaiseAsyncError + HasChainCommandPath, Runtime: HasFilePathType + CanExecCommand, { async fn collect_genesis_transactions( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_account.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_account.rs index 29015f0e1..8231aaa7e 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_account.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_account.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; @@ -22,9 +22,9 @@ impl GenesisAccountAdder for LegacyAddCosm where Bootstrap: HasRuntime + HasChainType - + HasErrorType + + HasAsyncErrorType + HasChainCommandPath - + CanRaiseError, + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommand, Chain: HasAmountType + HasAddressType, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_validator.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_validator.rs index 84f4e4658..e00cba2b7 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_validator.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/add_genesis_validator.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; @@ -22,7 +22,7 @@ where Bootstrap: HasRuntime + HasChainType + HasChainCommandPath - + CanRaiseError, + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommand, Chain: HasChainIdType + HasAmountType, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/collect_gentxs.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/collect_gentxs.rs index 4840ee053..f22492aa8 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/collect_gentxs.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/genesis_legacy/collect_gentxs.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use cgp::prelude::*; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; @@ -12,9 +12,9 @@ pub struct LegacyCollectCosmosGentxs; impl GenesisTransactionsCollector for LegacyCollectCosmosGentxs where Bootstrap: HasRuntime - + HasErrorType + + HasAsyncErrorType + HasChainCommandPath - + CanRaiseError, + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommand, { async fn collect_genesis_transactions( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/create_chain_home_dir.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/create_chain_home_dir.rs index 020e51e4a..db093e7c3 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/create_chain_home_dir.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/create_chain_home_dir.rs @@ -1,6 +1,6 @@ use core::fmt::Display; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::create_dir::CanCreateDir; use hermes_runtime_components::traits::runtime::HasRuntime; @@ -15,7 +15,7 @@ impl ChainHomeDirInitializer for CreateCha where Bootstrap: HasChainType + HasRuntime - + CanRaiseError + + CanRaiseAsyncError + HasChainStoreDir, Runtime: CanCreateDir, Chain: HasChainIdType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_chain_data.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_chain_data.rs index 2d5defabc..3d097b050 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_chain_data.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_chain_data.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::os::exec_command::CanExecCommand; @@ -15,7 +15,7 @@ where Bootstrap: HasChainType + HasRuntime + HasChainCommandPath - + CanRaiseError, + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommand, Chain: HasChainIdType, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_wallet.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_wallet.rs index 88a4a3f93..06ddf9d75 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_wallet.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/init_wallet.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::{Async, CanRaiseError}; +use cgp::prelude::{Async, CanRaiseAsyncError}; use hermes_cosmos_chain_components::types::key_types::secp256k1::Secp256k1KeyPair; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::fs::write_file::CanWriteStringToFile; @@ -48,10 +48,10 @@ where + HasChainType + HasWalletHdPath + HasChainCommandPath - + CanRaiseError - + CanRaiseError - + CanRaiseError<&'static str> - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError, Runtime: HasFilePathType + CanExecCommand + CanWriteStringToFile, Chain: HasWalletType, OutputGetter: ExecOutputGetter, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_chain_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_chain_config.rs index 897189ec8..1a92d9ba6 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_chain_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_chain_config.rs @@ -1,7 +1,7 @@ use core::time::Duration; use std::path::PathBuf; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::chain_id::HasChainIdType; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::fs::read_file::CanReadFileAsString; @@ -32,10 +32,10 @@ where + HasChainGenesisConfigType + CanModifyCometConfig + CanModifyCosmosSdkConfig - + CanRaiseError - + CanRaiseError<&'static str> - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError<&'static str> + + CanRaiseAsyncError + + CanRaiseAsyncError, Runtime: HasFilePathType + CanReadFileAsString + CanWriteStringToFile diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_genesis_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_genesis_config.rs index a353d4397..cfd8061e6 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_genesis_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/initializers/update_genesis_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_runtime_components::traits::fs::file_path::HasFilePathType; use hermes_runtime_components::traits::fs::read_file::CanReadFileAsString; use hermes_runtime_components::traits::fs::write_file::CanWriteStringToFile; @@ -23,10 +23,10 @@ where + CanModifyCosmosGenesisConfig + HasDenomPrefix + HasDenomPrefix - + CanRaiseError - + CanRaiseError + + CanRaiseAsyncError + + CanRaiseAsyncError + HasDynamicGas - + CanRaiseError<&'static str>, + + CanRaiseAsyncError<&'static str>, Runtime: HasFilePathType + CanReadFileAsString + CanWriteStringToFile, Bootstrap::ChainGenesisConfig: From, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_comet_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_comet_config.rs index ae4ec0bc0..8b16c3fb0 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_comet_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_comet_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use toml::Value; use crate::bootstrap::traits::modifiers::modify_comet_config::CometConfigModifier; @@ -7,7 +7,7 @@ pub struct NoModifyCometConfig; impl CometConfigModifier for NoModifyCometConfig where - Bootstrap: HasErrorType, + Bootstrap: HasAsyncErrorType, { fn modify_comet_config( _bootstrap: &Bootstrap, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_cosmos_sdk_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_cosmos_sdk_config.rs index 6902f1ad1..6697c28c1 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_cosmos_sdk_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_cosmos_sdk_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use toml::Value; use crate::bootstrap::traits::modifiers::modify_cosmos_sdk_config::CosmosSdkConfigModifier; @@ -7,7 +7,7 @@ pub struct NoModifyCosmosSdkConfig; impl CosmosSdkConfigModifier for NoModifyCosmosSdkConfig where - Bootstrap: HasErrorType, + Bootstrap: HasAsyncErrorType, { fn modify_cosmos_sdk_config( _bootstrap: &Bootstrap, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_genesis_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_genesis_config.rs index bac94f0c6..5d8e1da9e 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_genesis_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/impls/modifiers/no_modify_genesis_config.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use serde_json::Value; use crate::bootstrap::traits::modifiers::modify_genesis_config::CosmosGenesisConfigModifier; @@ -7,7 +7,7 @@ pub struct NoModifyGenesisConfig; impl CosmosGenesisConfigModifier for NoModifyGenesisConfig where - Bootstrap: HasErrorType, + Bootstrap: HasAsyncErrorType, { fn modify_genesis_config( _bootstrap: &Bootstrap, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/build_chain_driver.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/build_chain_driver.rs index 24f60dac5..a64b95d56 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/build_chain_driver.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/build_chain_driver.rs @@ -19,7 +19,7 @@ pub trait CanBuildChainDriver: + HasChainDriverType + HasChainGenesisConfigType + HasChainNodeConfigType - + HasErrorType + + HasAsyncErrorType { async fn build_chain_driver( &self, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/start_chain.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/start_chain.rs index 20f754cfd..b002fecb6 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/start_chain.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/chain/start_chain.rs @@ -15,7 +15,7 @@ pub trait CanStartChainFullNode: HasChainNodeConfigType + HasChainGenesisConfigType + HasRuntime - + HasErrorType + + HasAsyncErrorType { async fn start_chain_full_node( &self, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/generator/generate_wallet_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/generator/generate_wallet_config.rs index 8239a7904..ab3163784 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/generator/generate_wallet_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/generator/generate_wallet_config.rs @@ -11,7 +11,7 @@ use crate::bootstrap::traits::types::wallet_config::HasWalletConfigType; }] #[async_trait] pub trait CanGenerateWalletConfigs: - HasChainGenesisConfigType + HasWalletConfigType + HasErrorType + HasChainGenesisConfigType + HasWalletConfigType + HasAsyncErrorType { async fn generate_wallet_configs( &self, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_account.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_account.rs index fd45379a6..c35335220 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_account.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_account.rs @@ -10,7 +10,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanAddGenesisAccount: HasRuntime + HasChainType + HasErrorType +pub trait CanAddGenesisAccount: HasRuntime + HasChainType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasAmountType + HasAddressType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_validator.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_validator.rs index aa5a27073..37077774e 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_validator.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_validator.rs @@ -11,7 +11,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanAddGenesisValidator: HasRuntime + HasChainType + HasErrorType +pub trait CanAddGenesisValidator: HasRuntime + HasChainType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType + HasAmountType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_wallet.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_wallet.rs index e861e999d..7fa17ac92 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_wallet.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/add_genesis_wallet.rs @@ -14,7 +14,7 @@ use crate::bootstrap::traits::types::wallet_config::HasWalletConfigType; }] #[async_trait] pub trait CanAddWalletToGenesis: - HasRuntime + HasChainType + HasWalletConfigType + HasErrorType + HasRuntime + HasChainType + HasWalletConfigType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType + HasWalletType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/collect_gentxs.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/collect_gentxs.rs index 0baf96adf..c8c34cfd3 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/collect_gentxs.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/genesis/collect_gentxs.rs @@ -7,7 +7,7 @@ use hermes_runtime_components::traits::runtime::HasRuntime; context: Bootstrap, }] #[async_trait] -pub trait CanCollectGenesisTransactions: HasRuntime + HasErrorType +pub trait CanCollectGenesisTransactions: HasRuntime + HasAsyncErrorType where Self::Runtime: HasFilePathType, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_config.rs index 3955fd0cb..59c9a8345 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_config.rs @@ -14,7 +14,11 @@ use crate::bootstrap::traits::types::genesis_config::HasChainGenesisConfigType; }] #[async_trait] pub trait CanInitChainNodeConfig: - HasChainNodeConfigType + HasChainGenesisConfigType + HasChainType + HasRuntimeType + HasErrorType + HasChainNodeConfigType + + HasChainGenesisConfigType + + HasChainType + + HasRuntimeType + + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_data.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_data.rs index 0f9497aab..1cd43be0f 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_data.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_data.rs @@ -13,7 +13,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanInitChainData: HasRuntime + HasChainType + HasErrorType +pub trait CanInitChainData: HasRuntime + HasChainType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_home_dir.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_home_dir.rs index 3e3d3fe63..687471299 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_home_dir.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_chain_home_dir.rs @@ -10,7 +10,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanInitChainHomeDir: HasChainType + HasRuntime + HasErrorType +pub trait CanInitChainHomeDir: HasChainType + HasRuntime + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasChainIdType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_genesis_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_genesis_config.rs index 549262b6e..746c339e7 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_genesis_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_genesis_config.rs @@ -9,7 +9,8 @@ use crate::bootstrap::traits::types::genesis_config::HasChainGenesisConfigType; context: Bootstrap, }] #[async_trait] -pub trait CanInitChainGenesisConfig: HasRuntime + HasChainGenesisConfigType + HasErrorType +pub trait CanInitChainGenesisConfig: + HasRuntime + HasChainGenesisConfigType + HasAsyncErrorType where Self::Runtime: HasFilePathType, { diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_wallet.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_wallet.rs index 4ee733edc..58525cbbc 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_wallet.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/initializers/init_wallet.rs @@ -9,7 +9,7 @@ use hermes_test_components::chain_driver::traits::types::chain::HasChainType; context: Bootstrap, }] #[async_trait] -pub trait CanInitWallet: HasRuntime + HasChainType + HasErrorType +pub trait CanInitWallet: HasRuntime + HasChainType + HasAsyncErrorType where Self::Runtime: HasFilePathType, Self::Chain: HasWalletType, diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_comet_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_comet_config.rs index 8dc36d237..ce1c02fdb 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_comet_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_comet_config.rs @@ -9,13 +9,13 @@ use toml::Value; context: Bootstrap, }] #[async_trait] -pub trait CanModifyCometConfig: HasErrorType { +pub trait CanModifyCometConfig: HasAsyncErrorType { fn modify_comet_config(&self, comet_config: &mut Value) -> Result<(), Self::Error>; } impl CometConfigModifier for UseContext where - Bootstrap: HasErrorType + HasField, + Bootstrap: HasAsyncErrorType + HasField, Modifier: Fn(&mut Value) -> Result<(), Bootstrap::Error> + Send + Sync + 'static, { fn modify_comet_config( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_cosmos_sdk_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_cosmos_sdk_config.rs index 5d2afcba2..1a49a8d3d 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_cosmos_sdk_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_cosmos_sdk_config.rs @@ -9,13 +9,14 @@ use toml::Value; context: Bootstrap, }] #[async_trait] -pub trait CanModifyCosmosSdkConfig: HasErrorType { +pub trait CanModifyCosmosSdkConfig: HasAsyncErrorType { fn modify_cosmos_sdk_config(&self, cosmos_sdk_config: &mut Value) -> Result<(), Self::Error>; } impl CosmosSdkConfigModifier for UseContext where - Bootstrap: HasErrorType + HasField, + Bootstrap: + HasAsyncErrorType + HasField, Modifier: Fn(&mut Value) -> Result<(), Bootstrap::Error> + Send + Sync + 'static, { fn modify_cosmos_sdk_config( diff --git a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_genesis_config.rs b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_genesis_config.rs index a73da81e7..af0572929 100644 --- a/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_genesis_config.rs +++ b/crates/cosmos/cosmos-test-components/src/bootstrap/traits/modifiers/modify_genesis_config.rs @@ -8,13 +8,13 @@ use serde_json::Value; provider: CosmosGenesisConfigModifier, context: Bootstrap, }] -pub trait CanModifyCosmosGenesisConfig: HasErrorType { +pub trait CanModifyCosmosGenesisConfig: HasAsyncErrorType { fn modify_genesis_config(&self, genesis_config: &mut Value) -> Result<(), Self::Error>; } impl CosmosGenesisConfigModifier for UseContext where - Bootstrap: HasErrorType + HasField, + Bootstrap: HasAsyncErrorType + HasField, Modifier: Fn(&mut Value) -> Result<(), Bootstrap::Error> + Send + Sync + 'static, { fn modify_genesis_config( diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/messages/ibc_transfer.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/messages/ibc_transfer.rs index 8ab65b5bb..5923772c7 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/messages/ibc_transfer.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/messages/ibc_transfer.rs @@ -1,4 +1,4 @@ -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_cosmos_chain_components::traits::message::{CosmosMessage, ToCosmosMessage}; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_test_components::chain::traits::messages::ibc_transfer::IbcTokenTransferMessageBuilder; @@ -17,7 +17,7 @@ pub struct BuildCosmosIbcTransferMessage; impl IbcTokenTransferMessageBuilder for BuildCosmosIbcTransferMessage where - Chain: HasErrorType + Chain: HasAsyncErrorType + HasAddressType + HasAmountType + HasMemoType> diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/poll_status.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/poll_status.rs index 9041cc327..e11cbb38e 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/poll_status.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/poll_status.rs @@ -1,7 +1,7 @@ use core::fmt::{Debug, Display}; use core::time::Duration; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::error::traits::retry::HasRetryableError; use hermes_runtime_components::traits::runtime::HasRuntime; use hermes_runtime_components::traits::sleep::CanSleep; @@ -12,7 +12,7 @@ pub struct PollProposalStatus; impl ProposalStatusPoller for PollProposalStatus where - Chain: CanQueryProposalStatus + HasRuntime + HasRetryableError + CanRaiseError, + Chain: CanQueryProposalStatus + HasRuntime + HasRetryableError + CanRaiseAsyncError, Chain::Runtime: CanSleep, Chain::ProposalId: Display, Chain::ProposalStatus: Eq + Debug, diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/query_status.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/query_status.rs index 771943398..e36e64f8d 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/query_status.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/proposal/query_status.rs @@ -1,6 +1,6 @@ use core::fmt::Debug; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::traits::grpc_address::HasGrpcAddress; use hermes_test_components::chain::traits::proposal::query_status::ProposalStatusQuerier; use hermes_test_components::chain::traits::proposal::types::proposal_id::HasProposalIdType; @@ -26,11 +26,11 @@ where Chain: HasProposalIdType + HasProposalStatusType + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + for<'a> CanRaiseError>, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + for<'a> CanRaiseAsyncError>, { async fn query_proposal_status( chain: &Chain, diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/queries/balance.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/queries/balance.rs index 8c5be6b69..0114fbdf0 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/queries/balance.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/queries/balance.rs @@ -1,6 +1,6 @@ use core::num::ParseIntError; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::traits::grpc_address::HasGrpcAddress; use hermes_test_components::chain::traits::queries::balance::BalanceQuerier; use hermes_test_components::chain::traits::types::address::HasAddressType; @@ -22,12 +22,12 @@ where Chain: HasAddressType + HasAmountType + HasGrpcAddress - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { async fn query_balance( chain: &Chain, diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/transfer/amount.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/transfer/amount.rs index 20501c90b..3b2768f62 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/transfer/amount.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/transfer/amount.rs @@ -1,6 +1,6 @@ use std::string::FromUtf8Error; -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_relayer_components::chain::traits::types::ibc::HasIbcChainTypes; use hermes_test_components::chain::traits::transfer::amount::IbcTransferredAmountConverter; use hermes_test_components::chain::traits::types::amount::HasAmountType; @@ -17,7 +17,7 @@ impl IbcTransferredAmountConverter for ConvertCosmosIbcAmount where Chain: HasAmountType - + CanRaiseError + + CanRaiseAsyncError + HasIbcChainTypes, Counterparty: HasAmountType, { diff --git a/crates/cosmos/cosmos-test-components/src/chain/impls/types/amount.rs b/crates/cosmos/cosmos-test-components/src/chain/impls/types/amount.rs index 64d888dc3..32b03a555 100644 --- a/crates/cosmos/cosmos-test-components/src/chain/impls/types/amount.rs +++ b/crates/cosmos/cosmos-test-components/src/chain/impls/types/amount.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_test_components::chain::traits::types::amount::{ HasAmountType, ProvideAmountMethods, ProvideAmountType, }; @@ -22,7 +22,7 @@ where impl ProvideAmountMethods for ProvideU128AmountWithDenom where - ChainDriver: HasAmountType + CanRaiseError<&'static str>, + ChainDriver: HasAmountType + CanRaiseAsyncError<&'static str>, { fn add_amount(current: &Amount, amount: &Amount) -> Result { if current.denom != amount.denom { diff --git a/crates/cosmos/cosmos-test-components/src/chain_driver/impls/amount.rs b/crates/cosmos/cosmos-test-components/src/chain_driver/impls/amount.rs index 4d99cc04f..153bb4ede 100644 --- a/crates/cosmos/cosmos-test-components/src/chain_driver/impls/amount.rs +++ b/crates/cosmos/cosmos-test-components/src/chain_driver/impls/amount.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_runtime_components::traits::random::CanGenerateRandom; use hermes_runtime_components::traits::runtime::HasRuntime; use hermes_test_components::chain::traits::types::amount::HasAmountType; @@ -11,7 +11,7 @@ pub struct GenerateRandomAmount; impl RandomAmountGenerator for GenerateRandomAmount where - ChainDriver: HasChainType + HasRuntime + CanRaiseError<&'static str>, + ChainDriver: HasChainType + HasRuntime + CanRaiseAsyncError<&'static str>, ChainDriver::Runtime: CanGenerateRandom, Chain: HasAmountType, { diff --git a/crates/cosmos/cosmos-test-components/src/chain_driver/traits/store_wasm_client.rs b/crates/cosmos/cosmos-test-components/src/chain_driver/traits/store_wasm_client.rs index 3f114fe2a..b46973d95 100644 --- a/crates/cosmos/cosmos-test-components/src/chain_driver/traits/store_wasm_client.rs +++ b/crates/cosmos/cosmos-test-components/src/chain_driver/traits/store_wasm_client.rs @@ -7,7 +7,7 @@ use hermes_runtime_components::traits::runtime::HasRuntimeType; context: ChainDriver, }] #[async_trait] -pub trait CanUploadWasmClientCode: HasRuntimeType + HasErrorType +pub trait CanUploadWasmClientCode: HasRuntimeType + HasAsyncErrorType where Self::Runtime: HasFilePathType, { diff --git a/crates/cosmos/cosmos-wasm-relayer/src/context/chain.rs b/crates/cosmos/cosmos-wasm-relayer/src/context/chain.rs index 10f7ace3b..5707685b5 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/context/chain.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/context/chain.rs @@ -2,8 +2,8 @@ use core::ops::Deref; use std::sync::Arc; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use futures::lock::Mutex; use hermes_any_counterparty::contexts::any_counterparty::AnyCounterparty; diff --git a/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_bootstrap.rs b/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_bootstrap.rs index 31d4ec210..a9c42a98c 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_bootstrap.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_bootstrap.rs @@ -2,8 +2,8 @@ use std::path::PathBuf; use cgp::core::component::UseContext; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::WithField; -use cgp::core::types::impls::WithType; +use cgp::core::field::WithField; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_cosmos_chain_components::types::config::gas::dynamic_gas_config::DynamicGasConfig; use hermes_cosmos_integration_tests::impls::bootstrap::build_cosmos_chain::BuildCosmosChainWithNodeConfig; diff --git a/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_to_wasm_cosmos_relay.rs b/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_to_wasm_cosmos_relay.rs index 23716f38b..46ad51511 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_to_wasm_cosmos_relay.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/context/cosmos_to_wasm_cosmos_relay.rs @@ -2,8 +2,8 @@ use std::collections::BTreeSet; use std::sync::Arc; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::{UseField, WithField}; -use cgp::core::types::impls::WithType; +use cgp::core::field::{UseField, WithField}; +use cgp::core::types::WithType; use cgp::extra::run::CanRun; use cgp::prelude::*; use futures::lock::Mutex; diff --git a/crates/cosmos/cosmos-wasm-relayer/src/context/wasm_cosmos_relay.rs b/crates/cosmos/cosmos-wasm-relayer/src/context/wasm_cosmos_relay.rs index ed6fc69cc..9e408d717 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/context/wasm_cosmos_relay.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/context/wasm_cosmos_relay.rs @@ -2,8 +2,8 @@ use std::collections::BTreeSet; use std::sync::Arc; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::field::impls::use_field::{UseField, WithField}; -use cgp::core::types::impls::WithType; +use cgp::core::field::{UseField, WithField}; +use cgp::core::types::WithType; use cgp::extra::run::CanRun; use cgp::prelude::*; use futures::lock::Mutex; diff --git a/crates/cosmos/cosmos-wasm-relayer/src/impls/create_client_message.rs b/crates/cosmos/cosmos-wasm-relayer/src/impls/create_client_message.rs index 78e9bc65f..80e64cdc0 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/impls/create_client_message.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/impls/create_client_message.rs @@ -1,4 +1,4 @@ -use cgp::core::error::CanRaiseError; +use cgp::core::error::CanRaiseAsyncError; use hermes_cosmos_chain_components::traits::message::{CosmosMessage, ToCosmosMessage}; use hermes_cosmos_chain_components::types::messages::client::create::CosmosCreateClientMessage; use hermes_cosmos_chain_components::types::payloads::client::CosmosCreateClientPayload; @@ -32,7 +32,7 @@ where + HasCreateClientMessageOptionsType< Counterparty, CreateClientMessageOptions = CreateWasmTendermintMessageOptions, - > + CanRaiseError, + > + CanRaiseAsyncError, Counterparty: HasCreateClientPayloadType + HasDefaultEncoding, Encoding: HasEncodedType> diff --git a/crates/cosmos/cosmos-wasm-relayer/src/impls/update_client_message.rs b/crates/cosmos/cosmos-wasm-relayer/src/impls/update_client_message.rs index 085d0dd9c..514e2cd93 100644 --- a/crates/cosmos/cosmos-wasm-relayer/src/impls/update_client_message.rs +++ b/crates/cosmos/cosmos-wasm-relayer/src/impls/update_client_message.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use hermes_cosmos_chain_components::traits::message::{CosmosMessage, ToCosmosMessage}; use hermes_cosmos_chain_components::types::messages::client::update::CosmosUpdateClientMessage; use hermes_cosmos_chain_components::types::payloads::client::CosmosUpdateClientPayload; @@ -18,8 +18,8 @@ pub struct BuildUpdateWasmTendermintClientMessage; impl UpdateClientMessageBuilder for BuildUpdateWasmTendermintClientMessage where - Chain: - HasIbcChainTypes + HasErrorType, + Chain: HasIbcChainTypes + + HasAsyncErrorType, Counterparty: HasUpdateClientPayloadType, { diff --git a/crates/encoding/encoding-components/src/impls/convert.rs b/crates/encoding/encoding-components/src/impls/convert.rs index 410b73f9c..c7f7d8d45 100644 --- a/crates/encoding/encoding-components/src/impls/convert.rs +++ b/crates/encoding/encoding-components/src/impls/convert.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use crate::traits::convert::Converter; @@ -8,7 +8,7 @@ pub struct TryConvertFrom; impl Converter for TryConvertFrom where - Encoding: CanRaiseError, + Encoding: CanRaiseAsyncError, From: Clone + TryInto, { fn convert(_encoding: &Encoding, from: &From) -> Result { @@ -20,7 +20,7 @@ pub struct ConvertFrom; impl Converter for ConvertFrom where - Encoding: HasErrorType, + Encoding: HasAsyncErrorType, From: Clone + Into, { fn convert(_encoding: &Encoding, from: &From) -> Result { @@ -35,7 +35,7 @@ pub struct ConvertVia( impl Converter for ConvertVia where - Encoding: HasErrorType, + Encoding: HasAsyncErrorType, ConvertA: Converter, ConvertB: Converter, { diff --git a/crates/encoding/encoding-components/src/impls/delegate.rs b/crates/encoding/encoding-components/src/impls/delegate.rs index 0e608eb02..7b1376f9a 100644 --- a/crates/encoding/encoding-components/src/impls/delegate.rs +++ b/crates/encoding/encoding-components/src/impls/delegate.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use cgp::core::component::UseDelegate; -use cgp::prelude::{DelegateComponent, HasErrorType}; +use cgp::prelude::{DelegateComponent, HasAsyncErrorType}; use crate::traits::convert::Converter; use crate::traits::decode::Decoder; @@ -17,7 +17,7 @@ use crate::traits::types::schema::HasSchemaType; impl Encoder for UseDelegate where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, Components: DelegateComponent<(Strategy, Value), Delegate = Delegate>, Delegate: Encoder, { @@ -29,7 +29,7 @@ where impl Decoder for UseDelegate where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, Components: DelegateComponent<(Strategy, Value), Delegate = Delegate>, Delegate: Decoder, { @@ -41,7 +41,7 @@ where impl Converter for UseDelegate where - Encoding: HasErrorType, + Encoding: HasAsyncErrorType, Components: DelegateComponent<(From, To), Delegate = Delegate>, Delegate: Converter, { @@ -65,7 +65,7 @@ where impl MutEncoder for UseDelegate where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, Components: DelegateComponent<(Strategy, Value), Delegate = Delegate>, Delegate: MutEncoder, { @@ -81,7 +81,7 @@ where impl MutDecoder for UseDelegate where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, Components: DelegateComponent<(Strategy, Value), Delegate = Delegate>, Delegate: MutDecoder, { diff --git a/crates/encoding/encoding-components/src/impls/encode/return_encoded.rs b/crates/encoding/encoding-components/src/impls/encode/return_encoded.rs index 1c43dad91..f8ef08f6b 100644 --- a/crates/encoding/encoding-components/src/impls/encode/return_encoded.rs +++ b/crates/encoding/encoding-components/src/impls/encode/return_encoded.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use crate::traits::decode::Decoder; use crate::traits::encode::Encoder; @@ -8,7 +8,7 @@ pub struct ReturnEncoded; impl Encoder for ReturnEncoded where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, Value: Clone, { fn encode(_encoding: &Encoding, value: &Value) -> Result { @@ -18,7 +18,7 @@ where impl Decoder for ReturnEncoded where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, Value: Clone, { fn decode(_encoding: &Encoding, value: &Value) -> Result { diff --git a/crates/encoding/encoding-components/src/impls/encode_mut/combine.rs b/crates/encoding/encoding-components/src/impls/encode_mut/combine.rs index 23317f5f6..d7b7617f1 100644 --- a/crates/encoding/encoding-components/src/impls/encode_mut/combine.rs +++ b/crates/encoding/encoding-components/src/impls/encode_mut/combine.rs @@ -12,7 +12,7 @@ pub struct CombineEncoders(pub PhantomData); impl MutEncoder for CombineEncoders> where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, Encoder: MutEncoder, CombineEncoders: MutEncoder, { @@ -30,7 +30,7 @@ where impl MutEncoder for CombineEncoders where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, { fn encode_mut( _encoding: &Encoding, @@ -45,7 +45,7 @@ impl MutDecoder> for CombineEncoders> where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, Encoder: MutDecoder, CombineEncoders: MutDecoder, { @@ -62,7 +62,7 @@ where impl MutDecoder for CombineEncoders where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, { fn decode_mut( _encoding: &Encoding, diff --git a/crates/encoding/encoding-components/src/impls/encode_mut/field.rs b/crates/encoding/encoding-components/src/impls/encode_mut/field.rs index 7c3bc55a1..8a0888e1c 100644 --- a/crates/encoding/encoding-components/src/impls/encode_mut/field.rs +++ b/crates/encoding/encoding-components/src/impls/encode_mut/field.rs @@ -2,7 +2,7 @@ use core::marker::PhantomData; use cgp::core::component::UseContext; use cgp::core::field::FieldGetter; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use crate::traits::encode_mut::MutEncoder; use crate::traits::types::encode_buffer::HasEncodeBufferType; @@ -14,7 +14,7 @@ pub struct EncodeFieldWithGetter(pub PhantomData<(Getter impl MutEncoder for EncodeFieldWithGetter where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, InEncoder: MutEncoder, Getter: FieldGetter, { diff --git a/crates/encoding/encoding-components/src/impls/encode_mut/from.rs b/crates/encoding/encoding-components/src/impls/encode_mut/from.rs index 142cd1d34..5db93f741 100644 --- a/crates/encoding/encoding-components/src/impls/encode_mut/from.rs +++ b/crates/encoding/encoding-components/src/impls/encode_mut/from.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use crate::traits::decode_mut::MutDecoder; use crate::traits::transform::Transformer; @@ -11,7 +11,7 @@ pub struct DecodeFrom(pub PhantomData<(Transform, InDecode impl MutDecoder for DecodeFrom where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, InDecoder: MutDecoder, Transform: Transformer, { diff --git a/crates/encoding/encoding-components/src/impls/encode_mut/pair.rs b/crates/encoding/encoding-components/src/impls/encode_mut/pair.rs index 170e49ced..16b390f43 100644 --- a/crates/encoding/encoding-components/src/impls/encode_mut/pair.rs +++ b/crates/encoding/encoding-components/src/impls/encode_mut/pair.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use cgp::core::component::UseContext; -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use crate::traits::decode_mut::MutDecoder; use crate::traits::encode_mut::MutEncoder; @@ -15,7 +15,7 @@ pub type EncodeCons = EncoderPair; impl MutEncoder for EncoderPair where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncoderA: MutEncoder, EncoderB: MutEncoder, { @@ -34,7 +34,7 @@ where impl MutDecoder for EncoderPair where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, EncoderA: MutDecoder, EncoderB: MutDecoder, { diff --git a/crates/encoding/encoding-components/src/impls/encode_mut/unit.rs b/crates/encoding/encoding-components/src/impls/encode_mut/unit.rs index a69a020b7..3cf299be6 100644 --- a/crates/encoding/encoding-components/src/impls/encode_mut/unit.rs +++ b/crates/encoding/encoding-components/src/impls/encode_mut/unit.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use crate::traits::decode_mut::MutDecoder; use crate::traits::encode_mut::MutEncoder; @@ -9,7 +9,7 @@ pub struct EncodeNothing; impl MutEncoder for EncodeNothing where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, { fn encode_mut( _encoding: &Encoding, @@ -22,7 +22,7 @@ where impl MutDecoder for EncodeNothing where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, { fn decode_mut( _encoding: &Encoding, diff --git a/crates/encoding/encoding-components/src/traits/convert.rs b/crates/encoding/encoding-components/src/traits/convert.rs index 46f558471..c2384f6e7 100644 --- a/crates/encoding/encoding-components/src/traits/convert.rs +++ b/crates/encoding/encoding-components/src/traits/convert.rs @@ -4,7 +4,7 @@ use cgp::prelude::*; provider: Converter, context: Encoding, }] -pub trait CanConvert: HasErrorType { +pub trait CanConvert: HasAsyncErrorType { fn convert(&self, from: &From) -> Result; } diff --git a/crates/encoding/encoding-components/src/traits/decode.rs b/crates/encoding/encoding-components/src/traits/decode.rs index f765835e1..41bc6cc03 100644 --- a/crates/encoding/encoding-components/src/traits/decode.rs +++ b/crates/encoding/encoding-components/src/traits/decode.rs @@ -6,6 +6,6 @@ use crate::traits::types::encoded::HasEncodedType; provider: Decoder, context: Encoding, }] -pub trait CanDecode: HasEncodedType + HasErrorType { +pub trait CanDecode: HasEncodedType + HasAsyncErrorType { fn decode(&self, encoded: &Self::Encoded) -> Result; } diff --git a/crates/encoding/encoding-components/src/traits/decode_mut.rs b/crates/encoding/encoding-components/src/traits/decode_mut.rs index f1289ec37..9ff18f194 100644 --- a/crates/encoding/encoding-components/src/traits/decode_mut.rs +++ b/crates/encoding/encoding-components/src/traits/decode_mut.rs @@ -6,7 +6,7 @@ use crate::traits::types::decode_buffer::HasDecodeBufferType; provider: MutDecoder, context: Encoding, }] -pub trait CanDecodeMut: HasDecodeBufferType + HasErrorType { +pub trait CanDecodeMut: HasDecodeBufferType + HasAsyncErrorType { fn decode_mut<'a>(&self, buffer: &mut Self::DecodeBuffer<'a>) -> Result; } diff --git a/crates/encoding/encoding-components/src/traits/encode.rs b/crates/encoding/encoding-components/src/traits/encode.rs index 6fdd7d0c1..64b0ef14f 100644 --- a/crates/encoding/encoding-components/src/traits/encode.rs +++ b/crates/encoding/encoding-components/src/traits/encode.rs @@ -6,6 +6,6 @@ use crate::traits::types::encoded::HasEncodedType; provider: Encoder, context: Encoding, }] -pub trait CanEncode: HasEncodedType + HasErrorType { +pub trait CanEncode: HasEncodedType + HasAsyncErrorType { fn encode(&self, value: &Value) -> Result; } diff --git a/crates/encoding/encoding-components/src/traits/encode_and_decode_mut.rs b/crates/encoding/encoding-components/src/traits/encode_and_decode_mut.rs index 82f406ed6..34ac836fe 100644 --- a/crates/encoding/encoding-components/src/traits/encode_and_decode_mut.rs +++ b/crates/encoding/encoding-components/src/traits/encode_and_decode_mut.rs @@ -1,4 +1,4 @@ -use cgp::core::error::HasErrorType; +use cgp::core::error::HasAsyncErrorType; use crate::traits::decode_mut::{CanDecodeMut, MutDecoder}; use crate::traits::encode_mut::{CanEncodeMut, MutEncoder}; @@ -18,7 +18,7 @@ impl CanEncodeAndDecodeMut for Encod pub trait MutEncoderAndDecoder: MutEncoder + MutDecoder where - Encoding: HasEncodeBufferType + HasDecodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasDecodeBufferType + HasAsyncErrorType, { } @@ -26,6 +26,6 @@ impl MutEncoderAndDecoder + MutDecoder, - Encoding: HasEncodeBufferType + HasDecodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasDecodeBufferType + HasAsyncErrorType, { } diff --git a/crates/encoding/encoding-components/src/traits/encode_mut.rs b/crates/encoding/encoding-components/src/traits/encode_mut.rs index 35ee44426..4a3dbd1a8 100644 --- a/crates/encoding/encoding-components/src/traits/encode_mut.rs +++ b/crates/encoding/encoding-components/src/traits/encode_mut.rs @@ -6,7 +6,7 @@ use crate::traits::types::encode_buffer::HasEncodeBufferType; provider: MutEncoder, context: Encoding, }] -pub trait CanEncodeMut: HasEncodeBufferType + HasErrorType { +pub trait CanEncodeMut: HasEncodeBufferType + HasAsyncErrorType { fn encode_mut(&self, value: &Value, buffer: &mut Self::EncodeBuffer) -> Result<(), Self::Error>; } diff --git a/crates/encoding/protobuf-encoding-components/src/impls/any.rs b/crates/encoding/protobuf-encoding-components/src/impls/any.rs index d8268f25e..3da01fbb4 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/any.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/any.rs @@ -23,7 +23,7 @@ pub struct DecodeAsAnyProtobuf(pub PhantomData<(InStrateg impl Encoder for EncodeAsAnyProtobuf where - Encoding: HasEncodedType> + HasSchema + HasErrorType, + Encoding: HasEncodedType> + HasSchema + HasAsyncErrorType, InEncoder: Encoder, Encoding::Schema: Display, Self: Converter, @@ -38,7 +38,7 @@ where impl Converter for EncodeAsAnyProtobuf where - Encoding: HasEncodedType> + HasSchema + HasErrorType, + Encoding: HasEncodedType> + HasSchema + HasAsyncErrorType, InEncoder: Encoder, Encoding::Schema: Display, InStrategy: Async, @@ -59,7 +59,7 @@ where impl Decoder for DecodeAsAnyProtobuf where - Encoding: HasEncodedType> + CanRaiseError, + Encoding: HasEncodedType> + CanRaiseAsyncError, Self: Converter, { fn decode(encoding: &Encoding, encoded: &Vec) -> Result { @@ -72,8 +72,9 @@ where impl Converter for DecodeAsAnyProtobuf where - Encoding: - HasEncodedType> + HasSchema + CanRaiseError, + Encoding: HasEncodedType> + + HasSchema + + CanRaiseAsyncError, InEncoder: Decoder, Encoding::Schema: Display, InStrategy: Async, diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode/buffer.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode/buffer.rs index 3add06fc1..fcd00098f 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode/buffer.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode/buffer.rs @@ -1,4 +1,3 @@ -use cgp::prelude::HasErrorType; use hermes_encoding_components::traits::decode::Decoder; use hermes_encoding_components::traits::decode_mut::CanDecodeMut; use hermes_encoding_components::traits::encode::Encoder; @@ -32,10 +31,7 @@ where + HasProtoChunksDecodeBuffer + CanDecodeMut, { - fn decode( - encoding: &Encoding, - buffer: &Vec, - ) -> Result::Error> { + fn decode(encoding: &Encoding, buffer: &Vec) -> Result { let mut chunks = Encoding::decode_protochunks(&mut buffer.as_ref())?; encoding.decode_mut(&mut chunks) diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/chunk.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/chunk.rs index e878285c1..72ec09e7b 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/chunk.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/chunk.rs @@ -1,7 +1,7 @@ use core::array::TryFromSliceError; use std::collections::BTreeMap; -use cgp::prelude::{CanRaiseError, HasErrorType}; +use cgp::prelude::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::traits::types::decode_buffer::HasDecodeBufferType; use prost::bytes::Buf; use prost::encoding::{decode_key, decode_varint, WireType}; @@ -28,11 +28,11 @@ pub struct InvalidWireType { pub actual: WireType, } -pub trait CanDecodeProtoChunks: HasErrorType { +pub trait CanDecodeProtoChunks: HasAsyncErrorType { fn decode_protochunks<'a>(buffer: &mut &'a [u8]) -> Result, Self::Error>; } -pub trait CanDecodeProtoChunk: HasErrorType { +pub trait CanDecodeProtoChunk: HasAsyncErrorType { fn decode_protochunk<'a>(buffer: &mut &'a [u8]) -> Result<(u32, ProtoChunk<'a>), Self::Error>; } @@ -85,9 +85,9 @@ where impl CanDecodeProtoChunk for Encoding where - Encoding: CanRaiseError - + CanRaiseError - + CanRaiseError, + Encoding: CanRaiseAsyncError + + CanRaiseAsyncError + + CanRaiseAsyncError, { fn decode_protochunk<'a>( buffer: &mut &'a [u8], diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/message.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/message.rs index be8529a06..690de923d 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/message.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/message.rs @@ -1,4 +1,4 @@ -use cgp::prelude::{CanRaiseError, HasErrorType}; +use cgp::prelude::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::traits::decode_mut::MutDecoder; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; @@ -16,7 +16,7 @@ pub struct EncodeProstMessage; impl MutEncoder for EncodeProstMessage where Value: Message, - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, { fn encode_mut( _encoding: &Encoding, @@ -32,7 +32,7 @@ where impl MutDecoder for EncodeProstMessage where Value: Message + Default, - Encoding: CanDecodeProtoChunks + HasProtoChunksDecodeBuffer + CanRaiseError, + Encoding: CanDecodeProtoChunks + HasProtoChunksDecodeBuffer + CanRaiseAsyncError, { fn decode_mut( _encoding: &Encoding, diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/option.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/option.rs index cfd492974..213b91b41 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/option.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/option.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; @@ -9,7 +9,7 @@ pub struct EncodeOption(pub PhantomData); impl MutEncoder> for EncodeOption where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, InEncoder: MutEncoder, { fn encode_mut( diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/bytes.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/bytes.rs index 7d14ef2ef..3272abd60 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/bytes.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/bytes.rs @@ -12,7 +12,7 @@ pub struct EncodeByteField; impl MutEncoder for EncodeByteField where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, EncodeLengthDelimitedHeader: MutEncoder, Value: AsRef<[u8]>, { @@ -39,8 +39,8 @@ impl MutDecoder where Encoding: HasProtoChunksDecodeBuffer - + CanRaiseError - + for<'a> CanRaiseError<>::Error>, + + CanRaiseAsyncError + + for<'a> CanRaiseAsyncError<>::Error>, Value: Default + for<'a> TryFrom<&'a [u8]>, { fn decode_mut( diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_optional.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_optional.rs index bfa4a15d7..28eb892a5 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_optional.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_optional.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_encoding_components::traits::decode_mut::MutDecoder; use crate::impls::encode_mut::chunk::{ @@ -12,7 +12,8 @@ pub struct DecodeProtoOptionalField(pub PhantomData MutDecoder for DecodeProtoOptionalField where - Encoding: CanDecodeProtoChunks + HasProtoChunksDecodeBuffer + CanRaiseError, + Encoding: + CanDecodeProtoChunks + HasProtoChunksDecodeBuffer + CanRaiseAsyncError, InEncoder: MutDecoder, Value: Default, { diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_required.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_required.rs index ae9b5e9d7..51273b8c1 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_required.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/decode_required.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_encoding_components::traits::decode_mut::MutDecoder; use crate::impls::encode_mut::chunk::{ @@ -19,8 +19,8 @@ impl MutDecoder - + CanRaiseError, + + CanRaiseAsyncError + + CanRaiseAsyncError, InEncoder: MutDecoder, { fn decode_mut( diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode.rs index 32c83692e..0c543d0eb 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; @@ -11,7 +11,7 @@ pub struct EncodeLengthDelimitedProtoField(pub Phanto impl MutEncoder for EncodeLengthDelimitedProtoField where - Encoding: HasEncodeBufferType> + HasErrorType, + Encoding: HasEncodeBufferType> + HasAsyncErrorType, InEncoder: MutEncoder, EncodeLengthDelimitedHeader: MutEncoder, { diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode_len.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode_len.rs index 5f231604c..a70415cd9 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode_len.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/encode_len.rs @@ -1,6 +1,6 @@ use core::marker::PhantomData; -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; use prost::bytes::BufMut; @@ -13,7 +13,7 @@ pub struct EncodeProtoFieldWithKnownLength(pub Phanto impl MutEncoder for EncodeProtoFieldWithKnownLength where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, Encoding::EncodeBuffer: BufMut, InEncoder: MutEncoder + EncodedLengthGetter, diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/length_delim.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/length_delim.rs index 7892192c8..d35eea1cf 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/length_delim.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/length_delim.rs @@ -1,4 +1,4 @@ -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; use prost::bytes::BufMut; @@ -9,7 +9,7 @@ pub struct EncodeLengthDelimitedHeader; impl MutEncoder for EncodeLengthDelimitedHeader where - Encoding: HasEncodeBufferType + HasErrorType, + Encoding: HasEncodeBufferType + HasAsyncErrorType, { fn encode_mut( _encoding: &Encoding, diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/string.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/string.rs index 8884914b7..c552fd1ab 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/string.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/string.rs @@ -19,7 +19,7 @@ delegate_components! { impl MutDecoder for EncodeStringField where - Encoding: HasDecodeBufferType + HasErrorType, + Encoding: HasDecodeBufferType + HasAsyncErrorType, EncodeByteField: MutDecoder, { fn decode_mut( diff --git a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/u64.rs b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/u64.rs index e855d92f0..68050129c 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/u64.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/encode_mut/proto_field/u64.rs @@ -1,4 +1,4 @@ -use cgp::prelude::CanRaiseError; +use cgp::prelude::CanRaiseAsyncError; use hermes_encoding_components::traits::decode_mut::MutDecoder; use hermes_encoding_components::traits::encode_mut::MutEncoder; use hermes_encoding_components::traits::types::encode_buffer::HasEncodeBufferType; @@ -12,7 +12,7 @@ pub struct EncodeU64ProtoField; impl MutEncoder for EncodeU64ProtoField where - Encoding: HasEncodeBufferType + CanRaiseError, + Encoding: HasEncodeBufferType + CanRaiseAsyncError, Value: Clone + TryInto, { fn encode_mut( @@ -34,8 +34,9 @@ where impl MutDecoder for EncodeU64ProtoField where - Encoding: - HasProtoChunksDecodeBuffer + CanRaiseError + CanRaiseError, + Encoding: HasProtoChunksDecodeBuffer + + CanRaiseAsyncError + + CanRaiseAsyncError, Value: TryFrom, { fn decode_mut( diff --git a/crates/encoding/protobuf-encoding-components/src/impls/protobuf.rs b/crates/encoding/protobuf-encoding-components/src/impls/protobuf.rs index 75fbfc3bd..5565dc13b 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/protobuf.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/protobuf.rs @@ -1,4 +1,4 @@ -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; use hermes_encoding_components::traits::decode::Decoder; use hermes_encoding_components::traits::encode::Encoder; use hermes_encoding_components::traits::types::encoded::HasEncodedType; @@ -9,7 +9,7 @@ pub struct EncodeAsProtobuf; impl Encoder for EncodeAsProtobuf where Value: Message, - Encoding: HasEncodedType> + HasErrorType, + Encoding: HasEncodedType> + HasAsyncErrorType, { fn encode(_encoding: &Encoding, value: &Value) -> Result, Encoding::Error> { Ok(value.encode_to_vec()) @@ -19,7 +19,7 @@ where impl Decoder for EncodeAsProtobuf where Value: Message + Default, - Encoding: HasEncodedType> + CanRaiseError, + Encoding: HasEncodedType> + CanRaiseAsyncError, { fn decode(_encoding: &Encoding, encoded: &Vec) -> Result { let decoded = Message::decode(encoded.as_ref()).map_err(Encoding::raise_error)?; diff --git a/crates/encoding/protobuf-encoding-components/src/impls/via_any.rs b/crates/encoding/protobuf-encoding-components/src/impls/via_any.rs index 81bb6236d..9f63c22d2 100644 --- a/crates/encoding/protobuf-encoding-components/src/impls/via_any.rs +++ b/crates/encoding/protobuf-encoding-components/src/impls/via_any.rs @@ -13,7 +13,7 @@ pub struct EncodeViaAny(pub PhantomData); impl Encoder for EncodeViaAny where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, EncodeAsAnyProtobuf: Encoder, InStrategy: Async, { @@ -25,7 +25,7 @@ where impl Decoder for EncodeViaAny where - Encoding: HasEncodedType + HasErrorType, + Encoding: HasEncodedType + HasAsyncErrorType, DecodeAsAnyProtobuf: Decoder, InStrategy: Async, { diff --git a/crates/error/src/handlers/debug.rs b/crates/error/src/handlers/debug.rs index a62773907..40627ef24 100644 --- a/crates/error/src/handlers/debug.rs +++ b/crates/error/src/handlers/debug.rs @@ -1,7 +1,7 @@ use alloc::sync::Arc; use core::fmt::Debug; -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; use eyre::eyre; use crate::types::{Error, ErrorDetail}; @@ -13,7 +13,7 @@ pub type DebugError = DebugErrorWithRetry; impl ErrorRaiser for DebugErrorWithRetry where - Context: HasErrorType, + Context: HasAsyncErrorType, E: Debug, { fn raise_error(e: E) -> Error { diff --git a/crates/error/src/handlers/display.rs b/crates/error/src/handlers/display.rs index dd12535f2..5dbd7e87d 100644 --- a/crates/error/src/handlers/display.rs +++ b/crates/error/src/handlers/display.rs @@ -1,7 +1,7 @@ use alloc::sync::Arc; use core::fmt::Display; -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; use eyre::eyre; use crate::types::{Error, ErrorDetail}; @@ -13,7 +13,7 @@ pub type DisplayError = DisplayErrorWithRetry; impl ErrorRaiser for DisplayErrorWithRetry where - Context: HasErrorType, + Context: HasAsyncErrorType, E: Display, { fn raise_error(e: E) -> Error { diff --git a/crates/error/src/handlers/identity.rs b/crates/error/src/handlers/identity.rs index c154e9f54..34302de2d 100644 --- a/crates/error/src/handlers/identity.rs +++ b/crates/error/src/handlers/identity.rs @@ -1,4 +1,4 @@ -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; use crate::types::Error; @@ -6,7 +6,7 @@ pub struct ReturnError; impl ErrorRaiser for ReturnError where - Context: HasErrorType, + Context: HasAsyncErrorType, { fn raise_error(e: Error) -> Error { e diff --git a/crates/error/src/handlers/infallible.rs b/crates/error/src/handlers/infallible.rs index ac99954e1..f686934f3 100644 --- a/crates/error/src/handlers/infallible.rs +++ b/crates/error/src/handlers/infallible.rs @@ -1,12 +1,12 @@ use core::convert::Infallible; -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; pub struct HandleInfallible; impl ErrorRaiser for HandleInfallible where - Context: HasErrorType, + Context: HasAsyncErrorType, { fn raise_error(e: Infallible) -> Context::Error { match e {} diff --git a/crates/error/src/handlers/report.rs b/crates/error/src/handlers/report.rs index 4e1dbccf5..deaec9c7a 100644 --- a/crates/error/src/handlers/report.rs +++ b/crates/error/src/handlers/report.rs @@ -1,6 +1,6 @@ use alloc::sync::Arc; -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; use eyre::Report; use crate::types::{Error, ErrorDetail}; @@ -12,7 +12,7 @@ pub type ReportError = ReportErrorWithRetry; impl ErrorRaiser for ReportErrorWithRetry where - Context: HasErrorType, + Context: HasAsyncErrorType, Report: From, { fn raise_error(e: E) -> Error { diff --git a/crates/error/src/handlers/wrap.rs b/crates/error/src/handlers/wrap.rs index 6564b9e44..d7569557e 100644 --- a/crates/error/src/handlers/wrap.rs +++ b/crates/error/src/handlers/wrap.rs @@ -2,7 +2,7 @@ use alloc::format; use alloc::sync::Arc; use core::fmt::Debug; -use cgp::core::error::{ErrorRaiser, HasErrorType}; +use cgp::core::error::{ErrorRaiser, HasAsyncErrorType}; use crate::traits::wrap::WrapError; use crate::types::{Error, ErrorDetail}; @@ -11,7 +11,7 @@ pub struct WrapErrorDetail; impl ErrorRaiser> for WrapErrorDetail where - Context: HasErrorType, + Context: HasAsyncErrorType, Detail: Debug, { fn raise_error(WrapError { detail, error }: WrapError) -> Error { diff --git a/crates/error/src/impls.rs b/crates/error/src/impls.rs index d76bc4bbd..12a601bc7 100644 --- a/crates/error/src/impls.rs +++ b/crates/error/src/impls.rs @@ -1,5 +1,5 @@ -use cgp::core::error::{ErrorTypeComponent, HasErrorType}; -use cgp::core::types::impls::WithType; +use cgp::core::error::{ErrorTypeComponent, HasAsyncErrorType}; +use cgp::core::types::WithType; use cgp::prelude::*; use hermes_relayer_components::error::traits::retry::ProvideRetryableError; @@ -15,7 +15,7 @@ delegate_components! { impl ProvideRetryableError for ProvideHermesError where - Context: HasErrorType, + Context: HasAsyncErrorType, { fn is_retryable_error(e: &Error) -> bool { e.is_retryable diff --git a/crates/error/src/traits/wrap.rs b/crates/error/src/traits/wrap.rs index 74c62c6b5..5b2339436 100644 --- a/crates/error/src/traits/wrap.rs +++ b/crates/error/src/traits/wrap.rs @@ -1,17 +1,17 @@ -use cgp::core::error::{CanRaiseError, HasErrorType}; +use cgp::core::error::{CanRaiseAsyncError, HasAsyncErrorType}; pub struct WrapError { pub detail: Detail, pub error: Error, } -pub trait CanWrapError: HasErrorType { +pub trait CanWrapError: HasAsyncErrorType { fn wrap_error(detail: Detail, error: Self::Error) -> Self::Error; } impl CanWrapError for Context where - Context: HasErrorType + CanRaiseError>, + Context: HasAsyncErrorType + CanRaiseAsyncError>, { fn wrap_error(detail: Detail, error: Self::Error) -> Self::Error { Context::raise_error(WrapError { detail, error }) diff --git a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/no_replay.rs b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/no_replay.rs index 5389cebb5..3c6bf3105 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/no_replay.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/no_replay.rs @@ -32,7 +32,7 @@ impl IncomingPacketHandler for DisallowDoubleReceive where Chain: CanQueryHasPacketReceived - + for<'a> CanRaiseError>, + + for<'a> CanRaiseAsyncError>, Counterparty: HasCommitmentProofType + HasPacketHeader + HasPacketNonce diff --git a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/payloads.rs b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/payloads.rs index 045282c13..967b019fc 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/payloads.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/payloads.rs @@ -18,7 +18,7 @@ pub struct HandleIncomingPacketPayloads(pub PhantomData); impl IncomingPacketHandler for HandleIncomingPacketPayloads where - Chain: HasErrorType + CanHandleIncomingPayload, + Chain: HasAsyncErrorType + CanHandleIncomingPayload, Counterparty: HasCommitmentProofType + HasPacketType + HasPacketHeader diff --git a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/timeout.rs b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/timeout.rs index 27f57d882..40c09e93a 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/timeout.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/timeout.rs @@ -32,7 +32,7 @@ impl IncomingPacketHandler where Chain: CanQueryCurrentTime + CanCompareTimeoutTime - + for<'a> CanRaiseError>, + + for<'a> CanRaiseAsyncError>, Counterparty: HasCommitmentProofType + HasPacketHeader + HasPacketTimeout, InHandler: IncomingPacketHandler, diff --git a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/verify_commitment.rs b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/verify_commitment.rs index d90a845c4..8daf7059a 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/verify_commitment.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/incoming/packet/verify_commitment.rs @@ -23,7 +23,7 @@ impl IncomingPacketHandler for VerifySendPacketCommitmentProof where Chain: CanQueryConsensusState - + CanRaiseError + + CanRaiseAsyncError + CanQueryClientIdFromChannelId, Counterparty: HasHeightType + HasCommitmentProofHeight diff --git a/crates/ibc/ibc-components/src/impls/handlers/incoming/payload/convert.rs b/crates/ibc/ibc-components/src/impls/handlers/incoming/payload/convert.rs index 43648bd14..4021ddc5b 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/incoming/payload/convert.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/incoming/payload/convert.rs @@ -16,7 +16,7 @@ pub struct ConvertAndHandlePayload(pub PhantomData<(InApp, InH impl IncomingPayloadHandler for ConvertAndHandlePayload where - Chain: HasEncoding + CanRaiseError>, + Chain: HasEncoding + CanRaiseAsyncError>, Counterparty: HasPacketHeaderType + HasPayloadHeaderType + HasPayloadDataType diff --git a/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/convert.rs b/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/convert.rs index 71d16470c..7e4a2f3c5 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/convert.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/convert.rs @@ -27,7 +27,7 @@ impl< PayloadData, > IbcMessageHandler for ConvertAndHandleIbcMessage where - Chain: HasErrorType + Chain: HasAsyncErrorType + HasPacketHeaderType + HasIbcMessageHeaderType + HasIbcMessageType @@ -36,7 +36,7 @@ where + HasPayloadDataType + HasPayloadHeaderType + HasEncoding - + CanRaiseError>, + + CanRaiseAsyncError>, InHandler: IbcMessageHandler, Chain::Encoding: CanConvert + CanConvert + Clone, diff --git a/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/validate_header.rs b/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/validate_header.rs index ef8c616cc..c63103b25 100644 --- a/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/validate_header.rs +++ b/crates/ibc/ibc-components/src/impls/handlers/outgoing/message/validate_header.rs @@ -43,7 +43,7 @@ where impl IbcMessageHandler for ValidateHeaderAppIds where - Chain: HasErrorType + Chain: HasAsyncErrorType + HasPacketHeaderType + HasIbcMessageHeaderType + HasIbcMessageType @@ -51,8 +51,8 @@ where + HasPayloadDataType + HasIbcMessageAppIds + HasPayloadAppIds - + for<'a> CanRaiseError> - + for<'a> CanRaiseError>, + + for<'a> CanRaiseAsyncError> + + for<'a> CanRaiseAsyncError>, Counterparty: HasAppIdType, InHandler: IbcMessageHandler, Chain::AppId: Eq, diff --git a/crates/ibc/ibc-components/src/traits/builders/packet.rs b/crates/ibc/ibc-components/src/traits/builders/packet.rs index 1aa605272..68bb81b7c 100644 --- a/crates/ibc/ibc-components/src/traits/builders/packet.rs +++ b/crates/ibc/ibc-components/src/traits/builders/packet.rs @@ -17,7 +17,7 @@ pub trait CanBuildPacket: + HasPacketHeaderType + HasPacketNonceType + HasPayloadType - + HasErrorType + + HasAsyncErrorType { fn build_packet( packet_header: &Self::PacketHeader, diff --git a/crates/ibc/ibc-components/src/traits/builders/payload.rs b/crates/ibc/ibc-components/src/traits/builders/payload.rs index 8d5d7f701..5ed480c17 100644 --- a/crates/ibc/ibc-components/src/traits/builders/payload.rs +++ b/crates/ibc/ibc-components/src/traits/builders/payload.rs @@ -1,4 +1,4 @@ -use cgp::prelude::HasErrorType; +use cgp::prelude::HasAsyncErrorType; use crate::traits::types::payload::data::HasPayloadDataType; use crate::traits::types::payload::header::HasPayloadHeaderType; @@ -8,7 +8,7 @@ pub trait CanBuildPayload: HasPayloadType + HasPayloadHeaderType + HasPayloadDataType - + HasErrorType + + HasAsyncErrorType { fn build_payload( header: Self::PayloadHeader, diff --git a/crates/ibc/ibc-components/src/traits/commitment/path/receive_packet.rs b/crates/ibc/ibc-components/src/traits/commitment/path/receive_packet.rs index 07cc7b859..4e09e2d1d 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/path/receive_packet.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/path/receive_packet.rs @@ -10,7 +10,7 @@ use crate::types::tags::commitment::receive::ReceivePacket; context: Chain, }] pub trait CanBuildReceivePacketCommitmentPath: - HasCommitmentPathType + HasChannelIdType + HasErrorType + HasCommitmentPathType + HasChannelIdType + HasAsyncErrorType where Counterparty: HasChannelIdType + HasPacketNonceType, { diff --git a/crates/ibc/ibc-components/src/traits/commitment/path/send_packet.rs b/crates/ibc/ibc-components/src/traits/commitment/path/send_packet.rs index 9c4a6fc83..e37b529a2 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/path/send_packet.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/path/send_packet.rs @@ -13,7 +13,7 @@ pub trait CanBuildSendPacketCommitmentPath: HasChannelIdType + HasPacketNonceType + HasCommitmentPathType - + HasErrorType + + HasAsyncErrorType where Counterparty: HasChannelIdType, { diff --git a/crates/ibc/ibc-components/src/traits/commitment/store.rs b/crates/ibc/ibc-components/src/traits/commitment/store.rs index 57c61da26..6f67a7400 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/store.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/store.rs @@ -9,7 +9,7 @@ use crate::traits::types::commitment::value::HasCommitmentValueType; }] #[async_trait] pub trait CanStoreCommitment: - HasCommitmentPathType + HasCommitmentValueType + HasErrorType + HasCommitmentPathType + HasCommitmentValueType + HasAsyncErrorType { async fn store_commitment( &mut self, diff --git a/crates/ibc/ibc-components/src/traits/commitment/value/receive_packet.rs b/crates/ibc/ibc-components/src/traits/commitment/value/receive_packet.rs index 7e3efcd4d..7e00fe99c 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/value/receive_packet.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/value/receive_packet.rs @@ -9,7 +9,7 @@ use crate::types::tags::commitment::receive::ReceivePacket; context: Chain, }] pub trait CanBuildReceivePacketCommitmentValue: - HasCommitmentValueType + HasErrorType + HasCommitmentValueType + HasAsyncErrorType where Counterparty: HasPacketType, { diff --git a/crates/ibc/ibc-components/src/traits/commitment/value/send_packet.rs b/crates/ibc/ibc-components/src/traits/commitment/value/send_packet.rs index da6481bb1..1d5cecda1 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/value/send_packet.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/value/send_packet.rs @@ -9,7 +9,7 @@ use crate::types::tags::commitment::send::SendPacket; context: Chain, }] pub trait CanBuildSendPacketCommitmentValue: - HasPacketType + HasCommitmentValueType + HasErrorType + HasPacketType + HasCommitmentValueType + HasAsyncErrorType { // Note: this may be called by the counterparty chain, thus the lack of access to &self. fn build_send_packet_commitment_value( diff --git a/crates/ibc/ibc-components/src/traits/commitment/verify.rs b/crates/ibc/ibc-components/src/traits/commitment/verify.rs index 3d385df1f..7c4527942 100644 --- a/crates/ibc/ibc-components/src/traits/commitment/verify.rs +++ b/crates/ibc/ibc-components/src/traits/commitment/verify.rs @@ -11,7 +11,7 @@ use crate::traits::types::commitment::value::HasCommitmentValueType; context: Chain, }] pub trait CanVerifyCommitment: - HasErrorType + HasAsyncErrorType + HasCommitmentPathType + HasCommitmentValueType + HasCommitmentProofType diff --git a/crates/ibc/ibc-components/src/traits/handlers/incoming/packet.rs b/crates/ibc/ibc-components/src/traits/handlers/incoming/packet.rs index 6caa7275a..996e0f6d1 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/incoming/packet.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/incoming/packet.rs @@ -9,7 +9,7 @@ use crate::types::tags::commitment::send::SendPacket; context: Chain, }] #[async_trait] -pub trait CanHandleIncomingPacket: Sized + Async + HasErrorType +pub trait CanHandleIncomingPacket: Sized + Async + HasAsyncErrorType where Counterparty: HasCommitmentProofType + HasPacketType, { diff --git a/crates/ibc/ibc-components/src/traits/handlers/incoming/payload.rs b/crates/ibc/ibc-components/src/traits/handlers/incoming/payload.rs index 9cb4249c9..ca5237751 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/incoming/payload.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/incoming/payload.rs @@ -10,7 +10,7 @@ use crate::traits::types::payload::header::HasPayloadHeaderType; context: Chain, }] #[async_trait] -pub trait CanHandleIncomingPayload: Sized + Async + HasErrorType +pub trait CanHandleIncomingPayload: Sized + Async + HasAsyncErrorType where Counterparty: HasPacketHeaderType + HasPayloadHeaderType + HasPayloadDataType, @@ -27,7 +27,7 @@ where impl IncomingPayloadHandler for UseDelegate where - Chain: Async + HasErrorType, + Chain: Async + HasAsyncErrorType, Counterparty: HasPacketHeaderType + HasPayloadHeaderType + HasPayloadDataType, Components: DelegateComponent, diff --git a/crates/ibc/ibc-components/src/traits/handlers/outgoing/message.rs b/crates/ibc/ibc-components/src/traits/handlers/outgoing/message.rs index 80a28c7f8..70e5675d3 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/outgoing/message.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/outgoing/message.rs @@ -13,7 +13,7 @@ use crate::traits::types::payload::header::HasPayloadHeaderType; }] #[async_trait] pub trait CanHandleIbcMessage: - HasErrorType + HasAsyncErrorType + HasPacketHeaderType + HasIbcMessageHeaderType + HasIbcMessageType @@ -49,7 +49,7 @@ where impl IbcMessageHandler for UseDelegate where - Chain: HasErrorType + Chain: HasAsyncErrorType + HasPacketHeaderType + HasIbcMessageHeaderType + HasIbcMessageType diff --git a/crates/ibc/ibc-components/src/traits/handlers/outgoing/packet.rs b/crates/ibc/ibc-components/src/traits/handlers/outgoing/packet.rs index a369cfe82..4663fa98b 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/outgoing/packet.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/outgoing/packet.rs @@ -15,7 +15,7 @@ pub trait CanSendPacket: HasPacketHeaderType + HasPayloadType + HasPacketType - + HasErrorType + + HasAsyncErrorType { async fn send_packet( &mut self, diff --git a/crates/ibc/ibc-components/src/traits/handlers/outgoing/permission.rs b/crates/ibc/ibc-components/src/traits/handlers/outgoing/permission.rs index 925dcb498..77b8913ce 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/outgoing/permission.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/outgoing/permission.rs @@ -16,7 +16,7 @@ use crate::traits::types::payload::header::HasPayloadHeaderType; }] #[async_trait] pub trait CanCheckSendPayloadPermission: - HasErrorType + HasAddressType + HasPayloadHeaderType + HasAsyncErrorType + HasAddressType + HasPayloadHeaderType { async fn check_send_payload_permission( &self, diff --git a/crates/ibc/ibc-components/src/traits/handlers/outgoing/transaction.rs b/crates/ibc/ibc-components/src/traits/handlers/outgoing/transaction.rs index e75b3992c..01d625364 100644 --- a/crates/ibc/ibc-components/src/traits/handlers/outgoing/transaction.rs +++ b/crates/ibc/ibc-components/src/traits/handlers/outgoing/transaction.rs @@ -9,7 +9,7 @@ use crate::traits::types::transaction::HasIbcTransactionType; }] #[async_trait] pub trait CanHandleIbcTransaction: - HasErrorType + HasIbcTransactionType + HasPacketType + HasAsyncErrorType + HasIbcTransactionType + HasPacketType { async fn handle_ibc_transaction( &mut self, diff --git a/crates/ibc/ibc-components/src/traits/nonce.rs b/crates/ibc/ibc-components/src/traits/nonce.rs index 731a93ca9..31d2c74bd 100644 --- a/crates/ibc/ibc-components/src/traits/nonce.rs +++ b/crates/ibc/ibc-components/src/traits/nonce.rs @@ -9,7 +9,7 @@ use crate::traits::types::packet::nonce::HasPacketNonceType; }] #[async_trait] pub trait CanAllocatePacketNonce: - HasPacketNonceType + HasChannelIdType + HasErrorType + HasPacketNonceType + HasChannelIdType + HasAsyncErrorType where Counterparty: HasChannelIdType, { diff --git a/crates/ibc/ibc-components/src/traits/queries/client_id.rs b/crates/ibc/ibc-components/src/traits/queries/client_id.rs index 7fa8e065c..8eb5063b0 100644 --- a/crates/ibc/ibc-components/src/traits/queries/client_id.rs +++ b/crates/ibc/ibc-components/src/traits/queries/client_id.rs @@ -8,7 +8,7 @@ use hermes_chain_type_components::traits::types::ibc::client_id::HasClientIdType }] #[async_trait] pub trait CanQueryClientIdFromChannelId: - HasChannelIdType + HasClientIdType + HasErrorType + HasChannelIdType + HasClientIdType + HasAsyncErrorType { async fn query_client_id_from_channel_id( &self, diff --git a/crates/ibc/ibc-components/src/traits/queries/consensus_state.rs b/crates/ibc/ibc-components/src/traits/queries/consensus_state.rs index 5d29c5667..9919cc350 100644 --- a/crates/ibc/ibc-components/src/traits/queries/consensus_state.rs +++ b/crates/ibc/ibc-components/src/traits/queries/consensus_state.rs @@ -9,7 +9,7 @@ use hermes_chain_type_components::traits::types::ibc::consensus_state::HasConsen }] #[async_trait] pub trait CanQueryConsensusState: - HasErrorType + HasClientIdType + HasAsyncErrorType + HasClientIdType where Counterparty: HasHeightType + HasConsensusStateType, { diff --git a/crates/ibc/ibc-components/src/traits/queries/recv_packet_commitment.rs b/crates/ibc/ibc-components/src/traits/queries/recv_packet_commitment.rs index 9825db8ca..829e36a93 100644 --- a/crates/ibc/ibc-components/src/traits/queries/recv_packet_commitment.rs +++ b/crates/ibc/ibc-components/src/traits/queries/recv_packet_commitment.rs @@ -9,7 +9,7 @@ use crate::traits::types::packet::nonce::HasPacketNonceType; }] #[async_trait] pub trait CanQueryHasPacketReceived: - HasChannelIdType + HasErrorType + HasChannelIdType + HasAsyncErrorType where Counterparty: HasChannelIdType + HasPacketNonceType, { diff --git a/crates/ibc/ibc-components/src/traits/queries/send_packet_commitment.rs b/crates/ibc/ibc-components/src/traits/queries/send_packet_commitment.rs index 72592829a..a455ca65f 100644 --- a/crates/ibc/ibc-components/src/traits/queries/send_packet_commitment.rs +++ b/crates/ibc/ibc-components/src/traits/queries/send_packet_commitment.rs @@ -10,7 +10,7 @@ use crate::traits::types::packet::packet::HasPacketType; }] #[async_trait] pub trait CanQuerySendPacketCommitment: - HasPacketType + HasChannelIdType + HasErrorType + HasPacketType + HasChannelIdType + HasAsyncErrorType where Counterparty: HasChannelIdType + HasPacketNonceType, { diff --git a/crates/ibc/ibc-components/src/traits/types/app_id.rs b/crates/ibc/ibc-components/src/traits/types/app_id.rs index ae57bdd55..51e57a5ec 100644 --- a/crates/ibc/ibc-components/src/traits/types/app_id.rs +++ b/crates/ibc/ibc-components/src/traits/types/app_id.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/commitment/proof.rs b/crates/ibc/ibc-components/src/traits/types/commitment/proof.rs index b3586243f..dd22dbea0 100644 --- a/crates/ibc/ibc-components/src/traits/types/commitment/proof.rs +++ b/crates/ibc/ibc-components/src/traits/types/commitment/proof.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/message_header.rs b/crates/ibc/ibc-components/src/traits/types/message_header.rs index c038deeab..406484858 100644 --- a/crates/ibc/ibc-components/src/traits/types/message_header.rs +++ b/crates/ibc/ibc-components/src/traits/types/message_header.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/packet/header.rs b/crates/ibc/ibc-components/src/traits/types/packet/header.rs index 1bcdbe616..331564994 100644 --- a/crates/ibc/ibc-components/src/traits/types/packet/header.rs +++ b/crates/ibc/ibc-components/src/traits/types/packet/header.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/packet/nonce.rs b/crates/ibc/ibc-components/src/traits/types/packet/nonce.rs index 60dd8f0e6..415e80f5c 100644 --- a/crates/ibc/ibc-components/src/traits/types/packet/nonce.rs +++ b/crates/ibc/ibc-components/src/traits/types/packet/nonce.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/packet/packet.rs b/crates/ibc/ibc-components/src/traits/types/packet/packet.rs index 813a1cb34..787de69b7 100644 --- a/crates/ibc/ibc-components/src/traits/types/packet/packet.rs +++ b/crates/ibc/ibc-components/src/traits/types/packet/packet.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; /** diff --git a/crates/ibc/ibc-components/src/traits/types/packet/timeout.rs b/crates/ibc/ibc-components/src/traits/types/packet/timeout.rs index 1dff519b7..53fe9955e 100644 --- a/crates/ibc/ibc-components/src/traits/types/packet/timeout.rs +++ b/crates/ibc/ibc-components/src/traits/types/packet/timeout.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/payload/data.rs b/crates/ibc/ibc-components/src/traits/types/payload/data.rs index 2f95366f8..fc1ea67ad 100644 --- a/crates/ibc/ibc-components/src/traits/types/payload/data.rs +++ b/crates/ibc/ibc-components/src/traits/types/payload/data.rs @@ -1,5 +1,5 @@ use cgp::core::component::{UseDelegate, WithProvider}; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; use crate::types::with_app_provider::WithAppProvider; diff --git a/crates/ibc/ibc-components/src/traits/types/payload/header.rs b/crates/ibc/ibc-components/src/traits/types/payload/header.rs index fe8b9d5aa..09c93772f 100644 --- a/crates/ibc/ibc-components/src/traits/types/payload/header.rs +++ b/crates/ibc/ibc-components/src/traits/types/payload/header.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/traits/types/payload/payload.rs b/crates/ibc/ibc-components/src/traits/types/payload/payload.rs index 1a6516da5..310a39c74 100644 --- a/crates/ibc/ibc-components/src/traits/types/payload/payload.rs +++ b/crates/ibc/ibc-components/src/traits/types/payload/payload.rs @@ -1,5 +1,5 @@ use cgp::core::component::WithProvider; -use cgp::core::types::traits::ProvideType; +use cgp::core::types::ProvideType; use cgp::prelude::*; #[cgp_component { diff --git a/crates/ibc/ibc-components/src/types/packet.rs b/crates/ibc/ibc-components/src/types/packet.rs index 75c44fc8f..be2ddaf2e 100644 --- a/crates/ibc/ibc-components/src/types/packet.rs +++ b/crates/ibc/ibc-components/src/types/packet.rs @@ -38,7 +38,7 @@ where + HasPacketNonceType + HasPayloadType + HasPacketType> - + HasErrorType, + + HasAsyncErrorType, Counterparty: Async, { fn build_packet( diff --git a/crates/ibc/ibc-mock-chain/src/components/chain.rs b/crates/ibc/ibc-mock-chain/src/components/chain.rs index 191971688..cccdc9f2e 100644 --- a/crates/ibc/ibc-mock-chain/src/components/chain.rs +++ b/crates/ibc/ibc-mock-chain/src/components/chain.rs @@ -2,7 +2,7 @@ use alloc::string::String; use cgp::core::component::{UseDelegate, WithProvider}; use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; -use cgp::core::types::impls::{UseDelegatedType, WithType}; +use cgp::core::types::{UseDelegatedType, WithType}; use cgp::prelude::*; use hermes_chain_type_components::traits::types::address::AddressTypeComponent; use hermes_chain_type_components::traits::types::height::HeightTypeComponent; diff --git a/crates/ibc/ibc-mock-chain/src/contexts/chain.rs b/crates/ibc/ibc-mock-chain/src/contexts/chain.rs index 229f84cd7..452554aff 100644 --- a/crates/ibc/ibc-mock-chain/src/contexts/chain.rs +++ b/crates/ibc/ibc-mock-chain/src/contexts/chain.rs @@ -227,7 +227,7 @@ impl Default for MockChainState; pub type MockChainB = MockChain; -pub trait CanUseMockChain: HasErrorType +pub trait CanUseMockChain: HasAsyncErrorType + HasHeightType> + HasTimeType